第118页:机器可携带
展开一一八.机器可携带
1.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\scienceprototyper.lua文件,将MakeObstaclePhysics(inst, .4)替换为以下内容:
local function turnon(inst)
inst.components.machine.ison = true
inst:AddComponent("inventoryitem")
end
local function turnoff(inst)
inst.components.machine.ison = false
inst:RemoveComponent("inventoryitem")
end
inst:AddComponent("machine")
inst.components.machine.turnonfn = turnon
inst.components.machine.turnofffn = turnoff
inst:AddComponent("equippable")
2.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\magicprototyper.lua文件,将MakeObstaclePhysics(inst, .4)替换为以下内容:
local function turnon(inst)
inst.components.machine.ison = true
inst:AddComponent("inventoryitem")
end
local function turnoff(inst)
inst.components.machine.ison = false
inst:RemoveComponent("inventoryitem")
end
inst:AddComponent("machine")
inst.components.machine.turnonfn = turnon
inst.components.machine.turnofffn = turnoff
inst:AddComponent("equippable")
即可在机器上按鼠标右键解除固定,再按鼠标左键点击即可带在身上。想固定机器时,将机器放在地上,在机器上按鼠标右键即可固定在地上
更多相关内容请关注:饥荒专区
责任编辑:Shy夏夏