Skip to content

Commit

Permalink
add info about the return of add_money
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Oct 8, 2023
1 parent ceaf70f commit 19a3a95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/game_data/spel2.lua

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

4 changes: 2 additions & 2 deletions docs/src/includes/_globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ Adds new custom type (group of ENT_TYPE) that can be later used in functions lik
#### int add_money(int amount, optional<int> display_time)

Adds money to the state.money_shop_total and displays the effect on the HUD for money change
Can be negative, default display_time = 60 (about 2s)
Can be negative, default display_time = 60 (about 2s). Returns the current money after the transaction

### add_money_slot

Expand All @@ -1197,7 +1197,7 @@ Can be negative, default display_time = 60 (about 2s)
#### int add_money_slot(int amount, int player_slot, optional<int> display_time)

Adds money to the state.items.player_inventory[player_slot].money and displays the effect on the HUD for money change
Can be negative, default display_time = 60 (about 2s)
Can be negative, default display_time = 60 (about 2s). Returns the current money after the transaction

### change_poison_timer

Expand Down
4 changes: 2 additions & 2 deletions src/game_api/script/lua_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2105,11 +2105,11 @@ end
lua["get_current_money"] = get_current_money;

/// Adds money to the state.money_shop_total and displays the effect on the HUD for money change
/// Can be negative, default display_time = 60 (about 2s)
/// Can be negative, default display_time = 60 (about 2s). Returns the current money after the transaction
lua["add_money"] = add_money;

/// Adds money to the state.items.player_inventory[player_slot].money and displays the effect on the HUD for money change
/// Can be negative, default display_time = 60 (about 2s)
/// Can be negative, default display_time = 60 (about 2s). Returns the current money after the transaction
lua["add_money_slot"] = add_money_slot;

lua.create_named_table("INPUTS", "NONE", 0, "JUMP", 1, "WHIP", 2, "BOMB", 4, "ROPE", 8, "RUN", 16, "DOOR", 32, "MENU", 64, "JOURNAL", 128, "LEFT", 256, "RIGHT", 512, "UP", 1024, "DOWN", 2048);
Expand Down

0 comments on commit 19a3a95

Please sign in to comment.