true
for exits, layers and others that the game never locks, even if you lock it with unlock
functiontrue
for exits, layers and others that the game never locks, even if you lock it with unlock
functionentry
.entry
.callback_id
, alternatively use clear_callback()
inside the hook.optional<float> enter_attempt(Door self, Entity*)
nil enter_attempt(Door self, Entity*)
optional<float> hide_hud(Door self, Entity*)
nil hide_hud(Door self, Entity*)
optional<int> enter(Door self, Entity who)
nil enter(Door self, Entity who)
optional<float> light_level(Door self)
nil light_level(Door self)
optional<bool> is_unlocked(Door self)
true
for exits, layers and others that the game never locks, even if you lock it with unlock
functionnil is_unlocked(Door self)
true
for exits, layers and others that the game never locks, even if you lock it with unlock
functionoptional<bool> can_enter(Door self, Entity player)
nil can_enter(Door self, Entity player)
Derived from Entity Floor Door
@@ -25428,7 +25513,7 @@optional<bool> can_jump(Movable self)
nil can_jump(Movable self)
optional<int> stomp_damage(Movable self)
nil stomp_damage(Movable self)
optional<bool> is_on_fire(Movable self)
nil is_on_fire(Movable self)
optional<bool> damage(Movable self, int damage_dealer_uid, int damage_amount, int stun_time, float velocity_x, float velocity_y, int iframes)
bool apply_movement(Movable self)
bool on_hit(Movable self, Entity damage_dealer)
nil on_hit(Movable self, Entity damage_dealer)
bool stun(Movable self, int framecount)
nil stun(Movable self, int framecount)
bool freeze(Movable self, int framecount)
nil freeze(Movable self, int framecount)
bool light_on_fire(Movable self, int time)
nil light_on_fire(Movable self, int time)
bool set_cursed(Movable self, bool b)
nil set_cursed(Movable self, bool b)
bool web_collision(Movable self)
nil web_collision(Movable self)
bool check_out_of_bounds(Movable self)
nil check_out_of_bounds(Movable self)
optional<Entity> standing_on(Movable self)
nil standing_on(Movable self)
bool stomped_by(Movable self, Entity*)
nil stomped_by(Movable self, Entity*)
bool thrown_by(Movable self, Entity*)
nil thrown_by(Movable self, Entity*)
bool cloned_to(Movable self, Entity*)
nil cloned_to(Movable self, Entity*)
bool pick_up(Movable self, Entity entity_to_pick_up)
nil pick_up(Movable self, Entity entity_to_pick_up)
bool picked_up_by(Movable self, Entity*)
nil apply_movement(Movable self)
nil picked_up_by(Movable self, Entity*)
bool check_is_falling(Movable self)
bool drop(Movable self, Entity entity_to_drop)
nil check_is_falling(Movable self)
nil drop(Movable self, Entity entity_to_drop)
bool collect_treasure(Movable self, int value, ENT_TYPE treasure)
nil collect_treasure(Movable self, int value, ENT_TYPE treasure)
bool initialize(Movable self)
nil initialize(Movable self)
nil process_input(Movable self)
bool picked_up(Movable self)
nil picked_up(Movable self)
bool fall(Movable self)
nil fall(Movable self)
bool apply_friction(Movable self)
nil apply_friction(Movable self)
bool crush(Movable self, Entity*)
nil crush(Movable self, Entity*)
diff --git a/docs/light.html b/docs/light.html index 6d4989f1b..31cccca70 100644 --- a/docs/light.html +++ b/docs/light.html @@ -17754,18 +17754,103 @@Door
+ int enter(Entity who) -+ Returns the entity state / behavior id to set the entity to after the entering animation. ++ float +light_level() +Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change + bool is_unlocked() -Will alwyas return +true
for exits, layers and others that the game never locks, even if you lock it withunlock
functionShould we display the button prompt when collided by player. Will always return +true
for exits, layers and others that the game never locks, even if you lock it withunlock
function+ bool +can_enter(Entity player) +Can the door actually be entered by player. Overrides the button prompt too if false. + nil unlock(bool unlock) Lock/Unlock doors + +CallbackId +set_pre_virtual(ENTITY_OVERRIDE entry, function fun) +Hooks before the virtual function at index +entry
.+ +CallbackId +set_post_virtual(ENTITY_OVERRIDE entry, function fun) +Hooks after the virtual function at index +entry
.+ +nil +clear_virtual(CallbackId callback_id) +Clears the hook given by +callback_id
, alternatively useclear_callback()
inside the hook.+ +CallbackId +set_pre_enter_attempt(function fun) +Hooks before the virtual function. +
The callback signature isoptional<float> enter_attempt(Door self, Entity*)
+ +CallbackId +set_post_enter_attempt(function fun) +Hooks after the virtual function. +
The callback signature isnil enter_attempt(Door self, Entity*)
+ +CallbackId +set_pre_hide_hud(function fun) +Hooks before the virtual function. +
The callback signature isoptional<float> hide_hud(Door self, Entity*)
+ +CallbackId +set_post_hide_hud(function fun) +Hooks after the virtual function. +
The callback signature isnil hide_hud(Door self, Entity*)
+ +CallbackId +set_pre_enter(function fun) +Hooks before the virtual function. +
The callback signature isoptional<int> enter(Door self, Entity who)
Virtual function docs:
Returns the entity state / behavior id to set the entity to after the entering animation.+ +CallbackId +set_post_enter(function fun) +Hooks after the virtual function. +
The callback signature isnil enter(Door self, Entity who)
Virtual function docs:
Returns the entity state / behavior id to set the entity to after the entering animation.+ +CallbackId +set_pre_light_level(function fun) +Hooks before the virtual function. +
The callback signature isoptional<float> light_level(Door self)
Virtual function docs:
Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change+ +CallbackId +set_post_light_level(function fun) +Hooks after the virtual function. +
The callback signature isnil light_level(Door self)
Virtual function docs:
Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change+ +CallbackId +set_pre_is_unlocked(function fun) +Hooks before the virtual function. +
The callback signature isoptional<bool> is_unlocked(Door self)
Virtual function docs:
Should we display the button prompt when collided by player. Will always returntrue
for exits, layers and others that the game never locks, even if you lock it withunlock
function+ +CallbackId +set_post_is_unlocked(function fun) +Hooks after the virtual function. +
The callback signature isnil is_unlocked(Door self)
Virtual function docs:
Should we display the button prompt when collided by player. Will always returntrue
for exits, layers and others that the game never locks, even if you lock it withunlock
function+ +CallbackId +set_pre_can_enter(function fun) +Hooks before the virtual function. +
The callback signature isoptional<bool> can_enter(Door self, Entity player)
Virtual function docs:
Can the door actually be entered by player. Overrides the button prompt too if false.+ CallbackId +set_post_can_enter(function fun) +Hooks after the virtual function. +
The callback signature isnil can_enter(Door self, Entity player)
Virtual function docs:
Can the door actually be entered by player. Overrides the button prompt too if false.EggShipDoor
Derived from Entity Floor Door
@@ -25428,7 +25513,7 @@Movable
nil drop(Entity entity_to_drop) -+ Called when dropping or throwing nil @@ -25438,7 +25523,7 @@Movable
bool can_jump() -+ Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently. Entity @@ -25447,8 +25532,8 @@Movable
nil -add_money(int money) -Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. +collect_treasure(int value, ENT_TYPE treasure) +Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. Adds treasure to the inventory list shown on transition. Use the global add_money to add money without adding specific treasure. bool @@ -25542,6 +25627,36 @@Movable
+ CallbackId +set_pre_can_jump(function fun) +Hooks before the virtual function. +
The callback signature isoptional<bool> can_jump(Movable self)
Virtual function docs:
Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently.+ +CallbackId +set_post_can_jump(function fun) +Hooks after the virtual function. +
The callback signature isnil can_jump(Movable self)
Virtual function docs:
Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently.+ +CallbackId +set_pre_stomp_damage(function fun) +Hooks before the virtual function. +
The callback signature isoptional<int> stomp_damage(Movable self)
+ +CallbackId +set_post_stomp_damage(function fun) +Hooks after the virtual function. +
The callback signature isnil stomp_damage(Movable self)
+ +CallbackId +set_pre_is_on_fire(function fun) +Hooks before the virtual function. +
The callback signature isoptional<bool> is_on_fire(Movable self)
+ +CallbackId +set_post_is_on_fire(function fun) +Hooks after the virtual function. +
The callback signature isnil is_on_fire(Movable self)
+ @@ -25552,23 +25667,163 @@CallbackId set_pre_damage(function fun) Hooks before the virtual function.
The callback signature isoptional<bool> damage(Movable self, int damage_dealer_uid, int damage_amount, int stun_time, float velocity_x, float velocity_y, int iframes)
Virtual function docs:
Damage the movable by the specified amount, stuns and gives it invincibility for the specified amount of frames and applies the velocities
Returns: true if entity was affected, damage_dealer should break etc. false if the event should be ignored by damage_dealer?Movable
+ CallbackId -set_pre_apply_movement(function fun) -Hooks before the virtual function. +
The callback signature isbool apply_movement(Movable self)
set_pre_on_hit(function fun) +Hooks before the virtual function. +
The callback signature isbool on_hit(Movable self, Entity damage_dealer)
Virtual function docs:
Hit by broken arrows etc that don't deal damage, calls on_damage with 0 damage.+ +CallbackId +set_post_on_hit(function fun) +Hooks after the virtual function. +
The callback signature isnil on_hit(Movable self, Entity damage_dealer)
Virtual function docs:
Hit by broken arrows etc that don't deal damage, calls on_damage with 0 damage.+ +CallbackId +set_pre_stun(function fun) +Hooks before the virtual function. +
The callback signature isbool stun(Movable self, int framecount)
+ +CallbackId +set_post_stun(function fun) +Hooks after the virtual function. +
The callback signature isnil stun(Movable self, int framecount)
+ +CallbackId +set_pre_freeze(function fun) +Hooks before the virtual function. +
The callback signature isbool freeze(Movable self, int framecount)
+ +CallbackId +set_post_freeze(function fun) +Hooks after the virtual function. +
The callback signature isnil freeze(Movable self, int framecount)
+ +CallbackId +set_pre_light_on_fire(function fun) +Hooks before the virtual function. +
The callback signature isbool light_on_fire(Movable self, int time)
Virtual function docs:
Does not damage entity+ +CallbackId +set_post_light_on_fire(function fun) +Hooks after the virtual function. +
The callback signature isnil light_on_fire(Movable self, int time)
Virtual function docs:
Does not damage entity+ +CallbackId +set_pre_set_cursed(function fun) +Hooks before the virtual function. +
The callback signature isbool set_cursed(Movable self, bool b)
+ +CallbackId +set_post_set_cursed(function fun) +Hooks after the virtual function. +
The callback signature isnil set_cursed(Movable self, bool b)
+ +CallbackId +set_pre_web_collision(function fun) +Hooks before the virtual function. +
The callback signature isbool web_collision(Movable self)
+ +CallbackId +set_post_web_collision(function fun) +Hooks after the virtual function. +
The callback signature isnil web_collision(Movable self)
+ +CallbackId +set_pre_check_out_of_bounds(function fun) +Hooks before the virtual function. +
The callback signature isbool check_out_of_bounds(Movable self)
+ +CallbackId +set_post_check_out_of_bounds(function fun) +Hooks after the virtual function. +
The callback signature isnil check_out_of_bounds(Movable self)
+ +CallbackId +set_pre_standing_on(function fun) +Hooks before the virtual function. +
The callback signature isoptional<Entity> standing_on(Movable self)
+ +CallbackId +set_post_standing_on(function fun) +Hooks after the virtual function. +
The callback signature isnil standing_on(Movable self)
+ +CallbackId +set_pre_stomped_by(function fun) +Hooks before the virtual function. +
The callback signature isbool stomped_by(Movable self, Entity*)
+ +CallbackId +set_post_stomped_by(function fun) +Hooks after the virtual function. +
The callback signature isnil stomped_by(Movable self, Entity*)
+ +CallbackId +set_pre_thrown_by(function fun) +Hooks before the virtual function. +
The callback signature isbool thrown_by(Movable self, Entity*)
+ +CallbackId +set_post_thrown_by(function fun) +Hooks after the virtual function. +
The callback signature isnil thrown_by(Movable self, Entity*)
+ +CallbackId +set_pre_cloned_to(function fun) +Hooks before the virtual function. +
The callback signature isbool cloned_to(Movable self, Entity*)
+ +CallbackId +set_post_cloned_to(function fun) +Hooks after the virtual function. +
The callback signature isnil cloned_to(Movable self, Entity*)
+ +CallbackId +set_pre_pick_up(function fun) +Hooks before the virtual function. +
The callback signature isbool pick_up(Movable self, Entity entity_to_pick_up)
+ +CallbackId +set_post_pick_up(function fun) +Hooks after the virtual function. +
The callback signature isnil pick_up(Movable self, Entity entity_to_pick_up)
+ CallbackId +set_pre_picked_up_by(function fun) +Hooks before the virtual function.
The callback signature isbool picked_up_by(Movable self, Entity*)
CallbackId -set_post_apply_movement(function fun) -Hooks after the virtual function. +
The callback signature isnil apply_movement(Movable self)
set_post_picked_up_by(function fun) +Hooks after the virtual function.
The callback signature isnil picked_up_by(Movable self, Entity*)
CallbackId -set_pre_check_is_falling(function fun) -Hooks before the virtual function. +
The callback signature isbool check_is_falling(Movable self)
set_pre_drop(function fun) +Hooks before the virtual function.
The callback signature isbool drop(Movable self, Entity entity_to_drop)
Virtual function docs:
Called when dropping or throwing+ CallbackId -set_post_check_is_falling(function fun) -Hooks after the virtual function. +
The callback signature isnil check_is_falling(Movable self)
set_post_drop(function fun) +Hooks after the virtual function. +
The callback signature isnil drop(Movable self, Entity entity_to_drop)
Virtual function docs:
Called when dropping or throwing+ +CallbackId +set_pre_collect_treasure(function fun) +Hooks before the virtual function. +
The callback signature isbool collect_treasure(Movable self, int value, ENT_TYPE treasure)
Virtual function docs:
Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. Adds treasure to the inventory list shown on transition. Use the global add_money to add money without adding specific treasure.+ +CallbackId +set_post_collect_treasure(function fun) +Hooks after the virtual function. +
The callback signature isnil collect_treasure(Movable self, int value, ENT_TYPE treasure)
Virtual function docs:
Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. Adds treasure to the inventory list shown on transition. Use the global add_money to add money without adding specific treasure.+ +CallbackId +set_pre_initialize(function fun) +Hooks before the virtual function. +
The callback signature isbool initialize(Movable self)
+ CallbackId +set_post_initialize(function fun) +Hooks after the virtual function.
The callback signature isnil initialize(Movable self)
+ CallbackId @@ -25580,6 +25835,46 @@Movable
set_post_process_input(function fun) Hooks after the virtual function.
The callback signature isnil process_input(Movable self)
+ +CallbackId +set_pre_picked_up(function fun) +Hooks before the virtual function. +
The callback signature isbool picked_up(Movable self)
+ +CallbackId +set_post_picked_up(function fun) +Hooks after the virtual function. +
The callback signature isnil picked_up(Movable self)
+ +CallbackId +set_pre_fall(function fun) +Hooks before the virtual function. +
The callback signature isbool fall(Movable self)
+ +CallbackId +set_post_fall(function fun) +Hooks after the virtual function. +
The callback signature isnil fall(Movable self)
+ +CallbackId +set_pre_apply_friction(function fun) +Hooks before the virtual function. +
The callback signature isbool apply_friction(Movable self)
+ +CallbackId +set_post_apply_friction(function fun) +Hooks after the virtual function. +
The callback signature isnil apply_friction(Movable self)
+ +CallbackId +set_pre_crush(function fun) +Hooks before the virtual function. +
The callback signature isbool crush(Movable self, Entity*)
+ CallbackId +set_post_crush(function fun) +Hooks after the virtual function. +
The callback signature isnil crush(Movable self, Entity*)
MovingIcon
@@ -28008,23 +28303,128 @@ENTITY_OVERRIDE
+ +CAN_JUMP +37 ++ + +STOMP_DAMAGE +43 ++ + +IS_ON_FIRE +45 ++ DAMAGE 48 - +APPLY_MOVEMENT -71 +ON_HIT +49 ++ + +STUN +51 ++ + +FREEZE +52 ++ + +LIGHT_ON_FIRE +53 ++ + +SET_CURSED +54 ++ + +WEB_COLLISION +55 ++ + CHECK_OUT_OF_BOUNDS +58 - +CHECK_IS_FALLING +STANDING_ON +60 ++ + +STOMPED_BY +61 ++ + +THROWN_BY +62 ++ + +CLONED_TO +63 ++ + +PICK_UP +67 ++ + +PICKED_UP_BY +68 ++ + +DROP +69 ++ + +COLLECT_TREASURE +70 ++ + INITIALIZE 75 + PROCESS_INPUT -77 +78 ++ + +PICKED_UP +80 ++ + +FALL +83 ++ + +APPLY_FRICTION +84 ++ + CRUSH +90 @@ -28032,6 +28432,36 @@ +ENTITY_OVERRIDE
38 + +ENTER_ATTEMPT +40 ++ + +HIDE_HUD +41 ++ + +ENTER +42 ++ + +LIGHT_LEVEL +44 ++ + +IS_UNLOCKED +45 ++ + CAN_ENTER +46 ++ ENT_FLAG
diff --git a/docs/src/includes/_enums.md b/docs/src/includes/_enums.md index 0853597b3..426806b5f 100644 --- a/docs/src/includes/_enums.md +++ b/docs/src/includes/_enums.md @@ -245,11 +245,38 @@ Name | Data | Description [LEDGE_GRAB](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.LEDGE_GRAB) | 31 | [STOOD_ON](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.STOOD_ON) | 32 | [INIT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.INIT) | 36 | +[CAN_JUMP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.CAN_JUMP) | 37 | +[STOMP_DAMAGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.STOMP_DAMAGE) | 43 | +[IS_ON_FIRE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.IS_ON_FIRE) | 45 | [DAMAGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.DAMAGE) | 48 | -[APPLY_MOVEMENT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.APPLY_MOVEMENT) | 71 | -[CHECK_IS_FALLING](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.CHECK_IS_FALLING) | 75 | -[PROCESS_INPUT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.PROCESS_INPUT) | 77 | +[ON_HIT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.ON_HIT) | 49 | +[STUN](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.STUN) | 51 | +[FREEZE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.FREEZE) | 52 | +[LIGHT_ON_FIRE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.LIGHT_ON_FIRE) | 53 | +[SET_CURSED](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.SET_CURSED) | 54 | +[WEB_COLLISION](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.WEB_COLLISION) | 55 | +[CHECK_OUT_OF_BOUNDS](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.CHECK_OUT_OF_BOUNDS) | 58 | +[STANDING_ON](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.STANDING_ON) | 60 | +[STOMPED_BY](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.STOMPED_BY) | 61 | +[THROWN_BY](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.THROWN_BY) | 62 | +[CLONED_TO](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.CLONED_TO) | 63 | +[PICK_UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.PICK_UP) | 67 | +[PICKED_UP_BY](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.PICKED_UP_BY) | 68 | +[DROP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.DROP) | 69 | +[COLLECT_TREASURE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.COLLECT_TREASURE) | 70 | +[INITIALIZE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.INITIALIZE) | 75 | +[PROCESS_INPUT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.PROCESS_INPUT) | 78 | +[PICKED_UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.PICKED_UP) | 80 | +[FALL](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.FALL) | 83 | +[APPLY_FRICTION](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.APPLY_FRICTION) | 84 | +[CRUSH](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.CRUSH) | 90 | [FLOOR_UPDATE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.FLOOR_UPDATE) | 38 | +[ENTER_ATTEMPT](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.ENTER_ATTEMPT) | 40 | +[HIDE_HUD](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.HIDE_HUD) | 41 | +[ENTER](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.ENTER) | 42 | +[LIGHT_LEVEL](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.LIGHT_LEVEL) | 44 | +[IS_UNLOCKED](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.IS_UNLOCKED) | 45 | +[CAN_ENTER](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.CAN_ENTER) | 46 | ## ENT_FLAG diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 05a4faed6..a68b17f33 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -3333,9 +3333,26 @@ Type | Name | Description ---- | ---- | ----------- int | [counter](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=counter) | [Entity](#Entity) | [fx_button](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fx_button) | -int | [enter(Entity who)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter) | -bool | [is_unlocked()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=is_unlocked) | Will alwyas return `true` for exits, layers and others that the game never locks, even if you lock it with `unlock` function +int | [enter(Entity who)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter) | Returns the entity state / behavior id to set the entity to after the entering animation. +float | [light_level()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=light_level) | Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change +bool | [is_unlocked()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=is_unlocked) | Should we display the button prompt when collided by player. Will always return `true` for exits, layers and others that the game never locks, even if you lock it with `unlock` function +bool | [can_enter(Entity player)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=can_enter) | Can the door actually be entered by player. Overrides the button prompt too if false. nil | [unlock(bool unlock)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unlock) | Lock/Unlock doors +[CallbackId](#Aliases) | [set_pre_virtual(ENTITY_OVERRIDE entry, function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_virtual) | Hooks before the virtual function at index `entry`. +[CallbackId](#Aliases) | [set_post_virtual(ENTITY_OVERRIDE entry, function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_virtual) | Hooks after the virtual function at index `entry`. +nil | [clear_virtual(CallbackId callback_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=clear_virtual) | Clears the hook given by `callback_id`, alternatively use `clear_callback()` inside the hook. +[CallbackId](#Aliases) | [set_pre_enter_attempt(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_enter_attempt) | Hooks before the virtual function.
The callback signature is `optionalenter_attempt(Door self, Entity*)` +[CallbackId](#Aliases) | [set_post_enter_attempt(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_enter_attempt) | Hooks after the virtual function.
The callback signature is `nil enter_attempt(Door self, Entity*)` +[CallbackId](#Aliases) | [set_pre_hide_hud(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_hide_hud) | Hooks before the virtual function.
The callback signature is `optionalhide_hud(Door self, Entity*)` +[CallbackId](#Aliases) | [set_post_hide_hud(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_hide_hud) | Hooks after the virtual function.
The callback signature is `nil hide_hud(Door self, Entity*)` +[CallbackId](#Aliases) | [set_pre_enter(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_enter) | Hooks before the virtual function.
The callback signature is `optionalenter(Door self, Entity who)`
Virtual function docs:
Returns the entity state / behavior id to set the entity to after the entering animation. +[CallbackId](#Aliases) | [set_post_enter(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_enter) | Hooks after the virtual function.
The callback signature is `nil enter(Door self, Entity who)`
Virtual function docs:
Returns the entity state / behavior id to set the entity to after the entering animation. +[CallbackId](#Aliases) | [set_pre_light_level(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_light_level) | Hooks before the virtual function.
The callback signature is `optionallight_level(Door self)`
Virtual function docs:
Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change +[CallbackId](#Aliases) | [set_post_light_level(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_light_level) | Hooks after the virtual function.
The callback signature is `nil light_level(Door self)`
Virtual function docs:
Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change +[CallbackId](#Aliases) | [set_pre_is_unlocked(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_is_unlocked) | Hooks before the virtual function.
The callback signature is `optionalis_unlocked(Door self)`
Virtual function docs:
Should we display the button prompt when collided by player. Will always return `true` for exits, layers and others that the game never locks, even if you lock it with `unlock` function +[CallbackId](#Aliases) | [set_post_is_unlocked(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_is_unlocked) | Hooks after the virtual function.
The callback signature is `nil is_unlocked(Door self)`
Virtual function docs:
Should we display the button prompt when collided by player. Will always return `true` for exits, layers and others that the game never locks, even if you lock it with `unlock` function +[CallbackId](#Aliases) | [set_pre_can_enter(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_can_enter) | Hooks before the virtual function.
The callback signature is `optionalcan_enter(Door self, Entity player)`
Virtual function docs:
Can the door actually be entered by player. Overrides the button prompt too if false. +[CallbackId](#Aliases) | [set_post_can_enter(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_can_enter) | Hooks after the virtual function.
The callback signature is `nil can_enter(Door self, Entity player)`
Virtual function docs:
Can the door actually be entered by player. Overrides the button prompt too if false. ### EggShipDoor @@ -6416,11 +6433,11 @@ nil | [stun(int framecount)](https://github.com/spelunky-fyi/overlunky/search?l= nil | [freeze(int framecount)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=freeze) | nil | [light_on_fire(int time)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=light_on_fire) | Does not damage entity nil | [set_cursed(bool b)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_cursed) | -nil | [drop(Entity entity_to_drop)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=drop) | +nil | [drop(Entity entity_to_drop)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=drop) | Called when dropping or throwing nil | [pick_up(Entity entity_to_pick_up)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pick_up) | -bool | [can_jump()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=can_jump) | +bool | [can_jump()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=can_jump) | Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently. [Entity](#Entity) | [standing_on()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=standing_on) | -nil | [add_money(int money)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=add_money) | Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. +nil | [collect_treasure(int value, ENT_TYPE treasure)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=collect_treasure) | Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. Adds treasure to the inventory list shown on transition. Use the global add_money to add money without adding specific treasure. bool | [is_on_fire()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=is_on_fire) | bool | [damage(int damage_dealer_uid, int damage_amount, int stun_time, float velocity_x, float velocity_y, int iframes)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=damage) | Damage the movable by the specified amount, stuns and gives it invincibility for the specified amount of frames and applies the velocities
Returns: true if entity was affected, damage_dealer should break etc. false if the event should be ignored by damage_dealer? array<int> | [get_all_behaviors()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_all_behaviors) | Get all avaible behavior ids @@ -6439,14 +6456,56 @@ nil | [generic_update_world(Vec2 move, float sprint_factor, bool disable_gravity [CallbackId](#Aliases) | [set_pre_virtual(ENTITY_OVERRIDE entry, function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_virtual) | Hooks before the virtual function at index `entry`. [CallbackId](#Aliases) | [set_post_virtual(ENTITY_OVERRIDE entry, function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_virtual) | Hooks after the virtual function at index `entry`. nil | [clear_virtual(CallbackId callback_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=clear_virtual) | Clears the hook given by `callback_id`, alternatively use `clear_callback()` inside the hook. +[CallbackId](#Aliases) | [set_pre_can_jump(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_can_jump) | Hooks before the virtual function.
The callback signature is `optionalcan_jump(Movable self)`
Virtual function docs:
Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently. +[CallbackId](#Aliases) | [set_post_can_jump(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_can_jump) | Hooks after the virtual function.
The callback signature is `nil can_jump(Movable self)`
Virtual function docs:
Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently. +[CallbackId](#Aliases) | [set_pre_stomp_damage(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_stomp_damage) | Hooks before the virtual function.
The callback signature is `optionalstomp_damage(Movable self)` +[CallbackId](#Aliases) | [set_post_stomp_damage(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_stomp_damage) | Hooks after the virtual function.
The callback signature is `nil stomp_damage(Movable self)` +[CallbackId](#Aliases) | [set_pre_is_on_fire(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_is_on_fire) | Hooks before the virtual function.
The callback signature is `optionalis_on_fire(Movable self)` +[CallbackId](#Aliases) | [set_post_is_on_fire(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_is_on_fire) | Hooks after the virtual function.
The callback signature is `nil is_on_fire(Movable self)` [CallbackId](#Aliases) | [set_pre_damage(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_damage) | Hooks before the virtual function.
The callback signature is `optionaldamage(Movable self, int damage_dealer_uid, int damage_amount, int stun_time, float velocity_x, float velocity_y, int iframes)`
Virtual function docs:
Damage the movable by the specified amount, stuns and gives it invincibility for the specified amount of frames and applies the velocities
Returns: true if entity was affected, damage_dealer should break etc. false if the event should be ignored by damage_dealer? [CallbackId](#Aliases) | [set_post_damage(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_damage) | Hooks after the virtual function.
The callback signature is `nil damage(Movable self, int damage_dealer_uid, int damage_amount, int stun_time, float velocity_x, float velocity_y, int iframes)`
Virtual function docs:
Damage the movable by the specified amount, stuns and gives it invincibility for the specified amount of frames and applies the velocities
Returns: true if entity was affected, damage_dealer should break etc. false if the event should be ignored by damage_dealer? -[CallbackId](#Aliases) | [set_pre_apply_movement(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_apply_movement) | Hooks before the virtual function.
The callback signature is `bool apply_movement(Movable self)` -[CallbackId](#Aliases) | [set_post_apply_movement(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_apply_movement) | Hooks after the virtual function.
The callback signature is `nil apply_movement(Movable self)` -[CallbackId](#Aliases) | [set_pre_check_is_falling(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_check_is_falling) | Hooks before the virtual function.
The callback signature is `bool check_is_falling(Movable self)` -[CallbackId](#Aliases) | [set_post_check_is_falling(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_check_is_falling) | Hooks after the virtual function.
The callback signature is `nil check_is_falling(Movable self)` +[CallbackId](#Aliases) | [set_pre_on_hit(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_on_hit) | Hooks before the virtual function.
The callback signature is `bool on_hit(Movable self, Entity damage_dealer)`
Virtual function docs:
Hit by broken arrows etc that don't deal damage, calls on_damage with 0 damage. +[CallbackId](#Aliases) | [set_post_on_hit(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_on_hit) | Hooks after the virtual function.
The callback signature is `nil on_hit(Movable self, Entity damage_dealer)`
Virtual function docs:
Hit by broken arrows etc that don't deal damage, calls on_damage with 0 damage. +[CallbackId](#Aliases) | [set_pre_stun(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_stun) | Hooks before the virtual function.
The callback signature is `bool stun(Movable self, int framecount)` +[CallbackId](#Aliases) | [set_post_stun(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_stun) | Hooks after the virtual function.
The callback signature is `nil stun(Movable self, int framecount)` +[CallbackId](#Aliases) | [set_pre_freeze(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_freeze) | Hooks before the virtual function.
The callback signature is `bool freeze(Movable self, int framecount)` +[CallbackId](#Aliases) | [set_post_freeze(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_freeze) | Hooks after the virtual function.
The callback signature is `nil freeze(Movable self, int framecount)` +[CallbackId](#Aliases) | [set_pre_light_on_fire(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_light_on_fire) | Hooks before the virtual function.
The callback signature is `bool light_on_fire(Movable self, int time)`
Virtual function docs:
Does not damage entity +[CallbackId](#Aliases) | [set_post_light_on_fire(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_light_on_fire) | Hooks after the virtual function.
The callback signature is `nil light_on_fire(Movable self, int time)`
Virtual function docs:
Does not damage entity +[CallbackId](#Aliases) | [set_pre_set_cursed(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_set_cursed) | Hooks before the virtual function.
The callback signature is `bool set_cursed(Movable self, bool b)` +[CallbackId](#Aliases) | [set_post_set_cursed(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_set_cursed) | Hooks after the virtual function.
The callback signature is `nil set_cursed(Movable self, bool b)` +[CallbackId](#Aliases) | [set_pre_web_collision(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_web_collision) | Hooks before the virtual function.
The callback signature is `bool web_collision(Movable self)` +[CallbackId](#Aliases) | [set_post_web_collision(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_web_collision) | Hooks after the virtual function.
The callback signature is `nil web_collision(Movable self)` +[CallbackId](#Aliases) | [set_pre_check_out_of_bounds(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_check_out_of_bounds) | Hooks before the virtual function.
The callback signature is `bool check_out_of_bounds(Movable self)` +[CallbackId](#Aliases) | [set_post_check_out_of_bounds(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_check_out_of_bounds) | Hooks after the virtual function.
The callback signature is `nil check_out_of_bounds(Movable self)` +[CallbackId](#Aliases) | [set_pre_standing_on(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_standing_on) | Hooks before the virtual function.
The callback signature is `optionalstanding_on(Movable self)` +[CallbackId](#Aliases) | [set_post_standing_on(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_standing_on) | Hooks after the virtual function.
The callback signature is `nil standing_on(Movable self)` +[CallbackId](#Aliases) | [set_pre_stomped_by(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_stomped_by) | Hooks before the virtual function.
The callback signature is `bool stomped_by(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_post_stomped_by(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_stomped_by) | Hooks after the virtual function.
The callback signature is `nil stomped_by(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_pre_thrown_by(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_thrown_by) | Hooks before the virtual function.
The callback signature is `bool thrown_by(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_post_thrown_by(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_thrown_by) | Hooks after the virtual function.
The callback signature is `nil thrown_by(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_pre_cloned_to(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_cloned_to) | Hooks before the virtual function.
The callback signature is `bool cloned_to(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_post_cloned_to(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_cloned_to) | Hooks after the virtual function.
The callback signature is `nil cloned_to(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_pre_pick_up(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_pick_up) | Hooks before the virtual function.
The callback signature is `bool pick_up(Movable self, Entity entity_to_pick_up)` +[CallbackId](#Aliases) | [set_post_pick_up(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_pick_up) | Hooks after the virtual function.
The callback signature is `nil pick_up(Movable self, Entity entity_to_pick_up)` +[CallbackId](#Aliases) | [set_pre_picked_up_by(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_picked_up_by) | Hooks before the virtual function.
The callback signature is `bool picked_up_by(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_post_picked_up_by(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_picked_up_by) | Hooks after the virtual function.
The callback signature is `nil picked_up_by(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_pre_drop(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_drop) | Hooks before the virtual function.
The callback signature is `bool drop(Movable self, Entity entity_to_drop)`
Virtual function docs:
Called when dropping or throwing +[CallbackId](#Aliases) | [set_post_drop(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_drop) | Hooks after the virtual function.
The callback signature is `nil drop(Movable self, Entity entity_to_drop)`
Virtual function docs:
Called when dropping or throwing +[CallbackId](#Aliases) | [set_pre_collect_treasure(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_collect_treasure) | Hooks before the virtual function.
The callback signature is `bool collect_treasure(Movable self, int value, ENT_TYPE treasure)`
Virtual function docs:
Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. Adds treasure to the inventory list shown on transition. Use the global add_money to add money without adding specific treasure. +[CallbackId](#Aliases) | [set_post_collect_treasure(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_collect_treasure) | Hooks after the virtual function.
The callback signature is `nil collect_treasure(Movable self, int value, ENT_TYPE treasure)`
Virtual function docs:
Adds or subtracts the specified amount of money to the movable's (player's) inventory. Shows the calculation animation in the HUD. Adds treasure to the inventory list shown on transition. Use the global add_money to add money without adding specific treasure. +[CallbackId](#Aliases) | [set_pre_initialize(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_initialize) | Hooks before the virtual function.
The callback signature is `bool initialize(Movable self)` +[CallbackId](#Aliases) | [set_post_initialize(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_initialize) | Hooks after the virtual function.
The callback signature is `nil initialize(Movable self)` [CallbackId](#Aliases) | [set_pre_process_input(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_process_input) | Hooks before the virtual function.
The callback signature is `bool process_input(Movable self)` [CallbackId](#Aliases) | [set_post_process_input(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_process_input) | Hooks after the virtual function.
The callback signature is `nil process_input(Movable self)` +[CallbackId](#Aliases) | [set_pre_picked_up(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_picked_up) | Hooks before the virtual function.
The callback signature is `bool picked_up(Movable self)` +[CallbackId](#Aliases) | [set_post_picked_up(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_picked_up) | Hooks after the virtual function.
The callback signature is `nil picked_up(Movable self)` +[CallbackId](#Aliases) | [set_pre_fall(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_fall) | Hooks before the virtual function.
The callback signature is `bool fall(Movable self)` +[CallbackId](#Aliases) | [set_post_fall(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_fall) | Hooks after the virtual function.
The callback signature is `nil fall(Movable self)` +[CallbackId](#Aliases) | [set_pre_apply_friction(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_apply_friction) | Hooks before the virtual function.
The callback signature is `bool apply_friction(Movable self)` +[CallbackId](#Aliases) | [set_post_apply_friction(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_apply_friction) | Hooks after the virtual function.
The callback signature is `nil apply_friction(Movable self)` +[CallbackId](#Aliases) | [set_pre_crush(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_crush) | Hooks before the virtual function.
The callback signature is `bool crush(Movable self, Entity*)` +[CallbackId](#Aliases) | [set_post_crush(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_crush) | Hooks after the virtual function.
The callback signature is `nil crush(Movable self, Entity*)` ### MovingIcon