New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decorations: Generalise 'spawn by' to be used by all decoration types #4520
Conversation
return true; | ||
|
||
int nneighs = 0; | ||
v3s16 dirs[16] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should make this static const.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
Updated with requests. |
@@ -338,16 +338,63 @@ DecoSchematic::DecoSchematic() | |||
} | |||
|
|||
|
|||
size_t DecoSchematic::generate(MMVManip *vm, PcgRandom *pr, v3s16 p) | |||
bool DecoSchematic::canPlaceSchematicDecoration(MMVManip *vm, v3s16 p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I missing something or is this function identical to canPlaceSimpleDecoration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first few lines are different, but those can be moved into 'generate' to allow de-duplicating this code, good idea will try this.
The commit message is a bit misleading. |
Seems correct to me but will update commit message. |
In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
Updated with all requests. Retested. |
👍 |
In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
/////////////////////////////////////////////////
Requested in #4463
Tested.
To keep this simple just the placement point of the schematic is considered for 'spawn by', as this is for use with the flags 'place centre x' 'place centre z' and will usually be used for schematic trees which have a central trunk.