From f01722a846c0586b64afda200d6c11ae300e8893 Mon Sep 17 00:00:00 2001 From: Arwent Date: Thu, 7 Jul 2022 10:18:54 +0200 Subject: [PATCH] giving randomly depot credits between 2 and 3 at end --- data/ui_scripts/custom_depot/scoreboard_override.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/ui_scripts/custom_depot/scoreboard_override.lua b/data/ui_scripts/custom_depot/scoreboard_override.lua index bc7edbc5..877de295 100644 --- a/data/ui_scripts/custom_depot/scoreboard_override.lua +++ b/data/ui_scripts/custom_depot/scoreboard_override.lua @@ -56,6 +56,10 @@ local scoreboard = function(unk1, unk2) custom_depot.get_function("add_currency")(InventoryCurrencyType.Parts, currency_gain) + if custom_depot.functions["has_accepted_mod_eula"]() then + custom_depot.get_function("add_currency")(InventoryCurrencyType.Credits, math.random(2, 3)) + end + player_old_score = player_score custom_depot.get_function("save_depot_data")() end