diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.AutoFire.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.AutoFire.cs index 39cd2486ed7..8b993245948 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.AutoFire.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.AutoFire.cs @@ -1,9 +1,16 @@ using Content.Shared.Weapons.Ranged.Components; +using Content.Server.Power.Components; // Frontier +using Content.Server.Power.EntitySystems; // Frontier +using Content.Shared.Interaction; // Frontier +using Content.Shared.Examine; // Frontier +using Content.Shared.Power; // Frontier +using Content.Server.Popups; // Frontier namespace Content.Server.Weapons.Ranged.Systems; public sealed partial class GunSystem { + [Dependency] public PopupSystem _popup = default!; // Frontier public override void Update(float frameTime) { base.Update(frameTime); @@ -26,4 +33,114 @@ public override void Update(float frameTime) AttemptShoot(uid, gun); } } + + // New Frontiers - Shuttle Gun Power Draw - makes shuttle guns require power if they + // have an ApcPowerReceiverComponent + // This code is licensed under AGPLv3. See AGPLv3.txt + private void OnGunExamine(EntityUid uid, AutoShootGunComponent component, ExaminedEvent args) + { + // Powered is already handled by other power components + var enabled = Loc.GetString(component.On ? "gun-comp-enabled" : "gun-comp-disabled"); + + args.PushMarkup(enabled); + } + + private void OnActivateGun(EntityUid uid, AutoShootGunComponent component, ActivateInWorldEvent args) + { + if (args.Handled || !args.Complex) + return; + + component.On ^= true; + + if (!component.On) + { + if (TryComp(uid, out var apcPower) && component.OriginalLoad != 0) + apcPower.Load = 1; + + DisableGun(uid, component); + args.Handled = true; + _popup.PopupEntity(Loc.GetString("auto-fire-disabled"), uid, args.User); + } + else if (CanEnable(uid, component)) + { + if (TryComp(uid, out var apcPower) && component.OriginalLoad != apcPower.Load) + apcPower.Load = component.OriginalLoad; + + EnableGun(uid, component); + args.Handled = true; + _popup.PopupEntity(Loc.GetString("auto-fire-enabled"), uid, args.User); + } + else + { + _popup.PopupEntity(Loc.GetString("auto-fire-enabled-no-power"), uid, args.User); + } + } + + /// + /// Tries to disable the AutoShootGun. + /// + public void DisableGun(EntityUid uid, AutoShootGunComponent component) + { + if (component.CanFire) + component.CanFire = false; + } + + public bool CanEnable(EntityUid uid, AutoShootGunComponent component) + { + var xform = Transform(uid); + + // Must be anchored to fire. + if (!xform.Anchored) + return false; + + // No power needed? Always works. + if (!HasComp(uid)) + return true; + + // Not switched on? Won't work. + if (!component.On) + return false; + + return this.IsPowered(uid, EntityManager); + } + + public void EnableGun(EntityUid uid, AutoShootGunComponent component, TransformComponent? xform = null) + { + if (!component.CanFire) + component.CanFire = true; + } + + private void OnAnchorChange(EntityUid uid, AutoShootGunComponent component, ref AnchorStateChangedEvent args) + { + if (args.Anchored && CanEnable(uid, component)) + EnableGun(uid, component); + else + DisableGun(uid, component); + } + + private void OnGunInit(EntityUid uid, AutoShootGunComponent component, ComponentInit args) + { + if (TryComp(uid, out var apcPower) && component.OriginalLoad == 0) + component.OriginalLoad = apcPower.Load; + + if (!component.On) + return; + + if (CanEnable(uid, component)) + EnableGun(uid, component); + } + + private void OnGunShutdown(EntityUid uid, AutoShootGunComponent component, ComponentShutdown args) + { + DisableGun(uid, component); + } + + private void OnPowerChange(EntityUid uid, AutoShootGunComponent component, ref PowerChangedEvent args) + { + if (args.Powered && CanEnable(uid, component)) + EnableGun(uid, component); + else + DisableGun(uid, component); + } + // End of Frontier modified code } diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index fb111e11fe7..29504d5a76d 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -25,6 +25,9 @@ using Robust.Shared.Prototypes; using Robust.Shared.Utility; using Robust.Shared.Containers; +using Content.Shared.Interaction; // Frontier +using Content.Shared.Examine; // Frontier +using Content.Shared.Power; // Frontier namespace Content.Server.Weapons.Ranged.Systems; @@ -48,6 +51,12 @@ public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnBallisticPrice); + SubscribeLocalEvent(OnActivateGun); // Frontier + SubscribeLocalEvent(OnGunInit); // Frontier + SubscribeLocalEvent(OnGunShutdown); // Frontier + SubscribeLocalEvent(OnGunExamine); // Frontier + SubscribeLocalEvent(OnPowerChange); // Frontier + SubscribeLocalEvent(OnAnchorChange); // Frontier } private void OnBallisticPrice(EntityUid uid, BallisticAmmoProviderComponent component, ref PriceCalculationEvent args) diff --git a/Content.Shared/Weapons/Ranged/Components/AutoShootGunComponent.cs b/Content.Shared/Weapons/Ranged/Components/AutoShootGunComponent.cs index 16b3110b85a..d7c4012f462 100644 --- a/Content.Shared/Weapons/Ranged/Components/AutoShootGunComponent.cs +++ b/Content.Shared/Weapons/Ranged/Components/AutoShootGunComponent.cs @@ -11,4 +11,21 @@ public sealed partial class AutoShootGunComponent : Component { [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public bool Enabled; + + /// + /// Frontier - Whether the gun is switched on (e.g. through user interaction) + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public bool On { get; set; } = true; + + /// + /// Frontier - Whether or not the gun can actually fire (i.e. switched on and receiving power if needed) + /// + [ViewVariables(VVAccess.ReadWrite)] + public bool CanFire; + + /// + /// Frontier - Amount of power this gun needs from an APC in Watts to function. + /// + public float OriginalLoad { get; set; } = 0; } diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 248fe0a2cd5..2ba462008cb 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -228,6 +228,9 @@ public void AttemptShoot(EntityUid gunUid, GunComponent gun) private void AttemptShoot(EntityUid user, EntityUid gunUid, GunComponent gun) { + if (TryComp(gunUid, out var auto) && !auto.CanFire) // Frontier + return; // Frontier + if (gun.FireRateModified <= 0f || !_actionBlockerSystem.CanAttack(user)) return; diff --git a/Resources/Audio/DeltaV/Jukebox/attributions.yml b/Resources/Audio/DeltaV/Jukebox/attributions.yml index 3710761cb5e..4724a3e53ce 100644 --- a/Resources/Audio/DeltaV/Jukebox/attributions.yml +++ b/Resources/Audio/DeltaV/Jukebox/attributions.yml @@ -21,6 +21,11 @@ copyright: "DOS=HIGH, UMB by MASTER BOOT RECORD may be used non-commercially in the Delta-V fork of SS14. Converted from FLAC to OGG, then converted to mono." source: "https://masterbootrecord.bandcamp.com/album/c-edit-config-sys" +- files: ["deck_the_halls_b.ogg"] + license: "CC-BY-SA-4.0" + copyright: "Deck the Halls B Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License http://creativecommons.org/licenses/by/4.0/" + source: "https://incompetech.com/music/royalty-free/mp3-royaltyfree/Deck%20the%20Halls%20B.mp3" + - files: ["drozerix_-_alone.xm-MONO.ogg"] license: "Custom" copyright: "Alone by Drozerix, converted to mono" @@ -90,3 +95,4 @@ license: "CC-BY-SA-3.0" copyright: "Lone Digger by Caravan Palace, converted to mono" source: "https://vimeo.com/144736865" + diff --git a/Resources/Audio/DeltaV/Jukebox/deck_the_halls_b.ogg b/Resources/Audio/DeltaV/Jukebox/deck_the_halls_b.ogg new file mode 100644 index 00000000000..4b54fc78f6e Binary files /dev/null and b/Resources/Audio/DeltaV/Jukebox/deck_the_halls_b.ogg differ diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 7529c355db4..47dc4954912 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,24 +1,4 @@ Entries: -- author: BramvanZijp - changes: - - message: Security dogs now can wear an id card and radio, are able to drag things, - and have received additional combat training. - type: Tweak - id: 184 - time: '2023-12-28T09:32:10.0000000+00:00' -- author: Adrian16199 - changes: - - message: Gives shoukou an oxygen miner until air actualy works. - type: Fix - id: 185 - time: '2023-12-28T21:38:57.0000000+00:00' -- author: Master2112 - changes: - - message: Crime Assist program to Security and Lawyer PDA's, to help identify a - crime with a simple yes/no question tree. - type: Add - id: 186 - time: '2023-12-29T19:34:56.0000000+00:00' - author: ps3moira changes: - message: Added Scottish Trait. @@ -3739,3 +3719,25 @@ id: 683 time: '2024-11-18T02:08:58.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2214 +- author: Stareostar, Mylegsaresharp, Aikakakah + changes: + - message: Added new lobby art to the rotation! + type: Add + id: 684 + time: '2024-11-18T17:05:11.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2226 +- author: Lyndomen, SleepyApril + changes: + - message: Normal kill targets now just need to be killed once- but it needs to + teach them a lesson that will be remembered + type: Tweak + id: 685 + time: '2024-11-19T03:58:49.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2225 +- author: Lyndomen + changes: + - message: Added holiday cheer + type: Add + id: 686 + time: '2024-11-19T05:46:09.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2233 diff --git a/Resources/Locale/en-US/_NF/weapons/gun.ftl b/Resources/Locale/en-US/_NF/weapons/gun.ftl new file mode 100644 index 00000000000..5e954b49895 --- /dev/null +++ b/Resources/Locale/en-US/_NF/weapons/gun.ftl @@ -0,0 +1,6 @@ +gun-comp-enabled = The gun is turned [color=green]on[/color]. +gun-comp-disabled = The gun is turned [color=red]off[/color]. + +auto-fire-enabled = Gun turned on. +auto-fire-disabled = Gun turned off. +auto-fire-enabled-no-power = Gun turned on; but it has no power! diff --git a/Resources/Locale/en-US/deltav/paper/book-salvage.ftl b/Resources/Locale/en-US/deltav/paper/book-salvage.ftl index 3d7f9b7adfc..1daf8bd3db0 100644 --- a/Resources/Locale/en-US/deltav/paper/book-salvage.ftl +++ b/Resources/Locale/en-US/deltav/paper/book-salvage.ftl @@ -32,3 +32,21 @@ book-text-fishops = FISHOPS ADVANCED USER MANUAL FIRST EDITION CHAPTER 6: Fish War In the event of fish war there will be double the fish, more than could possibly be carried. A reinforcement or two will be required to carry the surplus fish. A fish war has never happened in recorded history, so it is currently purely theoretical. Its destructive power would rival several neutronium bombs. + +book-text-vulpkanin = Vulpkanin for Dummies, an Exhaustive Guide + + So, you're new to the sector and keep seeing these fine folks running around? + Those are Vulpkanin, basically space foxes (or wolves, depending who you ask)! + We've accumulated some quick tips you might use when engaging with these fluff balls. + + No Chocolate! Seriously, it's like poison to them. Stick to burgers and fries. + + Watch the Tail: A wagging tail usually means they're happy. A puffed-up tail? Back away slowly... + + They Come in All Colors: From fiery reds to snowy whites, every Vulpkanin is unique! + + Learn their Language: While most Vulpkanin speak common, knowing a few phrases in their native tongue can go a long way in building rapport. + + How to Kiss: Kiss + + Don't Underestimate Them: Vulpkanin may look cute and cuddly, but they can be fierce fighters when provoked. Treat them with respect and avoid unnecessary conflict. diff --git a/Resources/Prototypes/DeltaV/Catalog/Jukebox/Standard.yml b/Resources/Prototypes/DeltaV/Catalog/Jukebox/Standard.yml index 40f06ba7a9a..ec30256670b 100644 --- a/Resources/Prototypes/DeltaV/Catalog/Jukebox/Standard.yml +++ b/Resources/Prototypes/DeltaV/Catalog/Jukebox/Standard.yml @@ -25,6 +25,12 @@ path: path: /Audio/DeltaV/Jukebox/DOS=HIGH,_UMB.ogg +- type: jukebox + id: DeckTheHalls + name: Deck The Halls - Kevin Macleod + path: + path: /Audio/DeltaV/Jukebox/deck_the_halls_b.ogg + - type: jukebox id: DrozAlone name: Drozerix - Alone diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Misc/books.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Misc/books.yml index e073ee12a21..0a534dd8d72 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Misc/books.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Misc/books.yml @@ -20,3 +20,26 @@ color: "#2c5491" - type: Paper content: book-text-fishops + +- type: entity + parent: BookBase + id: BookVulpFAQ + name: Vulpkanin 101 + suffix: library salvage + description: You seriously didn't purchase a "For Dummies" book in 2425? + components: + - type: Sprite + sprite: Objects/Misc/books.rsi + layers: + - state: paper + - state: cover_strong + color: "#c836aa" + - state: decor_spine + color: "#961cc8" + - state: detail_bookmark + color: "#eee039" + - state: icon_question + - state: detail_bookmark + color: "#2c5491" + - type: Paper + content: book-text-vulpkanin diff --git a/Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/detective.yml b/Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/detective.yml index 5687a12c82e..8203b103887 100644 --- a/Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/detective.yml +++ b/Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/detective.yml @@ -1,14 +1,17 @@ - type: loadout id: SecurityRevolverWeaponRevolverLucky - storage: - belt: - - WeaponRevolverLucky + equipment: + pocket1: WeaponRevolverLucky - type: loadout id: SecurityRevolverInspector - storage: - belt: - - WeaponRevolverInspector + equipment: + pocket1: WeaponRevolverInspector + +- type: loadout + id: SecurityFirearmWeaponRevolverFitz + equipment: + pocket1: WeaponRevolverFitz - type: loadout id: SecurityFirearmSpeedLoaderMagnumRubber @@ -34,11 +37,6 @@ back: - SpeedLoaderSpecial -- type: loadout - id: SecurityFirearmWeaponRevolverFitz - equipment: - pocket1: WeaponRevolverFitz - - type: loadout id: SecurityFirearmWeaponRevolverK38Master equipment: diff --git a/Resources/Prototypes/Entities/Structures/Shuttles/cannons.yml b/Resources/Prototypes/Entities/Structures/Shuttles/cannons.yml index f0e6dd0155c..086a708453b 100644 --- a/Resources/Prototypes/Entities/Structures/Shuttles/cannons.yml +++ b/Resources/Prototypes/Entities/Structures/Shuttles/cannons.yml @@ -363,3 +363,6 @@ count: 5 - type: Machine board: ShuttleGunKineticCircuitboard + - type: ExtensionCableReceiver # Frontier + - type: ApcPowerReceiver # Frontier + powerLoad: 1500 # Frontier diff --git a/Resources/Prototypes/lobbyscreens.yml b/Resources/Prototypes/lobbyscreens.yml index 6e0e604f926..694b30c0140 100644 --- a/Resources/Prototypes/lobbyscreens.yml +++ b/Resources/Prototypes/lobbyscreens.yml @@ -45,3 +45,15 @@ - type: lobbyBackground id: breakingspace background: /Textures/LobbyScreens/breakingspace.webp + +- type: lobbyBackground + id: StationCrewBoard + background: /Textures/LobbyScreens/station-crew-board.webp + +- type: lobbyBackground + id: CorporateRats + background: /Textures/LobbyScreens/Corporate_Rats.webp + +- type: lobbyBackground + id: SecurityCamera + background: /Textures/LobbyScreens/DeltaVContestWinner.webp