forked from new-frontiers-14/frontier-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-frontiers-14:master' into master
- Loading branch information
Showing
42 changed files
with
1,359 additions
and
475 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
2 changes: 1 addition & 1 deletion
2
Content.Server/Worldgen/Components/Debris/OwnedDebrisComponent.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
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
123 changes: 107 additions & 16 deletions
123
Content.Server/_NF/StationEvents/Components/BluespaceErrorRuleComponent.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 |
---|---|---|
@@ -1,38 +1,129 @@ | ||
using Content.Server.StationEvents.Events; | ||
using Content.Server.StationEvents.Events; | ||
using Content.Shared.Storage; | ||
using Content.Server.Shuttles.Systems; | ||
using Content.Shared.Dataset; | ||
using Content.Shared.Procedural; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Utility; | ||
|
||
namespace Content.Server.StationEvents.Components; | ||
|
||
[RegisterComponent, Access(typeof(BluespaceErrorRule))] | ||
[RegisterComponent, Access(typeof(BluespaceErrorRule), typeof(ShuttleSystem))] | ||
public sealed partial class BluespaceErrorRuleComponent : Component | ||
{ | ||
/// <summary> | ||
/// List of paths to the grids that can be bluespaced in. | ||
/// Dictionary of groups where each group will have entries selected. | ||
/// String is just an identifier to make yaml easier. | ||
/// </summary> | ||
[DataField("gridPaths")] | ||
public List<string> GridPaths = new(); | ||
[DataField(required: true)] public Dictionary<string, IBluespaceSpawnGroup> Groups = new(); | ||
|
||
/// <summary> | ||
/// The color of your thing. The name should be set by the mapper when mapping. | ||
/// The grid in question, set after starting the event | ||
/// </summary> | ||
[DataField("color")] | ||
public Color Color = new Color(225, 15, 155); | ||
[DataField] | ||
public List<EntityUid> GridsUid = new(); | ||
|
||
/// <summary> | ||
/// Multiplier to apply to the remaining value of a grid, to be deposited in the station account for defending | ||
/// If true, the grids are deleted at the end of the event. If false, the grids are left in the map. | ||
/// </summary> | ||
[DataField("rewardFactor")] | ||
public float RewardFactor = 0f; | ||
[DataField] | ||
public bool DeleteGridsOnEnd = true; | ||
|
||
/// <summary> | ||
/// The grid in question, set after starting the event | ||
/// Multiplier to apply to the remaining value of a grid, to be deposited in the station account for defending the grids. | ||
/// Note: | ||
/// </summary> | ||
[DataField("gridUid")] | ||
public EntityUid? GridUid = null; | ||
[DataField] | ||
public float NfsdRewardFactor = 0f; | ||
|
||
/// <summary> | ||
/// How much the grid is appraised at upon entering into existence, set after starting the event | ||
/// </summary> | ||
[DataField("startingValue")] | ||
public double startingValue = 0; | ||
[DataField] | ||
public double StartingValue = 0; | ||
} | ||
|
||
public interface IBluespaceSpawnGroup | ||
{ | ||
/// <summary> | ||
/// Minimum distance to spawn away from the station. | ||
/// </summary> | ||
public float MinimumDistance { get; } | ||
|
||
/// <summary> | ||
/// Maximum distance to spawn away from the station. | ||
/// </summary> | ||
public float MaximumDistance { get; } | ||
|
||
/// <inheritdoc /> | ||
public List<LocId> NameLoc { get; } | ||
|
||
/// <inheritdoc /> | ||
public ProtoId<DatasetPrototype>? NameDataset { get; } | ||
|
||
/// <inheritdoc /> | ||
int MinCount { get; set; } | ||
|
||
/// <inheritdoc /> | ||
int MaxCount { get; set; } | ||
|
||
/// <summary> | ||
/// Components to be added to any spawned grids. | ||
/// </summary> | ||
public ComponentRegistry AddComponents { get; set; } | ||
|
||
/// <summary> | ||
/// Should we set the metadata name of a grid. Useful for admin purposes. | ||
/// </summary> | ||
public bool NameGrid { get; set; } | ||
} | ||
|
||
[DataRecord] | ||
public sealed class BluespaceDungeonSpawnGroup : IBluespaceSpawnGroup | ||
{ | ||
/// <summary> | ||
/// Prototypes we can choose from to spawn. | ||
/// </summary> | ||
public List<ProtoId<DungeonConfigPrototype>> Protos = new(); | ||
|
||
/// <inheritdoc /> | ||
public float MinimumDistance { get; } | ||
|
||
public float MaximumDistance { get; } | ||
|
||
/// <inheritdoc /> | ||
public List<LocId> NameLoc { get; } = new(); | ||
|
||
/// <inheritdoc /> | ||
public ProtoId<DatasetPrototype>? NameDataset { get; } | ||
|
||
/// <inheritdoc /> | ||
public int MinCount { get; set; } = 1; | ||
|
||
/// <inheritdoc /> | ||
public int MaxCount { get; set; } = 1; | ||
|
||
/// <inheritdoc /> | ||
public ComponentRegistry AddComponents { get; set; } = new(); | ||
|
||
/// <inheritdoc /> | ||
public bool NameGrid { get; set; } = false; | ||
} | ||
|
||
[DataRecord] | ||
public sealed class BluespaceGridSpawnGroup : IBluespaceSpawnGroup | ||
{ | ||
public List<ResPath> Paths = new(); | ||
|
||
/// <inheritdoc /> | ||
public float MinimumDistance { get; } | ||
|
||
/// <inheritdoc /> | ||
public float MaximumDistance { get; } | ||
public List<LocId> NameLoc { get; } = new(); | ||
public ProtoId<DatasetPrototype>? NameDataset { get; } | ||
public int MinCount { get; set; } = 1; | ||
public int MaxCount { get; set; } = 1; | ||
public ComponentRegistry AddComponents { get; set; } = new(); | ||
public bool NameGrid { get; set; } = true; | ||
} |
Oops, something went wrong.