Bird shouldn't eat seeds. Fixed seed spoilage

This commit is contained in:
Santje Finke 2023-06-18 15:48:56 +02:00
parent 0ffb58a890
commit fb03db32e8
2 changed files with 7 additions and 5 deletions

View file

@ -198,10 +198,10 @@ configuration_options =
label = "Max. fruit seeds", label = "Max. fruit seeds",
options = options =
{ {
{description = "default (2)", data = 1}, {description = "default (2)", data = 2},
{description = "modded (3)", data = 2}, {description = "modded (3)", data = 3},
}, },
default = 2, default = 3,
}, },
{ {
name = "pc_dmg_taken_mod", name = "pc_dmg_taken_mod",

View file

@ -74,8 +74,8 @@ end
if seed_spoilage == 0 then AddPrefabPostInit("seeds",noSpoil) if seed_spoilage == 0 then AddPrefabPostInit("seeds",noSpoil)
end end
for key, value in pairs(cropseeds) do for cropseed in cropseeds do
if crop_seed_spoilage == 0 then AddPrefabPostInit(value,noSpoil) if crop_seed_spoilage == 0 then AddPrefabPostInit(cropseed,noSpoil)
end end
end end
@ -146,6 +146,8 @@ local function OnGetItemFromPlayer(inst, giver, item)
inst.AnimState:PushAnimation("idle_bird", true) inst.AnimState:PushAnimation("idle_bird", true)
inst:DoTaskInTime(60 * FRAMES, OnDigestMOD, item) inst:DoTaskInTime(60 * FRAMES, OnDigestMOD, item)
else
inst.components.lootdropper:SpawnLootPrefab(item)
end end
end end