Make the sentient plant mutation non-copyable to other plantholders (#29133)
make the sentient plant mutation not propagate by clipping, using the seed extractor or cryoxadone
This commit is contained in:
@@ -42,12 +42,19 @@ public sealed class SeedExtractorSystem : EntitySystem
|
||||
var amount = _random.Next(seedExtractor.BaseMinSeeds, seedExtractor.BaseMaxSeeds + 1);
|
||||
var coords = Transform(uid).Coordinates;
|
||||
|
||||
var packetSeed = seed;
|
||||
if (packetSeed.Sentient)
|
||||
{
|
||||
if (!packetSeed.Unique) // clone if necessary before modifying the seed
|
||||
packetSeed = packetSeed.Clone();
|
||||
packetSeed.Sentient = false; // remove Sentient to avoid ghost role spam
|
||||
}
|
||||
if (amount > 1)
|
||||
seed.Unique = false;
|
||||
packetSeed.Unique = false;
|
||||
|
||||
for (var i = 0; i < amount; i++)
|
||||
{
|
||||
_botanySystem.SpawnSeedPacket(seed, coords, args.User);
|
||||
_botanySystem.SpawnSeedPacket(packetSeed, coords, args.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user