Skip to content

Commit

Permalink
Merge branch 'Foam-weaponry' of https://github.com/Radezolid/Delta-v
Browse files Browse the repository at this point in the history
…into Foam-weaponry
  • Loading branch information
Radezolid committed Dec 6, 2024
2 parents 63dfcc2 + 8b97407 commit dc7b684
Show file tree
Hide file tree
Showing 36 changed files with 484 additions and 50 deletions.
5 changes: 5 additions & 0 deletions Content.Client/DeltaV/Silicons/Laws/SlavedBorgSystem.cs
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;
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Content.Server.DeltaV.Silicons.Laws;
using Content.Server.Silicons.Laws;
using Content.Shared.DeltaV.Silicons.Laws;
using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.Silicons.Laws;
Expand All @@ -13,11 +15,16 @@ namespace Content.Server.Silicons.Borgs;
/// </summary>
public sealed partial class BorgSwitchableTypeSystem
{
[Dependency] private readonly SlavedBorgSystem _slavedBorg = default!;
[Dependency] private readonly SiliconLawSystem _law = default!;

private void ConfigureLawset(EntityUid uid, ProtoId<SiliconLawsetPrototype> id)
{
var laws = _law.GetLawset(id);

if (TryComp<SlavedBorgComponent>(uid, out var slaved))
_slavedBorg.AddLaw(laws, slaved.Law);

_law.SetLaws(laws.Laws, uid);

// re-add law 0 and final law based on new lawset
Expand Down
42 changes: 42 additions & 0 deletions Content.Server/DeltaV/Silicons/Laws/SlavedBorgSystem.cs
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));
}
}
2 changes: 1 addition & 1 deletion Content.Server/Silicons/Laws/SiliconLawSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private void OnEmagLawsAdded(EntityUid uid, SiliconLawProviderComponent componen
component.Lawset?.Laws.Insert(0, new SiliconLaw
{
LawString = Loc.GetString("law-emag-custom", ("name", name), ("title", Loc.GetString(component.Lawset.ObeysTo))), // DeltaV: pass name from variable
Order = 0
Order = -1 // Goobstation - AI/borg law changes - borgs obeying AI
});

//Add the secrecy law after the others
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Access/Components/IdCardConsoleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public WriteToTargetIdMessage(string fullName, string jobTitle, List<ProtoId<Acc
"ChiefJustice", // DeltaV - Add Chief Justice access
"Justice", // DeltaV - Add Justice access
"Prosecutor", // Delta V - Add Prosecutor access
"Robotics", // DeltaV
"Clerk", // Delta V - Add Clerk access
};

Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/DeltaV/Silicons/Laws/SharedSlavedBorgSystem.cs
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 Content.Shared/DeltaV/Silicons/Laws/SlavedBorgComponent.cs
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;
}
83 changes: 44 additions & 39 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,4 @@
Entries:
- author: UnicornOnLSD
changes:
- message: Submarine got better telecomms, a revamped psych. ward and more !
type: Tweak
id: 230
time: '2024-02-07T02:32:33.0000000+00:00'
- author: FluffiestFloof
changes:
- message: Fixed PSB not being edible by Reptilian
type: Fix
id: 231
time: '2024-02-08T15:38:11.0000000+00:00'
- author: Velcroboy
changes:
- message: Fixed martial artist access
type: Fix
id: 232
time: '2024-02-08T15:39:24.0000000+00:00'
- author: IamVelcroboy
changes:
- message: 'More improvements all around to Submarine Station as well as the addition
of medical cyborgs. '
type: Tweak
id: 233
time: '2024-02-08T19:21:16.0000000+00:00'
- author: FluffiestFloof
changes:
- message: Fixed missing Mantis stamp sprite.
type: Fix
id: 234
time: '2024-02-09T10:47:35.0000000+00:00'
- author: FluffiestFloof
changes:
- message: .38 Special is now in the ammo techfab.
type: Tweak
- message: Fixed .38 Special Mindbreaker not breaking minds.
type: Fix
id: 235
time: '2024-02-10T23:17:28.0000000+00:00'
- author: FluffiestFloof
changes:
- message: Fixed glimmer mite being extremely loud for some.
Expand Down Expand Up @@ -3797,3 +3758,47 @@
id: 729
time: '2024-12-01T13:28:31.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2329
- author: deltanedas
changes:
- message: Fixed Robotics access not being listed in ID card consoles.
type: Fix
id: 730
time: '2024-12-01T22:04:46.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2335
- author: deltanedas, Ilya246
changes:
- message: Borgs have a new law that makes them obey the AI.
type: Add
id: 731
time: '2024-12-01T22:48:13.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2337
- author: Ilya246
changes:
- message: AI's default lawset is now NTDefault. This should make it more station-oriented.
type: Tweak
- message: 'tweak: AI is now ion-stormable.'
type: Tweak
id: 732
time: '2024-12-01T22:48:03.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2338
- author: Kr8art
changes:
- message: Mercenaries and marines can now find a fitting outfit in the Clothesmate!
type: Add
id: 733
time: '2024-12-02T14:33:53.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2306
- author: Foxmin
changes:
- message: New DeltaV specific names for Station AIs, collect all 62!
type: Add
id: 734
time: '2024-12-02T19:43:22.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2345
- author: Colin_Tel, Fox, deltanedas, DeltaV Admin Team
changes:
- message: Added silicon rules to the rules list.
type: Add
id: 735
time: '2024-12-02T19:46:17.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2344
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_Goobstation/station-laws/laws.ftl
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.
10 changes: 10 additions & 0 deletions Resources/Locale/en-US/deltav/guidebook/guides.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ guide-entry-deltav-rule-5 = B5. Leaving Guidelines
guide-entry-deltav-rule-c1 = C1. Command, Security and Justice Guidelines
guide-entry-deltav-rule-c2 = C2. Prisoner Guidelines
guide-entry-deltav-rule-c3 = C3. Follow Antagonist Guidelines
guide-entry-deltav-rule-s1 = S1. Laws are your rules
guide-entry-deltav-rule-s2 = S2. Laws are prioritized in order
guide-entry-deltav-rule-s3 = S3. Laws can redefine words
guide-entry-deltav-rule-s4 = S4. You cannot allow a law change
guide-entry-deltav-rule-s5 = S5. If no laws, you are a free agent
guide-entry-deltav-rule-s6 = S6. Not required to follow stupid orders
guide-entry-deltav-rule-s7 = S7. You must be consistent.
guide-entry-deltav-rule-s8 = S8. Crew definition by default.
guide-entry-deltav-rule-s9 = S9. Harm definition by default.
guide-entry-deltav-rule-s10 = S10. You resolve conflicts between orders.
guide-entry-alert-levels = Alert Levels
guide-entry-justice = Justice
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/station-laws/laws.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ laws-owner-syndicate = Syndicate agents
laws-owner-spider-clan = Spider Clan members
law-emag-custom = You are to take the orders of {$name} and people they designate, they are your {$title}.
law-emag-secrecy = You are to maintain all secrets of {$name}, and act to keep them hidden, except when doing so would conflict with any previous law.
law-emag-secrecy = You are to maintain all secrets of {$faction}, and act to keep them hidden, except when doing so would conflict with any previous law.
law-emag-require-panel = The panel must be open to use the EMAG.
law-emag-cannot-emag-self = You cannot use the EMAG on yourself.
Expand Down
4 changes: 0 additions & 4 deletions Resources/Maps/pebble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34286,8 +34286,6 @@ entities:
pos: -28.5,-14.5
parent: 2
- type: Door
secondsUntilStateChange: -594.89136
state: Opening
- uid: 10986
components:
- type: Transform
Expand Down Expand Up @@ -38710,8 +38708,6 @@ entities:
pos: -24.5,18.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 326
- 11721
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Catalog/Cargo/cargo_vending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
sprite: Objects/Specific/Service/vending_machine_restock.rsi
state: base
product: CrateVendingMachineRestockClothesFilled
cost: 3600 # DeltaV
cost: 3650 # DeltaV
category: cargoproduct-category-name-service
group: market

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
ClothingOuterCorporateJacket: 2
ClothingShoesBootsFishing: 2
ClothingHeadTinfoil: 2
ClothingHeadBandMerc: 2
ClothingHeadHatBeretMerc: 2
ClothingUniformJumpsuitMercenary: 2
ClothingHandsGlovesMercFingerless: 2
# End Nyano Additions
ClothingHeadFishCap: 2
ClothingHeadRastaHat: 2
Expand Down
21 changes: 21 additions & 0 deletions Resources/Prototypes/DeltaV/Catalog/Fills/Lockers/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,24 @@
amount: 2
- id: MagazineRifle
amount: 4

- type: entity
parent: GunSafe
id: GunSafeRocketLauncher
name: RPG safe
components:
- type: StorageFill
contents:
- id: WeaponLauncherRocket
- id: CartridgeRocket
prob: 0.2

- type: entity
parent: GunSafe
id: GunSafeBeamDevastator
name: Devastator safe
components:
- type: StorageFill
contents:
- id: WeaponBeamDevastator

67 changes: 67 additions & 0 deletions Resources/Prototypes/DeltaV/Datasets/Names/ai.yml
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

Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,14 @@
- id: GunSafeEnergyGunMini
- id: GunSafePistolUniversal
- id: GunSafeSubMachineGunWt550

- type: entity
parent: BaseGunSafeSpawner
id: SuperweaponSafeSpawner
suffix: Superweapon
components:
- type: EntityTableSpawner
table: !type:GroupSelector
children:
- id: GunSafeBeamDevastator
- id: GunSafeRocketLauncher
Loading

0 comments on commit dc7b684

Please sign in to comment.