Added some of the accessors listed in #1455. As stated in this issue, the final goal is to have access to every single property set when creating an entity. However, for this MR i only included the ones that seemed the most useful / relevant. This includes:
chest:get/set_opening_method(): returns or sets the opening method of this chest.
chest:get/set_opening_condition(): returns or set the item or savegame variable required to open this chest.
chest:is/set_opening_condition_consumed(): returns or sets whether the opening condition is consumed on opening.
- All of the above for doors.
enemy:get_savegame_variable(): returns the savegame variable indicating whether this enemy is dead or not (or "" if this enemy is not saved) (simply returns the
door:get_savegame_variable(): returns the savegame variable that contains the state of this door (or "" if this door is not saved) (simply returns the
jumper:get_jump_length(): returns the jump length of this jumper. (simply returns the
block:get_direction(): if this block can only be pulled/push to a specific direction, returns it, if it can be moved in any direction returns -1. (simply returns the
switch:get_inactivate_when_leaving(): returns true is this switch is inactivated when the hero/block leaves it, or false if it's not. (simply returns the
inactivate_when_leavingattribute) [was originally is_inactivate_when_leaving]
destructible:get_weight(): returns the weight of this destructible.
Also added the corresponding setter in some cases (when it seemingly didn't risk breaking something):
- switch:set_inactivate_when_leaving(state) (defaults to true)
The corresponding MR in the doc repo will come soon.