Display obvious plant mutations in examine text (#32650)
* Effect mutations now display on examine * ChangeSpecies shouldn't stay on the list after running. Name cleanup * EmoGarbage Review - convert description to LocId and add minor logic fix * fix the dastardly yaml --------- Co-authored-by: PraxisMapper <praxismapper@gmail.com> Co-authored-by: EmoGarbage404 <retron404@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Botany.Components;
|
||||
using Content.Shared.EntityEffects;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.FixedPoint;
|
||||
|
||||
namespace Content.Server.Botany.Systems;
|
||||
@@ -37,4 +38,23 @@ public sealed partial class BotanySystem
|
||||
solutionContainer.AddReagent(chem, amount);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnProduceExamined(EntityUid uid, ProduceComponent comp, ExaminedEvent args)
|
||||
{
|
||||
if (comp.Seed == null)
|
||||
return;
|
||||
|
||||
using (args.PushGroup(nameof(ProduceComponent)))
|
||||
{
|
||||
foreach (var m in comp.Seed.Mutations)
|
||||
{
|
||||
// Don't show mutations that have no effect on produce (sentience)
|
||||
if (!m.AppliesToProduce)
|
||||
continue;
|
||||
|
||||
if (m.Description != null)
|
||||
args.PushMarkup(Loc.GetString(m.Description));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user