Bird shouldn't eat seeds. Fixed seed spoilage
This commit is contained in:
parent
0ffb58a890
commit
fb03db32e8
2 changed files with 7 additions and 5 deletions
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue