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:
LankLTE
2023-07-09 15:01:35 -07:00
committed by GitHub
parent af38a22d69
commit 9e6bd30aa4
14 changed files with 137 additions and 4 deletions

View File

@@ -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);
}
}
}