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:
8
Content.Server/Zombies/ZombieImmuneComponent.cs
Normal file
8
Content.Server/Zombies/ZombieImmuneComponent.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Content.Server.Zombies
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class ZombieImmuneComponent : Component
|
||||
{
|
||||
//still no
|
||||
}
|
||||
}
|
||||
@@ -258,7 +258,7 @@ namespace Content.Server.Zombies
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_random.Prob(GetZombieInfectionChance(entity, component)))
|
||||
if (!HasComp<ZombieImmuneComponent>(entity) && _random.Prob(GetZombieInfectionChance(entity, component)))
|
||||
{
|
||||
var pending = EnsureComp<PendingZombieComponent>(entity);
|
||||
pending.MaxInfectionLength = _random.NextFloat(0.25f, 1.0f) * component.ZombieInfectionTurnTime;
|
||||
@@ -301,6 +301,7 @@ namespace Content.Server.Zombies
|
||||
_humanoidSystem.SetBaseLayerId(target, layer, info.ID);
|
||||
}
|
||||
_humanoidSystem.SetSkinColor(target, zombiecomp.BeforeZombifiedSkinColor);
|
||||
_bloodstream.ChangeBloodReagent(target, zombiecomp.BeforeZombifiedBloodReagent);
|
||||
|
||||
MetaData(target).EntityName = zombiecomp.BeforeZombifiedEntityName;
|
||||
return true;
|
||||
|
||||
@@ -146,6 +146,8 @@ namespace Content.Server.Zombies
|
||||
//store some values before changing them in case the humanoid get cloned later
|
||||
zombiecomp.BeforeZombifiedSkinColor = huApComp.SkinColor;
|
||||
zombiecomp.BeforeZombifiedCustomBaseLayers = new(huApComp.CustomBaseLayers);
|
||||
if (TryComp<BloodstreamComponent>(target, out var stream))
|
||||
zombiecomp.BeforeZombifiedBloodReagent = stream.BloodReagent;
|
||||
|
||||
_sharedHuApp.SetSkinColor(target, zombiecomp.SkinColor, verify: false, humanoid: huApComp);
|
||||
_sharedHuApp.SetBaseLayerColor(target, HumanoidVisualLayers.Eyes, zombiecomp.EyeColor, humanoid: huApComp);
|
||||
@@ -171,6 +173,8 @@ namespace Content.Server.Zombies
|
||||
//This makes it so the zombie doesn't take bloodloss damage.
|
||||
//NOTE: they are supposed to bleed, just not take damage
|
||||
_bloodstream.SetBloodLossThreshold(target, 0f);
|
||||
//Give them zombie blood
|
||||
_bloodstream.ChangeBloodReagent(target, zombiecomp.NewBloodReagent);
|
||||
|
||||
//This is specifically here to combat insuls, because frying zombies on grilles is funny as shit.
|
||||
_serverInventory.TryUnequip(target, "gloves", true, true);
|
||||
|
||||
Reference in New Issue
Block a user