]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Chameleon vests now act like winter coats (#34929)
authorbeck-thompson <107373427+beck-thompson@users.noreply.github.com>
Mon, 17 Mar 2025 18:39:04 +0000 (11:39 -0700)
committerGitHub <noreply@github.com>
Mon, 17 Mar 2025 18:39:04 +0000 (19:39 +0100)
First commit

Content.Shared/Armor/ArmorComponent.cs
Content.Shared/Armor/SharedArmorSystem.cs
Resources/Prototypes/Entities/Clothing/OuterClothing/specific.yml

index 8ffbb5a4f83d0280ad52fc8298b88ac8e012c451..38f5f2cb1b04d0575e46bccb3e112aca1f8e828e 100644 (file)
@@ -23,6 +23,12 @@ public sealed partial class ArmorComponent : Component
     /// </summary>
     [DataField]
     public float PriceMultiplier = 1;
+
+    /// <summary>
+    /// If true, you can examine the armor to see the protection. If false, the verb won't appear.
+    /// </summary>
+    [DataField]
+    public bool ShowArmorOnExamine = true;
 }
 
 /// <summary>
index bea875256f86f7777fa474e8a11715361f1b783a..1ff1bbc073375a42dac65eb80a4592c142c06761 100644 (file)
@@ -51,7 +51,7 @@ public abstract class SharedArmorSystem : EntitySystem
 
     private void OnArmorVerbExamine(EntityUid uid, ArmorComponent component, GetVerbsEvent<ExamineVerb> args)
     {
-        if (!args.CanInteract || !args.CanAccess)
+        if (!args.CanInteract || !args.CanAccess || !component.ShowArmorOnExamine)
             return;
 
         var examineMarkup = GetArmorExamine(component.Modifiers);
index c3d9bb1224244bbe12acabb77dffd833a6878b7d..aec34e80ca50a0939f8fab24216eaae43cfb3473 100644 (file)
       interfaces:
         enum.ChameleonUiKey.Key:
           type: ChameleonBoundUserInterface
+    - type: TemperatureProtection # Same as a basic winter coat.
+      heatingCoefficient: 1.1
+      coolingCoefficient: 0.1
+    - type: Armor
+      modifiers:
+        coefficients:
+          Slash: 0.95
+          Heat: 0.90
+      showArmorOnExamine: false