if not TheWorld.ismastersim then return inst end 这段代码的意思是,检查当前系统环境是否是主机。如果不是主机,就到此为止,不再执行后面的代码。在这段代码之前的部分,是主客机通用的,通常只包含创建实体,添加系统底层组件,添加tag。 虽然代码的编写顺序没有严格的限制,但官方的代码多数是按照上面的顺序来编写的...
if TheWorld.speechdisabled then return nil end if TheWorld.ismastersim then if not force and (self.ignoring ~= nil or (self.inst.components.health ~= nil and self.inst.components.health:IsDead() and self.inst.components.revivablecorpse == nil) or (self.inst.components.sleeper ~= nil and...
inst.entity:SetPristine()if not TheWorld.ismastersim then return inst end inst:AddComponent(waterproofer)inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_SMALL)inst:AddComponent(inspectable)inst:AddComponent(inventoryitem)inst.components.inventoryitem.imagename = umbrella inst.co...
if TheWorld.ismastersim then self:AddTag("_"..name) if self:HasTag("__"..name) then self:RemoveTag("__"..name) return end end if rawget(self.replica, "_")[name] ~= nil then print("replica "..name.." already exists! "..debugstack_oneline(3)) end local filename = name.."...
弄了半天了都进不来 分享12赞 饥荒吧 嘉嘉:) 进不去有mod的服务器我舍友创的房间 他们都能进去就我不行,显示服务器有模组啥的进去就闪退了 百度了很久应该不是配置问题, 求大佬帮 分享92 饥荒mod吧 星抹茶空 一些mod问题,求大佬解答local function creatureToBigPlot(inst) if inst.ismastersim then inst:...
我打克劳斯和蜂王掉的那两个专属物品不见了我后面去打克劳斯和蜂王也刷不出来了 分享回复赞 饥荒mod吧 星抹茶空 一些mod问题,求大佬解答local function creatureToBigPlot(inst) if inst.ismastersim then inst:ListenForEvent("ms_cyclecomplete", function(inst) if GLOBAL.TheWorld.state.cycles >= (GLOBAL....
if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("lootdropper") inst:AddComponent("playerprox") inst.components.playerprox:SetDist(POSTERN_DIST, POSTERN_CLOSE_DIST) inst.components.playerprox:SetOnPlayerFar(Far) inst.components.playerprox:SetOn...
if TheWorld.ismastersim then if not force and (self.ignoring ~= nil or (self.inst.components.health ~= nil and self.inst.components.health:IsDead() and self.inst.components.revivablecorpse == nil) or (self.inst.components.sleeper ~= nil and self.inst.components.sleeper:IsAsleep())) the...
inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst.components.inspectable.getstatus = GetStatus inst:AddComponent("inventoryitem") inst:AddComponent("temperature") inst.components.temperature.current = TheWorld.state.temperature ...
有问题请在楼中楼提出,会有专人解 分享1081 饥荒mod吧 星抹茶空 一些mod问题,求大佬解答local function creatureToBigPlot(inst) if inst.ismastersim then inst:ListenForEvent("ms_cyclecomplete", function(inst) if GLOBAL.TheWorld.state.cycles >= (GLOBAL.PKC_BEGIN_TOBIG - 2) then GLOBAL.PKC_CREATURE...