Skip to content

Commit

Permalink
Merge branch 'new-frontiers-14:master' into Syndie-Vessel-Interceptio…
Browse files Browse the repository at this point in the history
…n-Event
  • Loading branch information
ErhardSteinhauer authored Mar 18, 2024
2 parents acb36e9 + 87939de commit 55fc7fa
Show file tree
Hide file tree
Showing 72 changed files with 13,008 additions and 2,405 deletions.
59 changes: 8 additions & 51 deletions Content.Server/Paper/PaperSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,8 @@ private void OnInteractUsing(EntityUid uid, PaperComponent paperComp, InteractUs
var editable = paperComp.StampedBy.Count == 0 || _tagSystem.HasTag(args.Used, "WriteIgnoreStamps");
if (_tagSystem.HasTag(args.Used, "Write") && editable)
{
bool write = true;

if (TryComp<PenComponent>(args.Used, out var penComp))
{
// If a pen in sign mod, dont try to write.
if (penComp.Pen == PenMode.PenSign)
{
write = false;
}
}

if (write)
if (TryComp<PenComponent>(args.Used, out var penComp) && penComp.Pen == PenMode.PenSign);
else // Frontier - Else the rest
{
var writeEvent = new PaperWriteEvent(uid, args.User);
RaiseLocalEvent(args.Used, ref writeEvent);
Expand All @@ -145,37 +135,16 @@ private void OnInteractUsing(EntityUid uid, PaperComponent paperComp, InteractUs
// If a stamp, attempt to stamp paper
if (TryComp<StampComponent>(args.Used, out var stampComp) && TryStamp(uid, GetStampInfo(stampComp), stampComp.StampState, paperComp))
{
var actionOther = "stamps";
var actionSelf = "stamp";

if (stampComp.StampedPersonal)
{
stampComp.StampedIdUser = args.User;

var userName = Loc.GetString("stamp-component-unknown-name");
var userJob = Loc.GetString("stamp-component-unknown-job");
if (_idCardSystem.TryFindIdCard(stampComp.StampedIdUser!.Value, out var card))
{
if (card.Comp.FullName != null)
userName = card.Comp.FullName;
if (card.Comp.JobTitle != null)
userJob = card.Comp.JobTitle;
}
//string stampedName = userJob + " - " + userName;
string stampedName = userName;
stampComp.StampedName = stampedName;

actionOther = "signs";
actionSelf = "sign";
}
if (stampComp.StampedPersonal) // Frontier
stampComp.StampedName = Loc.GetString("stamp-component-signee-name", ("user", args.User)); // Frontier

// successfully stamped, play popup
var stampPaperOtherMessage = Loc.GetString("paper-component-action-stamp-paper-other",
("action", actionOther), ("user", args.User), ("target", args.Target), ("stamp", args.Used));
("user", args.User), ("target", args.Target), ("stamp", args.Used));

_popupSystem.PopupEntity(stampPaperOtherMessage, args.User, Filter.PvsExcept(args.User, entityManager: EntityManager), true);
var stampPaperSelfMessage = Loc.GetString("paper-component-action-stamp-paper-self",
("action", actionSelf), ("target", args.Target), ("stamp", args.Used));
("target", args.Target), ("stamp", args.Used));
_popupSystem.PopupEntity(stampPaperSelfMessage, args.User, args.User);

_audio.PlayPvs(stampComp.Sound, uid);
Expand Down Expand Up @@ -275,20 +244,8 @@ private void OnHandPickUp(EntityUid uid, StampComponent stampComp, GotEquippedHa
{
if (stampComp.StampedPersonal)
{
stampComp.StampedIdUser = args.User;

var userName = Loc.GetString("stamp-component-unknown-name");
var userJob = Loc.GetString("stamp-component-unknown-job");
if (_idCardSystem.TryFindIdCard(stampComp.StampedIdUser!.Value, out var card))
{
if (card.Comp.FullName != null)
userName = card.Comp.FullName;
if (card.Comp.JobTitle != null)
userJob = card.Comp.JobTitle;
}
//string stampedName = userJob + " - " + userName;
string stampedName = userName;
stampComp.StampedName = stampedName;
if (stampComp.StampedPersonal) // Frontier
stampComp.StampedName = Loc.GetString("stamp-component-signee-name", ("user", args.User)); // Frontier
}
}

Expand Down
6 changes: 4 additions & 2 deletions Content.Shared/Access/Systems/AccessReaderSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ private void OnLinkAttempt(EntityUid uid, AccessReaderComponent component, LinkA

private void OnEmagged(EntityUid uid, AccessReaderComponent reader, ref GotEmaggedEvent args)
{
if (!reader.BreakOnEmag)
return;
//if (!reader.BreakOnEmag) // Frontier
// return; // Frontier
if (reader.ImmuneToEmag) // Frontier
return; // Frontier
args.Handled = true;
reader.Enabled = false;
reader.AccessLog.Clear();
Expand Down
19 changes: 19 additions & 0 deletions Content.Shared/Doors/Systems/SharedDoorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Robust.Shared.Timing;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Network;
using Content.Shared.Emag.Components; // Frontier - Added DEMUG

namespace Content.Shared.Doors.Systems;

Expand Down Expand Up @@ -82,6 +83,7 @@ public override void Initialize()
SubscribeLocalEvent<DoorComponent, GetPryTimeModifierEvent>(OnPryTimeModifier);

SubscribeLocalEvent<DoorComponent, GotEmaggedEvent>(OnEmagged);
SubscribeLocalEvent<DoorComponent, GotUnEmaggedEvent>(OnUnEmagged); // Frontier - Added DEMUG
}

protected virtual void OnComponentInit(Entity<DoorComponent> ent, ref ComponentInit args)
Expand Down Expand Up @@ -137,6 +139,23 @@ private void OnEmagged(EntityUid uid, DoorComponent door, ref GotEmaggedEvent ar
}
}

private void OnUnEmagged(EntityUid uid, DoorComponent door, ref GotUnEmaggedEvent args) // Frontier - Added DEMUG
{
if (TryComp<AirlockComponent>(uid, out var airlockComponent))
{
if (HasComp<EmaggedComponent>(uid))
{
if (TryComp<DoorBoltComponent>(uid, out var doorBoltComponent))
{
SetBoltsDown((uid, doorBoltComponent), !doorBoltComponent.BoltsDown, null, true);
SetState(uid, DoorState.Closing, door);
}
Audio.PlayPredicted(door.SparkSound, uid, args.UserUid, AudioParams.Default.WithVolume(8));
args.Handled = true;
}
}
}

#region StateManagement
private void OnHandleState(Entity<DoorComponent> ent, ref AfterAutoHandleStateEvent args)
{
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Lock/LockSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ private void OnUnEmagged(EntityUid uid, LockComponent component, ref GotUnEmagge
if (HasComp<EmaggedComponent>(uid))
{
_audio.PlayPredicted(component.UnlockSound, uid, null, AudioParams.Default.WithVolume(-5));
_appearanceSystem.SetData(uid, LockVisuals.Locked, true);
//EnsureComp<LockComponent>(uid); //Literally addes the lock as a tell it was emagged
component.Locked = true;
args.Handled = true;
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/Paper/PenComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public PenStatus(NetEntity penUid)
public enum PenMode : byte
{
/// <summary>
/// Sensor doesn't send any information about owner
/// Frontier - The normal mode of a pen.
/// </summary>
PenWrite = 0,

/// <summary>
/// Sensor sends only binary status (alive/dead)
/// Frontier - The sign mode of a pen.
/// </summary>
PenSign = 1,
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Paper/StampComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public sealed partial class StampComponent : Component
public SoundSpecifier? Sound = null;

/// <summary>
/// The stamp using the person name on it
/// Frontier - The stamp using the person name on it
/// </summary>
[DataField("stampedPersonal")]
public bool StampedPersonal = false;
Expand Down
58 changes: 58 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3679,3 +3679,61 @@ Entries:
message: Server Rules have been updated in relation to the station safezone.
id: 4867
time: '2024-03-14T22:47:33.0000000+00:00'
- author: cite2000
changes:
- type: Add
message: NFSD medical ship "Whiskey"
id: 4868
time: '2024-03-16T21:53:36.0000000+00:00'
- author: Cu1r
changes:
- type: Add
message: Added the UAC Canister to the scrapyard for purchase.
id: 4869
time: '2024-03-17T08:29:25.0000000+00:00'
- author: Letholldus
changes:
- type: Fix
message: >-
Adjusts the price of the NC Hauler from 49,500 to 60,000 to cost what it
should.
id: 4870
time: '2024-03-17T10:21:37.0000000+00:00'
- author: MagnusCrowe
changes:
- type: Remove
message: Opportunity temporarily removed.
id: 4871
time: '2024-03-18T13:42:10.0000000+00:00'
- author: Leander
changes:
- type: Tweak
message: smugglers and pirates are no longer in the same team.
id: 4872
time: '2024-03-18T16:30:56.0000000+00:00'
- author: dvir01
changes:
- type: Tweak
message: >-
Pen sign is back, signing is now based on your name and not your ID
name.
id: 4873
time: '2024-03-18T16:35:36.0000000+00:00'
- author: erhardsteinhauer
changes:
- type: Add
message: Hardsuits and softsuits can be researched and fabricated.
- type: Add
message: Added salvage techfab machine.
- type: Add
message: >-
Added Botany and Mailcarrier EVA suits. Print one on your service fab
today!
- type: Tweak
message: Hardsuits and softsuits can be recycled.
id: 4874
time: '2024-03-18T16:45:02.0000000+00:00'
- author: arimah
changes: []
id: 4875
time: '2024-03-18T16:46:12.0000000+00:00'
3 changes: 1 addition & 2 deletions Resources/Locale/en-US/_NF/paper/stamp-component.ftl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Components

stamp-component-unknown-name = Unknown
stamp-component-unknown-job = No job
stamp-component-signee-name = {$user}
stamp-component-stamped-name-psychologist = Psychologist
stamp-component-stamped-name-lawyer = Lawyer
Expand Down
9 changes: 8 additions & 1 deletion Resources/Locale/en-US/_NF/research/technologies.ftl
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
research-techology-advanced-personal-propulsion = Advanced Personal Propulsion
research-techology-advanced-personal-propulsion = Advanced Personal Propulsion
research-technology-hardsuits-basic = Basic Hardsuits
research-technology-hardsuits-specialized = Specialized Hardsuits
research-technology-hardsuits-advanced = Advanced Hardsuits
research-technology-hardsuits-experimental-industrial = Experimental Salvager Hardsuit
research-technology-hardsuits-armored = Armored Hardsuits
research-technology-hardsuits-armored-advanced = Advanced Armored Hardsuits
research-technology-hardsuits-experimental-rd = Experimental Research Hardsuit
1 change: 1 addition & 0 deletions Resources/Locale/en-US/lathe/lathe-categories.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ lathe-category-parts = Parts
lathe-category-robotics = Robotics
lathe-category-tools = Tools
lathe-category-weapons = Weapons
lathe-category-evasuits = EVA
6 changes: 4 additions & 2 deletions Resources/Locale/en-US/paper/paper-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ paper-component-examine-detail-has-words = {CAPITALIZE(THE($paper))} has somethi
# Shown when paper with stamps examined
paper-component-examine-detail-stamped-by = {CAPITALIZE(THE($paper))} {CONJUGATE-HAVE($paper)} been stamped by: {$stamps}.
paper-component-action-stamp-paper-other = {CAPITALIZE(THE($user))} {$action} {THE($target)} with {THE($stamp)}.
paper-component-action-stamp-paper-self = You {$action} {THE($target)} with {THE($stamp)}.
paper-component-action-stamp-paper-other = {CAPITALIZE(THE($user))} stamps {THE($target)} with {THE($stamp)}.
paper-component-action-stamp-paper-self = You stamp {THE($target)} with {THE($stamp)}.
paper-ui-save-button = Save ({$keybind})
Loading

0 comments on commit 55fc7fa

Please sign in to comment.