diff --git a/Content.Shared/Mining/MiningScannerSystem.cs b/Content.Shared/Mining/MiningScannerSystem.cs index 22e9061b09e..45f10fb387f 100644 --- a/Content.Shared/Mining/MiningScannerSystem.cs +++ b/Content.Shared/Mining/MiningScannerSystem.cs @@ -1,3 +1,4 @@ +using Content.Shared._NF.Mining.Components; // Frontier using Content.Shared.Inventory; using Content.Shared.Item.ItemToggle.Components; using Content.Shared.Mining.Components; @@ -8,7 +9,7 @@ namespace Content.Shared.Mining; -public sealed class MiningScannerSystem : EntitySystem +public sealed partial class MiningScannerSystem : EntitySystem // Frontier: partial { [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly INetManager _net = default!; @@ -22,6 +23,8 @@ public override void Initialize() SubscribeLocalEvent(OnInserted); SubscribeLocalEvent(OnRemoved); SubscribeLocalEvent(OnToggled); + + NFInitialize(); // Frontier } private void OnInserted(Entity ent, ref EntGotInsertedIntoContainerMessage args) @@ -85,8 +88,17 @@ public override void Update(float frameTime) { if (viewer.QueueRemoval) { - RemCompDeferred(uid, viewer); - continue; + // Frontier: innate mining scanner + if (TryComp(uid, out var innateViewer)) + { + SetupInnateMiningViewerComponent((uid, innateViewer)); + } + else + { + // End Frontier: innate mining scanner + RemCompDeferred(uid, viewer); + continue; + } // Frontier } if (_timing.CurTime < viewer.NextPingTime) diff --git a/Content.Shared/_NF/Mining/Components/InnateMiningScannerViewerComponent.cs b/Content.Shared/_NF/Mining/Components/InnateMiningScannerViewerComponent.cs new file mode 100644 index 00000000000..7d6ad85b457 --- /dev/null +++ b/Content.Shared/_NF/Mining/Components/InnateMiningScannerViewerComponent.cs @@ -0,0 +1,22 @@ +using Robust.Shared.Audio; +using Robust.Shared.GameStates; +using Content.Shared.Mining; + +namespace Content.Shared._NF.Mining.Components; + +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(MiningScannerSystem))] +public sealed partial class InnateMiningScannerViewerComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadOnly), AutoNetworkedField] + public float ViewRange; + + [DataField, AutoNetworkedField] + public float AnimationDuration = 1.5f; + + [DataField, AutoNetworkedField] + public TimeSpan PingDelay = TimeSpan.FromSeconds(5); + + [DataField, AutoNetworkedField] + public SoundSpecifier? PingSound = null; + +} diff --git a/Content.Shared/_NF/Mining/MiningScannerSystem.Innate.cs b/Content.Shared/_NF/Mining/MiningScannerSystem.Innate.cs new file mode 100644 index 00000000000..11f7ca80887 --- /dev/null +++ b/Content.Shared/_NF/Mining/MiningScannerSystem.Innate.cs @@ -0,0 +1,33 @@ +using Content.Shared.Mining.Components; +using Content.Shared._NF.Mining.Components; + +namespace Content.Shared.Mining; + +public sealed partial class MiningScannerSystem : EntitySystem +{ + + /// + public void NFInitialize() + { + SubscribeLocalEvent(OnStartup); + } + + private void OnStartup(Entity ent, ref ComponentStartup args) + { + if (!HasComp(ent)) + { + SetupInnateMiningViewerComponent(ent); + } + } + + private void SetupInnateMiningViewerComponent(Entity ent) + { + var comp = EnsureComp(ent); + comp.ViewRange = ent.Comp.ViewRange; + comp.PingDelay = ent.Comp.PingDelay; + comp.PingSound = ent.Comp.PingSound; + comp.QueueRemoval = false; + comp.NextPingTime = _timing.CurTime + ent.Comp.PingDelay; + Dirty(ent.Owner, comp); + } +} diff --git a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml index 251f183be8e..a00a203617e 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml @@ -65,6 +65,9 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female + - type: InnateMiningScannerViewer # Frontier + pingSound: null # Frontier + viewRange: 5 # Frontier - type: entity parent: BaseSpeciesDummy diff --git a/Resources/Prototypes/Guidebook/medical.yml b/Resources/Prototypes/Guidebook/medical.yml index 0c7b1c781e4..0ba0311821e 100644 --- a/Resources/Prototypes/Guidebook/medical.yml +++ b/Resources/Prototypes/Guidebook/medical.yml @@ -6,7 +6,7 @@ - Medical Doctor - Chemist - Cloning - - Cryogenics + - Cryogenics # Note: Frontier changes inside - type: guideEntry id: Medical Doctor @@ -21,7 +21,7 @@ - type: guideEntry id: Cryogenics name: guide-entry-cryogenics - text: "/ServerInfo/Guidebook/Medical/Cryogenics.xml" + text: "/ServerInfo/_NF/Guidebook/Medical/Cryogenics.xml" # Frontier: added _NF prefix - type: guideEntry id: Chemist diff --git a/Resources/Prototypes/Guidebook/species.yml b/Resources/Prototypes/Guidebook/species.yml index a8f74f800bf..fd6272100d1 100644 --- a/Resources/Prototypes/Guidebook/species.yml +++ b/Resources/Prototypes/Guidebook/species.yml @@ -5,7 +5,7 @@ children: - Arachnid - Diona - - Dwarf + - Dwarf # Note: Frontier changes inside - Goblin # Frontier - Human - Moth @@ -30,7 +30,7 @@ - type: guideEntry id: Dwarf name: species-name-dwarf - text: "/ServerInfo/Guidebook/Mobs/Dwarf.xml" + text: "/ServerInfo/_NF/Guidebook/Mobs/Dwarf.xml" # Frontier: moved to _NF folder - type: guideEntry id: Human diff --git a/Resources/Prototypes/_NF/Guidebook/species.yml b/Resources/Prototypes/_NF/Guidebook/species.yml index bcd8b4a78ca..fe8b718df5e 100644 --- a/Resources/Prototypes/_NF/Guidebook/species.yml +++ b/Resources/Prototypes/_NF/Guidebook/species.yml @@ -1,4 +1,4 @@ - type: guideEntry id: Goblin name: species-name-goblin - text: "/ServerInfo/_NF/Guidebook/Mobs/Goblin.xml" \ No newline at end of file + text: "/ServerInfo/_NF/Guidebook/Mobs/Goblin.xml" diff --git a/Resources/ServerInfo/Guidebook/Medical/Cryogenics.xml b/Resources/ServerInfo/Guidebook/Medical/Cryogenics.xml index 4afb59cd0d1..eb7af8b4993 100644 --- a/Resources/ServerInfo/Guidebook/Medical/Cryogenics.xml +++ b/Resources/ServerInfo/Guidebook/Medical/Cryogenics.xml @@ -37,21 +37,18 @@ Not every network will look like this, but hopefully, it's enough to give you th An important thing to note, winter clothing (and hardsuits) will make cryogenic treatment less, or completely ineffective. Be sure to remove cold preventative clothing before placing people in the pod. ## Using the Pod - -Once things have been set up, you're going to require cryogenic medications (all listed below). They each provide healing when a patient is chilled, and should be loaded into the pod directly with a beaker. Do note, patients won't begin to heal until they've chilled to the appropriate temperature, it may be worthwhile to wait a bit before placing a beaker inside. +Once things have been set up, you're going to require a specific medication, Cryoxadone. Cryoxadone heals all damage types when a patient is chilled, and can either be pre-administered (with a pill), or loaded into the cell directly with a beaker. Do note, patients won't begin to heal until they've chilled to the appropriate temperature, it may be worthwhile to wait a bit before placing a beaker inside. ## Additional Information: -The standard pressure for a gas pump is 100.325 kpa. Cryogenics medicines work at under 213K (150K for Opporozidone), but it is standard practice to set the freezer to 100K for faster freezing. - -Cryo pods filter out each cryogenic medicine from the beaker in the pod, injecting a small, steady amount of each into the patient. This allows for medicine to be administered twice as efficiently than with injection or oral administration. +The standard pressure for a gas pump is 100.325 kpa. Cryoxadone works at under 170K, but it is standard practice to set the freezer to 100K for faster freezing. + + - - diff --git a/Resources/ServerInfo/_NF/Guidebook/Medical/Cryogenics.xml b/Resources/ServerInfo/_NF/Guidebook/Medical/Cryogenics.xml new file mode 100644 index 00000000000..4afb59cd0d1 --- /dev/null +++ b/Resources/ServerInfo/_NF/Guidebook/Medical/Cryogenics.xml @@ -0,0 +1,57 @@ + +# Cryogenics +Cryogenics can be a bit daunting to understand, but hopefully, quick run through of this diagram, you'll learn how to work it! So, let's go over what each part does: + +- Air in: Air comes in here through the distro or an air tank, giving those inside something to breathe, and the freezer something to chill. +- Gas pump: Limits the network pressure, so those in the tube aren't crushed. +- Freezer: Chills the air, and by extension, patients in the tube, so Cryoxadone can activate. +- Gas filters: Removes waste gas (Carbon Dioxide and Nitrous Oxide) from the loop. +- Air out: Waste gasses go here, either into a storage tank, or into the waste network. + + + + + + + + + + + + + + + + + + + + + + + + + +Not every network will look like this, but hopefully, it's enough to give you the basic gist of how it's functioning. + +An important thing to note, winter clothing (and hardsuits) will make cryogenic treatment less, or completely ineffective. Be sure to remove cold preventative clothing before placing people in the pod. + +## Using the Pod + +Once things have been set up, you're going to require cryogenic medications (all listed below). They each provide healing when a patient is chilled, and should be loaded into the pod directly with a beaker. Do note, patients won't begin to heal until they've chilled to the appropriate temperature, it may be worthwhile to wait a bit before placing a beaker inside. + +## Additional Information: + +The standard pressure for a gas pump is 100.325 kpa. Cryogenics medicines work at under 213K (150K for Opporozidone), but it is standard practice to set the freezer to 100K for faster freezing. + +Cryo pods filter out each cryogenic medicine from the beaker in the pod, injecting a small, steady amount of each into the patient. This allows for medicine to be administered twice as efficiently than with injection or oral administration. + + + + + + + + + + diff --git a/Resources/ServerInfo/_NF/Guidebook/Mobs/Dwarf.xml b/Resources/ServerInfo/_NF/Guidebook/Mobs/Dwarf.xml new file mode 100644 index 00000000000..391568cdb60 --- /dev/null +++ b/Resources/ServerInfo/_NF/Guidebook/Mobs/Dwarf.xml @@ -0,0 +1,18 @@ + + # Dwarves + + + + + + An industrious species, dwarves are similar to humans in most respect, but tolerate alcohol better and are healed by it. + + + + + + + + A dwarf instinctively knows where the choice ore veins are, and can sense the presence of ore up to 5 meters away. + +