fixing concept and removing useless variable and parantheses
This commit is contained in:
parent
4b36f7bf4e
commit
033d649338
@ -1,4 +1,4 @@
|
|||||||
if (game:issingleplayer()) then
|
if game:issingleplayer() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -74,11 +74,13 @@ custom_depot.functions["remove_currency"] = function(currency_type, amount)
|
|||||||
end
|
end
|
||||||
|
|
||||||
custom_depot.functions["get_currency"] = function(currency_type)
|
custom_depot.functions["get_currency"] = function(currency_type)
|
||||||
if not currency_type or not custom_depot.data.currencies[tostring(currency_type)] then
|
local type = convert_currency_to_string(currency_type)
|
||||||
|
|
||||||
|
if not currency_type or not custom_depot.data.currencies[type] then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return custom_depot.data.currencies[tostring(currency_type)]
|
return custom_depot.data.currencies[type]
|
||||||
end
|
end
|
||||||
|
|
||||||
custom_depot.functions["add_item"] = function(item, value)
|
custom_depot.functions["add_item"] = function(item, value)
|
||||||
@ -117,11 +119,11 @@ end
|
|||||||
|
|
||||||
custom_depot.get_function("load_depot_data")()
|
custom_depot.get_function("load_depot_data")()
|
||||||
|
|
||||||
if (Engine.InFrontend()) then
|
if Engine.InFrontend() then
|
||||||
require("mod_eula")
|
require("mod_eula")
|
||||||
require("depot_override")
|
require("depot_override")
|
||||||
end
|
end
|
||||||
|
|
||||||
if (not Engine.InFrontend()) then
|
if not Engine.InFrontend() then
|
||||||
require("scoreboard_override")
|
require("scoreboard_override")
|
||||||
end
|
end
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
InventoryCurrencyType = {
|
|
||||||
LaunchCredits = 1,
|
|
||||||
Credits = 2,
|
|
||||||
Parts = 3,
|
|
||||||
CoDPoints = 4,
|
|
||||||
Bonus = 5,
|
|
||||||
Max = 6
|
|
||||||
}
|
|
||||||
|
|
||||||
GetCurrencyBalance = function(currency_type)
|
GetCurrencyBalance = function(currency_type)
|
||||||
return custom_depot.get_function("get_currency")(currency_type)
|
return custom_depot.get_function("get_currency")(currency_type)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user