diff --git a/Content.Server/Drone/DroneSystem.cs b/Content.Server/Drone/DroneSystem.cs index 516eba3819..4857696fbf 100644 --- a/Content.Server/Drone/DroneSystem.cs +++ b/Content.Server/Drone/DroneSystem.cs @@ -1,3 +1,4 @@ +using System.Linq; using Content.Shared.Drone; using Content.Server.Drone.Components; using Content.Shared.Actions; @@ -88,9 +89,16 @@ namespace Content.Server.Drone { var body = Comp(uid); //There's no way something can have a mobstate but not a body... - foreach (var item in drone.ToolUids) + foreach (var item in drone.ToolUids.Select((value, i) => ( value, i ))) { - EntityManager.DeleteEntity(item); + if (_tagSystem.HasTag(item.value, "Drone")) + { + RemComp(item.value); + } + else + { + EntityManager.DeleteEntity(item.value); + } } body.Gib(); EntityManager.DeleteEntity(uid); @@ -111,12 +119,12 @@ namespace Content.Server.Drone if (TryComp(uid, out var hands) && hands.Count >= drone.Tools.Count) { foreach (var entry in drone.Tools) - { - var item = EntityManager.SpawnEntity(entry.PrototypeId, spawnCoord); - AddComp(item); - hands.PutInHand(item); - drone.ToolUids.Add(item); - } + { + var item = EntityManager.SpawnEntity(entry.PrototypeId, spawnCoord); + AddComp(item); + hands.PutInHand(item); + drone.ToolUids.Add(item); + } } if (TryComp(uid, out var actions) && TryComp(uid, out var flashlight)) diff --git a/Resources/Prototypes/Body/Presets/drone.yml b/Resources/Prototypes/Body/Presets/drone.yml index 08eb753086..6e4813ad40 100644 --- a/Resources/Prototypes/Body/Presets/drone.yml +++ b/Resources/Prototypes/Body/Presets/drone.yml @@ -5,6 +5,6 @@ hand 1: LeftHandDrone hand 2: LeftHandDrone hand 3: LeftHandDrone - hand 4: RightHandDrone + hand 4: LeftHandDrone hand 5: RightHandDrone hand 6: RightHandDrone diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml index faacbd24f5..2042694def 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml @@ -102,3 +102,12 @@ - id: BoxSurvival - id: AcousticGuitarInstrument - id: SaxophoneInstrument + +- type: entity + abstract: true + parent: ClothingBackpackSatchel + id: ClothingBackpackSatchelDrone + components: + - type: Tag + tags: + - Drone diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 48c7d4a6f5..6d610c9ef8 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -72,8 +72,9 @@ components: - type: Drone tools: - - id: PowerDrill - - id: JawsOfLife + - id: ClothingBackpackSatchelDrone + - id: trayScanner + - id: Omnitool - id: WelderExperimental - type: NameIdentifier group: Drone diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index 3832af41d0..4507d53043 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -276,3 +276,63 @@ Blunt: 10 - type: Item sprite: Objects/Tools/shovel.rsi + +- type: entity + name: omnitool + parent: BaseItem + id: Omnitool + description: A drone's best friend. + components: + - type: Sprite + sprite: Objects/Tools/omnitool.rsi + state: omnitool-screwing + - type: Item + sprite: Objects/Tools/omnitool.rsi + size: 20 + - type: TilePrying + - type: SignalLinker + - type: Tool + qualities: + - Screwing + speed: 1.2 # Kept for future adjustments. Currently 1.2x for balance + - type: MultipleTool + statusShowBehavior: true + entries: + - behavior: Screwing + sprite: + sprite: Objects/Tools/omnitool.rsi + state: omnitool-screwing + useSound: + path: /Audio/Items/drill_use.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Prying + sprite: + sprite: Objects/Tools/omnitool.rsi + state: omnitool-prying + useSound: + path: /Audio/Items/jaws_pry.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Anchoring + sprite: + sprite: Objects/Tools/omnitool.rsi + state: omnitool-wrenching + useSound: + path: /Audio/Items/ratchet.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Cutting + sprite: + sprite: Objects/Tools/omnitool.rsi + state: omnitool-snipping + useSound: + path: /Audio/Items/jaws_cut.ogg + changeSound: + path: /Audio/Items/change_drill.ogg + - behavior: Pulsing + sprite: + sprite: Objects/Tools/omnitool.rsi + state: omnitool-pulsing + changeSound: + path: /Audio/Items/change_drill.ogg diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 9bdff42442..c330825096 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -318,3 +318,6 @@ - type: Tag id: Write + +- type: Tag + id: Drone diff --git a/Resources/Textures/Objects/Tools/omnitool.rsi/meta.json b/Resources/Textures/Objects/Tools/omnitool.rsi/meta.json new file mode 100644 index 0000000000..dea5db6174 --- /dev/null +++ b/Resources/Textures/Objects/Tools/omnitool.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "license": "CC-BY-NC-SA-3.0", + "copyright": "Taken from https://github.com/goonstation/goonstation at commit 68aa9d134c07ed345755ff4cc0e11eae531f624e", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "omnitool-prying" + }, + { + "name": "omnitool-screwing" + }, + { + "name": "omnitool-pulsing" + }, + { + "name": "omnitool-snipping" + }, + { + "name": "omnitool-wrenching" + } + ] +} diff --git a/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-prying.png b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-prying.png new file mode 100644 index 0000000000..fea44447af Binary files /dev/null and b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-prying.png differ diff --git a/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-pulsing.png b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-pulsing.png new file mode 100644 index 0000000000..af8c5a962c Binary files /dev/null and b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-pulsing.png differ diff --git a/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-screwing.png b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-screwing.png new file mode 100644 index 0000000000..09c243553d Binary files /dev/null and b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-screwing.png differ diff --git a/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-snipping.png b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-snipping.png new file mode 100644 index 0000000000..6e9f3681c0 Binary files /dev/null and b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-snipping.png differ diff --git a/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-wrenching.png b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-wrenching.png new file mode 100644 index 0000000000..821cb7de59 Binary files /dev/null and b/Resources/Textures/Objects/Tools/omnitool.rsi/omnitool-wrenching.png differ