mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Schematics: Refactor NodeResolver and add NodeResolveMethod
NodeResolver name lists now belong to the NodeResolver object instead of the associated NodeDefManager. In addition to minimizing unnecessary abstraction and overhead, this move permits NodeResolvers to look up nodes that they had previously set pending for resolution. So far, this functionality has been used in the case of schematics for serialization/deserialization.
This commit is contained in:
parent
0c634a9719
commit
479f38973e
17 changed files with 493 additions and 458 deletions
|
@ -79,7 +79,7 @@ public:
|
|||
Decoration();
|
||||
virtual ~Decoration();
|
||||
|
||||
virtual void resolveNodeNames(NodeResolveInfo *nri);
|
||||
virtual void resolveNodeNames();
|
||||
|
||||
size_t placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
|
||||
//size_t placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
s16 deco_height_max;
|
||||
s16 nspawnby;
|
||||
|
||||
virtual void resolveNodeNames(NodeResolveInfo *nri);
|
||||
virtual void resolveNodeNames();
|
||||
|
||||
bool canPlaceDecoration(MMVManip *vm, v3s16 p);
|
||||
virtual size_t generate(MMVManip *vm, PseudoRandom *pr, v3s16 p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue