Skip to content

Commit

Permalink
Merge branch 'new-frontiers-14:master' into 2024-03-31-MailPod
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 authored Apr 17, 2024
2 parents 290dee5 + 58d7b4a commit 2ce57be
Show file tree
Hide file tree
Showing 286 changed files with 2,688 additions and 351 deletions.
1 change: 1 addition & 0 deletions Content.Server/Bed/Sleep/SleepingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Slippery;
using Content.Shared.Sound.Components;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;
using Content.Shared.Verbs;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Cargo/Systems/PricingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ public double GetEstimatedVendPrice(EntityPrototype prototype)
public double GetPrice(EntityUid uid)
{
var ev = new PriceCalculationEvent();
ev.Price = 0; // Structs doesnt initialize doubles when called by constructor.
RaiseLocalEvent(uid, ref ev);

if (ev.Handled)
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Power/Components/BatteryComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public float CurrentCharge
[Obsolete("Use system method")]
public bool TryUseCharge(float value)
=> _entMan.System<BatterySystem>().TryUseCharge(Owner, value, this);

/// <summary>
/// Whether or not information about
/// the battery will be shown on examine.
/// </summary>
[DataField]
public bool ShowExamineText = true;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Power/EntitySystems/BatterySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void OnExamine(EntityUid uid, ExaminableBatteryComponent component, Exam
{
if (!TryComp<BatteryComponent>(uid, out var batteryComponent))
return;
if (args.IsInDetailsRange)
if (args.IsInDetailsRange && batteryComponent.ShowExamineText)
{
var effectiveMax = batteryComponent.MaxCharge;
if (effectiveMax == 0)
Expand Down
27 changes: 0 additions & 27 deletions Content.Server/Sound/Components/SpamEmitSoundComponent.cs

This file was deleted.

1 change: 1 addition & 0 deletions Content.Server/Sound/EmitSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Server.Sound.Components;
using Content.Shared.UserInterface;
using Content.Shared.Sound;
using Content.Shared.Sound.Components;
using Robust.Shared.Random;

namespace Content.Server.Sound;
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/Audio/SoundWhileAliveComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Content.Shared.Sound.Components;
using Robust.Shared.GameStates;

namespace Content.Shared.Audio;

/// <summary>
/// Toggles <see cref="AmbientSoundComponent"/> and <see cref="SpamEmitSoundComponent"/> off when this entity's MobState isn't Alive.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class SoundWhileAliveComponent : Component;
24 changes: 24 additions & 0 deletions Content.Shared/Sound/Components/SpamEmitSoundComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Content.Shared.Sound.Components;

/// <summary>
/// Rolls to play a sound every few seconds.
/// </summary>
[RegisterComponent]
public sealed partial class SpamEmitSoundComponent : BaseEmitSoundComponent
{
[DataField("accumulator")]
public float Accumulator = 0f;

[DataField("rollInterval")]
public float RollInterval = 2f;

[DataField("playChance")]
public float PlayChance = 0.5f;

// Always Pvs.
[DataField("popUp")]
public string? PopUp;

[DataField("enabled")]
public bool Enabled = true;
}
18 changes: 18 additions & 0 deletions Content.Shared/Sound/SharedEmitSoundSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using Content.Shared.Audio;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Maps;
using Content.Shared.Mobs;
using Content.Shared.Popups;
using Content.Shared.Sound.Components;
using Content.Shared.Throwing;
Expand All @@ -28,6 +31,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
[Dependency] protected readonly IRobustRandom Random = default!;
[Dependency] private readonly SharedAmbientSoundSystem _ambient = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] protected readonly SharedPopupSystem Popup = default!;

Expand All @@ -43,6 +47,20 @@ public override void Initialize()
SubscribeLocalEvent<EmitSoundOnDropComponent, DroppedEvent>(OnEmitSoundOnDrop);

SubscribeLocalEvent<EmitSoundOnCollideComponent, StartCollideEvent>(OnEmitSoundOnCollide);

SubscribeLocalEvent<SoundWhileAliveComponent, MobStateChangedEvent>(OnMobState);
}

private void OnMobState(Entity<SoundWhileAliveComponent> entity, ref MobStateChangedEvent args)
{
// Disable this component rather than removing it because it can be brought back to life.
if (TryComp<SpamEmitSoundComponent>(entity, out var comp))
{
comp.Enabled = args.NewMobState == MobState.Alive;
Dirty(entity.Owner, comp);
}

_ambient.SetAmbience(entity.Owner, args.NewMobState != MobState.Dead);
}

private void OnEmitSpawnOnInit(EntityUid uid, EmitSoundOnSpawnComponent component, MapInitEvent args)
Expand Down
Binary file added Resources/Audio/_NF/Ambience/monster-flange.ogg
Binary file not shown.
34 changes: 34 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4033,3 +4033,37 @@ Entries:
message: Messenger Bag of Holding is now visible when worn.
id: 4912
time: '2024-04-15T15:11:12.0000000+00:00'
- author: Leander
changes:
- type: Add
message: >-
added grenade bundles to the NFSD uplink and make the experimental
combat hardsuit available.
id: 4913
time: '2024-04-17T21:38:15.0000000+00:00'
- author: dvir01
changes:
- type: Tweak
message: >-
Added the new Expeditionary FlatpackVend to the Lodge, not restockable
but contains expedition unique machines like the IFF,
id: 4914
time: '2024-04-17T21:40:06.0000000+00:00'
- author: GreaseMonk
changes:
- type: Fix
message: Fixed various issues with artifact construct including sell price.
- type: Tweak
message: Increased artifact construct health.
- type: Add
message: Added artifact construct chatter sound.
id: 4915
time: '2024-04-17T21:43:04.0000000+00:00'
- author: MagnusCrowe
changes:
- type: Add
message: Added new uniform for station guard and private security.
- type: Add
message: Added a full suite of clothing for the station representative.
id: 4916
time: '2024-04-17T22:04:59.0000000+00:00'
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_NF/job/job-description.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ job-description-mercenary = Execute the bidding of anyone- for the right price.
job-description-pilot = Pilot spaceships from point A to B, outmaneuver pirates and dodge asteroids. You are a leaf on the solar wind, let others marvel at how you soar.
job-description-security-guard = Patrol the empty halls, whistle simple tunes you heard on radio, jingle your keychain and scurry away at the sight of danger.
job-description-stc = Expertly de-conflict the space around the station and help the NFSD issue fines for overdocked ships.
job-description-sr = Handle access reassignment fairly using your ID console, manage Frontier outpost, and keep Clippy safe.
7 changes: 7 additions & 0 deletions Resources/Locale/en-US/_NF/job/job-names-old.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Role timers
JobSecurityCadetOld = Security Cadet
JobSecurityOfficerOld = Security Officer
JobHeadOfSecurityOld = Head of Security
JobWardenOld = Warden
JobDetectiveOld = Detective
JobHeadOfPersonnelOld = Head of Personnel
3 changes: 2 additions & 1 deletion Resources/Locale/en-US/_NF/job/job-names.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ job-name-mercenary = Mercenary
job-name-pilot = Pilot
job-name-security-guard = Security Guard
job-name-stc = Station Traffic Controller
job-name-sr = Station Representative
# Role timers - Make these alphabetical or I cut you
JobERTMailCarrier = ERT Mail Carrier
JobMercenary = Mercenary
JobPilot = Pilot
JobSecurityGuard = Security Guard
JobSTC = Station Traffic Controller
JobSTC = Station Traffic Controller
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_NF/paper/stamp-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ stamp-component-signee-name = {$user}
stamp-component-stamped-name-psychologist = Psychologist
stamp-component-stamped-name-lawyer = Lawyer
stamp-component-stamped-name-stc = Station Traffic Controller
stamp-component-stamped-name-sr = Station Representative
24 changes: 21 additions & 3 deletions Resources/Locale/en-US/_NF/store/uplink-catalog.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ store-category-sechardsuits = EVA Suits
store-category-secweapons = Weapons
store-category-secutility = Utility
store-category-secammo = Ammunition
store-category-secexplosives = Explosives
uplink-security-hardsuit-name = Security HardSuit
uplink-security-hardsuit-desc = Standard issue armored EVA suit. Bulky armor plating slightly limits movement speed.
Expand All @@ -14,8 +16,8 @@ uplink-security-hardsuit-brigmedic-name = BrigMedic HardSuit
uplink-security-hardsuit-brigmedic-desc = A lightly armored EVA suit. Designed for rescue operations, it sacrifices most of its armor in favor of movement speed.
uplink-security-hardsuit-warden-name = Bailiff HardSuit
uplink-security-hardsuit-warden-desc = A moderately reinforced variant of the Security EVA suit. Modern plating increases resistances without sacrificing range of motion.
uplink-security-hardsuit-syndie-re-name = Reverse Engineered Combat Suit
uplink-security-hardsuit-syndie-re-desc = An advanced combat suit recovered from the Syndicate Wars. Heavily protected and extremely mobile.
uplink-security-hardsuit-experimental-name = Experimental Combat Suit
uplink-security-hardsuit-experimental-desc = An advanced combat suit researched by the greatest Nanotrasen minds. Heavily protected and extremely mobile.
uplink-security-hardsuit-sheriff-name = Sheriff's HardSuit
uplink-security-hardsuit-sheriff-desc = A heavily reinforced Security EVA suit. Provides maximum resistance while maintaining the range of motion expected of security forces.
uplink-security-mk58-name = MK 58
Expand Down Expand Up @@ -54,7 +56,7 @@ uplink-security-holo-name = Holo Barrier
uplink-security-holo-desc = A battery powered holo projecter that places temporary barriers to bar movement.
uplink-security-jetpack-name = Jetpack
uplink-security-jetpack-desc = A pre-filled jetpack for EVA. Comes in a fashionable red.
uplink-security-magboots-name = Combat Magboots
uplink-security-magboots-name = NFSD Magboots
uplink-security-magboots-desc = Light weight magboots designed to keep the wearer grounded in low and no gravity environments.
uplink-security-techfab-name = Security Techfab
uplink-security-techfab-desc = A circuit board for a Security Techfab. Allows the production of ammunition, magazines, weapons, and numerous other utilities. Uses raw resources. Can be upgraded.
Expand Down Expand Up @@ -112,3 +114,19 @@ uplink-security-shotslug-name = Lethal Shotgun Slug Shells
uplink-security-shotslug-desc = A box of lethal .50 calibre slug shotgun shells.
uplink-security-cash1000-name = 1000 Spesos
uplink-security-cash1000-desc = Cold, hard cash.
uplink-security-empgrenade-box-name = EMP Grenades
uplink-security-empgrenade-box-desc = A box containing 4 EMP grenades.
uplink-security-explosivegrenade-box-name = Explosive Grenade Box
uplink-security-explosivegrenade-box-desc = A box containing 4 explosive grenades.
uplink-security-incendiarygrenade-box-name = Incendiary Grenade Box
uplink-security-incendiarygrenade-box-desc = A box containing 4 incendiary grenades.
uplink-security-shrapnelgrenade-box-name = Shrapnel Grenade Box
uplink-security-shrapnelgrenade-box-desc = A box containing 4 shrapnel grenades.
uplink-security-smokegrenade-box-name = Smoke Grenade Box
uplink-security-smokegrenade-box-desc = A box containing 4 smoke grenades.
uplink-security-teargasgrenade-box-name = Tear gas Grenade Box
uplink-security-teargasgrenade-box-desc = A box containing 4 tear gas grenades.
uplink-security-flashbanggrenade-box-name = Flashbang Grenade Box
uplink-security-flashbanggrenade-box-desc = A box containing 4 flasbang grenades.
uplink-security-stingergrenade-box-name = Stinger Grenade Box
uplink-security-stingergrenade-box-desc = A box containing 4 stinger grenades.
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/paper/stamp-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ stamp-component-stamped-name-clown = Clown
stamp-component-stamped-name-cmo = Chief Medical Officer
stamp-component-stamped-name-denied = DENIED
stamp-component-stamped-name-approved = APPROVED
stamp-component-stamped-name-hop = Station Representative
stamp-component-stamped-name-hop = Head of Personnel
stamp-component-stamped-name-hos = Sheriff
stamp-component-stamped-name-qm = Quartermaster
stamp-component-stamped-name-rd = Research Director
Expand Down
4 changes: 2 additions & 2 deletions Resources/Maps/_NF/Outpost/frontier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31658,7 +31658,7 @@ entities:
showEnts: False
occludes: True
ent: null
- proto: LockerHeadOfPersonnelFilled
- proto: LockerStationRepresentativeFilled
entities:
- uid: 4969
components:
Expand Down Expand Up @@ -36556,7 +36556,7 @@ entities:
- type: Transform
pos: 27.5,18.5
parent: 2173
- proto: SpawnPointHeadOfPersonnel
- proto: SpawnPointStationRepresentative
entities:
- uid: 4844
components:
Expand Down
2 changes: 1 addition & 1 deletion Resources/Maps/_NF/POI/lodge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10028,7 +10028,7 @@ entities:
- type: Transform
pos: 9.5,10.5
parent: 1
- proto: VendingMachineFlatpackVend
- proto: VendingMachineExpeditionaryFlatpackVend
entities:
- uid: 512
components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@
- id: BoxSurvival
- id: Flash
#- id: TelescopicBaton
- id: RubberStampHop # Frontier
- id: DoorRemoteService # Frontier
- id: AccessConfigurator # Frontier
- id: PhoneInstrument # Frontier

- type: entity
noSpawn: true
Expand Down Expand Up @@ -138,12 +134,12 @@
components:
- type: StorageFill
contents:
- id: BoxSurvivalSecurity
- id: BoxSurvivalNFSD
- id: Flash
- id: MagazinePistol
- id: RubberStampSheriff # Frontier
- id: DoorRemoteSecurity # Frontier
- id: SecurityTechFabCircuitboard # Frontier
- id: DoorRemoteNfsd # Frontier
- id: NFSDTechFabCircuitboard # Frontier
- id: BaseSecurityUplinkRadioSheriff # Frontier
- id: ClothingNeckNfsdBadgeHoS # Frontier

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@
- id: BoxSurvival
- id: Flash
#- id: TelescopicBaton
- id: RubberStampHop # Frontier
- id: DoorRemoteService # Frontier
- id: AccessConfigurator # Frontier
- id: PhoneInstrument # Frontier

- type: entity
noSpawn: true
Expand Down Expand Up @@ -148,12 +144,12 @@
components:
- type: StorageFill
contents:
- id: BoxSurvivalSecurity
- id: BoxSurvivalNFSD
- id: Flash
- id: MagazinePistol
- id: RubberStampSheriff # Frontier
- id: DoorRemoteSecurity # Frontier
- id: SecurityTechFabCircuitboard # Frontier
- id: DoorRemoteNfsd # Frontier
- id: NFSDTechFabCircuitboard # Frontier
- id: BaseSecurityUplinkRadioSheriff # Frontier
- id: ClothingNeckNfsdBadgeHoS # Frontier

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@
- id: BoxSurvival
- id: Flash
#- id: TelescopicBaton
- id: RubberStampHop # Frontier
- id: DoorRemoteService # Frontier
- id: AccessConfigurator # Frontier
- id: PhoneInstrument # Frontier

- type: entity
noSpawn: true
Expand Down Expand Up @@ -162,12 +158,12 @@
components:
- type: StorageFill
contents:
- id: BoxSurvivalSecurity
- id: BoxSurvivalNFSD
- id: Flash
- id: MagazinePistol
- id: RubberStampSheriff # Frontier
- id: DoorRemoteSecurity # Frontier
- id: SecurityTechFabCircuitboard # Frontier
- id: DoorRemoteNfsd # Frontier
- id: NFSDTechFabCircuitboard # Frontier
- id: BaseSecurityUplinkRadioSheriff # Frontier
- id: ClothingNeckNfsdBadgeHoS # Frontier

Expand Down
Loading

0 comments on commit 2ce57be

Please sign in to comment.