Fix brains, borgs etc not counting as marooned (#37148)
* init * comments * comment * no more debug
This commit is contained in:
@@ -39,7 +39,7 @@ public sealed class KillPersonConditionSystem : EntitySystem
|
||||
return 1f;
|
||||
|
||||
var targetDead = _mind.IsCharacterDeadIc(mind);
|
||||
var targetOnShuttle = _emergencyShuttle.IsTargetEscaping(mind.OwnedEntity.Value);
|
||||
var targetMarooned = !_emergencyShuttle.IsTargetEscaping(mind.OwnedEntity.Value) || _mind.IsCharacterUnrevivableIc(mind);
|
||||
if (!_config.GetCVar(CCVars.EmergencyShuttleEnabled) && requireMaroon)
|
||||
{
|
||||
requireDead = true;
|
||||
@@ -55,11 +55,11 @@ public sealed class KillPersonConditionSystem : EntitySystem
|
||||
|
||||
// If the shuttle hasn't left, give 50% progress if the target isn't on the shuttle as a "almost there!"
|
||||
if (requireMaroon && !_emergencyShuttle.ShuttlesLeft)
|
||||
return targetOnShuttle ? 0f : 0.5f;
|
||||
return targetMarooned ? 0.5f : 0f;
|
||||
|
||||
// If the shuttle has already left, and the target isn't on it, 100%
|
||||
if (requireMaroon && _emergencyShuttle.ShuttlesLeft)
|
||||
return targetOnShuttle ? 0f : 1f;
|
||||
return targetMarooned ? 1f : 0f;
|
||||
|
||||
return 1f; // Good job you did it woohoo
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
SubscribeLocalEvent<BorgChassisComponent, PowerCellChangedEvent>(OnPowerCellChanged);
|
||||
SubscribeLocalEvent<BorgChassisComponent, PowerCellSlotEmptyEvent>(OnPowerCellSlotEmpty);
|
||||
SubscribeLocalEvent<BorgChassisComponent, GetCharactedDeadIcEvent>(OnGetDeadIC);
|
||||
SubscribeLocalEvent<BorgChassisComponent, GetCharacterUnrevivableIcEvent>(OnGetUnrevivableIC);
|
||||
SubscribeLocalEvent<BorgChassisComponent, ItemToggledEvent>(OnToggled);
|
||||
|
||||
SubscribeLocalEvent<BorgBrainComponent, MindAddedMessage>(OnBrainMindAdded);
|
||||
@@ -218,6 +219,11 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
args.Dead = true;
|
||||
}
|
||||
|
||||
private void OnGetUnrevivableIC(EntityUid uid, BorgChassisComponent component, ref GetCharacterUnrevivableIcEvent args)
|
||||
{
|
||||
args.Unrevivable = true;
|
||||
}
|
||||
|
||||
private void OnToggled(Entity<BorgChassisComponent> ent, ref ItemToggledEvent args)
|
||||
{
|
||||
var (uid, comp) = ent;
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace Content.Server.Zombies
|
||||
SubscribeLocalEvent<ZombieComponent, CloningEvent>(OnZombieCloning);
|
||||
SubscribeLocalEvent<ZombieComponent, TryingToSleepEvent>(OnSleepAttempt);
|
||||
SubscribeLocalEvent<ZombieComponent, GetCharactedDeadIcEvent>(OnGetCharacterDeadIC);
|
||||
SubscribeLocalEvent<ZombieComponent, GetCharacterUnrevivableIcEvent>(OnGetCharacterUnrevivableIC);
|
||||
SubscribeLocalEvent<ZombieComponent, MindAddedMessage>(OnMindAdded);
|
||||
SubscribeLocalEvent<ZombieComponent, MindRemovedMessage>(OnMindRemoved);
|
||||
|
||||
@@ -168,6 +169,11 @@ namespace Content.Server.Zombies
|
||||
args.Dead = true;
|
||||
}
|
||||
|
||||
private void OnGetCharacterUnrevivableIC(EntityUid uid, ZombieComponent component, ref GetCharacterUnrevivableIcEvent args)
|
||||
{
|
||||
args.Unrevivable = true;
|
||||
}
|
||||
|
||||
private void OnStartup(EntityUid uid, ZombieComponent component, ComponentStartup args)
|
||||
{
|
||||
if (component.EmoteSoundsId == null)
|
||||
|
||||
Reference in New Issue
Block a user