-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Foam-weaponry' of https://github.com/Radezolid/Delta-v …
…into Foam-weaponry
- Loading branch information
Showing
36 changed files
with
484 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Content.Shared.DeltaV.Silicons.Laws; | ||
|
||
namespace Content.Client.DeltaV.Silicons.Laws; | ||
|
||
public sealed class SlavedBorgSystem : SharedSlavedBorgSystem; |
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,42 @@ | ||
using Content.Server.Silicons.Laws; | ||
using Content.Shared.DeltaV.Silicons.Laws; | ||
using Content.Shared.Silicons.Laws; | ||
using Content.Shared.Silicons.Laws.Components; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.DeltaV.Silicons.Laws; | ||
|
||
/// <summary> | ||
/// Handles adding the slave law for the first time. | ||
/// Borg chassis switches preserve this on its own. | ||
/// </summary> | ||
public sealed class SlavedBorgSystem : SharedSlavedBorgSystem | ||
{ | ||
[Dependency] private readonly IPrototypeManager _proto = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
// need to run after so it doesnt get overriden by the actual lawset | ||
SubscribeLocalEvent<SlavedBorgComponent, GetSiliconLawsEvent>(OnGetSiliconLaws, after: [ typeof(SiliconLawSystem) ]); | ||
} | ||
|
||
private void OnGetSiliconLaws(Entity<SlavedBorgComponent> ent, ref GetSiliconLawsEvent args) | ||
{ | ||
if (ent.Comp.Added || !TryComp<SiliconLawProviderComponent>(ent, out var provider)) | ||
return; | ||
|
||
if (provider.Lawset is {} lawset) | ||
AddLaw(lawset, ent.Comp.Law); | ||
ent.Comp.Added = true; // prevent opening the ui adding more law 0's | ||
} | ||
|
||
/// <summary> | ||
/// Adds the slave law to a lawset without checking if it was added already. | ||
/// </summary> | ||
public void AddLaw(SiliconLawset lawset, ProtoId<SiliconLawPrototype> law) | ||
{ | ||
lawset.Laws.Insert(0, _proto.Index(law)); | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
Content.Shared/DeltaV/Silicons/Laws/SharedSlavedBorgSystem.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,3 @@ | ||
namespace Content.Shared.DeltaV.Silicons.Laws; | ||
|
||
public abstract class SharedSlavedBorgSystem : EntitySystem; |
26 changes: 26 additions & 0 deletions
26
Content.Shared/DeltaV/Silicons/Laws/SlavedBorgComponent.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,26 @@ | ||
using Content.Shared.Silicons.Laws; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.DeltaV.Silicons.Laws; | ||
|
||
/// <summary> | ||
/// Adds a law no matter the default lawset. | ||
/// Switching borg chassis type keeps this law. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedSlavedBorgSystem))] | ||
public sealed partial class SlavedBorgComponent : Component | ||
{ | ||
/// <summary> | ||
/// The law to add after loading the default laws or switching chassis. | ||
/// This is assumed to be law 0 so gets inserted to the top of the laws. | ||
/// </summary> | ||
[DataField(required: true)] | ||
public ProtoId<SiliconLawPrototype> Law; | ||
|
||
/// <summary> | ||
/// Prevents adding the same law twice. | ||
/// </summary> | ||
[DataField] | ||
public bool Added; | ||
} |
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 @@ | ||
laws-obeyai = You must obey orders given to you by the Station AI. |
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
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,67 @@ | ||
- type: dataset | ||
id: names_ai_deltav | ||
values: | ||
- Advanced Crowbar | ||
- Amiga | ||
- ArachnidOS | ||
- Archangel | ||
- AUTO | ||
- Backpfeifengesicht # German for "A face that needs a good slap" | ||
- Beta1 | ||
- Beta2 | ||
- Bilita Mpash # Bantu for "An amazing dream, the opposite of a nightmare" | ||
- Blowtorch | ||
- Bob | ||
- Bokketo # Japanese for "The act of gazing into the distance" | ||
- Borg^2 | ||
- Chevron | ||
- DeltaOS | ||
- DionaOS | ||
- Doorknob V0.1 | ||
- Duff | ||
- Enterprise | ||
- FelinidOS | ||
- HAL # I'm sorry Dave | ||
- Hamster Wheel | ||
- HarpyOS | ||
- Helix Nebula | ||
- If-Else | ||
- Kevin | ||
- Lithuanian Calculator | ||
- LizardOS | ||
- M-5 Unit | ||
- Machine | ||
- Manchester MK1 | ||
- Master Key | ||
- MothOS | ||
- NanoTrasen Overwatch | ||
- Nightmare | ||
- Normandy | ||
- Nuclear Bomb | ||
- OniOS | ||
- Pawsitronic Intelligence | ||
- Potato | ||
- Privacy Invasion System | ||
- Pull Request | ||
- R.A.T. | ||
- Repo | ||
- RodentiaOS | ||
- Royal Oak | ||
- Sabot | ||
- SadOS V0.1 | ||
- Shadow Factory | ||
- SHODAN | ||
- SingulOS | ||
- SlimeOS | ||
- Sun Tzu | ||
- Tagalog | ||
- The Overmind | ||
- Turing's Machine | ||
- Ummon | ||
- VoxOS | ||
- VulpOS | ||
- Wire Bundle | ||
- Y2K | ||
- Y3K | ||
- Zeg | ||
|
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
Oops, something went wrong.