diff --git a/Content.Server/Drone/Components/DroneComponent.cs b/Content.Server/Drone/Components/DroneComponent.cs new file mode 100644 index 0000000000..df7ad2bcc8 --- /dev/null +++ b/Content.Server/Drone/Components/DroneComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Server.Drone.Components +{ + [RegisterComponent] + public sealed partial class DroneComponent : Component + { + public float InteractionBlockRange = 2.15f; + } +} diff --git a/Content.Server/Drone/DroneSystem.cs b/Content.Server/Drone/DroneSystem.cs new file mode 100644 index 0000000000..769d1b5d11 --- /dev/null +++ b/Content.Server/Drone/DroneSystem.cs @@ -0,0 +1,146 @@ +using Content.Server.Body.Systems; +using Content.Server.Drone.Components; +using Content.Server.Ghost.Roles.Components; +using Content.Server.Popups; +using Content.Server.Tools.Innate; +using Content.Shared.UserInterface; +using Content.Shared.Body.Components; +using Content.Shared.Drone; +using Content.Shared.Emoting; +using Content.Shared.Examine; +using Content.Shared.Ghost; +using Content.Shared.IdentityManagement; +using Content.Shared.Interaction.Components; +using Content.Shared.Interaction.Events; +using Content.Shared.Item; +using Content.Shared.Mind.Components; +using Content.Shared.Mobs; +using Content.Shared.Mobs.Components; +using Content.Shared.Mobs.Systems; +using Content.Shared.Popups; +using Content.Shared.Tag; +using Content.Shared.Throwing; +using Robust.Shared.Timing; + +namespace Content.Server.Drone +{ + public sealed class DroneSystem : SharedDroneSystem + { + [Dependency] private readonly BodySystem _bodySystem = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; + [Dependency] private readonly EntityLookupSystem _lookup = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; + [Dependency] private readonly InnateToolSystem _innateToolSystem = default!; + [Dependency] private readonly MobStateSystem _mobStateSystem = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnInteractionAttempt); + SubscribeLocalEvent(OnActivateUIAttempt); + SubscribeLocalEvent(OnMobStateChanged); + SubscribeLocalEvent(OnExamined); + SubscribeLocalEvent(OnMindAdded); + SubscribeLocalEvent(OnMindRemoved); + SubscribeLocalEvent(OnEmoteAttempt); + SubscribeLocalEvent(OnThrowAttempt); + } + + private void OnInteractionAttempt(EntityUid uid, DroneComponent component, InteractionAttemptEvent args) + { + if (args.Target != null && !HasComp(args.Target) && NonDronesInRange(uid, component)) + args.Cancel(); + + if (HasComp(args.Target) && !HasComp(args.Target)) + { + if (!_tagSystem.HasAnyTag(args.Target.Value, "DroneUsable", "Trash")) + args.Cancel(); + } + } + + private void OnActivateUIAttempt(EntityUid uid, DroneComponent component, UserOpenActivatableUIAttemptEvent args) + { + if (!_tagSystem.HasTag(args.Target, "DroneUsable")) + { + args.Cancel(); + } + } + + private void OnExamined(EntityUid uid, DroneComponent component, ExaminedEvent args) + { + if (TryComp(uid, out var mind) && mind.HasMind) + { + args.PushMarkup(Loc.GetString("drone-active")); + } + else + { + args.PushMarkup(Loc.GetString("drone-dormant")); + } + } + + private void OnMobStateChanged(EntityUid uid, DroneComponent drone, MobStateChangedEvent args) + { + if (args.NewMobState == MobState.Dead) + { + if (TryComp(uid, out var innate)) + _innateToolSystem.Cleanup(uid, innate); + + if (TryComp(uid, out var body)) + _bodySystem.GibBody(uid, body: body); + QueueDel(uid); + } + } + + private void OnMindAdded(EntityUid uid, DroneComponent drone, MindAddedMessage args) + { + UpdateDroneAppearance(uid, DroneStatus.On); + _popupSystem.PopupEntity(Loc.GetString("drone-activated"), uid, PopupType.Large); + } + + private void OnMindRemoved(EntityUid uid, DroneComponent drone, MindRemovedMessage args) + { + UpdateDroneAppearance(uid, DroneStatus.Off); + EnsureComp(uid); + } + + private void OnEmoteAttempt(EntityUid uid, DroneComponent component, EmoteAttemptEvent args) + { + // No. + args.Cancel(); + } + + private void OnThrowAttempt(EntityUid uid, DroneComponent drone, ThrowAttemptEvent args) + { + args.Cancel(); + } + + private void UpdateDroneAppearance(EntityUid uid, DroneStatus status) + { + if (TryComp(uid, out var appearance)) + { + _appearance.SetData(uid, DroneVisuals.Status, status, appearance); + } + } + + private bool NonDronesInRange(EntityUid uid, DroneComponent component) + { + var xform = Comp(uid); + foreach (var entity in _lookup.GetEntitiesInRange(xform.MapPosition, component.InteractionBlockRange)) + { + // Return true if the entity is/was controlled by a player and is not a drone or ghost. + if (HasComp(entity) && !HasComp(entity) && !HasComp(entity)) + { + // Filter out dead ghost roles. Dead normal players are intended to block. + if ((TryComp(entity, out var entityMobState) && HasComp(entity) && _mobStateSystem.IsDead(entity, entityMobState))) + continue; + if (_gameTiming.IsFirstTimePredicted) + _popupSystem.PopupEntity(Loc.GetString("drone-too-close", ("being", Identity.Entity(entity, EntityManager))), uid, uid); + return true; + } + } + return false; + } + } +} diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index bef57eceb3..12850418a9 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Body.Systems; using Content.Server.Chat; using Content.Server.Chat.Systems; using Content.Server.Cloning; +using Content.Server.Drone.Components; using Content.Server.Emoting.Systems; using Content.Server.Inventory; using Content.Server.Speech.EntitySystems; @@ -219,7 +220,7 @@ namespace Content.Server.Zombies if (args.User == entity) continue; - if (!TryComp(entity, out var mobState)) + if (!TryComp(entity, out var mobState) || HasComp(entity)) continue; if (HasComp(entity)) diff --git a/Content.Shared/Drone/SharedDroneSystem.cs b/Content.Shared/Drone/SharedDroneSystem.cs new file mode 100644 index 0000000000..d6fc7efcc6 --- /dev/null +++ b/Content.Shared/Drone/SharedDroneSystem.cs @@ -0,0 +1,20 @@ +using Robust.Shared.Serialization; + +namespace Content.Shared.Drone +{ + public abstract class SharedDroneSystem : EntitySystem + { + [Serializable, NetSerializable] + public enum DroneVisuals : byte + { + Status + } + + [Serializable, NetSerializable] + public enum DroneStatus : byte + { + Off, + On + } + } +} diff --git a/Resources/Locale/en-US/drone/drone-system.ftl b/Resources/Locale/en-US/drone/drone-system.ftl new file mode 100644 index 0000000000..292f981ecb --- /dev/null +++ b/Resources/Locale/en-US/drone/drone-system.ftl @@ -0,0 +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 = Your laws prevent this action near {THE($being)}. diff --git a/Resources/Prototypes/Body/Prototypes/drone.yml b/Resources/Prototypes/Body/Prototypes/drone.yml new file mode 100644 index 0000000000..00acba9646 --- /dev/null +++ b/Resources/Prototypes/Body/Prototypes/drone.yml @@ -0,0 +1,27 @@ +- type: body + id: Drone + name: "drone" + root: hand 1 + slots: + hand 1: + part: LeftArmBorg + connections: + - hand 2 + hand 2: + part: LeftArmBorg + connections: + - hand 3 + hand 3: + part: LeftArmBorg + connections: + - hand 4 + hand 4: + part: LeftArmBorg + connections: + - hand 5 + hand 5: + part: RightArmBorg + connections: + - hand 6 + hand 6: + part: RightArmBorg diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml index 58dbf598a0..8e86c84b0c 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/satchel.yml @@ -275,6 +275,15 @@ contents: - id: BoxSurvival +- type: entity + noSpawn: true + parent: ClothingBackpackSatchel + id: ClothingBackpackSatchelDrone + components: + - type: Tag + tags: + - InnateDontDelete + - type: entity noSpawn: true parent: ClothingBackpackSatchelMime diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/Catalog/Fills/Boxes/general.yml index 7926ba5b82..a50fc01ecf 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/general.yml @@ -6,7 +6,7 @@ components: - type: Item size: Large - shape: + shape: - 0,0,2,2 - type: Storage maxItemSize: Small @@ -67,6 +67,9 @@ whitelist: components: - LightBulb + - type: Tag + tags: + - DroneUsable - type: entity name: lighttube box @@ -88,6 +91,9 @@ whitelist: components: - LightBulb + - type: Tag + tags: + - DroneUsable - type: entity name: mixed lights box @@ -111,6 +117,9 @@ whitelist: components: - LightBulb + - type: Tag + tags: + - DroneUsable - type: entity name: PDA box @@ -215,6 +224,9 @@ layers: - state: box - state: inflatable + - type: Tag + tags: + - DroneUsable - type: entity @@ -266,6 +278,9 @@ layers: - state: box - state: trashbag + - type: Tag + tags: + - DroneUsable - type: entity name: passenger encryption key box diff --git a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml index 47dc296d85..c3615c4ee3 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml @@ -23,6 +23,7 @@ - type: Tag tags: - ClothMade + - DroneUsable - WhitelistChameleon - type: StaticPrice price: 25 diff --git a/Resources/Prototypes/Entities/Clothing/Head/hats.yml b/Resources/Prototypes/Entities/Clothing/Head/hats.yml index d466495901..534604356d 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hats.yml @@ -878,6 +878,7 @@ sprite: Clothing/Head/Hats/party_red.rsi - type: Tag tags: + - DroneUsable - WhitelistChameleon - HamsterWearable diff --git a/Resources/Prototypes/Entities/Clothing/Head/misc.yml b/Resources/Prototypes/Entities/Clothing/Head/misc.yml index 3fd55faf26..ed5162bed8 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/misc.yml @@ -175,7 +175,8 @@ suffix: DO NOT MAP components: - type: Tag - tags: [] # ignore "WhitelistChameleon" tag + tags: # ignore "WhitelistChameleon" tag + - DroneUsable - type: Sprite sprite: Clothing/Head/Hats/catears.rsi - type: Clothing @@ -190,6 +191,9 @@ description: Only for good boys. suffix: DO NOT MAP components: + - type: Tag + tags: + - DroneUsable - type: Sprite sprite: Clothing/Head/Hats/dogears.rsi - type: Clothing diff --git a/Resources/Prototypes/Entities/Clothing/Head/welding.yml b/Resources/Prototypes/Entities/Clothing/Head/welding.yml index 93d9b1e084..1e7092a3b8 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/welding.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/welding.yml @@ -18,6 +18,7 @@ price: 50 - type: Tag tags: + - DroneUsable - WhitelistChameleon - type: entity @@ -32,6 +33,7 @@ sprite: Clothing/Head/Welding/welding.rsi - type: Tag tags: + - DroneUsable - HamsterWearable - WhitelistChameleon diff --git a/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml b/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml index d8a095b443..49e746be06 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml @@ -74,6 +74,20 @@ prototypes: - MobRaccoonMorticia +- type: entity + name: Drone Spawner + id: SpawnMobDrone + parent: MarkerBase + components: + - type: Sprite + layers: + - state: green + - sprite: Mobs/Silicon/drone.rsi + state: shell + - type: ConditionalSpawner + prototypes: + - Drone + - type: entity name: Fox Renault Spawner id: SpawnMobFoxRenault diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 4d81af56da..8b87257a68 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -249,9 +249,9 @@ - type: ContainerFill containers: borg_brain: - - PositronicBrain + - PositronicBrain borg_module: - - BorgModuleTool + - BorgModuleTool - type: ItemSlots slots: cell_slot: @@ -268,7 +268,7 @@ - type: ContainerFill containers: borg_brain: - - MMIFilled + - MMIFilled - type: ItemSlots slots: cell_slot: @@ -280,17 +280,17 @@ parent: BorgChassisSyndicateAssault suffix: Battery, Module, Operative components: - - type: NukeOperative - - type: ContainerFill - containers: - borg_brain: - - PositronicBrain - borg_module: - - BorgModuleOperative - - BorgModuleL6C - - BorgModuleEsword - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellHyper + - type: NukeOperative + - type: ContainerFill + containers: + borg_brain: + - PositronicBrain + borg_module: + - BorgModuleOperative + - BorgModuleL6C + - BorgModuleEsword + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellHyper diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml index c481f656c8..50713409bd 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml @@ -352,6 +352,7 @@ - type: Tag tags: - Trash + - DroneUsable - WhitelistChameleon - type: TrashOnSolutionEmpty solution: drink diff --git a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/base_machineboard.yml b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/base_machineboard.yml index 164777284f..4e6dced060 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/base_machineboard.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/base_machineboard.yml @@ -11,6 +11,9 @@ state: generic - type: Item storedRotation: -90 + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 100 - type: PhysicalComposition diff --git a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml index afbfdadf91..10ac590f6c 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml @@ -10,6 +10,9 @@ state: cpuboard - type: Item storedRotation: -90 + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 100 - type: PhysicalComposition @@ -83,6 +86,9 @@ prototype: ComputerCargoOrders - type: StaticPrice price: 750 + - type: Tag + tags: + - DroneUsable - type: entity id: CargoBountyComputerCircuitboard @@ -95,6 +101,9 @@ - type: ComputerBoard prototype: ComputerCargoBounty - type: StaticPrice + - type: Tag + tags: + - DroneUsable - type: entity parent: BaseComputerCircuitboard @@ -152,6 +161,7 @@ prototype: ComputerSurveillanceCameraMonitor - type: Tag tags: + - DroneUsable - SurveillanceCameraMonitorCircuitboard - type: entity @@ -173,6 +183,7 @@ prototype: ComputerTelevision - type: Tag tags: + - DroneUsable - ComputerTelevisionCircuitboard - type: entity @@ -231,6 +242,7 @@ price: 750 - type: Tag tags: + - DroneUsable - HighRiskItem - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/misc.yml b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/misc.yml index cb35219eb0..c62721f80f 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/misc.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/misc.yml @@ -11,6 +11,7 @@ state: airalarm_electronics - type: Tag tags: + - DroneUsable - StationMapElectronics - type: StaticPrice price: 15 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml index 838ec637d3..b1e3116f32 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/atmos_alarms.yml @@ -9,6 +9,7 @@ state: airalarm_electronics - type: Tag tags: + - DroneUsable - AirAlarmElectronics - type: StaticPrice price: 61 @@ -26,6 +27,7 @@ state: airalarm_electronics - type: Tag tags: + - DroneUsable - FireAlarmElectronics - type: StaticPrice price: 61 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml index 7848d987e5..4e008091ad 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/base_electronics.yml @@ -10,6 +10,9 @@ - type: Sprite sprite: Objects/Misc/module.rsi state: generic + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 100 - type: PhysicalComposition diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml index 7c2f2a6fda..9278e34706 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/disposal.yml @@ -9,6 +9,7 @@ state: net_wired - type: Tag tags: + - DroneUsable - MailingUnitElectronics - type: StaticPrice price: 55 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml index 275a61d821..627fe5fb0a 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml @@ -11,5 +11,6 @@ - type: Tag tags: - DoorElectronics + - DroneUsable - type: StaticPrice price: 55 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml index c7fa8f9ecd..4c2ab79f5a 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/firelock.yml @@ -11,6 +11,7 @@ state: mainboard - type: Tag tags: + - DroneUsable - FirelockElectronics - type: StaticPrice price: 61 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/intercom.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/intercom.yml index 3446a3ba4f..b59654cf02 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/intercom.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/intercom.yml @@ -9,6 +9,7 @@ state: id_mod - type: Tag tags: + - DroneUsable - IntercomElectronics - type: StaticPrice price: 55 diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml index d3293bbfd2..9a806a6bf2 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml @@ -31,6 +31,7 @@ price: 40 - type: Tag tags: + - DroneUsable - WallmountSubstationElectronics # Wallmount Generator @@ -50,6 +51,7 @@ Glass: 90 - type: Tag tags: + - DroneUsable - WallmountGeneratorElectronics # APU @@ -66,6 +68,7 @@ price: 40 - type: Tag tags: + - DroneUsable - WallmountGeneratorAPUElectronics # Solar Tracker Electronics @@ -82,4 +85,5 @@ price: 85 - type: Tag tags: + - DroneUsable - SolarTrackerElectronics diff --git a/Resources/Prototypes/Entities/Objects/Devices/flatpack.yml b/Resources/Prototypes/Entities/Objects/Devices/flatpack.yml index 5499348bd1..6aa766bd58 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/flatpack.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/flatpack.yml @@ -35,6 +35,9 @@ cpu_supply: "#A46106" - type: StaticPrice price: 250 + - type: Tag + tags: + - DroneUsable - type: entity parent: BaseFlatpack diff --git a/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml b/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml index c3bd74dd75..440bc4dd8a 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml @@ -54,6 +54,9 @@ mask: - ItemMask - type: Rotatable + - type: Tag + tags: + - DroneUsable - type: entity name: mousetrap diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml index 8ad5eb22ee..4ce7a4a956 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml @@ -16,6 +16,7 @@ tags: - Sheet - NoPaint + - DroneUsable - type: Material - type: Damageable damageContainer: Inorganic diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml index e71f9dc732..7c6a1e3cfe 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml @@ -16,6 +16,7 @@ - Sheet - Metal - NoPaint + - DroneUsable - type: Damageable damageContainer: Inorganic damageModifierSet: Metallic diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml index 60cf5e55b2..2deab6fa95 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml @@ -13,6 +13,7 @@ tags: - Sheet - NoPaint + - DroneUsable - type: Damageable damageContainer: Inorganic - type: Destructible @@ -135,6 +136,7 @@ - Plastic - Sheet - NoPaint + - DroneUsable - type: Material - type: PhysicalComposition materialComposition: @@ -251,6 +253,7 @@ - type: Tag tags: - Sheet + - DroneUsable - type: Material - type: PhysicalComposition materialComposition: diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index f66bc7535f..a1fb30048c 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -11,6 +11,7 @@ size: Normal - type: Tag tags: + - DroneUsable - RawMaterial - NoPaint - type: Damageable @@ -128,6 +129,7 @@ - type: Tag tags: - ClothMade + - DroneUsable - Gauze - RawMaterial - type: Construction @@ -195,6 +197,7 @@ - type: Tag tags: - ClothMade + - DroneUsable - RawMaterial - type: entity @@ -242,6 +245,7 @@ - type: Tag tags: - Wooden + - DroneUsable - RawMaterial - type: Extractable grindableSolutionName: wood @@ -411,6 +415,7 @@ - type: Tag tags: - ClothMade + - DroneUsable - RawMaterial - type: entity @@ -521,6 +526,7 @@ - type: Tag tags: - ClothMade + - DroneUsable - RawMaterial - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 26a46d151c..652ddcd917 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -8,6 +8,9 @@ state: rods - type: Item sprite: Objects/Materials/parts.rsi + - type: Tag + tags: + - DroneUsable - type: Damageable damageContainer: Inorganic damageModifierSet: FlimsyMetallic @@ -82,6 +85,7 @@ tags: - RodMetal1 - CrossbowBolt + - DroneUsable - type: Sprite state: rods - type: Stack @@ -96,6 +100,7 @@ - type: Tag tags: - RodMetal1 + - DroneUsable - CrossbowBolt - type: Ammo muzzleFlash: null diff --git a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml index 5b57d930b0..379527fc29 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml @@ -18,6 +18,7 @@ - type: Tag tags: - NoPaint + - DroneUsable - type: Damageable damageContainer: Inorganic - type: Destructible diff --git a/Resources/Prototypes/Entities/Objects/Power/powercells.yml b/Resources/Prototypes/Entities/Objects/Power/powercells.yml index 3330258d98..ecff78b91b 100644 --- a/Resources/Prototypes/Entities/Objects/Power/powercells.yml +++ b/Resources/Prototypes/Entities/Objects/Power/powercells.yml @@ -29,6 +29,7 @@ Quantity: 5 - type: Tag tags: + - DroneUsable - PowerCell - type: Appearance - type: PowerCellVisuals @@ -51,6 +52,7 @@ startingCharge: 70 - type: Tag tags: + - DroneUsable - PotatoBattery - type: Construction graph: PowerCellPotato diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml index 8d3c83e3e1..ce4eef7453 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml @@ -30,6 +30,7 @@ delay: 1 - type: Tag tags: + - DroneUsable #No bucket because it holds chems, they can drag the cart or use a drain - Mop - MopBasic - type: GuideHelp @@ -80,6 +81,7 @@ maxVol: 100 - type: Tag tags: + - DroneUsable #No bucket because it holds chems, they can drag the cart or use a drain - Mop - MopAdv @@ -647,6 +649,7 @@ delay: 1.5 - type: Tag tags: + - DroneUsable - Mop - type: CleansForensics - type: Fiber diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml index 0e19c03dee..e9eb18f926 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml @@ -91,6 +91,8 @@ - type: Tag tags: - Spray + - DroneUsable #They don't have any other chem stuff on their whitelist so they can't refill it + # Vapor - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml index f802ae1c5c..c749102518 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/trashbag.yml @@ -25,6 +25,7 @@ - type: Tag tags: - TrashBag + - DroneUsable - type: Appearance - type: StorageFillVisualizer maxFillLevels: 4 diff --git a/Resources/Prototypes/Entities/Objects/Specific/atmos.yml b/Resources/Prototypes/Entities/Objects/Specific/atmos.yml index 6c5fd95bee..daf19f5781 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/atmos.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/atmos.yml @@ -26,6 +26,9 @@ enabled: True: { state: working } False: { state: icon } + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 80 - type: PhysicalComposition diff --git a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml index 5423ef7877..ad31fd0f51 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml @@ -12,6 +12,7 @@ - type: Tag tags: - CableCoil + - DroneUsable - type: Stack stackType: Cable - type: Sprite diff --git a/Resources/Prototypes/Entities/Objects/Tools/flashlights.yml b/Resources/Prototypes/Entities/Objects/Tools/flashlights.yml index d22e919092..5b85874099 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flashlights.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flashlights.yml @@ -7,6 +7,7 @@ - type: Tag tags: - Flashlight + - DroneUsable - type: HandheldLight addPrefix: false blinkingBehaviourId: blinking diff --git a/Resources/Prototypes/Entities/Objects/Tools/inflatable_wall.yml b/Resources/Prototypes/Entities/Objects/Tools/inflatable_wall.yml index 86163aad67..5c30cfdea3 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/inflatable_wall.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/inflatable_wall.yml @@ -19,6 +19,9 @@ doAfter: 1 removeOnInteract: true - type: Clickable + - type: Tag + tags: + - DroneUsable # TODO: Add stack sprites + visuals. - type: entity @@ -42,6 +45,9 @@ doAfter: 1 removeOnInteract: true - type: Clickable + - type: Tag + tags: + - DroneUsable # TODO: Add stack sprites + visuals. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Tools/light_replacer.yml b/Resources/Prototypes/Entities/Objects/Tools/light_replacer.yml index 646f6a6378..442e939d42 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/light_replacer.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/light_replacer.yml @@ -15,6 +15,9 @@ amount: 8 - id: LightBulb amount: 5 + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 100 - type: ContainerContainer diff --git a/Resources/Prototypes/Entities/Objects/Tools/t-ray.yml b/Resources/Prototypes/Entities/Objects/Tools/t-ray.yml index ea6b0159be..ae9d865ba7 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/t-ray.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/t-ray.yml @@ -19,6 +19,9 @@ base: On: { state: tray-on } Off: { state: tray-off } + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 60 # WD edit sounds start diff --git a/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml b/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml index 1545c0e66b..d69ca57e49 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/toolbox.yml @@ -32,6 +32,7 @@ path: "/Audio/Weapons/smash.ogg" - type: Tag tags: + - DroneUsable - Toolbox - type: GenericVisualizer visuals: diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index c5ed863eee..af18572550 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -265,6 +265,7 @@ - type: Tag tags: - Multitool + - DroneUsable - type: PhysicalComposition materialComposition: Steel: 100 @@ -322,6 +323,9 @@ type: NetworkConfiguratorBoundUserInterface - key: enum.NetworkConfiguratorUiKey.Link type: NetworkConfiguratorBoundUserInterface + - type: Tag + tags: + - DroneUsable - type: StaticPrice price: 56 - type: GuideHelp diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml index 3fd3706b2f..7f70576ff6 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml @@ -658,6 +658,9 @@ radius: 1.5 energy: 1.6 color: "#e6e227" + - type: Tag + tags: + - DroneUsable - type: entity parent: BaseComputer diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 5baec6333a..0d662fb620 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -305,6 +305,7 @@ - Implanter - PillCanister - ChemistryEmptyBottle01 + - Drone - AdvMopItem - WeaponSprayNozzle - ClothingBackpackWaterTank diff --git a/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml b/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml index 4763381f57..69410df495 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml @@ -299,6 +299,9 @@ - type: Advertise pack: ClothesMateAds - type: Speech + - type: Tag + tags: + - DroneUsable - type: Sprite sprite: Structures/Machines/VendingMachines/clothing.rsi layers: @@ -330,6 +333,9 @@ - type: Advertise pack: ClothesMateAds - type: Speech + - type: Tag + tags: + - DroneUsable - type: Sprite sprite: Structures/Machines/VendingMachines/winterdrobe.rsi layers: @@ -1121,6 +1127,9 @@ radius: 1.5 energy: 1.6 color: "#c73434" + - type: Tag + tags: + - DroneUsable - type: entity parent: VendingMachine @@ -1216,6 +1225,9 @@ radius: 1.5 energy: 1.6 color: "#d4ab33" + - type: Tag + tags: + - DroneUsable - type: entity parent: VendingMachine diff --git a/Resources/Prototypes/Recipes/Lathes/misc.yml b/Resources/Prototypes/Recipes/Lathes/misc.yml index 1334788376..613592ec97 100644 --- a/Resources/Prototypes/Recipes/Lathes/misc.yml +++ b/Resources/Prototypes/Recipes/Lathes/misc.yml @@ -93,6 +93,15 @@ materials: Wood: 100 +- type: latheRecipe + id: Drone + result: Drone + completetime: 6 + materials: + Steel: 500 + Glass: 500 + Plastic: 500 + - type: latheRecipe id: SynthesizerInstrument result: SynthesizerInstrument diff --git a/Resources/Prototypes/Research/experimental.yml b/Resources/Prototypes/Research/experimental.yml index 5fbf0e640b..4737470c06 100644 --- a/Resources/Prototypes/Research/experimental.yml +++ b/Resources/Prototypes/Research/experimental.yml @@ -11,6 +11,7 @@ cost: 5000 recipeUnlocks: - ProximitySensor + - Drone - ExosuitFabricatorMachineCircuitboard - type: technology diff --git a/Resources/Prototypes/name_identifier_groups.yml b/Resources/Prototypes/name_identifier_groups.yml index 82c2f3bce9..7df370035e 100644 --- a/Resources/Prototypes/name_identifier_groups.yml +++ b/Resources/Prototypes/name_identifier_groups.yml @@ -11,6 +11,13 @@ id: Holoparasite prefix: HOLO +- type: nameIdentifierGroup + id: Drone + prefix: DR + fullName: true + minValue: 10000 + maxValue: 99999 + - type: nameIdentifierGroup id: MMI prefix: MMI diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 543765f7db..2997be7448 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -529,6 +529,9 @@ - type: Tag id: DrinkSpaceGlue +- type: Tag + id: DroneUsable + - type: Tag id: Duck diff --git a/Resources/migration.yml b/Resources/migration.yml index 481f04c784..64ab0755b2 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -196,11 +196,6 @@ VehicleJanicartDestroyed: null YellowOxygenTank: OxygenTank YellowOxygenTankFilled: OxygenTankFilled -# 2024-02-19 -Drone: null -SpawnMobDrone: null -Onestar: null # I dont think this is even mapped, but just in case - # 2024-02-22 SolarAssemblyPart: SolarAssemblyFlatpack AmePart: AmePartFlatpack