From ea9c6ee7bf7cb2a997db3a0f5a17e0368fcb4960 Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Fri, 23 Aug 2024 00:42:27 +0300 Subject: [PATCH] PlantFix (#419) * fix * Update wheat.yml * Update CP14FarmingSystem.Interactions.cs --- .../_CP14/Farming/CP14FarmingSystem.Interactions.cs | 7 +++++-- .../Specific/Farming/Herbals/domesticated/cabbage.yml | 2 +- .../Specific/Farming/Herbals/domesticated/pumpkin.yml | 2 +- .../Specific/Farming/Herbals/domesticated/wheat.yml | 3 +++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Content.Server/_CP14/Farming/CP14FarmingSystem.Interactions.cs b/Content.Server/_CP14/Farming/CP14FarmingSystem.Interactions.cs index 8c31bef3d6..275e9c4e21 100644 --- a/Content.Server/_CP14/Farming/CP14FarmingSystem.Interactions.cs +++ b/Content.Server/_CP14/Farming/CP14FarmingSystem.Interactions.cs @@ -71,8 +71,11 @@ public sealed partial class CP14FarmingSystem continue; var spawnLoot = getLoot.GetSpawns(_random); - var spawnPos = pos.Offset(_random.NextVector2(gatheredPlant.Comp.GatherOffset)); - result.Add(Spawn(spawnLoot[0], spawnPos)); //TODO почему то не спавнится больше 1 пшенички. Кажись проблема оффов + foreach (var loot in spawnLoot) + { + var spawnPos = pos.Offset(_random.NextVector2(gatheredPlant.Comp.GatherOffset)); + result.Add(Spawn(loot, spawnPos)); + } } if (gatheredPlant.Comp.DeleteAfterHarvest) diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/cabbage.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/cabbage.yml index e52b390785..68e83bca17 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/cabbage.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/cabbage.yml @@ -43,7 +43,7 @@ acts: [ "Destruction" ] - !type:SpawnEntitiesBehavior spawn: - CP14PlantWheatDeath: + CP14PlantCabbageDeath: min: 1 max: 1 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/pumpkin.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/pumpkin.yml index 208a7babea..eca2605dad 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/pumpkin.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/pumpkin.yml @@ -43,7 +43,7 @@ acts: [ "Destruction" ] - !type:SpawnEntitiesBehavior spawn: - CP14PlantWheatDeath: + CP14PlantPumpkinDeath: min: 1 max: 1 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/wheat.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/wheat.yml index 6f2e5cb35e..fa5d25a0e6 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/wheat.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Farming/Herbals/domesticated/wheat.yml @@ -44,6 +44,9 @@ CP14PlantWheatDeath: min: 1 max: 1 + - type: CP14WaveShader + speed: 2.8 + dis: 4 - type: entity id: CP14PlantWheatDeath