]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Undetermined thieving satchel (#36201)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Mon, 31 Mar 2025 22:32:31 +0000 (00:32 +0200)
committerGitHub <noreply@github.com>
Mon, 31 Mar 2025 22:32:31 +0000 (15:32 -0700)
* yippee!

* no toolboxes allowed

* sprite, descriptions

13 files changed:
Content.Server/Thief/Components/ThiefUndeterminedBackpackComponent.cs
Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs
Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl
Resources/Locale/en-US/thief/backpack.ftl
Resources/Prototypes/Catalog/thief_toolbox_sets.yml
Resources/Prototypes/Entities/Clothing/Back/smuggler.yml
Resources/Prototypes/Entities/Objects/Tools/thief.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Tools/thief_beacon.yml [deleted file]
Resources/Prototypes/Entities/Objects/Tools/toolbox.yml
Resources/Prototypes/Roles/Antags/thief.yml
Resources/ServerInfo/Guidebook/Antagonist/Thieves.xml
Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/folded.png [new file with mode: 0644]
Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/meta.json

index 64f88df657942a276f4afd227189ac35b9cd7159..9080caa2456c8aced5b5a43522acd5d301ddb84a 100644 (file)
@@ -22,11 +22,18 @@ public sealed partial class ThiefUndeterminedBackpackComponent : Component
     public List<int> SelectedSets = new();
 
     [DataField]
-    public SoundSpecifier ApproveSound = new SoundPathSpecifier("/Audio/Effects/rustle1.ogg");
+    public SoundCollectionSpecifier ApproveSound = new SoundCollectionSpecifier("storageRustle");
 
     /// <summary>
     /// Max number of sets you can select.
     /// </summary>
     [DataField]
     public int MaxSelectedSets = 2;
+
+    /// <summary>
+    /// What entity all the spawned items will appear inside of
+    /// If null, will instead drop on the ground.
+    /// </summary>
+    [DataField]
+    public EntProtoId? SpawnedStoragePrototype;
 }
index 3248a6b9c8050042c3f71df0a99f5399b850634e..23f845a2e73a09848a7067baa8853b753a1bf9b5 100644 (file)
@@ -1,5 +1,7 @@
 using Content.Server.Thief.Components;
+using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Item;
+using Content.Shared.Storage.EntitySystems;
 using Content.Shared.Thief;
 using Robust.Server.GameObjects;
 using Robust.Server.Audio;
@@ -17,6 +19,8 @@ public sealed class ThiefUndeterminedBackpackSystem : EntitySystem
     [Dependency] private readonly IPrototypeManager _proto = default!;
     [Dependency] private readonly SharedTransformSystem _transform = default!;
     [Dependency] private readonly UserInterfaceSystem _ui = default!;
+    [Dependency] private readonly SharedStorageSystem _storage = default!;
+    [Dependency] private readonly SharedHandsSystem _hands = default!;
 
     public override void Initialize()
     {
@@ -37,6 +41,10 @@ public sealed class ThiefUndeterminedBackpackSystem : EntitySystem
         if (backpack.Comp.SelectedSets.Count != backpack.Comp.MaxSelectedSets)
             return;
 
+        EntityUid? spawnedStorage = null;
+        if (backpack.Comp.SpawnedStoragePrototype != null)
+            spawnedStorage = Spawn(backpack.Comp.SpawnedStoragePrototype, _transform.GetMapCoordinates(backpack.Owner));
+
         foreach (var i in backpack.Comp.SelectedSets)
         {
             var set = _proto.Index(backpack.Comp.PossibleSets[i]);
@@ -44,10 +52,20 @@ public sealed class ThiefUndeterminedBackpackSystem : EntitySystem
             {
                 var ent = Spawn(item, _transform.GetMapCoordinates(backpack.Owner));
                 if (TryComp<ItemComponent>(ent, out var itemComponent))
-                    _transform.DropNextTo(ent, backpack.Owner);
+                {
+                    if (spawnedStorage != null)
+                        _storage.Insert(spawnedStorage.Value, ent, out _, playSound: false);
+                    else
+                        _transform.DropNextTo(ent, backpack.Owner);
+                }
             }
         }
-        _audio.PlayPvs(backpack.Comp.ApproveSound, backpack.Owner);
+
+        if (spawnedStorage != null)
+            _hands.TryPickupAnyHand(args.Actor, spawnedStorage.Value);
+
+        // Play the sound on coordinates of the backpack/toolbox. The reason being, since we immediately delete it, the sound gets deleted alongside it.
+        _audio.PlayPvs(backpack.Comp.ApproveSound, Transform(backpack.Owner).Coordinates);
         QueueDel(backpack);
     }
     private void OnChangeSet(Entity<ThiefUndeterminedBackpackComponent> backpack, ref ThiefBackpackChangeSetMessage args)
index ab2b8f88d76d7a4197813ae02e078b52480a7fe7..46eab5fee3d8dc2c4f80a1cbe6f5bcd837eb9beb 100644 (file)
@@ -10,7 +10,7 @@ thief-role-greeting-animal =
     Steal things that you like.
 
 thief-role-greeting-equipment =
-    You have a toolbox of thieves'
+    You have a satchel of thieves'
     tools and chameleon thieves' gloves.
     Choose your starting equipment,
     and do your work stealthily.
index 6d3baa2c0d8a6255cfda451fa88e04454464ea80..962480e2e240cd22540c32c275685a1e3a32c912 100644 (file)
@@ -1,4 +1,4 @@
-thief-backpack-window-title = thief toolbox
+thief-backpack-window-title = thieving kit
 
 thief-backpack-window-description =
     Inside are your tools of the trade, which will dissolve when you're ready.
index 7826c1db97206622b9a6a8fec3e97af425b4395f..a17cb128a74e824bdf7f2ec14c6e34fcbc0b6e01 100644 (file)
@@ -6,16 +6,7 @@
     sprite: /Textures/Clothing/OuterClothing/Misc/black_hoodie.rsi
     state: icon
   content:
-  - ChameleonPDA
-  - ClothingUniformJumpsuitChameleon
-  - ClothingOuterChameleon
-  - ClothingNeckChameleon
-  - ClothingMaskGasChameleon
-  - ClothingHeadHatChameleon
-  - ClothingEyesChameleon
-  - ClothingHeadsetChameleon
-  - ClothingShoesChameleon
-  - BarberScissors
+  - ClothingBackpackChameleonFill
   - ChameleonProjector
   - FakeMindShieldImplanter
   - AgentIDCard
index c9d7f61890b8204bc3f9fb3e33a8806ea8b784a4..f5ec4fcd3a2c666da6cc18eb38162db9aa0d44e9 100644 (file)
@@ -37,7 +37,7 @@
   id: ClothingBackpackSatchelSmuggler
   name: smuggler's satchel
   suffix: Empty
-  description: A dingy, suspicious looking satchel.
+  description: A handy, suspicious looking satchel. Just flat enough to fit underneath floor tiles.
   components:
   - type: Sprite
     sprite: Clothing/Back/Satchels/smuggler.rsi
@@ -48,7 +48,7 @@
   id: ClothingBackpackSatchelSmugglerUnanchored
   name: smuggler's satchel
   suffix: Empty, Unanchored
-  description: A dingy, suspicious looking satchel.
+  description: A handy, suspicious looking satchel. Just flat enough to fit underneath floor tiles.
   components:
   - type: Sprite
     sprite: Clothing/Back/Satchels/smuggler.rsi
diff --git a/Resources/Prototypes/Entities/Objects/Tools/thief.yml b/Resources/Prototypes/Entities/Objects/Tools/thief.yml
new file mode 100644 (file)
index 0000000..7200c8c
--- /dev/null
@@ -0,0 +1,80 @@
+- type: entity
+  parent: BaseMinorContraband
+  id: ThiefBeacon
+  name: thieving beacon
+  description: A device that will teleport everything around it to the thief's vault at the end of the shift.
+  components:
+    - type: ThiefBeacon
+    - type: StealArea
+      range: 2 # Slightly larger than fulton beacon's random offset
+    - type: Item
+      size: Normal
+    - type: Physics
+      bodyType: Dynamic
+    - type: Fixtures
+      fixtures:
+        fix1:
+          shape:
+            !type:PhysShapeAabb
+            bounds: "-0.25,-0.4,0.25,0.1"
+          density: 20
+          mask:
+            - Impassable
+    - type: Foldable
+      folded: true
+    - type: Clickable
+    - type: InteractionOutline
+    - type: Appearance
+    - type: GenericVisualizer
+      visuals:
+        enum.FoldedVisuals.State:
+          foldedLayer:
+            True: { state: folded_extraction }
+            False: { state: extraction_point }
+    - type: Sprite
+      sprite: Objects/Tools/thief_beacon.rsi
+      drawdepth: SmallObjects
+      noRot: true
+      layers:
+        - state: extraction_point
+          map: [ "foldedLayer" ]
+
+- type: entity
+  id: ToolboxThief
+  name: undetermined thieving toolbox
+  description: This is where your favorite thief's supplies lie. Try to remember which ones.
+  parent: [ BaseItem, BaseMinorContraband ]
+  components:
+  - type: Sprite
+    sprite: Objects/Tools/Toolboxes/toolbox_thief.rsi
+    state: icon
+  - type: ThiefUndeterminedBackpack
+    possibleSets:
+    # TODO Thief pinpointer needed
+    - ChemistrySet
+    - ToolsSet
+    - ChameleonSet # TODO Chameleon stump PR needed
+    - SyndieSet
+    - SleeperSet
+    - CommunicatorSet
+    - SmugglerSet
+  - type: ActivatableUI
+    key: enum.ThiefBackpackUIKey.Key
+  - type: UserInterface
+    interfaces:
+      enum.ThiefBackpackUIKey.Key:
+        type: ThiefBackpackBoundUserInterface
+
+- type: entity
+  id: SatchelThief
+  name: undetermined thieving satchel
+  description: This is where your favorite thief's supplies lie. Folded for your convenience.
+  parent: ToolboxThief
+  components:
+  - type: Sprite
+    sprite: Clothing/Back/Satchels/smuggler.rsi
+    state: folded
+  - type: Item
+    storedRotation: 90
+  - type: ThiefUndeterminedBackpack
+    spawnedStoragePrototype: ClothingBackpackSatchelSmugglerUnanchored
diff --git a/Resources/Prototypes/Entities/Objects/Tools/thief_beacon.yml b/Resources/Prototypes/Entities/Objects/Tools/thief_beacon.yml
deleted file mode 100644 (file)
index f0f3737..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-- type: entity
-  parent: BaseMinorContraband
-  id: ThiefBeacon
-  name: thieving beacon
-  description: A device that will teleport everything around it to the thief's vault at the end of the shift.
-  components:
-    - type: ThiefBeacon
-    - type: StealArea
-      range: 2 # Slightly larger than fulton beacon's random offset
-    - type: Item
-      size: Normal
-    - type: Physics
-      bodyType: Dynamic
-    - type: Fixtures
-      fixtures:
-        fix1:
-          shape:
-            !type:PhysShapeAabb
-            bounds: "-0.25,-0.4,0.25,0.1"
-          density: 20
-          mask:
-            - Impassable
-    - type: Foldable
-      folded: true
-    - type: Clickable
-    - type: InteractionOutline
-    - type: Appearance
-    - type: GenericVisualizer
-      visuals:
-        enum.FoldedVisuals.State:
-          foldedLayer:
-            True: { state: folded_extraction }
-            False: { state: extraction_point }
-    - type: Sprite
-      sprite: Objects/Tools/thief_beacon.rsi
-      drawdepth: SmallObjects
-      noRot: true
-      layers:
-        - state: extraction_point
-          map: [ "foldedLayer" ]
index dd1f41e5718f29581bbafb4dca1bc425ec769bb9..d0f42e405f71b47ad528cf4577ee1353cfb9f90c 100644 (file)
     state: icon
   - type: Item
     sprite: Objects/Tools/Toolboxes/toolbox_gold.rsi
-
-- type: entity
-  id: ToolboxThief
-  name: thief undetermined toolbox
-  description: This is where your favorite thief's supplies lie. Try to remember which ones.
-  parent: [ BaseItem, BaseMinorContraband ]
-  components:
-  - type: Sprite
-    sprite: Objects/Tools/Toolboxes/toolbox_thief.rsi
-    state: icon
-  - type: ThiefUndeterminedBackpack
-    possibleSets:
-    # TODO Thief pinpointer needed
-    - ChemistrySet
-    - ToolsSet
-    - ChameleonSet # TODO Chameleon stump PR needed
-    - SyndieSet
-    - SleeperSet
-    - CommunicatorSet
-    - SmugglerSet
-  - type: ActivatableUI
-    key: enum.ThiefBackpackUIKey.Key
-  - type: UserInterface
-    interfaces:
-      enum.ThiefBackpackUIKey.Key:
-        type: ThiefBackpackBoundUserInterface
index 0309b00b504665d343ad2fc4c862bbd45098e9da..12fdefba2b389fa61cf6d6c89da857fc76d786e7 100644 (file)
@@ -11,5 +11,5 @@
   storage:
     back:
     - ThiefBeacon
-    - ToolboxThief
+    - SatchelThief
     - ClothingHandsChameleonThief
index 4c11fc0d991309c7a12c87d38c15b054c133a8d8..ec871851c6ac97df72077b12ec631c6e27668894 100644 (file)
@@ -1,6 +1,6 @@
 <Document>
   # Thieves
-  
+
   <Box>
     [color=#999999][italic]"Yoink! I'll be taking that! And that! Ooh, don't mind if I do!"[/italic][/color]
   </Box>
@@ -25,7 +25,7 @@
   </Box>
 
   ## Tools of the Trade
-  You've got two more aces up your stolen sleeves: your [color=cyan]beacon[/color] and your [color=cyan]toolbox.[/color]
+  You've got two more aces up your stolen sleeves: your [color=cyan]beacon[/color] and your [color=cyan]satchel.[/color]
 
   Your [color=cyan]beacon[/color] provides safe passage home for trinkets that may not be easy to carry with you on the evac shuttle. Simply find a secluded part of the station to unfold the beacon, then set its coordinates to your hideout.
   Any shinies near it will be [bold]teleported to your vault when the shift ends,[/bold] fulfilling your objectives.
     <GuideEntityEmbed Entity="ThiefBeacon"/>
   </Box>
 
-  Your [color=cyan]toolbox[/color] contains... well, whatever you remembered to pack. [bold]You can select two pre-made kits[/bold] to help you complete grander heists.
-  Approve your choices in a safe place, as the toolbox will dissolve and the gear will drop at your feet.
+  Your [color=cyan]satchel[/color] contains... well, whatever you remembered to pack. [bold]You can select two pre-made kits[/bold] to help you complete grander heists.
 
   <Box>
-    <GuideEntityEmbed Entity="ToolboxThief"/>
+    <GuideEntityEmbed Entity="SatchelThief"/>
   </Box>
   <Box>
     <GuideEntityEmbed Entity="StorageImplanter" Caption="Anatomy"/>
@@ -56,7 +55,7 @@
 
   ## Centerpiece of the Collection
   Your kleptomania will take you places. One day, you'll feel like stealing a few figurines. Another day, you'll feel like stealing an industrial machine.
-  
+
   No matter. They'll all be a part of your collection within a matter of time.
 
   You can steal items by [bold]having them on your person[/bold] when you get to CentComm. Failing this, you can steal larger items by [bold]leaving them by your beacon.[/bold]
   Some of the more [italic]animate[/italic] objectives may not cooperate with you. Make sure they're alive and with you or your beacon when the shift ends.
 
   Things that you may desire include but are not limited to:
-  
+
   <Box>
    <GuideEntityEmbed Entity="ToyFigurineGreytider" Caption="Figurines"/>
    <GuideEntityEmbed Entity="PassengerIDCard" Caption="ID cards"/>
    <GuideEntityEmbed Entity="ChemDispenser" Caption="Structures"/>
    <GuideEntityEmbed Entity="MobCorgiIan" Caption="Animals/Pets"/>
   </Box>
-  
+
 </Document>
diff --git a/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/folded.png b/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/folded.png
new file mode 100644 (file)
index 0000000..0773c0b
Binary files /dev/null and b/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/folded.png differ
index d3b44ffaa2ce5fe2da30bc08162b0a1fc9c93f09..66c0f6df16885b06ba6b2fa42f9b30047712660e 100644 (file)
@@ -1,7 +1,7 @@
 {
     "version": 1,
     "license": "CC-BY-SA-3.0",
-    "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/a8056c6ba7f5367934ef829116e57d743226e1f0",
+    "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/a8056c6ba7f5367934ef829116e57d743226e1f0, folded by princesscheeseballs (Discord)(https://github.com/Pronana).",
     "size": {
         "x": 32,
         "y": 32
@@ -10,6 +10,9 @@
         {
             "name": "icon"
         },
+        {
+            "name": "folded"
+        },
         {
             "name": "equipped-BACKPACK",
             "directions": 4