Salvage magnet revamp (#23119)
* Generic offering window * More work * weh * Parity * Progression meter * magnet * rona * PG asteroid work * code red * Asteroid spawnings * clams * a * Marker fixes * More fixes * Workings of biome asteroids * A * Fix this loading code * a * Fix masking * weh * Fixes * Magnet claiming * toe * petogue * magnet * Bunch of fixes * Fix default * Fixes * asteroids * Fix offerings * Localisation and a bunch of fixes * a * Fixes * Preliminary draft * Announcement fixes * Fixes and bump spawn rate * Fix asteroid spawns and UI * More fixes * Expeditions fix * fix * Gravity * Fix announcement rounding * a * Offset tweak * sus * jankass * Fix merge
This commit is contained in:
7
Content.Server/Salvage/Magnet/SalvageMagnetComponent.cs
Normal file
7
Content.Server/Salvage/Magnet/SalvageMagnetComponent.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Content.Server.Salvage.Magnet;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class SalvageMagnetComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
57
Content.Server/Salvage/Magnet/SalvageMagnetDataComponent.cs
Normal file
57
Content.Server/Salvage/Magnet/SalvageMagnetDataComponent.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Server.Salvage.Magnet;
|
||||
|
||||
/// <summary>
|
||||
/// Added to the station to hold salvage magnet data.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SalvageMagnetDataComponent : Component
|
||||
{
|
||||
// May be multiple due to splitting.
|
||||
|
||||
/// <summary>
|
||||
/// Entities currently magnetised.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public List<EntityUid>? ActiveEntities;
|
||||
|
||||
/// <summary>
|
||||
/// If the magnet is currently active when does it end.
|
||||
/// </summary>
|
||||
[DataField(customTypeSerializer:typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan? EndTime;
|
||||
|
||||
[DataField(customTypeSerializer:typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan NextOffer;
|
||||
|
||||
/// <summary>
|
||||
/// How long salvage will be active for before despawning.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public TimeSpan ActiveTime = TimeSpan.FromMinutes(6);
|
||||
|
||||
/// <summary>
|
||||
/// Cooldown between offerings after one ends.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public TimeSpan OfferCooldown = TimeSpan.FromMinutes(3);
|
||||
|
||||
/// <summary>
|
||||
/// Seeds currently offered
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public List<int> Offered = new();
|
||||
|
||||
[DataField]
|
||||
public int OfferCount = 6;
|
||||
|
||||
[DataField]
|
||||
public int ActiveSeed;
|
||||
|
||||
/// <summary>
|
||||
/// Final countdown announcement.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool Announced;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Content.Server.Salvage.Magnet;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the entity is a salvage target for tracking.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SalvageMagnetTargetComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Entity that spawned us.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public EntityUid DataTarget;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Content.Server.Salvage.Magnet;
|
||||
|
||||
// This is dumb
|
||||
/// <summary>
|
||||
/// Deletes the attached entity if the linked entity is deleted.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SalvageMobRestrictionsComponent : Component
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntityUid LinkedEntity;
|
||||
}
|
||||
Reference in New Issue
Block a user