diff --git a/Content.Shared/_White/Construction/AddTag.cs b/Content.Shared/_White/Construction/AddTag.cs new file mode 100644 index 0000000000..3b6d577cc9 --- /dev/null +++ b/Content.Shared/_White/Construction/AddTag.cs @@ -0,0 +1,18 @@ +using Content.Shared.Construction; +using Content.Shared.Tag; +using JetBrains.Annotations; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; + +namespace Content.Shared._White.Construction; + +[UsedImplicitly, DataDefinition] +public sealed partial class AddTag : IGraphAction +{ + [DataField(required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] + public string Tag = default!; + + public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager) + { + entityManager.System().AddTag(uid, Tag); + } +} diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml index ba44b992d3..a718c12ebd 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml @@ -218,6 +218,10 @@ qualities: - Sawing speed: 1.5 + - type: Construction + deconstructionTarget: null + graph: ChainsawGraph + node: circular - type: entity name: advanced circular saw @@ -241,3 +245,7 @@ qualities: - Sawing speed: 2.0 + - type: Construction + deconstructionTarget: null + graph: ChainsawGraph + node: circular diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml index 3506a0b31f..c82ecd54bb 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml @@ -149,6 +149,10 @@ proto: PelletShotgunImprovised - type: SpentAmmoVisuals state: "improvised" + - type: Construction + deconstructionTarget: null + graph: ImprovisedShellGraph + node: shell - type: entity id: ShellShotgunUranium diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/chainsaw.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/chainsaw.yml index bfdd94add6..9812fa4bef 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/chainsaw.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/chainsaw.yml @@ -47,3 +47,7 @@ maxVol: 300 - type: UseDelay delay: 1 + - type: Construction + deconstructionTarget: null + graph: ChainsawGraph + node: chainsaw diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml index 8ff32e5600..6210d60c51 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml @@ -44,6 +44,10 @@ - type: GuideHelp guides: - Chef + - type: Construction + deconstructionTarget: null + graph: SwordGraph + node: knife - type: entity name: butcher's cleaver @@ -100,6 +104,10 @@ sprite: Objects/Weapons/Melee/combat_knife.rsi - type: DisarmMalus malus: 0.225 + - type: Construction + deconstructionTarget: null + graph: SwordGraph + node: knife - type: entity name: survival knife diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml index 4073865533..40286b7f8a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml @@ -109,6 +109,10 @@ size: Normal sprite: Objects/Weapons/Melee/machete.rsi - type: DisarmMalus + - type: Construction + deconstructionTarget: null + graph: SwordGraph + node: machete - type: entity name: claymore @@ -135,6 +139,10 @@ slots: - back - type: DisarmMalus + - type: Construction + deconstructionTarget: null + graph: SwordGraph + node: sword - type: entity name: cutlass diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 3f6329202f..7ce772bb35 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -318,6 +318,8 @@ - FauxTileAstroIce - OreBagOfHolding - ClothingEyesNightVisionGoggles # WD EDIT + - KitchenKnife # WD EDIT + - ButchCleaver # WD EDIT - DeviceQuantumSpinInverter - type: EmagLatheRecipes emagDynamicRecipes: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/atmos_pipes.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/atmos_pipes.yml index 771c63ebd5..4c62cd4efd 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/atmos_pipes.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/atmos_pipes.yml @@ -65,6 +65,20 @@ steps: - tool: Welding doAfter: 1 + - to: pipe_cut + conditions: + - !type:EntityAnchored + anchored: false + steps: + - tool: Cutting + doAfter: 1 + completed: + - !type:SpawnPrototype + prototype: PipeCut + amount: 4 + - !type:DeleteEntity + + - node: pipe_cut - node: bend entity: GasPipeBend diff --git a/Resources/Prototypes/Research/civilianservices.yml b/Resources/Prototypes/Research/civilianservices.yml index ffb6383d79..a0c40f83ff 100644 --- a/Resources/Prototypes/Research/civilianservices.yml +++ b/Resources/Prototypes/Research/civilianservices.yml @@ -50,6 +50,8 @@ - ElectricGrillMachineCircuitboard - BoozeDispenserMachineCircuitboard - SodaDispenserMachineCircuitboard + - KitchenKnife + - ButchCleaver - type: technology id: AudioVisualCommunication diff --git a/Resources/Prototypes/White/Entities/Objects/Misc/improvised_parts.yml b/Resources/Prototypes/White/Entities/Objects/Misc/improvised_parts.yml new file mode 100644 index 0000000000..d356c60277 --- /dev/null +++ b/Resources/Prototypes/White/Entities/Objects/Misc/improvised_parts.yml @@ -0,0 +1,37 @@ +- type: entity + id: PipeCut + name: часть трубы + parent: BaseItem + components: + - type: Item + size: Tiny + - type: Sprite + sprite: White/Misc/improvised_shell.rsi + state: pipeCut + - type: Construction + deconstructionTarget: null + graph: ImprovisedShellGraph + node: pipe_cut + +- type: entity + id: PipeCutClosed + parent: PipeCut + components: + - type: Sprite + state: pipeCutClosed + - type: Construction + node: pipe_cut_closed + - type: SolutionContainerManager + solutions: + sol: + maxVol: 5 + - type: DrawableSolution + solution: sol + - type: RefillableSolution + solution: sol + - type: DrainableSolution + solution: sol + - type: Spillable + solution: sol + - type: SolutionTransfer + maxTransferAmount: 5 diff --git a/Resources/Prototypes/White/Recipes/hidden_crafts.yml b/Resources/Prototypes/White/Recipes/hidden_crafts.yml index d650307471..34ff4df018 100644 --- a/Resources/Prototypes/White/Recipes/hidden_crafts.yml +++ b/Resources/Prototypes/White/Recipes/hidden_crafts.yml @@ -3,7 +3,6 @@ start: esword graph: - node: esword - entity: EnergySword edges: - to: desword steps: @@ -16,29 +15,20 @@ start: welder graph: - node: welder - entity: Welder - edges: - - to: screwed-welder - steps: - - tool: Screwing - doAfter: 1 - - node: screwed-welder edges: - to: no-igniter steps: - - material: MetalRod - amount: 5 - doAfter: 5 + - tool: Screwing + doAfter: 1 + - material: MetalRod + amount: 5 + doAfter: 5 - node: no-igniter entity: WeaponFlamethrowerUnfinished - edges: - - to: unscrewed - steps: - - tag: Igniter - - node: unscrewed edges: - to: flamethrower steps: + - tag: Igniter - tool: Screwing doAfter: 1 - node: flamethrower @@ -49,48 +39,28 @@ start: stock graph: - node: stock - entity: RifleStock edges: - to: unfinished steps: - material: MetalRod amount: 3 doAfter: 3 - - node: unfinished - edges: - - to: rods - node: unfinished entity: WeaponPoweredCrossbowUnfinished - edges: - - to: welded - steps: - - tool: Welding - doAfter: 5 - - node: welded - edges: - - to: cables - steps: - - material: Cable - amount: 5 - doAfter: 0.5 - - node: cables - edges: - - to: plastic - steps: - - material: Plastic - amount: 3 - doAfter: 0.5 - - node: plastic - edges: - - to: unscrewed - steps: - - material: Cable - amount: 5 - doAfter: 0.5 - - node: unscrewed edges: - to: crossbow steps: + - tool: Welding + doAfter: 5 + - material: Cable + amount: 5 + doAfter: 0.5 + - material: Plastic + amount: 3 + doAfter: 0.5 + - material: Cable + amount: 5 + doAfter: 0.5 - tool: Screwing doAfter: 1 - node: crossbow @@ -130,3 +100,77 @@ - !type:SpawnPrototype prototype: Telecrystal1 - !type:EmptyAllContainers + +- type: constructionGraph + id: ChainsawGraph + start: circular + graph: + - node: circular + edges: + - to: chainsaw + steps: + - material: Cable + amount: 3 + doAfter: 0.5 + - material: Plasteel + amount: 5 + doAfter: 3 + - tool: Welding + doAfter: 5 + - node: chainsaw + entity: Chainsaw + +- type: constructionGraph + id: SwordGraph + start: knife + graph: + - node: knife + edges: + - to: machete + steps: + - tool: Welding + doAfter: 5 + completed: + - !type:AddTag + tag: "WeldedKnife" + - tag: WeldedKnife + - node: machete + entity: Machete + edges: + - to: sword + steps: + - tool: Welding + doAfter: 5 + - tag: WeldedKnife + - node: sword + entity: Claymore + +- type: constructionGraph + id: ImprovisedShellGraph + start: pipe_cut + graph: + - node: pipe_cut + edges: + - to: pipe_cut_closed + steps: + - material: Steel + amount: 1 + doAfter: 0.5 + - node: pipe_cut_closed + entity: PipeCutClosed + edges: + - to: shell + conditions: + - !type:MinSolution + solution: sol + reagent: + ReagentId: WeldingFuel + quantity: 5 + steps: + - material: Cable + amount: 1 + doAfter: 0.5 + - tool: Screwing + doAfter: 1 + - node: shell + entity: ShellShotgunImprovised diff --git a/Resources/Prototypes/White/tags.yml b/Resources/Prototypes/White/tags.yml index febef3d7ce..e76a29fc03 100644 --- a/Resources/Prototypes/White/tags.yml +++ b/Resources/Prototypes/White/tags.yml @@ -45,3 +45,6 @@ - type: Tag id: SurveillanceBodyCamera + +- type: Tag + id: WeldedKnife diff --git a/Resources/Textures/White/Misc/improvised_shell.rsi/meta.json b/Resources/Textures/White/Misc/improvised_shell.rsi/meta.json new file mode 100644 index 0000000000..8545afe180 --- /dev/null +++ b/Resources/Textures/White/Misc/improvised_shell.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "FDev", + "states": [ + { + "name": "pipeCut" + }, + { + "name": "pipeCutClosed" + } + ] +} diff --git a/Resources/Textures/White/Misc/improvised_shell.rsi/pipeCut.png b/Resources/Textures/White/Misc/improvised_shell.rsi/pipeCut.png new file mode 100644 index 0000000000..1f3c0930e3 Binary files /dev/null and b/Resources/Textures/White/Misc/improvised_shell.rsi/pipeCut.png differ diff --git a/Resources/Textures/White/Misc/improvised_shell.rsi/pipeCutClosed.png b/Resources/Textures/White/Misc/improvised_shell.rsi/pipeCutClosed.png new file mode 100644 index 0000000000..c9d37fe9e6 Binary files /dev/null and b/Resources/Textures/White/Misc/improvised_shell.rsi/pipeCutClosed.png differ