1: In prefabs, evergreen, line 707,
Spoiler
local function OnTimerDone(inst, data) if data.name == "decay" then -- before we disappear, clean up any crap left on the ground -- too -- many objects is as bad for server health as too few! local x,y,z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x,y,z,6) local leftone = false for k,ent in pairs(ents) do if ent.prefab == "log" or ent.prefab == "pinecone" or ent.prefab == "charcoal" then if leftone then ent:Remove() else leftone = true end end end inst:Remove() end end
the stump decay function not only removes logs, pinecones, charcoals on the ground, but also those in nearby containers and even the ones in players' inventory who happen to pass by.
2: In butterflyspawner component, line 44.
This function doesn't sort out butterflies in player's inventory or any container.
Spoiler
local function SpawnButterflyForPlayer(player, reschedule) local pt = player:GetPosition() local ents = TheSim:FindEntities(pt.x, pt.y, pt.z, 64, { "butterfly" }) if #ents < _maxbutterflies then local spawnflower = GetSpawnPoint(player) if spawnflower ~= nil then local butterfly = SpawnPrefab("butterfly") if butterfly.components.pollinator ~= nil then butterfly.components.pollinator:Pollinate(spawnflower) end butterfly.components.homeseeker:SetHome(spawnflower) -- KAJ: TODO: Butterflies can be despawned before getting to the rest of the logic if this is above the homeseeker butterfly.Physics:Teleport(spawnflower.Transform:GetWorldPosition()) end end _scheduledtasks[player] = nil reschedule(player) end
So, butterfly will not spawn for you, if you have 4 stacks of butterflies, no matter the size of each stack.
Steps to Reproduce
1, build a chest near a stump, put logs pinecones in, let the stump decay(I used c_select():PushEvent("timerdome",{name = "decay"}) ). Then logs in chest is gone. 2, get four stacks of butterfly and stand near some flower. See no more butterfly spawns.
1, build a chest near a stump, put logs pinecones in, let the stump decay(I used c_select():PushEvent("timerdome",{name = "decay"}) ). Then logs in chest is gone. 2, get four stacks of butterfly and stand near some flower. See no more butterfly spawns.
-
1
-
1
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now