diff --git a/Content.Server/Botany/Systems/PlantHolderSystem.cs b/Content.Server/Botany/Systems/PlantHolderSystem.cs index 91849a973bd..3761a543629 100644 --- a/Content.Server/Botany/Systems/PlantHolderSystem.cs +++ b/Content.Server/Botany/Systems/PlantHolderSystem.cs @@ -406,13 +406,22 @@ private void OnInteractUsing(Entity entity, ref InteractUs ("usingItem", args.Used), ("owner", uid)), uid, Robust.Shared.Player.Filter.PvsExcept(args.User), true); - if (_solutionContainerSystem.TryGetSolution(args.Used, produce.SolutionName, out var soln2, out var solution2)) + // If this is a stack with multiple items, split one item off and use that as the source + // for solution transfer so that per-item solutions are preserved on the remaining stack. + EntityUid sourceForTransfer = args.Used; + EntityUid? splitEntity = null; + if (TryComp(args.Used, out var usedStack) && usedStack.Count > 1) + { + splitEntity = _stack.Split(args.Used, 1, Transform(args.Used).Coordinates, usedStack); + if (splitEntity != null) + sourceForTransfer = splitEntity.Value; + } + + if (_solutionContainerSystem.TryGetSolution(sourceForTransfer, produce.SolutionName, out var soln2, out var solution2)) { if (_solutionContainerSystem.ResolveSolution(uid, component.SoilSolutionName, ref component.SoilSolution, out var solution1)) { - // We try to fit as much of the composted plant's contained solution into the hydroponics tray as we can, - // since the plant will be consumed anyway. - + // Transfer as much solution as the tray can accept from the single-item source. var fillAmount = FixedPoint2.Min(solution2.Volume, solution1.AvailableVolume); _solutionContainerSystem.TryAddSolution(component.SoilSolution.Value, _solutionContainerSystem.SplitSolution(soln2.Value, fillAmount)); @@ -425,7 +434,26 @@ private void OnInteractUsing(Entity entity, ref InteractUs var nutrientBonus = seed.Potency / 2.5f; AdjustNutrient(uid, nutrientBonus, component); } - QueueDel(args.Used); + + // If we split off a single-item entity earlier, delete it now. Otherwise delete (or eject label) the used entity. + if (splitEntity != null) + { + if (TryComp(splitEntity.Value, out var paperLabel)) + { + _itemSlots.TryEjectToHands(splitEntity.Value, paperLabel.LabelSlot, args.User); + } + + QueueDel(splitEntity.Value); + } + else + { + if (TryComp(args.Used, out var paperLabel)) + { + _itemSlots.TryEjectToHands(args.Used, paperLabel.LabelSlot, args.User); + } + + QueueDel(args.Used); + } } } diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs index c8e8e89ce53..9817fa5b7dc 100644 --- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs @@ -1,5 +1,6 @@ using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reaction; +using Content.Shared._Goobstation.Factory; using Content.Shared.Interaction; using Content.Shared.Popups; using Robust.Shared.Audio.Systems; @@ -27,6 +28,7 @@ public override void Initialize() { SubscribeLocalEvent(OnActivateInWorld); SubscribeLocalEvent(OnRemoveAttempt); + SubscribeLocalEvent(OnMachineStarted); } private void OnActivateInWorld(Entity entity, ref ActivateInWorldEvent args) @@ -38,6 +40,11 @@ private void OnActivateInWorld(Entity entity, r args.Handled = true; } + private void OnMachineStarted(Entity ent, ref MachineStartedEvent args) + { + // Start mixing when a machine receives a start signal. + TryStartMix(ent, null); + } private void OnRemoveAttempt(Entity ent, ref ContainerIsRemovingAttemptEvent args) { if (args.Container.ID == ent.Comp.ContainerId && ent.Comp.Mixing) diff --git a/Resources/Locale/en-US/_HL/recipes/misc.ftl b/Resources/Locale/en-US/_HL/recipes/misc.ftl index cfc7488fcc5..7f4034bbb95 100644 --- a/Resources/Locale/en-US/_HL/recipes/misc.ftl +++ b/Resources/Locale/en-US/_HL/recipes/misc.ftl @@ -1,3 +1,4 @@ # Random Hardlight additions that done need localizin' improvised-railgun-mag-desc = Making a railgun takes a research team five years and multiple doctorates. Making the ammunition for one, on the other hand, takes a minute or two. construction-graph-component-gaslock-circuit-board = a portable gaslock circuit board +storage-port-construction-desc = A gas storage port, holds gas canisters without leaking gas! diff --git a/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml b/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml index 65eaf04d78f..2a6e0f2f8b8 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/Medical/chemistry_machines.yml @@ -43,6 +43,7 @@ name: electrolysis unit description: The latest in medicinal electrocution technology. components: + - type: StartableMachine - type: SolutionContainerMixer mixDuration: 5 mixingSound: @@ -73,6 +74,16 @@ enum.PowerDeviceVisualLayers.Powered: True: { visible: True } False: { visible: False } + - type: AutomationSlots # Goobstation + slots: + - !type:AutomatedBeakerSlot + input: PlumbingDispenser + output: PlumbingDispenser + slotName: mixer + - !type:AutomatedPorts + sinks: + - Start + - AutoStart - type: Machine board: ElectrolysisUnitMachineCircuitboard @@ -82,6 +93,7 @@ name: tabletop centrifuge description: Around and around it goes... components: + - type: StartableMachine - type: SolutionContainerMixer mixDuration: 10 mixingSound: @@ -113,6 +125,16 @@ enum.PowerDeviceVisualLayers.Powered: True: { visible: True } False: { visible: False } + - type: AutomationSlots # Goobstation + slots: + - !type:AutomatedBeakerSlot + input: PlumbingDispenser + output: PlumbingDispenser + slotName: mixer + - !type:AutomatedPorts + sinks: + - Start + - AutoStart - type: ItemSlots slots: mixer: diff --git a/Resources/Prototypes/Floof/Entities/Objects/Weapons/guns.yml b/Resources/Prototypes/Floof/Entities/Objects/Weapons/guns.yml index 5ca2c744c74..d30d65e083a 100644 --- a/Resources/Prototypes/Floof/Entities/Objects/Weapons/guns.yml +++ b/Resources/Prototypes/Floof/Entities/Objects/Weapons/guns.yml @@ -170,9 +170,7 @@ startingCharge: 1200 - type: BatterySelfRecharger autoRecharge: true - autoRechargeRate: 24 - autoRechargePause: true - autoRechargePauseTime: 30 + autoRechargeRate: 100 #HL - 100 < 24, why was it so low - type: entity name: energy shotgun diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/pda.yml index a9a48b98ab6..082e11fa177 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/pda.yml @@ -73,5 +73,5 @@ - NotekeeperCartridge - NewsReaderCartridge - GlimmerMonitorCartridge - # - NanoChatCartridge + - NanoChatCartridge - PsiWatchCartridge diff --git a/Resources/Prototypes/_DV/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/_DV/Entities/Objects/Devices/pda.yml index 4dcbfaedffb..348e76573e9 100644 --- a/Resources/Prototypes/_DV/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/_DV/Entities/Objects/Devices/pda.yml @@ -20,9 +20,10 @@ accentVColor: "#050c4d" - type: Icon state: pda-mailcarrier - # - type: CartridgeLoader # DeltaV - Courier Performance # Frontier - pushed to cartridge loadouts - # preinstalled: - # - CrewManifestCartridge - # - NotekeeperCartridge - # - NewsReaderCartridge - # - MailMetricsCartridge + - type: CartridgeLoader # DeltaV - Courier Performance # Frontier - pushed to cartridge loadouts + preinstalled: + - CrewManifestCartridge + - NotekeeperCartridge + - NewsReaderCartridge + - MailMetricsCartridge + - NanoChatCartridge diff --git a/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index 93021f6a795..997af39d5ac 100644 --- a/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -84,6 +84,7 @@ path: /Audio/_DV/Weapons/Guns/Gunshots/laser.ogg soundEmpty: path: /Audio/_DV/Weapons/Guns/Empty/dry_fire.ogg + fireRate: 4 - type: Battery maxCharge: 2000 startingCharge: 2000 @@ -93,11 +94,11 @@ - type: EnergyGun fireModes: - proto: BulletDisabler - fireCost: 100 + fireCost: 25 name: disable state: disabler - proto: MultiPhaseLethalBolt - fireCost: 200 + fireCost: 50 name: lethal state: lethal - proto: BulletTaser diff --git a/Resources/Prototypes/_DV/Entities/Structures/Storage/Crates/barrel.yml b/Resources/Prototypes/_DV/Entities/Structures/Storage/Crates/barrel.yml index 3d419751303..a5faecd9f39 100644 --- a/Resources/Prototypes/_DV/Entities/Structures/Storage/Crates/barrel.yml +++ b/Resources/Prototypes/_DV/Entities/Structures/Storage/Crates/barrel.yml @@ -124,6 +124,12 @@ - MachineLayer - type: Transform noRot: false + - type: AutomationSlots # Goobstation + slots: + - !type:AutomatedSolution + solutionName: tank + input: PlumbingInput + output: PlumbingOutput - type: entity parent: WoodenKeg diff --git a/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/Plumbing/liquid_pump.yml b/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/Plumbing/liquid_pump.yml index 9a64f603052..84f0e5f3ec0 100644 --- a/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/Plumbing/liquid_pump.yml +++ b/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/Plumbing/liquid_pump.yml @@ -30,7 +30,7 @@ port: PlumbingOutput - type: SolutionTransfer # verb so you can throttle its speed transferAmount: 50 # max speed is 50u/s - maxTransferAmount: 50 + maxTransferAmount: 500 # Hardlight - Faster transfer, fewer pumps needed for large setups canReceive: false canSend: false canChangeTransferAmount: true diff --git a/Resources/Prototypes/_HL/Entities/Objects/Devices/PDA.yml b/Resources/Prototypes/_HL/Entities/Objects/Devices/PDA.yml index ec916bbc49f..089bef23179 100644 --- a/Resources/Prototypes/_HL/Entities/Objects/Devices/PDA.yml +++ b/Resources/Prototypes/_HL/Entities/Objects/Devices/PDA.yml @@ -103,6 +103,7 @@ - NewsReaderCartridge - BountyContractsCartridge - AstroNavCartridge + - NanoChatCartridge - type: Tag # Ignore Chameleon tags tags: - DoorBumpOpener @@ -383,4 +384,4 @@ appearanceDataInit: enum.PdaVisuals.PdaType: !type:String - pda-sof \ No newline at end of file + pda-sof diff --git a/Resources/Prototypes/_HL/Entities/Objects/Tools/bluespacebarrel.yml b/Resources/Prototypes/_HL/Entities/Objects/Tools/bluespacebarrel.yml index 937320c89c6..1d6f23ccc34 100644 --- a/Resources/Prototypes/_HL/Entities/Objects/Tools/bluespacebarrel.yml +++ b/Resources/Prototypes/_HL/Entities/Objects/Tools/bluespacebarrel.yml @@ -104,3 +104,9 @@ - type: Sealable - type: StaticPrice price: 1000 + - type: AutomationSlots # Goobstation + slots: + - !type:AutomatedSolution + solutionName: tank + input: PlumbingInput + output: PlumbingOutput diff --git a/Resources/Prototypes/_HL/Entities/Structures/Piping/Atmospherics/unary.yml b/Resources/Prototypes/_HL/Entities/Structures/Piping/Atmospherics/unary.yml new file mode 100644 index 00000000000..3de864b2312 --- /dev/null +++ b/Resources/Prototypes/_HL/Entities/Structures/Piping/Atmospherics/unary.yml @@ -0,0 +1,21 @@ +- type: entity + parent: [RecyclableItemSteelSmall, GasPipeBase] + id: GasPortStorage + name: storage port + description: A gas storage port, holds gas canisters without leaking gas! + placement: + mode: SnapgridCenter + components: + - type: SubFloorHide + visibleLayers: + - enum.SubfloorLayers.FirstLayer + - type: Sprite + sprite: Structures/Piping/Atmospherics/gascanisterport.rsi + layers: + - state: gasCanisterPort + map: [ "enum.SubfloorLayers.FirstLayer" ] + - type: Appearance + - type: GasPort + - type: Construction + graph: GasUnary + node: portstorage diff --git a/Resources/Prototypes/_HL/Recipes/Crafting/Graphs/unary.yml b/Resources/Prototypes/_HL/Recipes/Crafting/Graphs/unary.yml new file mode 100644 index 00000000000..7a9b7715100 --- /dev/null +++ b/Resources/Prototypes/_HL/Recipes/Crafting/Graphs/unary.yml @@ -0,0 +1,27 @@ +- type: constructionGraph + id: GasUnaryHL + start: start + graph: + - node: start + edges: + - to: portstorage + steps: + - material: Steel + amount: 2 + doAfter: 1 + + - node: portstorage + entity: GasPortStorage + edges: + - to: start + conditions: + - !type:EntityAnchored + anchored: false + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 2 + - !type:DeleteEntity + steps: + - tool: Welding + doAfter: 1 diff --git a/Resources/Prototypes/_HL/Recipes/Crafting/unary.yml b/Resources/Prototypes/_HL/Recipes/Crafting/unary.yml new file mode 100644 index 00000000000..9df37e8bb08 --- /dev/null +++ b/Resources/Prototypes/_HL/Recipes/Crafting/unary.yml @@ -0,0 +1,9 @@ +- type: construction + id: GasPortStorage + graph: GasUnaryHL + startNode: start + targetNode: portstorage + category: construction-category-structures + description: storage-port-construction-desc + placementMode: SnapgridCenter + objectType: Structure diff --git a/Resources/Prototypes/_Mono/Entities/Mobs/Species/protogen.yml b/Resources/Prototypes/_Mono/Entities/Mobs/Species/protogen.yml index 2404f5374b7..5fc0f2aaad6 100644 --- a/Resources/Prototypes/_Mono/Entities/Mobs/Species/protogen.yml +++ b/Resources/Prototypes/_Mono/Entities/Mobs/Species/protogen.yml @@ -67,6 +67,7 @@ - type: Speech # Frontier allowedEmotes: ['Belch', 'Beep', 'Ping', 'Buzz'] # Frontier + Protogen stuff speechSounds: Pai + - type: PotentialPsionic #Nyano - Summary: makes potentially psionic. - type: Vocal # Mono wilhelm: "/Audio/_EE/Voice/IPC/wilhelm.ogg" sounds: diff --git a/Resources/Prototypes/_Mono/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/_Mono/Entities/Objects/Devices/pda.yml index 0766e7353ed..a14923e1210 100644 --- a/Resources/Prototypes/_Mono/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/_Mono/Entities/Objects/Devices/pda.yml @@ -11,6 +11,7 @@ - NewsReaderCartridge - BountyContractsCartridge - AstroNavCartridge + - NanoChatCartridge - type: entity parent: BasePDA diff --git a/Resources/Prototypes/_NF/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/_NF/Entities/Objects/Devices/pda.yml index ee7abe256f2..14368973bfc 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Devices/pda.yml @@ -30,6 +30,7 @@ - MailMetricsCartridge - AppraisalCartridge - NetProbeCartridge + - NanoChatCartridge - type: entity parent: BasePDA diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Melee/e_sword.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Melee/e_sword.yml index 6a8124d4b42..c3a10c915d0 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Melee/e_sword.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Melee/e_sword.yml @@ -23,7 +23,7 @@ - type: ItemToggleMeleeWeapon activatedDamage: types: # Slightly less total damage than wielded crusher glaive has - Heat: 8 + Heat: 6 Piercing: 2 Structural: 40 # +10 damage compared to crusher glaive deactivatedSecret: true @@ -46,6 +46,13 @@ - Belt - back - suitStorage + - type: MeleeWeapon + wideAnimationRotation: -135 + attackRate: 4 + damage: + types: + Blunt: 2 + autoAttack: true - type: ToggleableLightVisuals spriteLayer: blade inhandVisuals: diff --git a/Resources/Prototypes/_NF/Entities/Structures/Storage/barrel.yml b/Resources/Prototypes/_NF/Entities/Structures/Storage/barrel.yml index 577e8cd703c..abc1dccf4ea 100644 --- a/Resources/Prototypes/_NF/Entities/Structures/Storage/barrel.yml +++ b/Resources/Prototypes/_NF/Entities/Structures/Storage/barrel.yml @@ -87,6 +87,12 @@ - type: Sealable - type: StaticPrice price: 1000 + - type: AutomationSlots # Goobstation + slots: + - !type:AutomatedSolution + solutionName: tank + input: PlumbingInput + output: PlumbingOutput - type: entity id: MetalBarrelGrey