Experimental Anomaly Vessel (#22233)
* experimental anomaly vessel * sprote changes
@@ -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;
|
||||
|
||||
@@ -3,13 +3,13 @@ using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Audio;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Materials;
|
||||
using Content.Server.Radiation.Systems;
|
||||
using Content.Server.Radio.EntitySystems;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.Anomaly;
|
||||
using Content.Shared.Anomaly.Components;
|
||||
using Content.Shared.DoAfter;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Physics.Events;
|
||||
@@ -33,6 +33,7 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
|
||||
[Dependency] private readonly SharedPointLightSystem _pointLight = default!;
|
||||
[Dependency] private readonly StationSystem _station = default!;
|
||||
[Dependency] private readonly RadioSystem _radio = default!;
|
||||
[Dependency] private readonly RadiationSystem _radiation = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Content.Shared.Anomaly;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Anomaly.Components;
|
||||
|
||||
@@ -25,22 +23,9 @@ public sealed partial class AnomalyVesselComponent : Component
|
||||
/// <summary>
|
||||
/// A multiplier applied to the amount of points generated.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float PointMultiplier = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The machine part that affects the point multiplier of the vessel
|
||||
/// </summary>
|
||||
[DataField("machinePartPointModifier", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string MachinePartPointModifier = "Capacitor";
|
||||
|
||||
/// <summary>
|
||||
/// A value used to scale the point multiplier
|
||||
/// with the corresponding part rating.
|
||||
/// </summary>
|
||||
[DataField("partRatingPointModifier")]
|
||||
public float PartRatingPointModifier = 1.25f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum time between each beep
|
||||
/// </summary>
|
||||
|
||||
@@ -44,6 +44,9 @@ public partial class RadiationSystem
|
||||
var sourcesData = new ValueList<(EntityUid, RadiationSourceComponent, TransformComponent, Vector2)>();
|
||||
while (sources.MoveNext(out var uid, out var source, out var sourceTrs))
|
||||
{
|
||||
if (!source.Enabled)
|
||||
continue;
|
||||
|
||||
var worldPos = _transform.GetWorldPosition(sourceTrs, transformQuery);
|
||||
var data = (uid, source, sourceTrs, worldPos);
|
||||
sourcesData.Add(data);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Radiation.Components;
|
||||
using Content.Shared.Radiation.Components;
|
||||
using Content.Shared.Radiation.Events;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Map;
|
||||
@@ -45,6 +46,14 @@ public sealed partial class RadiationSystem : EntitySystem
|
||||
RaiseLocalEvent(uid, msg);
|
||||
}
|
||||
|
||||
public void SetSourceEnabled(Entity<RadiationSourceComponent?> entity, bool val)
|
||||
{
|
||||
if (!Resolve(entity, ref entity.Comp, false))
|
||||
return;
|
||||
|
||||
entity.Comp.Enabled = val;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks entity to receive/ignore radiation rays.
|
||||
/// </summary>
|
||||
|
||||
@@ -23,4 +23,7 @@ public sealed partial class RadiationSourceComponent : Component
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("slope")]
|
||||
public float Slope = 0.5f;
|
||||
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool Enabled;
|
||||
}
|
||||
|
||||
@@ -228,11 +228,28 @@
|
||||
- type: MachineBoard
|
||||
prototype: MachineAnomalyVessel
|
||||
requirements:
|
||||
Capacitor: 5
|
||||
Capacitor: 3
|
||||
materialRequirements:
|
||||
Cable: 1
|
||||
PlasmaGlass: 10
|
||||
|
||||
- type: entity
|
||||
parent: BaseMachineCircuitboard
|
||||
id: AnomalyVesselExperimentalCircuitboard
|
||||
name: experimental anomaly vessel machine board
|
||||
description: A machine printed circuit board for an experimental anomaly vessel.
|
||||
components:
|
||||
- type: Sprite
|
||||
state: science
|
||||
- type: MachineBoard
|
||||
prototype: MachineAnomalyVesselExperimental
|
||||
requirements:
|
||||
Capacitor: 3
|
||||
materialRequirements:
|
||||
Cable: 5
|
||||
PlasmaGlass: 15
|
||||
MetalRod: 4
|
||||
|
||||
- type: entity
|
||||
parent: BaseMachineCircuitboard
|
||||
id: AnomalySynchronizerCircuitboard
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
id: MachineAnomalyVessel
|
||||
parent: [ BaseMachinePowered, ConstructibleMachine ]
|
||||
name: anomaly vessel
|
||||
description: A container able to harness a scan of an anomaly and turn it into research points.
|
||||
description: A container able to harness a scan of an anomaly and turn it into research data.
|
||||
components:
|
||||
- type: Sprite
|
||||
noRot: true
|
||||
@@ -77,12 +77,6 @@
|
||||
canCreateVacuum: false
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 300
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 150
|
||||
@@ -97,6 +91,32 @@
|
||||
guides:
|
||||
- ScannersAndVessels
|
||||
|
||||
- type: entity
|
||||
id: MachineAnomalyVesselExperimental
|
||||
parent: MachineAnomalyVessel
|
||||
name: experimental anomaly vessel
|
||||
description: An advanced anomaly vessel capable of greater research potential at the cost of increased volatility and low-level radioactive decay into the environment.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Structures/Machines/Anomaly/adv_anomaly_vessel.rsi
|
||||
offset: 0,0.5
|
||||
drawdepth: Mobs
|
||||
- type: SpriteFade
|
||||
- type: AnomalyVessel
|
||||
pointMultiplier: 2
|
||||
- type: RadiationSource
|
||||
intensity: 0.75
|
||||
slope: 0.1
|
||||
enabled: false
|
||||
- type: Machine
|
||||
board: AnomalyVesselExperimentalCircuitboard
|
||||
- type: Explosive
|
||||
explosionType: Default
|
||||
maxIntensity: 50
|
||||
intensitySlope: 7.5
|
||||
totalIntensity: 500
|
||||
canCreateVacuum: true
|
||||
|
||||
- type: entity
|
||||
id: MachineAPE
|
||||
parent: [ BaseMachinePowered, ConstructibleMachine ]
|
||||
|
||||
@@ -370,6 +370,7 @@
|
||||
- AnalysisComputerCircuitboard
|
||||
- ExosuitFabricatorMachineCircuitboard
|
||||
- AnomalyVesselCircuitboard
|
||||
- AnomalyVesselExperimentalCircuitboard
|
||||
- AnomalySynchronizerCircuitboard
|
||||
- APECircuitboard
|
||||
- ArtifactAnalyzerMachineCircuitboard
|
||||
|
||||
@@ -248,6 +248,15 @@
|
||||
Steel: 100
|
||||
Glass: 900
|
||||
|
||||
- type: latheRecipe
|
||||
id: AnomalyVesselExperimentalCircuitboard
|
||||
result: AnomalyVesselExperimentalCircuitboard
|
||||
completetime: 4
|
||||
materials:
|
||||
Steel: 100
|
||||
Glass: 900
|
||||
Gold: 100
|
||||
|
||||
- type: latheRecipe
|
||||
id: AnomalySynchronizerCircuitboard
|
||||
result: AnomalySynchronizerCircuitboard
|
||||
@@ -695,4 +704,4 @@
|
||||
materials:
|
||||
Steel: 100
|
||||
Glass: 900
|
||||
Gold: 100
|
||||
Gold: 100
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
recipeUnlocks:
|
||||
- WeaponPistolCHIMP
|
||||
- AnomalySynchronizerCircuitboard
|
||||
- AnomalyVesselExperimentalCircuitboard
|
||||
technologyPrerequisites:
|
||||
- BasicAnomalousResearch
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 273 B |
|
After Width: | Height: | Size: 259 B |
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC0-1.0",
|
||||
"copyright": "Created by EmoGarbage404 (github)",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 64
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "anomaly-1"
|
||||
},
|
||||
{
|
||||
"name": "anomaly-2"
|
||||
},
|
||||
{
|
||||
"name": "anomaly-3"
|
||||
},
|
||||
{
|
||||
"name": "base"
|
||||
},
|
||||
{
|
||||
"name": "panel"
|
||||
},
|
||||
{
|
||||
"name": "powered-1"
|
||||
},
|
||||
{
|
||||
"name": "powered-2"
|
||||
},
|
||||
{
|
||||
"name": "powered-3"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 223 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 176 B |
|
After Width: | Height: | Size: 177 B |