From 19a3a951a1e86499c98dbf82710ba096efa904e8 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Mon, 9 Oct 2023 00:07:37 +0200 Subject: [PATCH] add info about the return of add_money --- docs/game_data/spel2.lua | 4 ++-- docs/src/includes/_globals.md | 4 ++-- src/game_api/script/lua_vm.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 4f8ee5cc5..199d3d9f2 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -1240,13 +1240,13 @@ function get_entities_by_draw_depth(draw_depths, l) end ---@return integer function get_current_money() end ---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 ---@param amount integer ---@param display_time integer? ---@return integer function add_money(amount, display_time) end ---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 ---@param amount integer ---@param player_slot integer ---@param display_time integer? diff --git a/docs/src/includes/_globals.md b/docs/src/includes/_globals.md index 72d13daad..112d88f94 100644 --- a/docs/src/includes/_globals.md +++ b/docs/src/includes/_globals.md @@ -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 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 @@ -1197,7 +1197,7 @@ Can be negative, default display_time = 60 (about 2s) #### int add_money_slot(int amount, int player_slot, optional 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 diff --git a/src/game_api/script/lua_vm.cpp b/src/game_api/script/lua_vm.cpp index 3825ec943..3266d1052 100644 --- a/src/game_api/script/lua_vm.cpp +++ b/src/game_api/script/lua_vm.cpp @@ -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);