Page 1 of 1

Difference between LuaEntity::revive() and LuaEntity::silent_revive()

Posted: Fri Apr 19, 2024 6:36 am
by Pi-C
What is the difference between LuaEntity::revive() and LuaEntity::silent_revive()? Their descriptions look very similar, they seem to be almost identical:

Code: Select all

$ diff /tmp/revive.txt /tmp/silent_revive.txt 
2c2
< revive{return_item_request_proxy?=…, raise_revive?=…}  → dictionary[string → uint]?, LuaEntity?, LuaEntity?
---
> silent_revive{return_item_request_proxy?=…, raise_revive?=…}  → dictionary[string → uint]?, LuaEntity?, LuaEntity?
4c4
< Revive a ghost. I.e. turn it from a ghost to a real entity or tile.
---
> Revives a ghost silently.
9c9
< If true the function will return item request proxy as the third return value.
---
> If true the function will return item request proxy as the third parameter.
$
Both can be called with the flag raise_revive, and if that is set, they will raise the same events. So when should LuaEntity::silent_revive() be used? Are there any arguments missing from the documentation?

Re: Difference between LuaEntity::revive() and LuaEntity::silent_revive()

Posted: Fri Apr 19, 2024 8:57 am
by boskid
Both of those are using the same internal function for revive purposes with the only difference being that silent_revive makes no sound and creates no smoke.

Re: Difference between LuaEntity::revive() and LuaEntity::silent_revive()

Posted: Fri Apr 19, 2024 12:14 pm
by Pi-C
boskid wrote:
Fri Apr 19, 2024 8:57 am
Both of those are using the same internal function for revive purposes with the only difference being that silent_revive makes no sound and creates no smoke.
Oh, thanks! It never occurred to me that "silent" was meant literally, referring to sound -- I thought more along the lines of the command being executed silently, without raising events. :-)

Re: Difference between LuaEntity::revive() and LuaEntity::silent_revive()

Posted: Sun May 05, 2024 8:51 am
by Bilka
Thanks for the note, added boskid's info for the next doc release.