Przeglądaj źródła

seed stacking fix, blue roman shield

Taislin 7 miesięcy temu
rodzic
commit
3082249c99

+ 19 - 2
Content.Server/Botany/Systems/PlantHolderSystem.cs

@@ -25,6 +25,8 @@
 using Content.Server.Labels.Components;
 using Content.Shared.Containers.ItemSlots;
 using Content.Shared.Weather;
+using Content.Server.Stack;
+using Content.Shared.Stacks;
 
 namespace Content.Server.Botany.Systems;
 
@@ -43,7 +45,7 @@ public sealed class PlantHolderSystem : EntitySystem
     [Dependency] private readonly RandomHelperSystem _randomHelper = default!;
     [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
-
+    [Dependency] private readonly StackSystem _stack = default!;
     public const float HydroponicsSpeedMultiplier = 1f;
     public const float HydroponicsConsumptionMultiplier = 2f;
     private ISawmill _sawmill = default!;
@@ -202,7 +204,22 @@ private void OnInteractUsing(Entity<PlantHolderComponent> entity, ref InteractUs
                 {
                     _itemSlots.TryEjectToHands(args.Used, paperLabel.LabelSlot, args.User);
                 }
-                QueueDel(args.Used);
+
+                if (TryComp<StackComponent>(args.Used, out var stack))
+                {
+                    //Not deleting whole stack piece will make troubles with grinding object
+                    if (stack.Count > 1)
+                    {
+                        _stack.SetCount(args.Used, stack.Count - 1);
+                        return;
+                    }
+                    else
+                    {
+                        QueueDel(args.Used);
+                    }
+                }
+                else { QueueDel(args.Used); }
+
 
                 CheckLevelSanity(uid, component);
                 UpdateSprite(uid, component);

+ 7 - 0
Resources/Locale/en-US/preferences/loadout-groups.ftl

@@ -211,3 +211,10 @@ loadout-group-native-jumpsuit = Native Jumpsuit Loadout
 loadout-group-native-shoes = Native Shoes Loadout
 loadout-group-native-neck = Native Neck Loadout
 loadout-group-native-pockets = Native Pocket Loadout
+
+
+loadout-group-roman-head = Roman Head Loadout
+loadout-group-roman-jumpsuit = Roman Jumpsuit Loadout
+loadout-group-roman-shoes = Roman Shoes Loadout
+loadout-group-roman-pockets = Roman Pocket Loadout
+loadout-group-roman-armor = Roman Pocket Loadout

+ 1 - 1
Resources/Prototypes/Civ14/Entities/Mobs/NPC/romans.yml

@@ -283,7 +283,7 @@
   id: RomanInhandGladiusFriendly
   inhand:
     - civ13_sword_gladius
-    - civ13_shield_praetorian_roman_shield
+    - civ13_shield_roman_shield_blue
 
 - type: startingGear
   id: RomanInhandRangedFriendly

+ 9 - 0
Resources/Prototypes/Civ14/Entities/Structures/Craft/shields.yml

@@ -592,6 +592,15 @@
           behaviors:
             - !type:DoActsBehavior
               acts: ["Destruction"]
+- type: entity
+  name: blue roman shield
+  parent: WoodenBuckler
+  id: civ13_shield_roman_shield_blue
+  description: A shield. Blocks melee damage.
+  components:
+    - type: Sprite
+      state: icon
+      sprite: Civ14/Weapons/roman_shield_blue.rsi
 - type: entity
   name: chimalli
   parent: WoodenBuckler

+ 10 - 2
Resources/Prototypes/Civ14/Entities/Structures/Craft/shields_lathe.yml

@@ -17,6 +17,7 @@
     - civ13_shield_egyptian_shield
     - civ13_shield_praetorian_roman_shield
     - civ13_shield_roman_shield
+    - civ13_shield_roman_shield_blue
 
 - type: latheRecipe
   id: civ13_shield_bronze_shield
@@ -79,7 +80,7 @@
   completetime: 12
   materials:
     Iron: 1000
-  result: civ13_shield_roman_shield
+  result: civ13_shield_praetorian_roman_shield
 - type: latheRecipe
   id: civ13_shield_roman_shield
   categories:
@@ -88,7 +89,14 @@
   materials:
     Iron: 1000
   result: civ13_shield_roman_shield
-
+- type: latheRecipe
+  id: civ13_shield_roman_shield_blue
+  categories:
+    - AnvilShieldsAncient
+  completetime: 12
+  materials:
+    Iron: 1000
+  result: civ13_shield_roman_shield_blue
 - type: latheRecipePack
   id: AnvilShieldsMedieval
   recipes:

BIN
Resources/Textures/Civ14/Weapons/roman_shield_blue.rsi/equipped-BACKPACK.png


BIN
Resources/Textures/Civ14/Weapons/roman_shield_blue.rsi/icon.png


BIN
Resources/Textures/Civ14/Weapons/roman_shield_blue.rsi/inhand-left.png


BIN
Resources/Textures/Civ14/Weapons/roman_shield_blue.rsi/inhand-right.png


+ 31 - 0
Resources/Textures/Civ14/Weapons/roman_shield_blue.rsi/meta.json

@@ -0,0 +1,31 @@
+{
+    "version": 1,
+    "license": "AGPLv3",
+    "copyright": "Taken from Civilization 13 https://github.com/civ13/civ13",
+    "size": {
+        "x": 32,
+        "y": 32
+    },
+    "states": [
+        {
+            "name": "roman_shield_blue",
+            "directions": 1
+        },
+        {
+            "name": "equipped-BACKPACK",
+            "directions": 4
+        },
+        {
+            "name": "icon",
+            "directions": 1
+        },
+        {
+            "name": "inhand-left",
+            "directions": 4
+        },
+        {
+            "name": "inhand-right",
+            "directions": 4
+        }
+    ]
+}

BIN
Resources/Textures/Civ14/Weapons/roman_shield_blue.rsi/roman_shield_blue.png