Page 1 of 1
regenerate_decorative not on top of belts/rails
Posted: Sun Mar 04, 2018 3:40 pm
by hreintke
Hi,
When running regenerate_decorative on an existing chunk it places new decoratives on top of belts/trains.
Would like to have the function only next to but not over existing entities.
- regenerated_decorative.JPG (100.46 KiB) Viewed 1412 times
- regenerated_decorative_rail.JPG (84.6 KiB) Viewed 1412 times
Re: regenerate_decorative not on top of belts/rails
Posted: Sun Mar 04, 2018 4:06 pm
by Rseding91
Regenerate decorative has no such logic built into it and I'm not going to add it in because it would be extremely expensive to do.
It uses the same logic that normal map generation uses just during normal generation the entities are placed after decoratives so they remove them partially.
Re: regenerate_decorative not on top of belts/rails
Posted: Sun Mar 04, 2018 4:30 pm
by hreintke
Bad luck.
Expected to be easy as the create_decoratives() hase the option.
Code: Select all
create_decoratives{check_collision=…, decoratives=…}
Adds the given decoratives to the surface.
Each Decorative is
name :: string
position :: Position
amount :: uint8
Parameters
Table with the following fields:
check_collision :: boolean (optional): If collision should be checked against entities/tiles.
decoratives :: array of Decorative
I think I cannot solve it myself because I have no possibilty to find/manipulate decoratives. Correct ?
Re: regenerate_decorative not on top of belts/rails
Posted: Sun Mar 04, 2018 10:10 pm
by eradicator
hreintke wrote:
I think I cannot solve it myself because I have no possibilty to find/manipulate decoratives. Correct ?
There's at least: LuaSurface.destroy_decoratives, running that on the collision_box of every entity you want cleared won't be cheap though.