@@ -55,7 +55,7 @@ namespace Content.Server.Zombies
|
|||||||
|
|
||||||
SubscribeLocalEvent<ZombieComponent, ComponentStartup>(OnStartup);
|
SubscribeLocalEvent<ZombieComponent, ComponentStartup>(OnStartup);
|
||||||
SubscribeLocalEvent<ZombieComponent, EmoteEvent>(OnEmote, before:
|
SubscribeLocalEvent<ZombieComponent, EmoteEvent>(OnEmote, before:
|
||||||
new []{typeof(VocalSystem), typeof(BodyEmotesSystem)});
|
new[] { typeof(VocalSystem), typeof(BodyEmotesSystem) });
|
||||||
|
|
||||||
SubscribeLocalEvent<ZombieComponent, MeleeHitEvent>(OnMeleeHit);
|
SubscribeLocalEvent<ZombieComponent, MeleeHitEvent>(OnMeleeHit);
|
||||||
SubscribeLocalEvent<ZombieComponent, MobStateChangedEvent>(OnMobState);
|
SubscribeLocalEvent<ZombieComponent, MobStateChangedEvent>(OnMobState);
|
||||||
@@ -70,6 +70,12 @@ namespace Content.Server.Zombies
|
|||||||
|
|
||||||
private void OnPendingMapInit(EntityUid uid, PendingZombieComponent component, MapInitEvent args)
|
private void OnPendingMapInit(EntityUid uid, PendingZombieComponent component, MapInitEvent args)
|
||||||
{
|
{
|
||||||
|
if (_mobState.IsDead(uid))
|
||||||
|
{
|
||||||
|
ZombifyEntity(uid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
component.NextTick = _timing.CurTime + TimeSpan.FromSeconds(1f);
|
component.NextTick = _timing.CurTime + TimeSpan.FromSeconds(1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +202,7 @@ namespace Content.Server.Zombies
|
|||||||
|
|
||||||
var min = component.MinZombieInfectionChance;
|
var min = component.MinZombieInfectionChance;
|
||||||
//gets a value between the max and min based on how many items the entity is wearing
|
//gets a value between the max and min based on how many items the entity is wearing
|
||||||
var chance = (max-min) * ((total - items)/total) + min;
|
var chance = (max - min) * ((total - items) / total) + min;
|
||||||
return chance;
|
return chance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,7 +267,7 @@ namespace Content.Server.Zombies
|
|||||||
_humanoidAppearance.SetBaseLayerColor(target, layer, info.Color);
|
_humanoidAppearance.SetBaseLayerColor(target, layer, info.Color);
|
||||||
_humanoidAppearance.SetBaseLayerId(target, layer, info.Id);
|
_humanoidAppearance.SetBaseLayerId(target, layer, info.Id);
|
||||||
}
|
}
|
||||||
if(TryComp<HumanoidAppearanceComponent>(target, out var appcomp))
|
if (TryComp<HumanoidAppearanceComponent>(target, out var appcomp))
|
||||||
{
|
{
|
||||||
appcomp.EyeColor = zombiecomp.BeforeZombifiedEyeColor;
|
appcomp.EyeColor = zombiecomp.BeforeZombifiedEyeColor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -455,6 +455,7 @@
|
|||||||
physicalDesc: reagent-physical-desc-necrotic
|
physicalDesc: reagent-physical-desc-necrotic
|
||||||
flavor: bitter
|
flavor: bitter
|
||||||
color: "#7e916e"
|
color: "#7e916e"
|
||||||
|
worksOnTheDead: true
|
||||||
metabolisms:
|
metabolisms:
|
||||||
Medicine:
|
Medicine:
|
||||||
effects:
|
effects:
|
||||||
|
|||||||
Reference in New Issue
Block a user