SubscribeLocalEvent<ZombieComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<ZombieComponent, EmoteEvent>(OnEmote, before:
- new []{typeof(VocalSystem), typeof(BodyEmotesSystem)});
+ new[] { typeof(VocalSystem), typeof(BodyEmotesSystem) });
SubscribeLocalEvent<ZombieComponent, MeleeHitEvent>(OnMeleeHit);
SubscribeLocalEvent<ZombieComponent, MobStateChangedEvent>(OnMobState);
private void OnPendingMapInit(EntityUid uid, PendingZombieComponent component, MapInitEvent args)
{
+ if (_mobState.IsDead(uid))
+ {
+ ZombifyEntity(uid);
+ return;
+ }
+
component.NextTick = _timing.CurTime + TimeSpan.FromSeconds(1f);
}
var min = component.MinZombieInfectionChance;
//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;
}
_humanoidAppearance.SetBaseLayerColor(target, layer, info.Color);
_humanoidAppearance.SetBaseLayerId(target, layer, info.Id);
}
- if(TryComp<HumanoidAppearanceComponent>(target, out var appcomp))
+ if (TryComp<HumanoidAppearanceComponent>(target, out var appcomp))
{
appcomp.EyeColor = zombiecomp.BeforeZombifiedEyeColor;
}