Experimental Anomaly Vessel (#22233)
* experimental anomaly vessel * sprote changes
This commit is contained in:
@@ -20,7 +20,6 @@ public sealed partial class AnomalySystem
|
||||
{
|
||||
SubscribeLocalEvent<AnomalyVesselComponent, ComponentShutdown>(OnVesselShutdown);
|
||||
SubscribeLocalEvent<AnomalyVesselComponent, MapInitEvent>(OnVesselMapInit);
|
||||
SubscribeLocalEvent<AnomalyVesselComponent, RefreshPartsEvent>(OnRefreshParts);
|
||||
SubscribeLocalEvent<AnomalyVesselComponent, UpgradeExamineEvent>(OnUpgradeExamine);
|
||||
SubscribeLocalEvent<AnomalyVesselComponent, InteractUsingEvent>(OnVesselInteractUsing);
|
||||
SubscribeLocalEvent<AnomalyVesselComponent, ExaminedEvent>(OnExamined);
|
||||
@@ -68,12 +67,6 @@ public sealed partial class AnomalySystem
|
||||
UpdateVesselAppearance(uid, component);
|
||||
}
|
||||
|
||||
private void OnRefreshParts(EntityUid uid, AnomalyVesselComponent component, RefreshPartsEvent args)
|
||||
{
|
||||
var modifierRating = args.PartRatings[component.MachinePartPointModifier] - 1;
|
||||
component.PointMultiplier = MathF.Pow(component.PartRatingPointModifier, modifierRating);
|
||||
}
|
||||
|
||||
private void OnUpgradeExamine(EntityUid uid, AnomalyVesselComponent component, UpgradeExamineEvent args)
|
||||
{
|
||||
args.AddPercentageUpgrade("anomaly-vessel-component-upgrade-output", component.PointMultiplier);
|
||||
@@ -93,6 +86,7 @@ public sealed partial class AnomalySystem
|
||||
|
||||
component.Anomaly = scanner.ScannedAnomaly;
|
||||
anomalyComponent.ConnectedVessel = uid;
|
||||
_radiation.SetSourceEnabled(uid, true);
|
||||
UpdateVesselAppearance(uid, component);
|
||||
Popup.PopupEntity(Loc.GetString("anomaly-vessel-component-anomaly-assigned"), uid);
|
||||
}
|
||||
@@ -120,6 +114,7 @@ public sealed partial class AnomalySystem
|
||||
|
||||
component.Anomaly = null;
|
||||
UpdateVesselAppearance(ent, component);
|
||||
_radiation.SetSourceEnabled(ent, false);
|
||||
|
||||
if (!args.Supercritical)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user