Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a4080e4
C
LukeZurg22 Nov 26, 2025
eba55ef
Corrected Null Machine Localizations
LukeZurg22 Nov 26, 2025
0d03443
Fixed Sprite for Claimant Stake Lights
LukeZurg22 Nov 26, 2025
843dd66
Minor Todo correction on ZombieSystem.cs
LukeZurg22 Nov 26, 2025
09d7064
Extending Outside of Scope to Fix Comments in Multiple Classes & Hand…
LukeZurg22 Nov 26, 2025
49c2b92
Modified GCAbleObjectComponent.cs to Permit ClaimantStakeSystem.cs Ac…
LukeZurg22 Nov 26, 2025
26576ab
Added Power Popup to claimant_stake.ftl
LukeZurg22 Nov 26, 2025
c5e81dd
Added Claiming Locale to claimant_stake.ftl
LukeZurg22 Nov 26, 2025
a0c5835
Refactored EmancipationGridSystem.cs
LukeZurg22 Nov 26, 2025
d5ff111
Added Additional functionality to StaticPowerSystem.cs, and Changed I…
LukeZurg22 Nov 26, 2025
27c2301
Added Color assignation methods to IFFComponent.cs
LukeZurg22 Nov 26, 2025
f92b6b2
Added Shutdown Locale to claimant_stake.ftl
LukeZurg22 Nov 26, 2025
d2d016f
Fixed NullExtensionSystem.cs to actually check for Grids
LukeZurg22 Nov 26, 2025
2af70f6
Updated StaticPowerSystem.cs
LukeZurg22 Nov 26, 2025
e1b45cc
Added Claimant Stake Prototype & Flatpack
LukeZurg22 Nov 26, 2025
ea88c0b
Updated claimant_stake.ftl
LukeZurg22 Nov 26, 2025
804849b
Refactored Null Extension System
LukeZurg22 Nov 26, 2025
f7b4c48
Added Yet more Claimant Stake Locale
LukeZurg22 Nov 26, 2025
2b43405
Final Localization Adjustment
LukeZurg22 Nov 27, 2025
15904ae
Claimant Stake Systems & Components In Addition to Other System Changes
LukeZurg22 Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion Content.Server/Power/EntitySystems/StaticPowerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,53 @@ public static class StaticPowerSystem
{
// Using this makes the call shorter.
// ReSharper disable once UnusedParameter.Global
public static bool IsPowered(this EntitySystem system, EntityUid uid, IEntityManager entManager, ApcPowerReceiverComponent? receiver = null)
public static bool IsPowered(this EntitySystem system,
EntityUid uid,
IEntityManager entManager,
ApcPowerReceiverComponent? receiver = null)
{
if (receiver == null && !entManager.TryGetComponent(uid, out receiver))
return true;

return receiver.Powered;
}

public static void Toggle<T>(this EntitySystem system, IEntityManager entManager, Entity<T> ent)
where T : IComponent
{
if (IsPowered(system, ent.Owner, entManager))
Disable(system, entManager, ent);
else
Enable(system, entManager, ent);
}

public static void Disable<T>(this EntitySystem system, IEntityManager entManager, Entity<T> ent) where T : IComponent
{
if (entManager.TryGetComponent<ApcPowerReceiverComponent>(ent, out var receiver))
Disable(entManager, ent, receiver);
}

/// <summary>
/// Forces power to be disabled.
/// </summary>
public static void Disable(IEntityManager entManager, EntityUid uid, ApcPowerReceiverComponent? receiver = null)
{
if (receiver == null && !entManager.TryGetComponent(uid, out receiver))
return;
receiver.PowerDisabled = true;
}

/// <summary>
/// Lifts the enforced power disable, if there is any.
/// </summary>
public static void Enable(
this EntitySystem system,
IEntityManager entManager,
EntityUid uid,
ApcPowerReceiverComponent? receiver = null)
{
if (receiver == null && !entManager.TryGetComponent(uid, out receiver))
return;
receiver.PowerDisabled = false;
}
}
8 changes: 4 additions & 4 deletions Content.Server/Shuttles/Systems/ShuttleConsoleLockSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ private bool TryUnlockWithVoucher(EntityUid console, EntityUid voucher, ShuttleC
var deedFound = false;
var query = EntityQueryEnumerator<ShuttleDeedComponent>();

while (query.MoveNext(out var entity, out var deed))
while (query.MoveNext(out _, out var deed))
{
var deedShuttleId = deed.ShuttleUid.HasValue ? deed.ShuttleUid.Value.ToString() : null;
var deedShuttleId = deed.ShuttleUid?.ToString();

// Check if this deed was purchased with this specific voucher and matches the shuttle ID
if (deed.PurchasedWithVoucher &&
Expand Down Expand Up @@ -302,9 +302,9 @@ private bool TryLockWithVoucher(EntityUid console, EntityUid voucher, ShuttleCon
var deedFound = false;
var query = EntityQueryEnumerator<ShuttleDeedComponent>();

while (query.MoveNext(out var entity, out var deed))
while (query.MoveNext(out _, out var deed))
{
var deedShuttleId = deed.ShuttleUid.HasValue ? deed.ShuttleUid.Value.ToString() : null;
var deedShuttleId = deed.ShuttleUid?.ToString();

// Check if this deed was purchased with this specific voucher and matches the shuttle ID
if (deed.PurchasedWithVoucher &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using Content.Server._Null.Systems;
using Content.Server.Worldgen.Prototypes;
using Content.Server.Worldgen.Systems.GC;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Server.Worldgen.Components.GC;

/// <summary>
/// This is used for whether or not a GCable object is "dirty". Firing GCDirtyEvent on the object is the correct way to
/// This is used for whether a GCable object is "dirty". Firing GCDirtyEvent on the object is the correct way to
/// set this up.
/// </summary>
[RegisterComponent]
[Access(typeof(GCQueueSystem))]
[Access(typeof(GCQueueSystem), typeof(ClaimantStakeSystem))]
public sealed partial class GCAbleObjectComponent : Component
{
/// <summary>
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/Zombies/ZombieSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ public override void Initialize()
SubscribeLocalEvent<IncurableZombieComponent, MapInitEvent>(OnPendingMapInit);

SubscribeLocalEvent<ZombifyOnDeathComponent, MobStateChangedEvent>(OnDamageChanged);

// TODO: Add OnCure event read, or whatever method of curing besides cloning comes up.
// Also a possible list of component *types* could be better, especially if using reflection to handle them.
}

private void OnBeforeRemoveAnomalyOnDeath(Entity<PendingZombieComponent> ent,
Expand Down
63 changes: 63 additions & 0 deletions Content.Server/_Null/Components/ClaimantStakeComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
using Content.Server._Null.Systems;
using Content.Shared.Shuttles.Components;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Server._Null.Components;

[RegisterComponent, Access(typeof(ClaimantStakeSystem))]
public sealed partial class ClaimantStakeComponent : Component
{
[ViewVariables(VVAccess.ReadOnly)]
public EntityUid? PlayerOwner { get; set; }

[ViewVariables(VVAccess.ReadOnly)]
public EntityUid? ClaimedGrid { get; set; }

[DataField("useSound")]
public SoundSpecifier? SoundUse { get; set; }

[DataField("awakeSound")]
public SoundSpecifier? SoundAwake { get; set; }

[DataField("sleepSound")]
public SoundSpecifier? ShutdownSound { get; set; }

public ClaimantStakeStatus StakeStatus = ClaimantStakeStatus.Offline;

public const float AwaitBeepSoundTime = 5f;
public float RemainingTime = AwaitBeepSoundTime;

/// <summary>
/// Check to see if this device is receiving power. Can be toggled, but it would be unwise due to possible
/// unpredicted behaviour.
/// </summary>
public bool Enabled = false;

#region Data Retention

public IFFFlags OldFlags = IFFFlags.None;
public string? OldColorHex = null;
public string? OldGridName = null;
public string? NewColorHex { get; set; }

#endregion

[ValidatePrototypeId<EntityPrototype>]
public const string WreckagePrototype = "NFBaseWreckDebris";

public const string WreckageRemovalQueueName = "SpaceDebris";
public const string DefaultUseSound = "/Audio/Effects/metal_crunch.ogg";
public const string DefaultAwakeSound = "/Audio/Effects/RingtoneNotes/asharp.ogg";
public const string DefaultShutdownSound = "/Audio/Effects/sparks4.ogg";

public static AudioParams DefaultAudioParameters = AudioParams.Default.WithVolume(-3);
}

public enum ClaimantStakeStatus : byte
{
Offline,
Warming,
Online,
Declaiming,
}
Loading
Loading