From f5ad61e021c89ab15ecfef6d91fcb3ebdc19a649 Mon Sep 17 00:00:00 2001 From: CaptainSqrBeard Date: Mon, 9 Dec 2024 21:04:08 +0600 Subject: [PATCH 1/3] add stuff --- Resources/Prototypes/Entities/Structures/Machines/lathe.yml | 1 + Resources/Prototypes/Research/civilianservices.yml | 1 + .../Entities/Objects/Circuitboards/production.yml | 6 +++--- .../_CorvaxNext/Recipes/Lathes/circuit_boards.yml | 5 +++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 740af449939..6b97fa69eb4 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -550,6 +550,7 @@ - ArtistCircuitBoard - NutimovCircuitBoard # Corvax-Next-MutableLaws-End + - MedicalBiofabMachineBoard #Corvax-Next-Surgery - type: EmagLatheRecipes emagDynamicRecipes: - ShuttleGunDusterCircuitboard diff --git a/Resources/Prototypes/Research/civilianservices.yml b/Resources/Prototypes/Research/civilianservices.yml index c3b2e173153..28c332bef85 100644 --- a/Resources/Prototypes/Research/civilianservices.yml +++ b/Resources/Prototypes/Research/civilianservices.yml @@ -96,6 +96,7 @@ - FatExtractorMachineCircuitboard - BiofabricatorMachineCircuitboard - BiomassReclaimerMachineCircuitboard + - MedicalBiofabMachineBoard #Corvax-Next-Surgery # Tier 2 diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Circuitboards/production.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Circuitboards/production.yml index 547eaa54001..5f37576475a 100644 --- a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Circuitboards/production.yml +++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Circuitboards/production.yml @@ -8,6 +8,6 @@ state: medical - type: MachineBoard prototype: MedicalBiofabricator -# requirements: -# MatterBin: 2 -# Manipulator: 2 + stackRequirements: + MatterBin: 2 + Manipulator: 2 diff --git a/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/circuit_boards.yml b/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/circuit_boards.yml index e690877af67..0976a59fde9 100644 --- a/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/circuit_boards.yml +++ b/Resources/Prototypes/_CorvaxNext/Recipes/Lathes/circuit_boards.yml @@ -52,3 +52,8 @@ parent: BaseCircuitboardRecipe id: NutimovCircuitBoard result: NutimovCircuitBoard + +- type: latheRecipe + parent: BaseCircuitboardRecipe + id: MedicalBiofabMachineBoard + result: MedicalBiofabMachineBoard From eb23c78285a0b35098fad4a6975a1957a9188f4b Mon Sep 17 00:00:00 2001 From: CaptainSqrBeard Date: Mon, 9 Dec 2024 21:22:58 +0600 Subject: [PATCH 2/3] locker board --- Resources/Prototypes/Catalog/Fills/Lockers/heads.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml index e2cff55e0ce..fd1fc15b5da 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml @@ -224,6 +224,7 @@ - id: HandheldCrewMonitor - id: Hypospray - id: MedicalTechFabCircuitboard + - id: MedicalBiofabMachineBoard #Corvax-Next-Surgery - id: MedkitFilled - id: RubberStampCMO - id: MedTekCartridge From 5e06bc07a9726de394176400e77e96c1ac222d02 Mon Sep 17 00:00:00 2001 From: Kill_Me_I_Noobs <118206719+Vonsant@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:27:03 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=94=D0=B2=D0=BE=D1=80=D1=84=D1=8B=20?= =?UTF-8?q?=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=B5=20=D0=BD=D0=B5=20=D0=B1?= =?UTF-8?q?=D0=B5=D1=81=D0=BF=D0=BE=D0=BB=D0=B5=D0=B7=D0=BD=D1=8B.=20(#144?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * innate mineral scanner * Update Resources/Prototypes/Entities/Mobs/Species/dwarf.yml Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com> * Update Dwarf.xml --------- Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com> --- Content.Shared/Mining/MiningScannerSystem.cs | 18 ++++++++-- .../InnateMiningScannerViewerComponent.cs | 22 +++++++++++++ .../Mining/MiningScannerSystem.Innate.cs | 33 +++++++++++++++++++ .../Entities/Mobs/Species/dwarf.yml | 3 ++ Resources/ServerInfo/Guidebook/Mobs/Dwarf.xml | 3 +- 5 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 Content.Shared/_CorvaxNext/Mining/Components/InnateMiningScannerViewerComponent.cs create mode 100644 Content.Shared/_CorvaxNext/Mining/MiningScannerSystem.Innate.cs diff --git a/Content.Shared/Mining/MiningScannerSystem.cs b/Content.Shared/Mining/MiningScannerSystem.cs index 22e9061b09e..70a846f3821 100644 --- a/Content.Shared/Mining/MiningScannerSystem.cs +++ b/Content.Shared/Mining/MiningScannerSystem.cs @@ -1,3 +1,4 @@ +using Content.Shared._CorvaxNext.Mining.Components; 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 // Corvax-Next-Dwarf { [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); + + CNInitialize(); // Corvax-Next-Dwarf } 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; + // Corvax-Next-Dwarf-Start: innate mining scanner + if (TryComp(uid, out var innateViewer)) + { + SetupInnateMiningViewerComponent((uid, innateViewer)); + } + else + { + RemCompDeferred(uid, viewer); + continue; + } + // Corvax-Next-Dwarf-End: innate mining scanner } if (_timing.CurTime < viewer.NextPingTime) diff --git a/Content.Shared/_CorvaxNext/Mining/Components/InnateMiningScannerViewerComponent.cs b/Content.Shared/_CorvaxNext/Mining/Components/InnateMiningScannerViewerComponent.cs new file mode 100644 index 00000000000..66335e3b614 --- /dev/null +++ b/Content.Shared/_CorvaxNext/Mining/Components/InnateMiningScannerViewerComponent.cs @@ -0,0 +1,22 @@ +using Robust.Shared.Audio; +using Robust.Shared.GameStates; +using Content.Shared.Mining; + +namespace Content.Shared._CorvaxNext.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; + +} \ No newline at end of file diff --git a/Content.Shared/_CorvaxNext/Mining/MiningScannerSystem.Innate.cs b/Content.Shared/_CorvaxNext/Mining/MiningScannerSystem.Innate.cs new file mode 100644 index 00000000000..d0b95137125 --- /dev/null +++ b/Content.Shared/_CorvaxNext/Mining/MiningScannerSystem.Innate.cs @@ -0,0 +1,33 @@ +using Content.Shared.Mining.Components; +using Content.Shared._CorvaxNext.Mining.Components; + +namespace Content.Shared.Mining; + +public sealed partial class MiningScannerSystem : EntitySystem +{ + + /// + public void CNInitialize() + { + 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); + } +} \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml index 64262958c34..37070f0304d 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml @@ -66,6 +66,9 @@ - type: FootprintVisualizer # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-dwarf" rightBarePrint: "footprint-right-bare-dwarf" + - type: InnateMiningScannerViewer # Corvax-Next-Dwarfs + pingSound: null + viewRange: 3 - type: entity parent: BaseSpeciesDummy diff --git a/Resources/ServerInfo/Guidebook/Mobs/Dwarf.xml b/Resources/ServerInfo/Guidebook/Mobs/Dwarf.xml index afc1ba43263..bee07e7fd48 100644 --- a/Resources/ServerInfo/Guidebook/Mobs/Dwarf.xml +++ b/Resources/ServerInfo/Guidebook/Mobs/Dwarf.xml @@ -19,5 +19,6 @@ - Не может быть вызвана рвота от алкоголя. - Дышат чаще в 2 раза, следовательно без воздуха получают по [color=red]2[/color] урона удушьем. - Этанол лечит дворфов на [color=green]0.66[/color] уколов и ушибов и на [color=green]0.68[/color] порезов при наличии менее 5 единиц в организме. + - Обладают врождённой чувствительностью к наличию рудоносных жил в радиусе [color=yellow]3[/color] метров. - \ No newline at end of file +