Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
-- 为“完全正常的树”添加可再生功能
AddPrefabPostInit("livingtree", function(inst) -- 完全正常的树
if not TheWorld.ismastersim then
return inst
end
local oldfn = inst.components.workable.onfinish
inst.components.workable.onfinish = function(inst, chopper)
oldfn(inst, chopper)
inst:DoTaskInTime(10, function()
if inst then
local x, y, z = inst.Transform:GetWorldPosition()
if TheWorld.Map:IsFarmableSoilAtPoint(x, y, z) and TheWorld.components.farming_manager ~= nil then
SpawnPrefab("sand_puff_large_front").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("farm_plant_happy").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("livingtree_sapling").Transform:SetPosition(inst.Transform:GetWorldPosition())
inst:Remove()
end
end
end)
end
end)
[00:56:37]: [string "scripts/components/map.lua"]:172: calling 'GetTileAtPoint' on bad self (number expected, got nil)
LUA ERROR stack traceback:
scripts/components/map.lua:172 in (method) IsFarmableSoilAtPoint (Lua) <171-173>
self = Map (0000000007D41E40)
x = nil
y = nil
z = nil
../mods/workshop-3163270064/modmain.lua:14 in (field) fn (Lua) <11-21>
x = nil
y = nil
z = nil
scripts/scheduler.lua:186 in (method) OnTick (Lua) <164-216>
self =
running = table: 000000005CBD6450
waitingfortick = table: 000000005CBD6A90
hibernating = table: 000000005CBD6C70
tasks = table: 000000005CBD6BD0
waking = table: 00000000763CBF40
attime = table: 000000005CBD6540
tick = 83645
k = PERIODIC 104896: 10.000000
v = true
already_dead = false