From 115313ddedf3da0077f4a5ea2191af9485ba6abd Mon Sep 17 00:00:00 2001 From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Tue, 1 Apr 2025 00:32:31 +0200 Subject: [PATCH] Undetermined thieving satchel (#36201) * yippee! * no toolboxes allowed * sprite, descriptions --- .../ThiefUndeterminedBackpackComponent.cs | 9 +- .../ThiefUndeterminedBackpackSystem.cs | 22 ++++- .../game-presets/preset-thief.ftl | 2 +- Resources/Locale/en-US/thief/backpack.ftl | 2 +- .../Prototypes/Catalog/thief_toolbox_sets.yml | 11 +-- .../Entities/Clothing/Back/smuggler.yml | 4 +- .../Entities/Objects/Tools/thief.yml | 80 ++++++++++++++++++ .../Entities/Objects/Tools/thief_beacon.yml | 40 --------- .../Entities/Objects/Tools/toolbox.yml | 26 ------ Resources/Prototypes/Roles/Antags/thief.yml | 2 +- .../Guidebook/Antagonist/Thieves.xml | 15 ++-- .../Back/Satchels/smuggler.rsi/folded.png | Bin 0 -> 5979 bytes .../Back/Satchels/smuggler.rsi/meta.json | 5 +- 13 files changed, 125 insertions(+), 93 deletions(-) create mode 100644 Resources/Prototypes/Entities/Objects/Tools/thief.yml delete mode 100644 Resources/Prototypes/Entities/Objects/Tools/thief_beacon.yml create mode 100644 Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/folded.png diff --git a/Content.Server/Thief/Components/ThiefUndeterminedBackpackComponent.cs b/Content.Server/Thief/Components/ThiefUndeterminedBackpackComponent.cs index 64f88df657..9080caa245 100644 --- a/Content.Server/Thief/Components/ThiefUndeterminedBackpackComponent.cs +++ b/Content.Server/Thief/Components/ThiefUndeterminedBackpackComponent.cs @@ -22,11 +22,18 @@ public sealed partial class ThiefUndeterminedBackpackComponent : Component public List SelectedSets = new(); [DataField] - public SoundSpecifier ApproveSound = new SoundPathSpecifier("/Audio/Effects/rustle1.ogg"); + public SoundCollectionSpecifier ApproveSound = new SoundCollectionSpecifier("storageRustle"); /// /// Max number of sets you can select. /// [DataField] public int MaxSelectedSets = 2; + + /// + /// What entity all the spawned items will appear inside of + /// If null, will instead drop on the ground. + /// + [DataField] + public EntProtoId? SpawnedStoragePrototype; } diff --git a/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs b/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs index 3248a6b9c8..23f845a2e7 100644 --- a/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs +++ b/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs @@ -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(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 backpack, ref ThiefBackpackChangeSetMessage args) diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl index ab2b8f88d7..46eab5fee3 100644 --- a/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl +++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl @@ -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. diff --git a/Resources/Locale/en-US/thief/backpack.ftl b/Resources/Locale/en-US/thief/backpack.ftl index 6d3baa2c0d..962480e2e2 100644 --- a/Resources/Locale/en-US/thief/backpack.ftl +++ b/Resources/Locale/en-US/thief/backpack.ftl @@ -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. diff --git a/Resources/Prototypes/Catalog/thief_toolbox_sets.yml b/Resources/Prototypes/Catalog/thief_toolbox_sets.yml index 7826c1db97..a17cb128a7 100644 --- a/Resources/Prototypes/Catalog/thief_toolbox_sets.yml +++ b/Resources/Prototypes/Catalog/thief_toolbox_sets.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml b/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml index c9d7f61890..f5ec4fcd3a 100644 --- a/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml +++ b/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml @@ -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 index 0000000000..7200c8c06d --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Tools/thief.yml @@ -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 index f0f3737417..0000000000 --- a/Resources/Prototypes/Entities/Objects/Tools/thief_beacon.yml +++ /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" ] diff --git a/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml b/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml index dd1f41e571..d0f42e405f 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml @@ -143,29 +143,3 @@ 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 diff --git a/Resources/Prototypes/Roles/Antags/thief.yml b/Resources/Prototypes/Roles/Antags/thief.yml index 0309b00b50..12fdefba2b 100644 --- a/Resources/Prototypes/Roles/Antags/thief.yml +++ b/Resources/Prototypes/Roles/Antags/thief.yml @@ -11,5 +11,5 @@ storage: back: - ThiefBeacon - - ToolboxThief + - SatchelThief - ClothingHandsChameleonThief diff --git a/Resources/ServerInfo/Guidebook/Antagonist/Thieves.xml b/Resources/ServerInfo/Guidebook/Antagonist/Thieves.xml index 4c11fc0d99..ec871851c6 100644 --- a/Resources/ServerInfo/Guidebook/Antagonist/Thieves.xml +++ b/Resources/ServerInfo/Guidebook/Antagonist/Thieves.xml @@ -1,6 +1,6 @@ # Thieves - + [color=#999999][italic]"Yoink! I'll be taking that! And that! Ooh, don't mind if I do!"[/italic][/color] @@ -25,7 +25,7 @@ ## 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. @@ -36,11 +36,10 @@ - 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. - + @@ -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] @@ -64,12 +63,12 @@ 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: - + - + 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 index 0000000000000000000000000000000000000000..0773c0b94dd573b9b33529f2c89b2a9a63d37e79 GIT binary patch literal 5979 zcmeHKdo+|=8z0mVa!tu?rjd%weTm1=S=AJd0#GEseVz-Bb&!pS%HM~JaD{q^w6xWJrWyq**{oEufa3j z{ugx~Wy@1nRZ!l_=>QgUpKZ$)mByD+3zKo@gt`?Q8NVZ81yf}LAdFwwT)#DXggLdltX6Cm6 z;Y4?%(n|+4Gz-zoE0yzf@SOY+^7);`MoO^}i6u`A&w}!PRvFf3p5=BH7^@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qII{T5#~+LAmh75`fPJWl#_}h6mvgi6lH8AcJU-z$KwcY%UJXf~?RGt_2BC zq!PG9i|-&jL_8=ffuQfbl0k7GC=!=Q1pyKPZ3(ccXcC??1w}!FmQ*&&0?(y_c*+zM zhfQ-5h=KuVJ9)uC0EiXx1EvHr!fDGrUFawR2KQ~oGYF7yAp__P@c0}-xcHlh$qNR( zB!G-hyd{Z9q>xA!BnpX4Bon?Vd4nP`l#4P{JPt#gmdG}S289Dr3&=7R0+_OZqM_M~ zKtLi8F$IDkI!fjgQfB#8>;@eu4j=&>00{_z;s_Qr9Fa!EG4T`{!4jerjkBcTzS9?Q zc-)BprY$=@NbBiMcjk$q^&_UHrq7fY7&1MY9tQEI4igeNbu4HAdpZO$5C(Fl{DiQk zMeI!gKLCX4$LECoGSB-D$w0BB0(eVHHkv@d;3<|CEFyt4P109% zv4ATH2SniV0EkD3D=0yyxI!-Zyj7+@dK110lpZS7({eQO4`|$r<0*U;!$WQV6i>_aE{S*T~rTi6<7zn~=5-r@Ff^E;~E>nB(*0-NP?m$_uw` zb1(C0B(-+s4GjhFKza^DUO3r!FrJJCbm5GZ)@=<{!L>d7!O>H{A(j;ItF0D18hEQ= zmp?#@wcDPUnAo1GA~Xo7sH$=*=_qX9)E8lNKParQEgb~17F}WC(+A#0K790ur3<%< zTVZ&hTfTSv7}E?^;fs#Z2s)WAeKST^iOASihY+Qm=A2E$up}+JID&7o9c8 zIvNrlzUwIOxK7@)R-2uG?!H!ThqZ$Bbq^bIQBhIZ+~@DxJd&7ryw<>NlOdLrWMFIMozJc}2zHoLix} z0|NtfzsDou1K_i_@% literal 0 HcmV?d00001 diff --git a/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/meta.json b/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/meta.json index d3b44ffaa2..66c0f6df16 100644 --- a/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/meta.json +++ b/Resources/Textures/Clothing/Back/Satchels/smuggler.rsi/meta.json @@ -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 -- 2.51.2