Könnte man dies nicht abwandeln damit man das überprüfen kann.
Code:
function PlayerHasBoughtSomething()
if g_PlayerHasBoughtSomething == true then
g_PlayerHasBoughtSomething = nil
return true
end
end
Code:
function EmptyOutstocks(_building)
local n = Logic.GetNumberOfGoodTypesOnOutStock(_building);
if n then
for i = 0, n - 1 do
local goodType = Logic.GetGoodTypeOnOutStockByIndex(_building, i);
Logic.RemoveGoodFromStock(_building, goodType, Logic.GetAmountOnOutStockByIndex(_building, i));
end
end
end
Lesezeichen