Ambuzol Plus (#17884)
* Added component and functionality. * Fixed ZombieImmune. * Zombies now have zombie blood. * Ambuzol plus. * Ambuzol plus spawns in bundle. * Fine CBURN get one too. * Reworked the reaction * No more magic blood refilling. * ok CE i fixed it * Component change.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
using Robust.Shared.Configuration;
|
||||
using Content.Server.Zombies;
|
||||
|
||||
@@ -9,8 +8,16 @@ namespace Content.Server.Chemistry.ReagentEffects;
|
||||
|
||||
public sealed class CureZombieInfection : ReagentEffect
|
||||
{
|
||||
[DataField("innoculate")]
|
||||
public bool innoculate = false;
|
||||
|
||||
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
|
||||
=> Loc.GetString("reagent-effect-guidebook-cure-zombie-infection", ("chance", Probability));
|
||||
{
|
||||
if(innoculate == true)
|
||||
return Loc.GetString("reagent-effect-guidebook-innoculate-zombie-infection", ("chance", Probability));
|
||||
|
||||
return Loc.GetString("reagent-effect-guidebook-cure-zombie-infection", ("chance", Probability));
|
||||
}
|
||||
|
||||
// Removes the Zombie Infection Components
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
@@ -18,6 +25,10 @@ public sealed class CureZombieInfection : ReagentEffect
|
||||
var entityManager = args.EntityManager;
|
||||
entityManager.RemoveComponent<ZombifyOnDeathComponent>(args.SolutionEntity);
|
||||
entityManager.RemoveComponent<PendingZombieComponent>(args.SolutionEntity);
|
||||
|
||||
if (innoculate == true) {
|
||||
entityManager.EnsureComponent<ZombieImmuneComponent>(args.SolutionEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user