游戏达人
  
- 贡献度
- 80
- 金元
- 19007
- 积分
- 2231
- 精华
- 1
- 注册时间
- 2010-11-27
|
本帖最后由 yzzn2009 于 2013-11-13 23:17 编辑
随鸟1 发表于 2013-11-13 22:59 
还有荧光草可移植怎么弄
你也可以修改荧光果不腐烂
一.用荧光果种三朵洞穴花
用记事本打开游戏目录\data\scripts\prefabs\lightbulb.lua文件,在inst:AddComponent("tradable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
local flower_cave_triple = SpawnPrefab("flower_cave_triple")
if flower_cave_triple then
flower_cave_triple:PushEvent("growfromlightbulb")
flower_cave_triple.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
即可用荧光果种三朵洞穴花(每株结3个荧光果)
二.荧光果腐烂变慢(延长6倍)
用记事本打开游戏目录\data\scripts\prefabs\lightbulb.lua文件,将inst.components.perishable:SetPerishTime(TUNING.PERISH_FAST)替换为inst.components.perishable:SetPerishTime(TUNING.PERISH_SUPERSLOW)
三.荧光果不腐烂
用记事本打开游戏目录\data\scripts\prefabs\lightbulb.lua文件,将下列内容:
inst:AddComponent("perishable")
inst.components.perishable:SetPerishTime(TUNING.PERISH_FAST)
inst.components.perishable:StartPerishing()
inst.components.perishable.onperishreplacement = "spoiled_food"
替换为:
--inst:AddComponent("perishable")
--inst.components.perishable:SetPerishTime(TUNING.PERISH_FAST)
--inst.components.perishable:StartPerishing()
--inst.components.perishable.onperishreplacement = "spoiled_food"
四.铲掉洞穴花得荧光果
用记事本打开游戏目录\data\scripts\prefabs\flower_cave.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function dig_up(inst, chopper)
inst.components.lootdropper:SpawnLootPrefab("lightbulb")
inst:Remove()
end
inst:AddComponent("workable")
inst.components.workable:SetWorkAction(ACTIONS.DIG)
inst.components.workable:SetOnFinishCallback(dig_up)
inst.components.workable:SetWorkLeft(1)
即可用铲子铲掉洞穴花得荧光果,使洞穴花可以被移除
|
|