]> git.lizzy.rs Git - dragonfireclient.git/blob - src/nodedef.h
51f930e55beddd295fd628febd4debf97feb7f28
[dragonfireclient.git] / src / nodedef.h
1 /*
2 Minetest
3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #pragma once
21
22 #include "irrlichttypes_bloated.h"
23 #include <string>
24 #include <iostream>
25 #include <map>
26 #include "mapnode.h"
27 #include "nameidmapping.h"
28 #ifndef SERVER
29 #include "client/tile.h"
30 #include <IMeshManipulator.h>
31 class Client;
32 #endif
33 #include "itemgroup.h"
34 #include "sound.h" // SimpleSoundSpec
35 #include "constants.h" // BS
36 #include "tileanimation.h"
37
38 class IItemDefManager;
39 class ITextureSource;
40 class IShaderSource;
41 class IGameDef;
42 class NodeResolver;
43
44 enum ContentParamType
45 {
46         CPT_NONE,
47         CPT_LIGHT,
48 };
49
50 enum ContentParamType2
51 {
52         CPT2_NONE,
53         // Need 8-bit param2
54         CPT2_FULL,
55         // Flowing liquid properties
56         CPT2_FLOWINGLIQUID,
57         // Direction for chests and furnaces and such
58         CPT2_FACEDIR,
59         // Direction for signs, torches and such
60         CPT2_WALLMOUNTED,
61         // Block level like FLOWINGLIQUID
62         CPT2_LEVELED,
63         // 2D rotation for things like plants
64         CPT2_DEGROTATE,
65         // Mesh options for plants
66         CPT2_MESHOPTIONS,
67         // Index for palette
68         CPT2_COLOR,
69         // 3 bits of palette index, then facedir
70         CPT2_COLORED_FACEDIR,
71         // 5 bits of palette index, then wallmounted
72         CPT2_COLORED_WALLMOUNTED,
73         // Glasslike framed drawtype internal liquid level, param2 values 0 to 63
74         CPT2_GLASSLIKE_LIQUID_LEVEL,
75 };
76
77 enum LiquidType
78 {
79         LIQUID_NONE,
80         LIQUID_FLOWING,
81         LIQUID_SOURCE,
82 };
83
84 enum NodeBoxType
85 {
86         NODEBOX_REGULAR, // Regular block; allows buildable_to
87         NODEBOX_FIXED, // Static separately defined box(es)
88         NODEBOX_WALLMOUNTED, // Box for wall mounted nodes; (top, bottom, side)
89         NODEBOX_LEVELED, // Same as fixed, but with dynamic height from param2. for snow, ...
90         NODEBOX_CONNECTED, // optionally draws nodeboxes if a neighbor node attaches
91 };
92
93 struct NodeBox
94 {
95         enum NodeBoxType type;
96         // NODEBOX_REGULAR (no parameters)
97         // NODEBOX_FIXED
98         std::vector<aabb3f> fixed;
99         // NODEBOX_WALLMOUNTED
100         aabb3f wall_top;
101         aabb3f wall_bottom;
102         aabb3f wall_side; // being at the -X side
103         // NODEBOX_CONNECTED
104         std::vector<aabb3f> connect_top;
105         std::vector<aabb3f> connect_bottom;
106         std::vector<aabb3f> connect_front;
107         std::vector<aabb3f> connect_left;
108         std::vector<aabb3f> connect_back;
109         std::vector<aabb3f> connect_right;
110         std::vector<aabb3f> disconnected_top;
111         std::vector<aabb3f> disconnected_bottom;
112         std::vector<aabb3f> disconnected_front;
113         std::vector<aabb3f> disconnected_left;
114         std::vector<aabb3f> disconnected_back;
115         std::vector<aabb3f> disconnected_right;
116         std::vector<aabb3f> disconnected;
117         std::vector<aabb3f> disconnected_sides;
118
119         NodeBox()
120         { reset(); }
121
122         void reset();
123         void serialize(std::ostream &os, u16 protocol_version) const;
124         void deSerialize(std::istream &is);
125 };
126
127 struct MapNode;
128 class NodeMetadata;
129
130 enum LeavesStyle {
131         LEAVES_FANCY,
132         LEAVES_SIMPLE,
133         LEAVES_OPAQUE,
134 };
135
136 enum AutoScale : u8 {
137         AUTOSCALE_DISABLE,
138         AUTOSCALE_ENABLE,
139         AUTOSCALE_FORCE,
140 };
141
142 enum WorldAlignMode : u8 {
143         WORLDALIGN_DISABLE,
144         WORLDALIGN_ENABLE,
145         WORLDALIGN_FORCE,
146         WORLDALIGN_FORCE_NODEBOX,
147 };
148
149 class TextureSettings {
150 public:
151         LeavesStyle leaves_style;
152         WorldAlignMode world_aligned_mode;
153         AutoScale autoscale_mode;
154         int node_texture_size;
155         bool opaque_water;
156         bool connected_glass;
157         bool use_normal_texture;
158         bool enable_mesh_cache;
159         bool enable_minimap;
160
161         TextureSettings() = default;
162
163         void readSettings();
164 };
165
166 enum NodeDrawType
167 {
168         // A basic solid block
169         NDT_NORMAL,
170         // Nothing is drawn
171         NDT_AIRLIKE,
172         // Do not draw face towards same kind of flowing/source liquid
173         NDT_LIQUID,
174         // A very special kind of thing
175         NDT_FLOWINGLIQUID,
176         // Glass-like, don't draw faces towards other glass
177         NDT_GLASSLIKE,
178         // Leaves-like, draw all faces no matter what
179         NDT_ALLFACES,
180         // Enabled -> ndt_allfaces, disabled -> ndt_normal
181         NDT_ALLFACES_OPTIONAL,
182         // Single plane perpendicular to a surface
183         NDT_TORCHLIKE,
184         // Single plane parallel to a surface
185         NDT_SIGNLIKE,
186         // 2 vertical planes in a 'X' shape diagonal to XZ axes.
187         // paramtype2 = "meshoptions" allows various forms, sizes and
188         // vertical and horizontal random offsets.
189         NDT_PLANTLIKE,
190         // Fenceposts that connect to neighbouring fenceposts with horizontal bars
191         NDT_FENCELIKE,
192         // Selects appropriate junction texture to connect like rails to
193         // neighbouring raillikes.
194         NDT_RAILLIKE,
195         // Custom Lua-definable structure of multiple cuboids
196         NDT_NODEBOX,
197         // Glass-like, draw connected frames and all visible faces.
198         // param2 > 0 defines 64 levels of internal liquid
199         // Uses 3 textures, one for frames, second for faces,
200         // optional third is a 'special tile' for the liquid.
201         NDT_GLASSLIKE_FRAMED,
202         // Draw faces slightly rotated and only on neighbouring nodes
203         NDT_FIRELIKE,
204         // Enabled -> ndt_glasslike_framed, disabled -> ndt_glasslike
205         NDT_GLASSLIKE_FRAMED_OPTIONAL,
206         // Uses static meshes
207         NDT_MESH,
208         // Combined plantlike-on-solid
209         NDT_PLANTLIKE_ROOTED,
210 };
211
212 // Mesh options for NDT_PLANTLIKE with CPT2_MESHOPTIONS
213 static const u8 MO_MASK_STYLE          = 0x07;
214 static const u8 MO_BIT_RANDOM_OFFSET   = 0x08;
215 static const u8 MO_BIT_SCALE_SQRT2     = 0x10;
216 static const u8 MO_BIT_RANDOM_OFFSET_Y = 0x20;
217 enum PlantlikeStyle {
218         PLANT_STYLE_CROSS,
219         PLANT_STYLE_CROSS2,
220         PLANT_STYLE_STAR,
221         PLANT_STYLE_HASH,
222         PLANT_STYLE_HASH2,
223 };
224
225 enum AlignStyle : u8 {
226         ALIGN_STYLE_NODE,
227         ALIGN_STYLE_WORLD,
228         ALIGN_STYLE_USER_DEFINED,
229 };
230
231 /*
232         Stand-alone definition of a TileSpec (basically a server-side TileSpec)
233 */
234
235 struct TileDef
236 {
237         std::string name = "";
238         bool backface_culling = true; // Takes effect only in special cases
239         bool tileable_horizontal = true;
240         bool tileable_vertical = true;
241         //! If true, the tile has its own color.
242         bool has_color = false;
243         //! The color of the tile.
244         video::SColor color = video::SColor(0xFFFFFFFF);
245         AlignStyle align_style = ALIGN_STYLE_NODE;
246         u8 scale = 0;
247
248         struct TileAnimationParams animation;
249
250         TileDef()
251         {
252                 animation.type = TAT_NONE;
253         }
254
255         void serialize(std::ostream &os, u16 protocol_version) const;
256         void deSerialize(std::istream &is, u8 contentfeatures_version,
257                 NodeDrawType drawtype);
258 };
259
260 #define CF_SPECIAL_COUNT 6
261
262 struct ContentFeatures
263 {
264         /*
265                 Cached stuff
266          */
267 #ifndef SERVER
268         // 0     1     2     3     4     5
269         // up    down  right left  back  front
270         TileSpec tiles[6];
271         // Special tiles
272         // - Currently used for flowing liquids
273         TileSpec special_tiles[CF_SPECIAL_COUNT];
274         u8 solidness; // Used when choosing which face is drawn
275         u8 visual_solidness; // When solidness=0, this tells how it looks like
276         bool backface_culling;
277 #endif
278
279         // Server-side cached callback existence for fast skipping
280         bool has_on_construct;
281         bool has_on_destruct;
282         bool has_after_destruct;
283
284         /*
285                 Actual data
286          */
287
288         // --- GENERAL PROPERTIES ---
289
290         std::string name; // "" = undefined node
291         ItemGroupList groups; // Same as in itemdef
292         // Type of MapNode::param1
293         ContentParamType param_type;
294         // Type of MapNode::param2
295         ContentParamType2 param_type_2;
296
297         // --- VISUAL PROPERTIES ---
298
299         enum NodeDrawType drawtype;
300         std::string mesh;
301 #ifndef SERVER
302         scene::IMesh *mesh_ptr[24];
303         video::SColor minimap_color;
304 #endif
305         float visual_scale; // Misc. scale parameter
306         TileDef tiledef[6];
307         // These will be drawn over the base tiles.
308         TileDef tiledef_overlay[6];
309         TileDef tiledef_special[CF_SPECIAL_COUNT]; // eg. flowing liquid
310         // If 255, the node is opaque.
311         // Otherwise it uses texture alpha.
312         u8 alpha;
313         // The color of the node.
314         video::SColor color;
315         std::string palette_name;
316         std::vector<video::SColor> *palette;
317         // Used for waving leaves/plants
318         u8 waving;
319         // for NDT_CONNECTED pairing
320         u8 connect_sides;
321         std::vector<std::string> connects_to;
322         std::vector<content_t> connects_to_ids;
323         // Post effect color, drawn when the camera is inside the node.
324         video::SColor post_effect_color;
325         // Flowing liquid or snow, value = default level
326         u8 leveled;
327
328         // --- LIGHTING-RELATED ---
329
330         bool light_propagates;
331         bool sunlight_propagates;
332         // Amount of light the node emits
333         u8 light_source;
334
335         // --- MAP GENERATION ---
336
337         // True for all ground-like things like stone and mud, false for eg. trees
338         bool is_ground_content;
339
340         // --- INTERACTION PROPERTIES ---
341
342         // This is used for collision detection.
343         // Also for general solidness queries.
344         bool walkable;
345         // Player can point to these
346         bool pointable;
347         // Player can dig these
348         bool diggable;
349         // Player can climb these
350         bool climbable;
351         // Player can build on these
352         bool buildable_to;
353         // Player cannot build to these (placement prediction disabled)
354         bool rightclickable;
355         u32 damage_per_second;
356         // client dig prediction
357         std::string node_dig_prediction;
358
359         // --- LIQUID PROPERTIES ---
360
361         // Whether the node is non-liquid, source liquid or flowing liquid
362         enum LiquidType liquid_type;
363         // If the content is liquid, this is the flowing version of the liquid.
364         std::string liquid_alternative_flowing;
365         // If the content is liquid, this is the source version of the liquid.
366         std::string liquid_alternative_source;
367         // Viscosity for fluid flow, ranging from 1 to 7, with
368         // 1 giving almost instantaneous propagation and 7 being
369         // the slowest possible
370         u8 liquid_viscosity;
371         // Is liquid renewable (new liquid source will be created between 2 existing)
372         bool liquid_renewable;
373         // Number of flowing liquids surrounding source
374         u8 liquid_range;
375         u8 drowning;
376         // Liquids flow into and replace node
377         bool floodable;
378
379         // --- NODEBOXES ---
380
381         NodeBox node_box;
382         NodeBox selection_box;
383         NodeBox collision_box;
384
385         // --- SOUND PROPERTIES ---
386
387         SimpleSoundSpec sound_footstep;
388         SimpleSoundSpec sound_dig;
389         SimpleSoundSpec sound_dug;
390
391         // --- LEGACY ---
392
393         // Compatibility with old maps
394         // Set to true if paramtype used to be 'facedir_simple'
395         bool legacy_facedir_simple;
396         // Set to true if wall_mounted used to be set to true
397         bool legacy_wallmounted;
398
399         /*
400                 Methods
401         */
402
403         ContentFeatures();
404         ~ContentFeatures() = default;
405         void reset();
406         void serialize(std::ostream &os, u16 protocol_version) const;
407         void deSerialize(std::istream &is);
408         /*!
409          * Since vertex alpha is no longer supported, this method
410          * adds opacity directly to the texture pixels.
411          *
412          * \param tiles array of the tile definitions.
413          * \param length length of tiles
414          */
415         void correctAlpha(TileDef *tiles, int length);
416
417         /*
418                 Some handy methods
419         */
420         bool isLiquid() const{
421                 return (liquid_type != LIQUID_NONE);
422         }
423         bool sameLiquid(const ContentFeatures &f) const{
424                 if(!isLiquid() || !f.isLiquid()) return false;
425                 return (liquid_alternative_flowing == f.liquid_alternative_flowing);
426         }
427
428         int getGroup(const std::string &group) const
429         {
430                 return itemgroup_get(groups, group);
431         }
432
433 #ifndef SERVER
434         void updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc,
435                 scene::IMeshManipulator *meshmanip, Client *client, const TextureSettings &tsettings);
436 #endif
437 };
438
439 /*!
440  * @brief This class is for getting the actual properties of nodes from their
441  * content ID.
442  *
443  * @details The nodes on the map are represented by three numbers (see MapNode).
444  * The first number (param0) is the type of a node. All node types have own
445  * properties (see ContentFeatures). This class is for storing and getting the
446  * properties of nodes.
447  * The manager is first filled with registered nodes, then as the game begins,
448  * functions only get `const` pointers to it, to prevent modification of
449  * registered nodes.
450  */
451 class NodeDefManager {
452 public:
453         /*!
454          * Creates a NodeDefManager, and registers three ContentFeatures:
455          * \ref CONTENT_AIR, \ref CONTENT_UNKNOWN and \ref CONTENT_IGNORE.
456          */
457         NodeDefManager();
458         ~NodeDefManager();
459
460         /*!
461          * Returns the properties for the given content type.
462          * @param c content type of a node
463          * @return properties of the given content type, or \ref CONTENT_UNKNOWN
464          * if the given content type is not registered.
465          */
466         inline const ContentFeatures& get(content_t c) const {
467                 return
468                         c < m_content_features.size() ?
469                                 m_content_features[c] : m_content_features[CONTENT_UNKNOWN];
470         }
471
472         /*!
473          * Returns the properties of the given node.
474          * @param n a map node
475          * @return properties of the given node or @ref CONTENT_UNKNOWN if the
476          * given content type is not registered.
477          */
478         inline const ContentFeatures& get(const MapNode &n) const {
479                 return get(n.getContent());
480         }
481
482         /*!
483          * Returns the node properties for a node name.
484          * @param name name of a node
485          * @return properties of the given node or @ref CONTENT_UNKNOWN if
486          * not found
487          */
488         const ContentFeatures& get(const std::string &name) const;
489
490         /*!
491          * Returns the content ID for the given name.
492          * @param name a node name
493          * @param[out] result will contain the content ID if found, otherwise
494          * remains unchanged
495          * @return true if the ID was found, false otherwise
496          */
497         bool getId(const std::string &name, content_t &result) const;
498
499         /*!
500          * Returns the content ID for the given name.
501          * @param name a node name
502          * @return ID of the node or @ref CONTENT_IGNORE if not found
503          */
504         content_t getId(const std::string &name) const;
505
506         /*!
507          * Returns the content IDs of the given node name or node group name.
508          * Group names start with "group:".
509          * @param name a node name or node group name
510          * @param[out] result will be appended with matching IDs
511          * @return true if `name` is a valid node name or a (not necessarily
512          * valid) group name
513          */
514         bool getIds(const std::string &name, std::vector<content_t> &result) const;
515
516         /*!
517          * Returns the smallest box in integer node coordinates that
518          * contains all nodes' selection boxes. The returned box might be larger
519          * than the minimal size if the largest node is removed from the manager.
520          */
521         inline core::aabbox3d<s16> getSelectionBoxIntUnion() const {
522                 return m_selection_box_int_union;
523         }
524
525         /*!
526          * Checks whether a node connects to an adjacent node.
527          * @param from the node to be checked
528          * @param to the adjacent node
529          * @param connect_face a bit field indicating which face of the node is
530          * adjacent to the other node.
531          * Bits: +y (least significant), -y, -z, -x, +z, +x (most significant).
532          * @return true if the node connects, false otherwise
533          */
534         bool nodeboxConnects(MapNode from, MapNode to,
535                         u8 connect_face) const;
536
537         /*!
538          * Registers a NodeResolver to wait for the registration of
539          * ContentFeatures. Once the node registration finishes, all
540          * listeners are notified.
541          */
542         void pendNodeResolve(NodeResolver *nr) const;
543
544         /*!
545          * Stops listening to the NodeDefManager.
546          * @return true if the listener was registered before, false otherwise
547          */
548         bool cancelNodeResolveCallback(NodeResolver *nr) const;
549
550         /*!
551          * Registers a new node type with the given name and allocates a new
552          * content ID.
553          * Should not be called with an already existing name.
554          * @param name name of the node, must match with `def.name`.
555          * @param def definition of the registered node type.
556          * @return ID of the registered node or @ref CONTENT_IGNORE if
557          * the function could not allocate an ID.
558          */
559         content_t set(const std::string &name, const ContentFeatures &def);
560
561         /*!
562          * Allocates a blank node ID for the given name.
563          * @param name name of a node
564          * @return allocated ID or @ref CONTENT_IGNORE if could not allocate
565          * an ID.
566          */
567         content_t allocateDummy(const std::string &name);
568
569         /*!
570          * Removes the given node name from the manager.
571          * The node ID will remain in the manager, but won't be linked to any name.
572          * @param name name to be removed
573          */
574         void removeNode(const std::string &name);
575
576         /*!
577          * Regenerates the alias list (a map from names to node IDs).
578          * @param idef the item definition manager containing alias information
579          */
580         void updateAliases(IItemDefManager *idef);
581
582         /*!
583          * Reads the used texture pack's override.txt, and replaces the textures
584          * of registered nodes with the ones specified there.
585          *
586          * Format of the input file: in each line
587          * `node_name top|bottom|right|left|front|back|all|*|sides texture_name.png`
588          *
589          * @param override_filepath path to 'texturepack/override.txt'
590          */
591         void applyTextureOverrides(const std::string &override_filepath);
592
593         /*!
594          * Only the client uses this. Loads textures and shaders required for
595          * rendering the nodes.
596          * @param gamedef must be a Client.
597          * @param progress_cbk called each time a node is loaded. Arguments:
598          * `progress_cbk_args`, number of loaded ContentFeatures, number of
599          * total ContentFeatures.
600          * @param progress_cbk_args passed to the callback function
601          */
602         void updateTextures(IGameDef *gamedef,
603                 void (*progress_cbk)(void *progress_args, u32 progress, u32 max_progress),
604                 void *progress_cbk_args);
605
606         /*!
607          * Writes the content of this manager to the given output stream.
608          * @param protocol_version serialization version of ContentFeatures
609          */
610         void serialize(std::ostream &os, u16 protocol_version) const;
611
612         /*!
613          * Restores the manager from a serialized stream.
614          * This clears the previous state.
615          * @param is input stream containing a serialized NodeDefManager
616          */
617         void deSerialize(std::istream &is);
618
619         /*!
620          * Used to indicate that node registration has finished.
621          * @param completed tells whether registration is complete
622          */
623         inline void setNodeRegistrationStatus(bool completed) {
624                 m_node_registration_complete = completed;
625         }
626
627         /*!
628          * Notifies the registered NodeResolver instances that node registration
629          * has finished, then unregisters all listeners.
630          * Must be called after node registration has finished!
631          */
632         void runNodeResolveCallbacks();
633
634         /*!
635          * Sets the registration completion flag to false and unregisters all
636          * NodeResolver instances listening to the manager.
637          */
638         void resetNodeResolveState();
639
640         /*!
641          * Resolves the IDs to which connecting nodes connect from names.
642          * Must be called after node registration has finished!
643          */
644         void mapNodeboxConnections();
645
646 private:
647         /*!
648          * Resets the manager to its initial state.
649          * See the documentation of the constructor.
650          */
651         void clear();
652
653         /*!
654          * Allocates a new content ID, and returns it.
655          * @return the allocated ID or \ref CONTENT_IGNORE if could not allocate
656          */
657         content_t allocateId();
658
659         /*!
660          * Binds the given content ID and node name.
661          * Registers them in \ref m_name_id_mapping and
662          * \ref m_name_id_mapping_with_aliases.
663          * @param i a content ID
664          * @param name a node name
665          */
666         void addNameIdMapping(content_t i, std::string name);
667
668         /*!
669          * Recalculates m_selection_box_int_union based on
670          * m_selection_box_union.
671          */
672         void fixSelectionBoxIntUnion();
673
674         //! Features indexed by ID.
675         std::vector<ContentFeatures> m_content_features;
676
677         //! A mapping for fast conversion between names and IDs
678         NameIdMapping m_name_id_mapping;
679
680         /*!
681          * Like @ref m_name_id_mapping, but maps only from names to IDs, and
682          * includes aliases too. Updated by \ref updateAliases().
683          * Note: Not serialized.
684          */
685         std::unordered_map<std::string, content_t> m_name_id_mapping_with_aliases;
686
687         /*!
688          * A mapping from group names to a vector of content types that belong
689          * to it. Necessary for a direct lookup in \ref getIds().
690          * Note: Not serialized.
691          */
692         std::unordered_map<std::string, std::vector<content_t>> m_group_to_items;
693
694         /*!
695          * The next ID that might be free to allocate.
696          * It can be allocated already, because \ref CONTENT_AIR,
697          * \ref CONTENT_UNKNOWN and \ref CONTENT_IGNORE are registered when the
698          * manager is initialized, and new IDs are allocated from 0.
699          */
700         content_t m_next_id;
701
702         //! True if all nodes have been registered.
703         bool m_node_registration_complete;
704
705         /*!
706          * The union of all nodes' selection boxes.
707          * Might be larger if big nodes are removed from the manager.
708          */
709         aabb3f m_selection_box_union;
710
711         /*!
712          * The smallest box in integer node coordinates that
713          * contains all nodes' selection boxes.
714          * Might be larger if big nodes are removed from the manager.
715          */
716         core::aabbox3d<s16> m_selection_box_int_union;
717
718         /*!
719          * NodeResolver instances to notify once node registration has finished.
720          * Even constant NodeDefManager instances can register listeners.
721          */
722         mutable std::vector<NodeResolver *> m_pending_resolve_callbacks;
723 };
724
725 NodeDefManager *createNodeDefManager();
726
727 class NodeResolver {
728 public:
729         NodeResolver();
730         virtual ~NodeResolver();
731         virtual void resolveNodeNames() = 0;
732
733         bool getIdFromNrBacklog(content_t *result_out,
734                 const std::string &node_alt, content_t c_fallback,
735                 bool error_on_fallback = true);
736         bool getIdsFromNrBacklog(std::vector<content_t> *result_out,
737                 bool all_required = false, content_t c_fallback = CONTENT_IGNORE);
738
739         void nodeResolveInternal();
740
741         u32 m_nodenames_idx = 0;
742         u32 m_nnlistsizes_idx = 0;
743         std::vector<std::string> m_nodenames;
744         std::vector<size_t> m_nnlistsizes;
745         const NodeDefManager *m_ndef = nullptr;
746         bool m_resolve_done = false;
747 };