]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Syringes that spawn with content start in inject mode (#25881)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Sat, 9 Mar 2024 10:19:03 +0000 (02:19 -0800)
committerGitHub <noreply@github.com>
Sat, 9 Mar 2024 10:19:03 +0000 (11:19 +0100)
* Remove unnecessary datafield names, syringes with stuff in them start in inject mode

* No trash tag

* Remove ViewVariables since DataField has them implicitly

* Revert "No trash tag"

This reverts commit 2c42172653d2cc70d58bd5bedf61a880b939bf20.

* Get rid of tags entirely for PrefilledSyringes

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
Content.Shared/Chemistry/Components/InjectorComponent.cs
Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml
Resources/Prototypes/Entities/Objects/Specific/chemistry.yml

index e29047b6ded766bc74bf48b4ee083ec9778df8df..437c5e327d2e32df2e40e6e5605acb25a52715cd 100644 (file)
@@ -30,7 +30,7 @@ public sealed partial class InjectorComponent : Component
     /// Whether or not the injector is able to draw from containers or if it's a single use
     /// device that can only inject.
     /// </summary>
-    [DataField("injectOnly")]
+    [DataField]
     public bool InjectOnly;
 
     /// <summary>
@@ -39,29 +39,26 @@ public sealed partial class InjectorComponent : Component
     /// <remarks>
     ///     for example: droppers would ignore mobs
     /// </remarks>
-    [DataField("ignoreMobs")]
+    [DataField]
     public bool IgnoreMobs;
 
     /// <summary>
     ///     The minimum amount of solution that can be transferred at once from this solution.
     /// </summary>
     [DataField("minTransferAmount")]
-    [ViewVariables(VVAccess.ReadWrite)]
     public FixedPoint2 MinimumTransferAmount = FixedPoint2.New(5);
 
     /// <summary>
     ///     The maximum amount of solution that can be transferred at once from this solution.
     /// </summary>
     [DataField("maxTransferAmount")]
-    [ViewVariables(VVAccess.ReadWrite)]
     public FixedPoint2 MaximumTransferAmount = FixedPoint2.New(50);
 
     /// <summary>
     /// Amount to inject or draw on each usage. If the injector is inject only, it will
     /// attempt to inject it's entire contents upon use.
     /// </summary>
-    [ViewVariables(VVAccess.ReadWrite)]
-    [DataField("transferAmount")]
+    [DataField]
     [AutoNetworkedField]
     public FixedPoint2 TransferAmount = FixedPoint2.New(5);
 
@@ -72,8 +69,7 @@ public sealed partial class InjectorComponent : Component
     /// The base delay has a minimum of 1 second, but this will still be modified if the target is incapacitated or
     /// in combat mode.
     /// </remarks>
-    [ViewVariables(VVAccess.ReadWrite)]
-    [DataField("delay")]
+    [DataField]
     public TimeSpan Delay = TimeSpan.FromSeconds(5);
 
     /// <summary>
@@ -81,7 +77,6 @@ public sealed partial class InjectorComponent : Component
     /// right SolutionCaps to support injection/drawing. For InjectOnly injectors this should
     /// only ever be set to Inject
     /// </summary>
-    [ViewVariables(VVAccess.ReadWrite)]
     [AutoNetworkedField]
     [DataField]
     public InjectorToggleMode ToggleState = InjectorToggleMode.Draw;
index 52407aba29f811186b6098d7aeadc7c4c5a7c162..79ce03f7006b5aa80b6779c98ba80add74894980 100644 (file)
 # Syringes
 - type: entity
   name: ephedrine syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeEphedrine
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: inaprovaline syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeInaprovaline
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: tranexamic acid syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeTranexamicAcid
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: bicaridine syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeBicaridine
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: dermaline syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeDermaline
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: hyronalin syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeHyronalin
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: ipecac syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeIpecac
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: ambuzol syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeAmbuzol
   components:
     - type: SolutionContainerManager
 
 - type: entity
   name: sigynate syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeSigynate
   components:
     - type: SolutionContainerManager
 
 - type: entity
   name: ethylredoxrazine syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeEthylredoxrazine
   components:
     - type: SolutionContainerManager
 
 - type: entity
   name: phalanximine syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringePhalanximine
   components:
     - type: SolutionContainerManager
 
 - type: entity
   name: saline syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeSaline
   components:
     - type: SolutionContainerManager
 #this is where all the syringes are so i didn't know where to put it
 - type: entity
   name: romerol syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeRomerol
   components:
   - type: SolutionContainerManager
 
 - type: entity
   name: stimulants syringe
-  parent: BaseSyringe
+  parent: PrefilledSyringe
   id: SyringeStimulants
   components:
   - type: SolutionContainerManager
index ab65940fabc73afaa5588eb3418251450c85ef0c..ae4aaed7d2189b8fc371258954df5c472289c70d 100644 (file)
     - Syringe
     - Trash
 
+- type: entity
+  parent: BaseSyringe
+  id: PrefilledSyringe
+  components:
+  - type: Injector
+    toggleState: Inject
+
 - type: entity
   id: SyringeBluespace
   parent: BaseSyringe