Skip to content

Commit

Permalink
Merge branch 'master' into Observation-bundle-tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
IamVelcroboy authored Dec 6, 2024
2 parents 1ee1d50 + 868297b commit 8ce11ed
Show file tree
Hide file tree
Showing 61 changed files with 884 additions and 445 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));
}
}
3 changes: 2 additions & 1 deletion Content.Server/DeltaV/StationEvents/Events/FugitiveRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Shared.Paper;
using Content.Shared.Popups;
using Content.Shared.Random.Helpers;
using Content.Shared.Silicons.StationAi;
using Content.Shared.Storage.EntitySystems;
using Robust.Shared.Physics.Components;
using Robust.Shared.Utility;
Expand Down Expand Up @@ -46,7 +47,7 @@ protected override void ActiveTick(EntityUid uid, FugitiveRuleComponent comp, Ga
var consoles = new List<TransformComponent>();
while (query.MoveNext(out var console, out var xform, out _))
{
if (StationSystem.GetOwningStation(console, xform) != comp.Station || HasComp<GhostComponent>(console))
if (StationSystem.GetOwningStation(console, xform) != comp.Station || HasComp<GhostComponent>(console) || HasComp<StationAiHeldComponent>(console))
continue;

consoles.Add(xform);
Expand Down
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;
}
162 changes: 86 additions & 76 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
@@ -1,80 +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.
type: Fix
id: 236
time: '2024-02-10T23:21:56.0000000+00:00'
- author: Adrian16199
changes:
- message: Added a speech bubble to felinids. Mraow!
type: Add
id: 237
time: '2024-02-12T20:51:35.0000000+00:00'
- author: DebugOk
changes:
- message: Felinids now fit in bags again!
type: Add
id: 238
time: '2024-02-12T20:52:49.0000000+00:00'
- author: Guess-My-Name
changes:
- message: Some budget cuts were made in HR department, expect more bureaucratic
errors in near future.
type: Add
id: 239
time: '2024-02-12T21:01:44.0000000+00:00'
- author: Adrian16199
changes:
- message: Felinid's thieving gloves have been removed for Soft paws mechanic.
type: Tweak
id: 240
time: '2024-02-12T21:10:44.0000000+00:00'
- author: Adrian16199
changes:
- message: Felinids now scream in agony from water.
type: Add
id: 241
time: '2024-02-12T21:11:44.0000000+00:00'
- author: VMSolidus
changes:
- message: 'Harpies have received a full visual rework. Featuring clothing sprites,
Expand Down Expand Up @@ -3797,3 +3721,89 @@
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
- author: Emily9031
changes:
- message: The Station AI can now use the Prison and Justice radio channels.
type: Fix
id: 736
time: '2024-12-03T06:36:02.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2352
- author: BlitzTheSquishy
changes:
- message: You now have to hold a rifle with TWO hands to operate it.
type: Tweak
id: 737
time: '2024-12-04T12:51:08.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2353
- author: deltanedas
changes:
- message: Fixed the AI getting a copy of fugitive reports on its face.
type: Fix
id: 738
time: '2024-12-04T23:20:55.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2363
- author: deltanedas
changes:
- message: Fixed traitors never getting the notary stamp steal objective.
type: Fix
id: 739
time: '2024-12-05T04:17:26.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2358
- author: JustAnOrange
changes:
- message: Fixed Logi and Epi departmental sign sprites.
type: Fix
id: 740
time: '2024-12-05T10:29:37.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2366
- author: Emily9031
changes:
- message: Cyborgs are now able to slowly fly through space.
type: Add
id: 741
time: '2024-12-06T01:22:26.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2339
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
Loading

0 comments on commit 8ce11ed

Please sign in to comment.