I'm looking for
LuaEntity::has_sticker(name) → boolean
LuaEntity::add_sticker(name)
LuaEntity::remove_sticker(name) → boolean (whether the entity had the said sticker so it is removed successfully)
There is so much potential for the sticker system.
![Razz :P](./images/smilies/icon_razz.gif)
Code: Select all
biter.surface.create_entity{ name="slowdown-sticker", position=biter.position, target=biter }
Code: Select all
for _,e in pairs(biter.surface.find_entities_filtered{type="sticker", area=biter.bounding_box}) do
e.destroy()
end
For such a small area a bounding box search vs a position search is almost identical performance wise.Mooncat wrote:Wow, that's great! Don't know the "target" parameter can be used for sticker.
hm... I wonder the performance impact of using find_entities_filtered to remove stickers. Really not a fan of using such a search function since you already know the sticker is on the biter.![]()
But yes, I can use this before the actual implementation. Thanks!
That's awesome! Thanks!Rseding91 wrote:For such a small area a bounding box search vs a position search is almost identical performance wise.Mooncat wrote:Wow, that's great! Don't know the "target" parameter can be used for sticker.
hm... I wonder the performance impact of using find_entities_filtered to remove stickers. Really not a fan of using such a search function since you already know the sticker is on the biter.![]()
But yes, I can use this before the actual implementation. Thanks!
I think biters already keep track of what stickers are attached to them so I'll just add the ability to read stickers off a biter for 0.15.