From 356186c33f854e6d72dc8880887b42939624f0f4 Mon Sep 17 00:00:00 2001
From: areit <77842470+areitpog@users.noreply.github.com>
Date: Mon, 28 Mar 2022 23:53:27 +0300
Subject: [PATCH] Adds a stun chemical (uplink only) (#7258)
---
.../Chemistry/ReagentEffects/Paralyze.cs | 26 +++++++++++++++++
.../Prototypes/Catalog/uplink_catalog.yml | 7 +++++
.../Objects/Specific/chemistry-bottles.yml | 14 ++++++++++
Resources/Prototypes/Reagents/narcotics.yml | 28 +++++++++++++++++++
4 files changed, 75 insertions(+)
create mode 100644 Content.Server/Chemistry/ReagentEffects/Paralyze.cs
diff --git a/Content.Server/Chemistry/ReagentEffects/Paralyze.cs b/Content.Server/Chemistry/ReagentEffects/Paralyze.cs
new file mode 100644
index 0000000000..2bae52045f
--- /dev/null
+++ b/Content.Server/Chemistry/ReagentEffects/Paralyze.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Content.Shared.Chemistry.Reagent;
+using Content.Server.Stunnable;
+
+namespace Content.Server.Chemistry.ReagentEffects;
+
+public sealed class Paralyze : ReagentEffect
+{
+ [DataField("paralyzeTime")] public double ParalyzeTime = 2;
+
+ ///
+ /// true - refresh paralyze time, false - accumulate paralyze time
+ ///
+ [DataField("refresh")] public bool Refresh = true;
+
+ public override void Effect(ReagentEffectArgs args)
+ {
+ EntitySystem.Get().TryParalyze(args.SolutionEntity, TimeSpan.FromSeconds(ParalyzeTime), Refresh);
+ }
+}
+
diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml
index 8935c3f23d..d5046a9d75 100644
--- a/Resources/Prototypes/Catalog/uplink_catalog.yml
+++ b/Resources/Prototypes/Catalog/uplink_catalog.yml
@@ -306,3 +306,10 @@
listingName: Ultragigacancer Health Analyzer
description: Works like a normal health analyzer, other than giving everyone it scans ultragigacancer.
price: 5
+
+- type: uplinkListing
+ id: UplinkNocturineChemistryBottle
+ category: Misc
+ itemId: NocturineChemistryBottle
+ description: A chemical that makes it very hard for your target to stand up.
+ price: 5
diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml
index 9e94fb6e18..7c5691d10b 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml
@@ -139,4 +139,18 @@
reagents:
- ReagentId: RobustHarvest
Quantity: 30
+
+- type: entity
+ id: NocturineChemistryBottle
+ name: nocturine bottle
+ description: This will make someone fall down almost immediately. Hard to overdose on.
+ parent: BaseChemistryEmptyBottle
+ components:
+ - type: SolutionContainerManager
+ solutions:
+ drink:
+ maxVol: 30
+ reagents:
+ - ReagentId: Nocturine
+ Quantity: 30
diff --git a/Resources/Prototypes/Reagents/narcotics.yml b/Resources/Prototypes/Reagents/narcotics.yml
index 02fc85a6a7..9344ba7c76 100644
--- a/Resources/Prototypes/Reagents/narcotics.yml
+++ b/Resources/Prototypes/Reagents/narcotics.yml
@@ -124,3 +124,31 @@
desc: An illegal compound which induces a number of effects such as loss of balance and visual artefacts.
physicalDesc: syrupy
color: "#63806e"
+
+# Probably replace this one with sleeping chem when putting someone in a comatose state is easier
+- type: reagent
+ id: Nocturine
+ name: nocturine
+ group: Narcotics
+ desc: Makes you feel very tired and unable to stand up. Basically, it's bone hurting juice.
+ physicalDesc: powdery
+ color: "#128e80"
+ boilingPoint: 444.0
+ meltingPoint: 128.0
+ metabolisms:
+ Narcotic:
+ effects:
+ - !type:HealthChange
+ conditions:
+ - !type:ReagentThreshold
+ min: 60
+ damage:
+ types:
+ Poison: 1
+ - !type:Paralyze
+ paralyzeTime: 1.2
+ refresh: false
+ - !type:GenericStatusEffect
+ key: Stutter
+ time: 1
+ component: StutteringAccent