Add the Omnitool, drone adjustments (#6948)

This commit is contained in:
Chris V
2022-03-15 18:11:29 -07:00
committed by GitHub
parent 60dd9fa46a
commit 90498edbbb
12 changed files with 118 additions and 11 deletions

View File

@@ -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<SharedBodyComponent>(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<UnremoveableComponent>(item.value);
}
else
{
EntityManager.DeleteEntity(item.value);
}
}
body.Gib();
EntityManager.DeleteEntity(uid);
@@ -111,12 +119,12 @@ namespace Content.Server.Drone
if (TryComp<HandsComponent>(uid, out var hands) && hands.Count >= drone.Tools.Count)
{
foreach (var entry in drone.Tools)
{
var item = EntityManager.SpawnEntity(entry.PrototypeId, spawnCoord);
AddComp<UnremoveableComponent>(item);
hands.PutInHand(item);
drone.ToolUids.Add(item);
}
{
var item = EntityManager.SpawnEntity(entry.PrototypeId, spawnCoord);
AddComp<UnremoveableComponent>(item);
hands.PutInHand(item);
drone.ToolUids.Add(item);
}
}
if (TryComp<ActionsComponent>(uid, out var actions) && TryComp<UnpoweredFlashlightComponent>(uid, out var flashlight))

View File

@@ -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

View File

@@ -102,3 +102,12 @@
- id: BoxSurvival
- id: AcousticGuitarInstrument
- id: SaxophoneInstrument
- type: entity
abstract: true
parent: ClothingBackpackSatchel
id: ClothingBackpackSatchelDrone
components:
- type: Tag
tags:
- Drone

View File

@@ -72,8 +72,9 @@
components:
- type: Drone
tools:
- id: PowerDrill
- id: JawsOfLife
- id: ClothingBackpackSatchelDrone
- id: trayScanner
- id: Omnitool
- id: WelderExperimental
- type: NameIdentifier
group: Drone

View File

@@ -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

View File

@@ -318,3 +318,6 @@
- type: Tag
id: Write
- type: Tag
id: Drone

View File

@@ -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"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B