GLOBAL.setmetatable( env, {__index = function(a, b) return GLOBAL.rawget(GLOBAL, b) end } ) modimport("scripts/constants") modimport("scripts/strings") modimport("scripts/actions") modimport("scripts/main") modimport("scripts/rpc") local function OpenShop(inst) if inst._parent == nil then return end if GLOBAL.SHOPDATA.SHOPS[ThePlayer.player_classified.shop_open:value()] then local ShopScreen = require "screens/shop_screen" TheFrontEnd:PushScreen(ShopScreen(inst._parent, GLOBAL.SHOPDATA.SHOPS[inst.shop_open:value()], inst.shop_open:value())) end end local function classified(inst) inst.shop_open = net_string(inst.GUID, "shopapi.shop_open", "shop_open_dirty") if not TheNet:IsDedicated() then local data = { ["shop_open_dirty"] = OpenShop, } for event, fn in pairs(data) do inst:ListenForEvent(event, fn) end end end AddPrefabPostInit("player_classified", classified) if not env.MODROOT:find("workshop-") then CHEATS_ENABLED = true require("debugkeys") end