diff --git a/Content.Server/Construction/Completions/EmptyContainer.cs b/Content.Server/Construction/Completions/EmptyContainer.cs index 4455d1d79a..6d26bb5da1 100644 --- a/Content.Server/Construction/Completions/EmptyContainer.cs +++ b/Content.Server/Construction/Completions/EmptyContainer.cs @@ -34,7 +34,7 @@ namespace Content.Server.Construction.Completions foreach (var ent in containerSys.EmptyContainer(container, true, reparent: !pickup)) { if (pickup) - handSys.PickupOrDrop(userUid, ent, dropNear: true, handsComp: hands); + handSys.PickupOrDrop(userUid, ent, handsComp: hands); } } } diff --git a/Content.Shared/Containers/ContainerFillSystem.cs b/Content.Shared/Containers/ContainerFillSystem.cs index e3849db824..0ccc6a7192 100644 --- a/Content.Shared/Containers/ContainerFillSystem.cs +++ b/Content.Shared/Containers/ContainerFillSystem.cs @@ -3,6 +3,8 @@ using Content.Shared.EntityTable.Conditions; using Content.Shared.Item; using Robust.Shared.Containers; using Robust.Shared.Map; +using Robust.Shared.Prototypes; +using System; using System.Linq; using System.Numerics; diff --git a/Resources/Audio/Construction/attributions.yml b/Resources/Audio/Construction/attributions.yml deleted file mode 100644 index 89c26dafa1..0000000000 --- a/Resources/Audio/Construction/attributions.yml +++ /dev/null @@ -1,30 +0,0 @@ -- files: ["place_electronics_1.ogg", "place_electronics_2.ogg"] - license: "CC0-1.0" - copyright: "Foley by izzl on freesound.org. Mixed by iaada (GitHub)." - source: "https://freesound.org/people/izzl/sounds/790525/" - -- files: ["place_glass_1.ogg"] - license: "CC-BY-3.0" - copyright: "By lsprice on freesound.org." - source: "https://freesound.org/people/lsprice/sounds/88851/" - -- files: ["place_glass_2.ogg"] - license: "CC-BY-3.0" - copyright: "By lsprice on freesound.org." - source: "https://freesound.org/people/lsprice/sounds/88852/" - -- files: ["place_glass_3.ogg"] - license: "CC-BY-3.0" - copyright: "By lsprice on freesound.org." - source: "https://freesound.org/people/lsprice/sounds/88853/" - -- files: ["place_metal_1.ogg", "place_metal_2.ogg", "place_metal_3.ogg", "place_metal_4.ogg"] - license: "CC-BY-4.0" - copyright: "Foley by jerry.berumen on freesound.org. Mixed by iaada (GitHub)." - source: "https://freesound.org/people/jerry.berumen/sounds/770810/" - -- files: ["place_wires_1.ogg", "place_wires_2.ogg"] - license: "CC-BY-4.0" - copyright: "Foley by Clearwavsound and SiriusBizdness on freesound.org. Mixed by iaada (GitHub)." - source: ["https://freesound.org/people/Clearwavsound/sounds/541035/", - "https://freesound.org/people/SiriusBizdness/sounds/565193/"] diff --git a/Resources/Audio/Construction/place_electronics_1.ogg b/Resources/Audio/Construction/place_electronics_1.ogg deleted file mode 100644 index 6fa8b7b830..0000000000 Binary files a/Resources/Audio/Construction/place_electronics_1.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_electronics_2.ogg b/Resources/Audio/Construction/place_electronics_2.ogg deleted file mode 100644 index 0e5b2199b4..0000000000 Binary files a/Resources/Audio/Construction/place_electronics_2.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_glass_1.ogg b/Resources/Audio/Construction/place_glass_1.ogg deleted file mode 100644 index ad575bb318..0000000000 Binary files a/Resources/Audio/Construction/place_glass_1.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_glass_2.ogg b/Resources/Audio/Construction/place_glass_2.ogg deleted file mode 100644 index 37ac6bb339..0000000000 Binary files a/Resources/Audio/Construction/place_glass_2.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_glass_3.ogg b/Resources/Audio/Construction/place_glass_3.ogg deleted file mode 100644 index 422ddec718..0000000000 Binary files a/Resources/Audio/Construction/place_glass_3.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_metal_1.ogg b/Resources/Audio/Construction/place_metal_1.ogg deleted file mode 100644 index 80c0e29c64..0000000000 Binary files a/Resources/Audio/Construction/place_metal_1.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_metal_2.ogg b/Resources/Audio/Construction/place_metal_2.ogg deleted file mode 100644 index 47a0b27a03..0000000000 Binary files a/Resources/Audio/Construction/place_metal_2.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_metal_3.ogg b/Resources/Audio/Construction/place_metal_3.ogg deleted file mode 100644 index 39f887cfec..0000000000 Binary files a/Resources/Audio/Construction/place_metal_3.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_metal_4.ogg b/Resources/Audio/Construction/place_metal_4.ogg deleted file mode 100644 index cd09e321c9..0000000000 Binary files a/Resources/Audio/Construction/place_metal_4.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_wires_1.ogg b/Resources/Audio/Construction/place_wires_1.ogg deleted file mode 100644 index de650a9b7a..0000000000 Binary files a/Resources/Audio/Construction/place_wires_1.ogg and /dev/null differ diff --git a/Resources/Audio/Construction/place_wires_2.ogg b/Resources/Audio/Construction/place_wires_2.ogg deleted file mode 100644 index 987599fe38..0000000000 Binary files a/Resources/Audio/Construction/place_wires_2.ogg and /dev/null differ diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml index d2c6ece32a..84f78aaca4 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/WallmountMachines/station_map.yml @@ -1,31 +1,14 @@ - type: entity - abstract: true - parent: BaseWallmountMetallic - id: BaseStationMap - suffix: Wall + parent: [ BaseWallmountMetallic, StructureHealthMachineFlimsy ] + id: StationMapBroken + name: station map + description: A virtual map of the surrounding station. + suffix: Wall broken components: - type: Sprite sprite: Structures/Wallmounts/station-map.rsi offset: 0, -0.25 drawdepth: WallMountedItems - - type: WallMount - arc: 360 - - type: Construction - graph: StationMap - containers: - - board - - type: ContainerContainer - containers: - board: !type:Container - -- type: entity - parent: [ BaseStationMap, StructureHealthMachineFlimsy ] - id: StationMapBroken - name: station map - description: A former map of the surrounding station. - suffix: Wall broken - components: - - type: Sprite layers: - state: broken - type: Destructible @@ -37,33 +20,29 @@ - &SoundMetalGlassBreak !type:PlaySoundBehavior sound: collection: MetalGlassBreak - - !type:EmptyAllContainersBehaviour - !type:SpawnEntitiesBehavior spawn: - SheetSteel1: &Min0Max1 + StationMapCircuitboard: &Min0Max1 min: 0 max: 1 + SheetSteel1: *Min0Max1 CableApcStack1: *Min0Max1 - - type: Construction - node: broken - - type: EntityTableContainerFill - contextContainers: true - containers: - board: - id: StationMapCircuitboard - prob: 0.25 # The board is probably broken - conditions: - - !type:EmptyContainerCondition # If this entity is spawned via construction the circuitboard already exists + - type: entity - parent: [ BaseStationMap, BaseWallmountMachine, StructureHealthMachineWeak ] + parent: [ BaseWallmountMachine, StructureHealthMachineWeak ] id: StationMap name: station map description: A virtual map of the surrounding station. + suffix: Wall components: + - type: WallMount + arc: 360 - type: Appearance - type: StationMap - type: Sprite + sprite: Structures/Wallmounts/station-map.rsi + offset: 0, -0.25 layers: - state: base - state: unshaded @@ -78,13 +57,12 @@ enum.PowerDeviceVisualLayers.Powered: True: { visible: true } False: { visible: false } - - type: EntityTableContainerFill - contextContainers: true + - type: ContainerFill containers: - board: - id: StationMapCircuitboard - conditions: - - !type:EmptyContainerCondition + board: [ StationMapCircuitboard ] + - type: ContainerContainer + containers: + board: !type:Container - type: ApcPowerReceiver powerLoad: 50 - type: PowerState @@ -92,12 +70,13 @@ workingPowerDraw: 200 - type: UIPowerState - type: Construction + graph: StationMap node: station_map - type: ActivatableUIRequiresPower - type: ActivatableUI key: enum.StationMapUiKey.Key - type: Damageable - damageModifierSet: GlassMod + damageModifierSet: GlassReinforcedMod - type: Destructible thresholds: - trigger: @@ -105,8 +84,12 @@ damage: 100 behaviors: - *SoundMetalGlassBreak - - !type:ChangeConstructionNodeBehavior - node: broken + - !type:SpawnEntitiesBehavior + offset: 0 + spawn: + StationMapBroken: + min: 1 + max: 1 - type: UserInterface interfaces: enum.StationMapUiKey.Key: @@ -123,12 +106,16 @@ - NoConsoleSound - type: entity - parent: [ BaseStationMap, StructureHealthMachineFlimsy ] + parent: [ BaseWallmountMetallic, StructureHealthMachineFlimsy ] id: StationMapAssembly name: station map assembly description: A station map assembly. components: + - type: WallMount + arc: 360 - type: Sprite + sprite: Structures/Wallmounts/station-map.rsi + offset: 0, -0.25 layers: - state: frame0 map: [ "enum.ConstructionVisuals.Layer" ] @@ -140,15 +127,14 @@ assembly: { state: frame0 } wired: { state: frame1 } electronics: { state: frame2 } - screen: { state: frame3 } - type: Construction + graph: StationMap node: assembly - type: Destructible thresholds: - trigger: *DamageMachineFlimsy behaviors: - *SoundMetalGlassBreak - - !type:EmptyAllContainersBehaviour - !type:SpawnEntitiesBehavior spawn: SheetSteel1: *Min0Max1 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/station_maps.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/station_maps.yml index 3d1ed73d9d..5329eaf68f 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/station_maps.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/station_maps.yml @@ -3,19 +3,12 @@ start: start graph: - node: start - actions: # This action on the start node ensures we delete regardless of how we get here (sometimes reduces code duplication) - - !type:DeleteEntity {} edges: - to: assembly steps: - material: Steel amount: 2 - doAfter: 2 - completed: - # An edge with no completed action feels unresponsive, so in this case a sound is added. - - !type:PlaySound - sound: - collection: PlaceMetal + doAfter: 2.0 - node: assembly entity: StationMapAssembly @@ -26,18 +19,16 @@ steps: - material: Cable amount: 2 - completed: - - !type:PlaySound - sound: - collection: PlaceWires + doAfter: 1 - to: start - steps: - - tool: Welding - doAfter: 2 completed: - !type:GivePrototype prototype: SheetSteel1 amount: 2 + - !type:DeleteEntity {} + steps: + - tool: Welding + doAfter: 2 - node: wired entity: StationMapAssembly @@ -47,50 +38,22 @@ - to: electronics steps: - tag: StationMapElectronics - doAfter: 1 - store: &Container board + store: board name: construction-graph-tag-station-map-electronics icon: sprite: "Objects/Misc/module.rsi" - state: "door_electronics" - completed: - - !type:PlaySound - sound: - collection: PlaceElectronics - - to: assembly - steps: - - tool: Cutting + state: "door_electronics" # /tg/ uses the same sprite, right? doAfter: 1 + - to: assembly completed: - !type:GivePrototype prototype: CableApcStack1 amount: 2 - - - node: electronics - entity: StationMapAssembly - actions: - - !type:AppearanceChange - edges: - - to: screen - steps: - - material: Glass - amount: 2 - completed: - - !type:PlaySound - sound: - collection: PlaceGlass - - to: wired steps: - tool: Cutting doAfter: 1 - completed: - # Empty the container instead of spawning a new electronics to maintain component changes the board might have. - - !type:EmptyContainer - container: *Container - pickup: true - - node: screen - entity: StationMapAssembly + - node: electronics actions: - !type:AppearanceChange edges: @@ -98,49 +61,18 @@ steps: - tool: Screwing doAfter: 2 - completed: - - !type:PlaySound - sound: /Audio/Machines/light_tube_on.ogg - - to: electronics - conditions: # Safety condition. Should never be false but surfaces something went wrong - - !type:ContainerNotEmpty - container: *Container - examineText: deconstructible-verb-activate-no-target-text - steps: - - tool: Prying - doAfter: 1 - completed: - - !type:GivePrototype - prototype: SheetGlass1 - amount: 2 - # Final destination - node: station_map entity: StationMap edges: - - to: screen - steps: - - tool: Screwing - doAfter: 2 - - # The entity prototype has a random fill so there's two nodes to cover both possibilities - - node: broken - entity: StationMapBroken - edges: - to: wired - conditions: - - !type:ContainerEmpty - container: *Container - steps: &StepsBroken - - tool: Screwing - doAfter: 3 - completed: &CompletedBroken - - !type:GivePrototype - prototype: ShardGlass - amount: 2 - - to: electronics conditions: - !type:ContainerNotEmpty - container: *Container - steps: *StepsBroken - completed: *CompletedBroken + container: board + completed: + - !type:EmptyAllContainers + pickup: true + emptyAtUser: true + steps: + - tool: Prying + doAfter: 1 diff --git a/Resources/Prototypes/SoundCollections/construction.yml b/Resources/Prototypes/SoundCollections/construction.yml deleted file mode 100644 index 887ec658b3..0000000000 --- a/Resources/Prototypes/SoundCollections/construction.yml +++ /dev/null @@ -1,26 +0,0 @@ -- type: soundCollection - id: PlaceElectronics - files: - - /Audio/Construction/place_electronics_1.ogg - - /Audio/Construction/place_electronics_2.ogg - -- type: soundCollection - id: PlaceGlass - files: - - /Audio/Construction/place_glass_1.ogg - - /Audio/Construction/place_glass_2.ogg - - /Audio/Construction/place_glass_3.ogg - -- type: soundCollection - id: PlaceMetal - files: - - /Audio/Construction/place_metal_1.ogg - - /Audio/Construction/place_metal_2.ogg - - /Audio/Construction/place_metal_3.ogg - - /Audio/Construction/place_metal_4.ogg - -- type: soundCollection - id: PlaceWires - files: - - /Audio/Construction/place_wires_1.ogg - - /Audio/Construction/place_wires_2.ogg diff --git a/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame2.png b/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame2.png index 358e8edba9..1b4ed09717 100644 Binary files a/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame2.png and b/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame2.png differ diff --git a/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame3.png b/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame3.png deleted file mode 100644 index de13939790..0000000000 Binary files a/Resources/Textures/Structures/Wallmounts/station-map.rsi/frame3.png and /dev/null differ diff --git a/Resources/Textures/Structures/Wallmounts/station-map.rsi/meta.json b/Resources/Textures/Structures/Wallmounts/station-map.rsi/meta.json index 6f57e92e12..6a5452dc3b 100644 --- a/Resources/Textures/Structures/Wallmounts/station-map.rsi/meta.json +++ b/Resources/Textures/Structures/Wallmounts/station-map.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "By AftrLite (GitHub), circuitboard on 'frame2' and 'frame3' added by iaada (GitHub)", + "copyright": "By AftrLite (GitHub)", "size": { "x": 32, "y": 32 @@ -27,10 +27,6 @@ "name": "frame2", "directions": 4 }, - { - "name": "frame3", - "directions": 4 - }, { "name": "unshaded", "directions": 4