Change plant clipping mechanics (#25326)
Make seeds from clipped plants inherit the decreased health from parents. Also require one growth stage before clipping.
This commit is contained in:
@@ -104,11 +104,12 @@ public sealed partial class BotanySystem : EntitySystem
|
||||
/// <summary>
|
||||
/// Spawns a new seed packet on the floor at a position, then tries to put it in the user's hands if possible.
|
||||
/// </summary>
|
||||
public EntityUid SpawnSeedPacket(SeedData proto, EntityCoordinates coords, EntityUid user)
|
||||
public EntityUid SpawnSeedPacket(SeedData proto, EntityCoordinates coords, EntityUid user, float? healthOverride = null)
|
||||
{
|
||||
var seed = Spawn(proto.PacketPrototype, coords);
|
||||
var seedComp = EnsureComp<SeedComponent>(seed);
|
||||
seedComp.Seed = proto;
|
||||
seedComp.HealthOverride = healthOverride;
|
||||
|
||||
var name = Loc.GetString(proto.Name);
|
||||
var noun = Loc.GetString(proto.Noun);
|
||||
|
||||
Reference in New Issue
Block a user