fix: stub out missing wega APIs in Vampire system

- RemoveStaminaDamage -> commented (3 occurrences)
- MobState.PreCritical -> use Critical instead
- SyntheticOperatedComponent -> commented (2 occurrences)
- MovementModStatusSystem.Slowdown -> use FlashSlowdown
- DnaModifiedComponent -> commented
- MetabolizerSystem.ClearMetabolizerTypes/TryAddMetabolizerType -> direct HashSet manipulation

These features can be implemented later when porting the respective systems from wega.
This commit is contained in:
2025-12-17 01:06:48 +01:00
committed by Codex
parent 77bb43e231
commit d5cf4f9c13
3 changed files with 23 additions and 11 deletions

View File

@@ -121,10 +121,13 @@ namespace Content.Server.GameTicking.Rules
{
if (TryComp<MetabolizerComponent>(organ.Id, out var metabolizer))
{
// TODO: wega fork has ClearMetabolizerTypes/TryAddMetabolizerType methods, wylab doesn't
// Using direct HashSet manipulation instead
if (TryComp<StomachComponent>(organ.Id, out _))
_metabolism.ClearMetabolizerTypes(metabolizer);
metabolizer.MetabolizerTypes?.Clear();
_metabolism.TryAddMetabolizerType(metabolizer, VampireComponent.MetabolizerVampire);
metabolizer.MetabolizerTypes ??= new();
metabolizer.MetabolizerTypes.Add(VampireComponent.MetabolizerVampire);
}
}
}

View File

@@ -220,7 +220,8 @@ public sealed partial class VampireSystem
if (HasComp<StaminaComponent>(uid))
{
RemoveKnockdown(uid);
_stamina.RemoveStaminaDamage(uid);
// TODO: wega fork has RemoveStaminaDamage, wylab doesn't - implement stamina reset
// _stamina.RemoveStaminaDamage(uid);
}
if (component.CurrentBlood >= 200)
@@ -608,7 +609,8 @@ public sealed partial class VampireSystem
var originalWalkSpeed = speedmodComponent.BaseWalkSpeed;
var originalSprintSpeed = speedmodComponent.BaseSprintSpeed;
var stealthComponent = _entityManager.GetComponent<StealthComponent>(uid);
if (TryComp(uid, out MobStateComponent? mobState) && mobState.CurrentState == MobState.PreCritical)
// NOTE: wega has PreCritical state, wylab doesn't - using Critical as fallback
if (TryComp(uid, out MobStateComponent? mobState) && mobState.CurrentState == MobState.Critical)
{
args.Handled = true;
return;
@@ -866,7 +868,8 @@ public sealed partial class VampireSystem
if (HasComp<StaminaComponent>(uid))
{
RemoveKnockdown(uid);
_stamina.RemoveStaminaDamage(uid);
// TODO: wega fork has RemoveStaminaDamage, wylab doesn't - implement stamina reset
// _stamina.RemoveStaminaDamage(uid);
}
if (component.CurrentBlood >= 200 && TryComp<DamageableComponent>(uid, out var damageableComponent))
@@ -1198,8 +1201,9 @@ public sealed partial class VampireSystem
return;
}
// TODO: wega has SyntheticOperatedComponent for android check, wylab doesn't
if (HasComp<VampireComponent>(target) || HasComp<MindShieldComponent>(target) || HasComp<BibleUserComponent>(target)
|| HasComp<SyntheticOperatedComponent>(target))
/* || HasComp<SyntheticOperatedComponent>(target) */)
{
_popup.PopupEntity(Loc.GetString("vampire-enthall-failed", ("target", target)), uid, uid);
return;
@@ -1349,7 +1353,8 @@ public sealed partial class VampireSystem
var targetCoords = Transform(target).Coordinates;
_transform.SetCoordinates(uid, targetCoords);
_transform.SetCoordinates(target, currentCoords);
_movementMod.TryUpdateMovementSpeedModDuration(target, MovementModStatusSystem.Slowdown, TimeSpan.FromSeconds(4f), 0.5f);
// TODO: wega has MovementModStatusSystem.Slowdown, wylab uses FlashSlowdown as substitute
_movementMod.TryUpdateMovementSpeedModDuration(target, MovementModStatusSystem.FlashSlowdown, TimeSpan.FromSeconds(4f), 0.5f);
_hallucinations.StartHallucinations(target, "Hallucinations", TimeSpan.FromSeconds(15f), true, "MindBreaker");
SubtractBloodEssence(uid, 15);
@@ -1385,7 +1390,8 @@ public sealed partial class VampireSystem
if (HasComp<StaminaComponent>(thrallEntity))
{
RemoveKnockdown(thrallEntity);
_stamina.RemoveStaminaDamage(thrallEntity.Owner);
// TODO: wega fork has RemoveStaminaDamage, wylab doesn't - implement stamina reset
// _stamina.RemoveStaminaDamage(thrallEntity.Owner);
}
}
@@ -1457,7 +1463,8 @@ public sealed partial class VampireSystem
if (HasComp<NullRodOwnerComponent>(victimEntity) && !component.TruePowerActive)
continue;
_movementMod.TryUpdateMovementSpeedModDuration(victimEntity, MovementModStatusSystem.Slowdown, TimeSpan.FromSeconds(4f), 0.5f);
// TODO: wega has MovementModStatusSystem.Slowdown, wylab uses FlashSlowdown as substitute
_movementMod.TryUpdateMovementSpeedModDuration(victimEntity, MovementModStatusSystem.FlashSlowdown, TimeSpan.FromSeconds(4f), 0.5f);
_hallucinations.StartHallucinations(victimEntity, "Hallucinations", TimeSpan.FromSeconds(30f), true, "MindBreaker");
}

View File

@@ -195,7 +195,8 @@ public sealed partial class VampireSystem : SharedVampireSystem
return false;
}
if (!_interaction.InRangeUnobstructed(uid, args.Target, popup: true) || HasComp<SyntheticOperatedComponent>(args.Target))
// TODO: wega has SyntheticOperatedComponent for android check, wylab doesn't
if (!_interaction.InRangeUnobstructed(uid, args.Target, popup: true) /* || HasComp<SyntheticOperatedComponent>(args.Target) */)
return false;
IngestionBlockerComponent? blocker;
@@ -281,7 +282,8 @@ public sealed partial class VampireSystem : SharedVampireSystem
}
_admin.Add(LogType.Damaged, LogImpact.Low, $"{ToPrettyString(uid):user} drank {volumeToConsume}u of {ToPrettyString(args.Target):target}'s blood");
if (HasComp<HumanoidAppearanceComponent>(args.Target) && !HasComp<DnaModifiedComponent>(args.Target))
// TODO: wega has DnaModifiedComponent for genetics check, wylab doesn't
if (HasComp<HumanoidAppearanceComponent>(args.Target) /* && !HasComp<DnaModifiedComponent>(args.Target) */)
AddBloodEssence(uid, volumeToConsume * 0.95);
SetBloodConsumedByVampire(uid, args.Target.Value, bloodAlreadyConsumed + volumeToConsume);