-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 2024-09-21-rgbb
- Loading branch information
Showing
91 changed files
with
2,130 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace Content.Server._NF.Forensics; | ||
|
||
[RegisterComponent] | ||
public sealed partial class ForensicsCartridgeComponent : Component; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...rver/_NF/GameTicking/Rules/VariationPass/Components/DeadDropHintVariationPassComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.GameTicking.Rules.VariationPass.Components; | ||
|
||
/// <summary> | ||
/// This handles generating round-start dead drop hints. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class DeadDropHintVariationPassComponent : Component | ||
{ | ||
/// <summary> | ||
/// Chance that a potential hint will be generated on a table. | ||
/// Remember, the average number | ||
/// </summary> | ||
[DataField] | ||
public float HintSpawnChance = 0.02f; | ||
|
||
/// <summary> | ||
/// The entity to spawn for a hint. | ||
/// </summary> | ||
[DataField] | ||
public EntProtoId HintSpawnPrototype = "PaperDeadDropHint"; | ||
} |
30 changes: 30 additions & 0 deletions
30
...ent.Server/_NF/GameTicking/Rules/VariationPass/Systems/DeadDropHintVariationPassSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Content.Server._NF.Smuggling.Components; | ||
using Content.Server.GameTicking.Rules.VariationPass.Components; | ||
using Content.Shared.Climbing.Components; | ||
using Content.Shared.Placeable; | ||
|
||
namespace Content.Server.GameTicking.Rules.VariationPass; | ||
|
||
/// <inheritdoc cref="DeadDropHintVariationPassComponent"/> | ||
public sealed class DeadDropHintVariationPass : VariationPassSystem<DeadDropHintVariationPassComponent> | ||
{ | ||
protected override void ApplyVariation(Entity<DeadDropHintVariationPassComponent> ent, ref StationVariationPassEvent args) | ||
{ | ||
if (HasComp<StationDeadDropHintExemptComponent>(args.Station)) | ||
return; | ||
|
||
// Best query for table-like objects: bonkable filters out grills. | ||
var query = AllEntityQuery<BonkableComponent, PlaceableSurfaceComponent, TransformComponent>(); | ||
while (query.MoveNext(out var uid, out var _, out var _, out var xform)) | ||
{ | ||
if (!IsMemberOfStation((uid, xform), ref args)) | ||
continue; | ||
|
||
var prob = Random.NextFloat(); | ||
if (prob < ent.Comp.HintSpawnChance) | ||
{ | ||
SpawnAttachedTo(ent.Comp.HintSpawnPrototype, xform.Coordinates); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace Content.Server._NF.GameTicking.Events; | ||
|
||
/// <summary> | ||
/// Raised once all of the stations have been generated. | ||
/// </summary> | ||
public sealed class StationsGeneratedEvent : EntityEventArgs | ||
{ | ||
public StationsGeneratedEvent() | ||
{ | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Content.Server/_NF/Smuggling/Components/ContrabandPodGridComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Content.Server._NF.Smuggling.Components; | ||
|
||
/// <summary> | ||
/// Denotes a grid that is brought in via a dead drop. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class ContrabandPodGridComponent : Component | ||
{ | ||
/// <summary> | ||
/// Maximum number of dead drops to spawn on the station. | ||
/// </summary> | ||
[DataField] | ||
public bool Scanned = false; | ||
} |
Oops, something went wrong.