Drone 1984 (#7009)
This commit is contained in:
@@ -13,5 +13,6 @@ namespace Content.Server.Drone.Components
|
||||
[DataField("tools")] public List<EntitySpawnEntry> Tools = new();
|
||||
public List<EntityUid> ToolUids = new();
|
||||
public bool AlreadyAwoken = false;
|
||||
public float InteractionBlockRange = 2.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
using Content.Shared.Drone;
|
||||
using Content.Server.Drone.Components;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Ghost.Roles.Components;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Emoting;
|
||||
using Robust.Shared.Player;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Emoting;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Server.Ghost.Roles.Components;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Drone
|
||||
{
|
||||
@@ -22,6 +23,7 @@ namespace Content.Server.Drone
|
||||
{
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -37,9 +39,13 @@ namespace Content.Server.Drone
|
||||
|
||||
private void OnInteractionAttempt(EntityUid uid, DroneComponent component, InteractionAttemptEvent args)
|
||||
{
|
||||
if (HasComp<MobStateComponent>(args.Target) && !HasComp<DroneComponent>(args.Target))
|
||||
{
|
||||
if (NonDronesInRange(uid, component))
|
||||
args.Cancel();
|
||||
|
||||
if (HasComp<SharedItemComponent>(args.Target) && !HasComp<UnremoveableComponent>(args.Target))
|
||||
{
|
||||
if (!_tagSystem.HasAnyTag(args.Target.Value, "DroneUsable", "Trash"))
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +87,6 @@ namespace Content.Server.Drone
|
||||
private void OnMindAdded(EntityUid uid, DroneComponent drone, MindAddedMessage args)
|
||||
{
|
||||
UpdateDroneAppearance(uid, DroneStatus.On);
|
||||
_tagSystem.AddTag(uid, "DoorBumpOpener");
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-activated"), uid, Filter.Pvs(uid));
|
||||
|
||||
if (drone.AlreadyAwoken == false)
|
||||
@@ -108,7 +113,6 @@ namespace Content.Server.Drone
|
||||
private void OnMindRemoved(EntityUid uid, DroneComponent drone, MindRemovedMessage args)
|
||||
{
|
||||
UpdateDroneAppearance(uid, DroneStatus.Off);
|
||||
_tagSystem.RemoveTag(uid, "DoorBumpOpener");
|
||||
EnsureComp<GhostTakeoverAvailableComponent>(uid);
|
||||
}
|
||||
|
||||
@@ -130,5 +134,19 @@ namespace Content.Server.Drone
|
||||
appearance.SetData(DroneVisuals.Status, status);
|
||||
}
|
||||
}
|
||||
|
||||
private bool NonDronesInRange(EntityUid uid, DroneComponent component)
|
||||
{
|
||||
var xform = Comp<TransformComponent>(uid);
|
||||
foreach (var entity in _lookup.GetEntitiesInRange(xform.MapID, xform.WorldPosition, component.InteractionBlockRange))
|
||||
{
|
||||
if (HasComp<MindComponent>(entity) && !HasComp<DroneComponent>(entity) && !HasComp<GhostComponent>(entity))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-too-close"), uid, Filter.Entities(uid));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
drone-active = A maintenance drone. It seems totally unconcerned with you.
|
||||
drone-dormant = A dormant maintenance drone. Who knows when it will wake up?
|
||||
drone-activated = The drone whirrs to life!
|
||||
drone-too-close = Too close to other beings!
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
whitelist:
|
||||
components:
|
||||
- LightBulb
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
name: PDA box
|
||||
@@ -177,7 +180,7 @@
|
||||
layers:
|
||||
- state: box
|
||||
- state: writing
|
||||
|
||||
|
||||
- type: entity
|
||||
name: flare box
|
||||
parent: BoxCardboard
|
||||
@@ -192,7 +195,7 @@
|
||||
layers:
|
||||
- state: box
|
||||
- state: writing
|
||||
|
||||
|
||||
- type: entity
|
||||
name: trashbag box
|
||||
parent: BoxCardboard
|
||||
@@ -211,4 +214,4 @@
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: box
|
||||
- state: writing
|
||||
- state: writing
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
- HEAD
|
||||
- type: Sprite
|
||||
state: icon
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
abstract: true
|
||||
@@ -76,4 +79,4 @@
|
||||
- type: PowerCellSlot
|
||||
cellSlot:
|
||||
startingItem: PowerCellHardsuitHelmet # self recharging
|
||||
locked: true # no need to recharge manually
|
||||
locked: true # no need to recharge manually
|
||||
|
||||
@@ -99,7 +99,27 @@
|
||||
- type: MobState
|
||||
thresholds:
|
||||
0: !type:NormalMobState {}
|
||||
70: !type:DeadMobState {}
|
||||
60: !type:DeadMobState {}
|
||||
- type: Flashable
|
||||
- type: NoSlip
|
||||
- type: StatusEffects
|
||||
allowed:
|
||||
- Stun
|
||||
- KnockedDown
|
||||
- SlowedDown
|
||||
- type: SlowOnDamage
|
||||
speedModifierThresholds:
|
||||
20: 0.8
|
||||
30: 0.6
|
||||
40: 0.4
|
||||
50: 0.2
|
||||
- type: Temperature
|
||||
heatDamageThreshold: 5000
|
||||
currentTemperature: 310.15
|
||||
specificHeat: 42
|
||||
heatDamage:
|
||||
types:
|
||||
Heat : 1 #per second, scales with temperature & other constants
|
||||
- type: Sprite
|
||||
drawdepth: Mobs
|
||||
netsync: false
|
||||
|
||||
@@ -9,3 +9,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: id_mod
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: cpuboard
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: BaseComputerCircuitboard
|
||||
@@ -26,7 +29,7 @@
|
||||
components:
|
||||
- type: ComputerBoard
|
||||
prototype: ComputerPowerMonitoring
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: BaseComputerCircuitboard
|
||||
id: MedicalRecordsComputerCircuitboard
|
||||
@@ -35,7 +38,7 @@
|
||||
components:
|
||||
- type: ComputerBoard
|
||||
prototype: ComputerMedicalRecords
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: BaseComputerCircuitboard
|
||||
id: CriminalRecordsComputerCircuitboard
|
||||
|
||||
@@ -8,3 +8,6 @@
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: charger_APC
|
||||
netsync: false
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- AirAlarmElectronics
|
||||
- DroneUsable
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: airalarm_electronics
|
||||
@@ -20,6 +21,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- FireAlarmElectronics
|
||||
- DroneUsable
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: airalarm_electronics
|
||||
state: airalarm_electronics
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- DoorElectronics
|
||||
- DroneUsable
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: door_electronics
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- FirelockElectronics
|
||||
- DroneUsable
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: mainboard
|
||||
|
||||
@@ -7,3 +7,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/module.rsi
|
||||
state: generic
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Sheet
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: SheetGlassBase
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
tags:
|
||||
- Sheet
|
||||
- Metal
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: SheetMetalBase
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Sheet
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: SheetOtherBase
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
- type: Item
|
||||
sprite: Objects/Materials/materials.rsi
|
||||
- type: ItemStatus
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: MaterialBase
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
- type: Item
|
||||
sprite: Objects/Materials/parts.rsi
|
||||
- type: ItemStatus
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: PartBase
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
Blunt: 10
|
||||
- type: Stack
|
||||
count: 1
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
name: steel tile
|
||||
@@ -351,7 +354,7 @@
|
||||
- FloorArcadeBlue
|
||||
- type: Stack
|
||||
stackType: FloorTileStackArcadeBlue
|
||||
|
||||
|
||||
- type: entity
|
||||
name: red arcade floor
|
||||
parent: FloorTileItemBase
|
||||
@@ -367,7 +370,7 @@
|
||||
- FloorArcadeRed
|
||||
- type: Stack
|
||||
stackType: FloorTileStackArcadeRed
|
||||
|
||||
|
||||
- type: entity
|
||||
name: eighties floor
|
||||
parent: FloorTileItemBase
|
||||
@@ -400,7 +403,7 @@
|
||||
- FloorShuttleWhite
|
||||
- type: Stack
|
||||
stackType: FloorTileStackShuttleWhite
|
||||
|
||||
|
||||
- type: entity
|
||||
name: blue shuttle floor
|
||||
parent: FloorTileItemBase
|
||||
@@ -416,7 +419,7 @@
|
||||
- FloorShuttleBlue
|
||||
- type: Stack
|
||||
stackType: FloorTileStackShuttleBlue
|
||||
|
||||
|
||||
- type: entity
|
||||
name: orange shuttle floor
|
||||
parent: FloorTileItemBase
|
||||
@@ -432,7 +435,7 @@
|
||||
- FloorShuttleOrange
|
||||
- type: Stack
|
||||
stackType: FloorTileStackShuttleOrange
|
||||
|
||||
|
||||
- type: entity
|
||||
name: purple shuttle floor
|
||||
parent: FloorTileItemBase
|
||||
@@ -448,7 +451,7 @@
|
||||
- FloorShuttlePurple
|
||||
- type: Stack
|
||||
stackType: FloorTileStackShuttlePurple
|
||||
|
||||
|
||||
- type: entity
|
||||
name: red shuttle floor
|
||||
parent: FloorTileItemBase
|
||||
@@ -539,7 +542,7 @@
|
||||
outputs:
|
||||
- plating
|
||||
- floor_grass
|
||||
|
||||
|
||||
- type: entity
|
||||
name: jungle grass tile
|
||||
parent: FloorTileItemBase
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
solutions:
|
||||
mop:
|
||||
maxVol: 50
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable #No bucket because it holds chems, they can drag the thing around instead
|
||||
|
||||
- type: entity
|
||||
name: mop bucket
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
reagents:
|
||||
- ReagentId: SpaceCleaner
|
||||
Quantity: 100
|
||||
- type: Tag
|
||||
tags:
|
||||
- Spray
|
||||
- DroneUsable #They don't have any other chem stuff on their whitelist so they can't refill it
|
||||
|
||||
# Vapor
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- TrashBag
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
name: trash bag
|
||||
|
||||
@@ -18,3 +18,6 @@
|
||||
- type: GasAnalyzerVisualizer
|
||||
state_off: icon
|
||||
state_working: working
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- CableCoil
|
||||
- DroneUsable
|
||||
- type: Stack
|
||||
stackType: Cable
|
||||
- type: Sprite
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Flashlight
|
||||
- DroneUsable
|
||||
- type: HandheldLight
|
||||
toggleAction:
|
||||
name: action-name-toggle-light
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
doAfter: 1
|
||||
removeOnInteract: true
|
||||
- type: Clickable
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
# - type: Appearance # TODO: Add stack sprites
|
||||
# visuals:
|
||||
# - type: StackVisualizer
|
||||
@@ -52,6 +55,9 @@
|
||||
doAfter: 1
|
||||
removeOnInteract: true
|
||||
- type: Clickable
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
parent: InflatableWallStack
|
||||
|
||||
@@ -17,3 +17,6 @@
|
||||
- name: LightBulb
|
||||
amount: 5
|
||||
type: Bulb
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
@@ -19,3 +19,6 @@
|
||||
states:
|
||||
enum.TrayScannerVisual.On: tray-on
|
||||
enum.TrayScannerVisual.Off: tray-off
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
@@ -181,6 +181,9 @@
|
||||
qualities:
|
||||
- Pulsing
|
||||
- type: SignalLinker
|
||||
- type: Tag
|
||||
tags:
|
||||
- DroneUsable
|
||||
|
||||
- type: entity
|
||||
name: power drill
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
- type: Tag
|
||||
id: Donut
|
||||
|
||||
- type: Tag
|
||||
id: DroneUsable
|
||||
|
||||
- type: Tag
|
||||
id: Egg
|
||||
|
||||
@@ -285,7 +288,7 @@
|
||||
|
||||
- type: Tag
|
||||
id: Trash
|
||||
|
||||
|
||||
- type: Tag
|
||||
id: TrashBag
|
||||
|
||||
|
||||
Reference in New Issue
Block a user