Quellcode durchsuchen

Fixes showing huds to others, pistol mag

Taislin vor 6 Monaten
Ursprung
Commit
16cda08c32

+ 12 - 0
Content.Client/StatusIcon/StatusIconSystem.cs

@@ -8,6 +8,7 @@
 using Robust.Client.Graphics;
 using Robust.Client.Player;
 using Robust.Shared.Configuration;
+using Content.Shared.Overlays;
 
 namespace Content.Client.StatusIcon;
 
@@ -85,6 +86,17 @@ public bool IsVisible(Entity<MetaDataComponent> ent, StatusIconData data)
 
         if (data.HideOnStealth && TryComp<StealthComponent>(ent, out var stealth) && stealth.Enabled)
             return false;
+        if (TryComp<ShowFactionIconsComponent>(ent, out var requested))
+        {
+            if (TryComp<ShowFactionIconsComponent>(viewer, out var requester))
+            {
+                //only show if on the same faction
+                if (requester.FactionIcon != requested.FactionIcon)
+                {
+                    return false;
+                }
+            }
+        }
 
         if (TryComp<SpriteComponent>(ent, out var sprite) && !sprite.Visible)
             return false;

+ 0 - 17
Resources/Maps/civ/tdm/hotel.yml

@@ -8555,23 +8555,6 @@ entities:
     - type: Transform
       pos: 26.508263,46.05315
       parent: 2
-- proto: LandMineCiv
-  entities:
-  - uid: 384
-    components:
-    - type: Transform
-      pos: -13.403467,9.933086
-      parent: 2
-  - uid: 387
-    components:
-    - type: Transform
-      pos: -12.965559,4.285555
-      parent: 2
-  - uid: 391
-    components:
-    - type: Transform
-      pos: -15.258289,35.163334
-      parent: 2
 - proto: LockerBooze
   entities:
   - uid: 1117

+ 2 - 2
Resources/Prototypes/Civ14/Entities/Objects/Guns/entities_pistol.yml

@@ -775,12 +775,12 @@
       slots:
         gun_magazine:
           name: Magazine
-          startingItem: civ13_magazine_default
+          startingItem: civ13_magazine_PM_Makarov_magazine_(9x18mm)
 
           priority: 2
           whitelist:
             tags:
-              - civ13_magazine_default
+              - civ13_magazine_PM_Makarov_magazine_(9x18mm)
           whitelistFailPopup: gun-magazine-whitelist-fail
         gun_chamber:
           name: Chamber

+ 1 - 1
Resources/Prototypes/Civ14/Entities/Objects/Storage/filled_crates.yml

@@ -159,5 +159,5 @@
   components:
     - type: StorageFill
       contents:
-        - id: MortarAmmoBase
+        - id: MortarShellHE
           amount: 10

+ 33 - 11
Resources/Prototypes/Civ14/Entities/Structures/Furniture/Decorative/decorative_machines.yml

@@ -1,5 +1,27 @@
 - type: entity
   parent: StructureDecorativeBase
+  id: StructureDecorativeMachines
+  name: military radio
+  description: A military radio.
+  suffix: decorative
+  abstract: true
+  components:
+    - type: Sprite
+      noRot: true
+      sprite: Civ14/Objects/device.rsi
+      state: modern_intercom
+    - type: Damageable
+      damageModifierSet: Metallic
+      damageContainer: StructuralInorganic
+    - type: Destructible
+      thresholds:
+        - trigger: !type:DamageTrigger
+            damage: 180
+          behaviors:
+            - !type:DoActsBehavior
+              acts: ["Destruction"]
+- type: entity
+  parent: StructureDecorativeMachines
   id: StructureDecorativeRadio
   name: military radio
   description: A military radio.
@@ -11,7 +33,7 @@
       state: modern_intercom
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeRadioTransmitter
   name: radio transmitter
   description: A powerful radio transmitter.
@@ -23,7 +45,7 @@
       state: radio_transmitter
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeRecorder
   name: recorder
   description: A tape recorder.
@@ -35,7 +57,7 @@
       state: recorder_on
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeMachine
   name: machine
   description: Some sort of machine. Not sure what this does.
@@ -47,7 +69,7 @@
       state: machine_on
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeFOB
   name: FOB transmitter
   description: A transmitter for a FOB command post.
@@ -70,7 +92,7 @@
       state: fob_flipped
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeSupplyCrate
   name: supply crate
   description: A crate of assorted supplies.
@@ -81,7 +103,7 @@
       sprite: Civ14/Objects/junk.rsi
       state: supply_crate
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeRadiator
   name: radiator
   description: An old radiator.
@@ -92,7 +114,7 @@
       sprite: Civ14/Objects/junk.rsi
       state: radiator
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeBathtube
   name: bathtub
   description: An old bathtub.
@@ -104,7 +126,7 @@
       state: bathtub
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeWashingMachine
   name: washing machine
   description: An old washing machine.
@@ -116,7 +138,7 @@
       state: washing_machine_4
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeStove
   name: stove
   description: An old gas stove.
@@ -128,7 +150,7 @@
       state: stove
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeTV
   name: TV
   description: An old TV.
@@ -140,7 +162,7 @@
       state: TV
 
 - type: entity
-  parent: StructureDecorativeBase
+  parent: StructureDecorativeMachines
   id: StructureDecorativeCashRegister
   name: cash register
   description: A standard cash register.