Skip to content

Commit

Permalink
name the unknown bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Dec 26, 2024
1 parent 538043a commit 843307d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/game_data/spel2.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/src/includes/_enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Name | Data | Description
[EQUIP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.EQUIP) | 93 |
[TRIGGER_EXPLOSION](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.TRIGGER_EXPLOSION) | 94 |
[SPAWN_PROJECTILE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.SPAWN_PROJECTILE) | 93 |
[GIVE_POWERUP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.GIVE_POWERUP) | 93 |
[GIVE_POWERUP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ENTITY_OVERRIDE.GIVE_POWERUP) | 94 |

## ENT_FLAG

Expand Down
6 changes: 3 additions & 3 deletions docs/src/includes/_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -7400,12 +7400,12 @@ Derived from [Entity](#Entity) [Movable](#Movable) [Purchasable](#Purchasable)
Type | Name | Description
---- | ---- | -----------
float | [roll_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=roll_speed) |
nil | [give_powerup(Entity who, bool)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=give_powerup) | Skip this function for item to be unpickable
nil | [give_powerup(Entity who, bool play_sfx)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=give_powerup) | Skip this function for item to be unpickable
[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_give_powerup(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_give_powerup) | Hooks before the virtual function.<br/>The callback signature is `bool give_powerup(RollingItem self, Entity who, bool)`<br/>Virtual function docs:<br/>Skip this function for item to be unpickable
[CallbackId](#Aliases) | [set_post_give_powerup(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_give_powerup) | Hooks after the virtual function.<br/>The callback signature is `nil give_powerup(RollingItem self, Entity who, bool)`<br/>Virtual function docs:<br/>Skip this function for item to be unpickable
[CallbackId](#Aliases) | [set_pre_give_powerup(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_give_powerup) | Hooks before the virtual function.<br/>The callback signature is `bool give_powerup(RollingItem self, Entity who, bool play_sfx)`<br/>Virtual function docs:<br/>Skip this function for item to be unpickable
[CallbackId](#Aliases) | [set_post_give_powerup(function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_give_powerup) | Hooks after the virtual function.<br/>The callback signature is `nil give_powerup(RollingItem self, Entity who, bool play_sfx)`<br/>Virtual function docs:<br/>Skip this function for item to be unpickable

### Rubble

Expand Down
2 changes: 1 addition & 1 deletion src/game_api/entities_items.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ class RollingItem : public Purchasable
float roll_speed; // only positive numbers

/// Skip this function for item to be unpickable
virtual void give_powerup(Entity* who, bool) = 0;
virtual void give_powerup(Entity* who, bool play_sfx) = 0;
};

class PlayerBag : public Movable
Expand Down

0 comments on commit 843307d

Please sign in to comment.