Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Muffled Gas Masks #197

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 52 additions & 9 deletions Resources/Prototypes/Entities/Clothing/Masks/masks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# FLOOF: Create a gas mask base class so that the MaskGas tag doesn't pass onto children
- type: entity
parent: ClothingMaskPullableBase
id: ClothingMaskGas
id: GasMaskTags
abstract: true
components:
- type: Tag
tags:
- HamsterWearable
- WhitelistChameleon
- HidesNose

- type: entity
parent: [ GasMaskTags, ClothingMaskPullableBase ]
id: ClothingMaskGasBase
abstract: true
name: gas mask
description: A face-covering mask that can be connected to an air supply.
components:
Expand All @@ -11,17 +23,32 @@
- type: BreathMask
- type: IngestionBlocker
- type: IdentityBlocker
- type: Tag
tags:
- HamsterWearable
- WhitelistChameleon
- type: HideLayerClothing
slots:
- Snout
hideOnToggle: true
# END FLOOF

- type: entity
parent: ClothingMaskGas
parent: ClothingMaskGasBase # FLOOF: Change parent
id: ClothingMaskGas
components: # FLOOF: Remove most components, move them to ClothingMaskGasBase
# - type: Sprite
# sprite: Clothing/Mask/gas.rsi
# - type: Clothing
# sprite: Clothing/Mask/gas.rsi
# - type: BreathMask
# - type: IngestionBlocker
# - type: IdentityBlocker
- type: Tag # FLOOF: Add MaskGasIngredient tag
tags:
- HamsterWearable
- WhitelistChameleon
- HidesNose
- MaskGasIngredient

- type: entity
parent: ClothingMaskGasBase # FLOOF: Change parent
id: ClothingMaskGasSecurity
name: security gas mask
description: A standard issue Security gas mask.
Expand All @@ -39,9 +66,15 @@
Slash: 0.95
Piercing: 0.95
Heat: 0.95
- type: Tag # FLOOF: Add MaskGasSecurityIngredient tag
tags:
- HamsterWearable
- WhitelistChameleon
- HidesNose
- MaskGasSecurityIngredient

- type: entity
parent: ClothingMaskGas
parent: ClothingMaskGasBase # FLOOF: Change parent
id: ClothingMaskGasSyndicate
name: syndicate gas mask
description: A close-fitting tactical mask that can be connected to an air supply.
Expand All @@ -61,7 +94,7 @@
Heat: 0.95

- type: entity
parent: ClothingMaskGas
parent: ClothingMaskGasBase # FLOOF: Change parent
id: ClothingMaskGasAtmos
name: atmospheric gas mask
description: Improved gas mask utilized by atmospheric technicians. It's flameproof!
Expand Down Expand Up @@ -118,6 +151,12 @@
Slash: 0.90
Piercing: 0.95
Heat: 0.95
- type: Tag # FLOOF: Add MaskGasExplorerIngredient tag
tags:
- HamsterWearable
- WhitelistChameleon
- HidesNose
- MaskGasExplorerIngredient

- type: entity
parent: ClothingMaskPullableBase
Expand Down Expand Up @@ -309,6 +348,10 @@
- type: Construction
graph: Muzzle
node: muzzle
- type: Tag # FLOOF: Add MuzzleIngredient tag
tags:
- WhitelistChameleon
- MuzzleIngredient

- type: entity
parent: ClothingMaskPullableBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
id: LoadoutMaskMuzzle
- type: loadout
id: LoadoutMaskGas
- type: loadout
id: LoadoutMaskGasMuffled
- type: loadout
id: LoadoutMaskBandBlack
- type: loadout
Expand Down
21 changes: 21 additions & 0 deletions Resources/Prototypes/Floof/Entities/Clothing/Masks/masks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- type: entity
parent: [ GasMaskTags, ClothingMaskGas, ClothingMaskMuzzle ]
id: ClothingMaskGasMuffled
name: muffled gas mask
description: A face-covering mask that can be connected to an air supply. This one blocks your speech.

- type: entity
parent: [ GasMaskTags, ClothingMaskGasExplorer, ClothingMaskMuzzle ]
id: ClothingMaskGasExplorerMuffled
name: muffled explorer gas mask
description: A military-grade gas mask that can be connected to an air supply. This one blocks your speech.

- type: entity
parent: [ GasMaskTags, ClothingMaskGasSecurity, ClothingMaskMuzzle ]
id: ClothingMaskGasSecurityMuffled
name: muffled security gas mask
description: A standard issue Security gas mask. This one blocks your speech.

# I'm actually not super satisfied with this implementation. I kinda wish all gas masks simply had a slot you could
# attach a muzzle to and it would muffle your speech. Especially because working with tags in recipes is clunky as hell
# and encourages some bad code practice. But I'm lazy. WYCI
11 changes: 11 additions & 0 deletions Resources/Prototypes/Floof/Loadouts/mask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@
requirements:
- !type:CharacterItemGroupRequirement
group: LoadoutMasks2

- type: loadout
id: LoadoutMaskGasMuffled
category: Mask
cost: 1
exclusive: true
items:
- ClothingMaskGasMuffled
requirements:
- !type:CharacterItemGroupRequirement
group: LoadoutMasks2
65 changes: 65 additions & 0 deletions Resources/Prototypes/Floof/Recipes/Crafting/Graphs/masks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
- type: constructionGraph
id: ClothingMaskGasMuffled
start: start
graph:
- node: start
edges:
- to: gasmask
steps:
- tag: MaskGasIngredient
name: gas mask
icon:
sprite: Clothing/Mask/gas.rsi
state: icon
- tag: MuzzleIngredient
name: muzzle
icon:
sprite: Clothing/Mask/muzzle.rsi
state: icon
doAfter: 3
- node: gasmask
entity: ClothingMaskGasMuffled

- type: constructionGraph
id: ClothingMaskGasExplorerMuffled
start: start
graph:
- node: start
edges:
- to: gasmask
steps:
- tag: MaskGasExplorerIngredient
name: explorer gas mask
icon:
sprite: Clothing/Mask/gasexplorer.rsi
state: icon
- tag: MuzzleIngredient
name: muzzle
icon:
sprite: Clothing/Mask/muzzle.rsi
state: icon
doAfter: 3
- node: gasmask
entity: ClothingMaskGasExplorerMuffled

- type: constructionGraph
id: ClothingMaskGasSecurityMuffled
start: start
graph:
- node: start
edges:
- to: gasmask
steps:
- tag: MaskGasSecurityIngredient
name: security gas mask
icon:
sprite: Clothing/Mask/gassecurity.rsi
state: icon
- tag: MuzzleIngredient
name: muzzle
icon:
sprite: Clothing/Mask/muzzle.rsi
state: icon
doAfter: 3
- node: gasmask
entity: ClothingMaskGasSecurityMuffled
38 changes: 38 additions & 0 deletions Resources/Prototypes/Floof/Recipes/Crafting/masks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- type: construction
name: muffled gas mask
id: ClothingMaskGasMuffled
graph: ClothingMaskGasMuffled
startNode: start
targetNode: gasmask
category: construction-category-clothing
description: A gas mask with a muzzle attached to block the wearer's speech.
icon:
sprite: Clothing/Mask/gas.rsi
state: icon
objectType: Item

- type: construction
name: muffled explorer gas mask
id: ClothingMaskGasExplorerMuffled
graph: ClothingMaskGasExplorerMuffled
startNode: start
targetNode: gasmask
category: construction-category-clothing
description: An explorer gas mask with a muzzle attached to block the wearer's speech.
icon:
sprite: Clothing/Mask/gasexplorer.rsi
state: icon
objectType: Item

- type: construction
name: muffled security gas mask
id: ClothingMaskGasSecurityMuffled
graph: ClothingMaskGasSecurityMuffled
startNode: start
targetNode: gasmask
category: construction-category-clothing
description: A security gas mask with a muzzle attached to block the wearer's speech.
icon:
sprite: Clothing/Mask/gassecurity.rsi
state: icon
objectType: Item
15 changes: 15 additions & 0 deletions Resources/Prototypes/Floof/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NOTE: These tags are for crafting at the moment.
# The "muffled gas mask" items do NOT have these tags, in order to prevent crafting redundancy.
# Also, only the "original" gas mask has the MaskGasIngredient tag, not any of the inheriting gas masks.

- type: Tag
id: MaskGasIngredient

- type: Tag
id: MaskGasExplorerIngredient

- type: Tag
id: MaskGasSecurityIngredient

- type: Tag
id: MuzzleIngredient
Loading