Working flashlight for hard hats (#2599)

* Add verb to toggle flashlight

* Playing with hand-held light for hard hat

* ClothingEquippedPrefix will update players sprite when changed

* Make abstract prototype for hardhat and fixed hardhat orange sprites

* Fixed all other hard hats

* Fixed requested changes

* Restore prototype and sprites changes

* Nullables

* That's actually nullable

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
Alex Evgrashin
2020-11-23 06:17:38 +03:00
committed by GitHub
parent e97763afd2
commit fb6dd4a490
44 changed files with 202 additions and 31 deletions

View File

@@ -1,5 +1,29 @@
- type: entity
parent: ClothingHeadBase
id: ClothingHeadHatHardhatBase
abstract: true
components:
- type: Sprite
layers:
- state: icon
- state: light-icon
shader: unshaded
visible: false
- type: Clothing
HeldPrefix: off
ClothingPrefix: off
- type: PointLight
enabled: false
radius: 3
- type: LoopingSound
- type: Appearance
visuals:
- type: FlashLightVisualizer
- type: HandheldLight
- type: PowerCellSlot
- type: entity
parent: ClothingHeadHatHardhatBase
id: ClothingHeadHatHardhatBlue
name: blue hard hat
description: A hard hat, painted in blue, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
@@ -10,7 +34,7 @@
sprite: Clothing/Head/Hardhats/blue.rsi
- type: entity
parent: ClothingHeadBase
parent: ClothingHeadHatHardhatBase
id: ClothingHeadHatHardhatOrange
name: orange hard hat
description: A hard hat, painted in orange, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
@@ -21,7 +45,7 @@
sprite: Clothing/Head/Hardhats/orange.rsi
- type: entity
parent: ClothingHeadBase
parent: ClothingHeadHatHardhatBase
id: ClothingHeadHatHardhatRed
name: red hard hat
description: A hard hat, painted in red, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
@@ -32,7 +56,7 @@
sprite: Clothing/Head/Hardhats/red.rsi
- type: entity
parent: ClothingHeadBase
parent: ClothingHeadHatHardhatBase
id: ClothingHeadHatHardhatWhite
name: white hard hat
description: A hard hat, painted in white, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
@@ -43,7 +67,7 @@
sprite: Clothing/Head/Hardhats/white.rsi
- type: entity
parent: ClothingHeadBase
parent: ClothingHeadHatHardhatBase
id: ClothingHeadHatHardhatYellow
name: yellow hard hat
description: A hard hat, painted in yellow, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

@@ -10,17 +10,33 @@
{
"name": "icon",
"directions": 1
},
{
"name": "light-icon",
"directions": 1
},
{
"name": "equipped-HELMET",
"name": "off-equipped-HELMET",
"directions": 4
},
{
"name": "inhand-left",
"name": "off-inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"name": "off-inhand-right",
"directions": 4
},
{
"name": "on-equipped-HELMET",
"directions": 4
},
{
"name": "on-inhand-left",
"directions": 4
},
{
"name": "on-inhand-right",
"directions": 4
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

@@ -10,17 +10,33 @@
{
"name": "icon",
"directions": 1
},
{
"name": "light-icon",
"directions": 1
},
{
"name": "equipped-HELMET",
"name": "off-equipped-HELMET",
"directions": 4
},
{
"name": "inhand-left",
"name": "off-inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"name": "off-inhand-right",
"directions": 4
},
{
"name": "on-equipped-HELMET",
"directions": 4
},
{
"name": "on-inhand-left",
"directions": 4
},
{
"name": "on-inhand-right",
"directions": 4
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

@@ -10,17 +10,33 @@
{
"name": "icon",
"directions": 1
},
{
"name": "light-icon",
"directions": 1
},
{
"name": "equipped-HELMET",
"name": "off-equipped-HELMET",
"directions": 4
},
{
"name": "inhand-left",
"name": "off-inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"name": "off-inhand-right",
"directions": 4
},
{
"name": "on-equipped-HELMET",
"directions": 4
},
{
"name": "on-inhand-left",
"directions": 4
},
{
"name": "on-inhand-right",
"directions": 4
}
]

View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

@@ -10,17 +10,33 @@
{
"name": "icon",
"directions": 1
},
{
"name": "light-icon",
"directions": 1
},
{
"name": "equipped-HELMET",
"name": "off-equipped-HELMET",
"directions": 4
},
{
"name": "inhand-left",
"name": "off-inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"name": "off-inhand-right",
"directions": 4
},
{
"name": "on-equipped-HELMET",
"directions": 4
},
{
"name": "on-inhand-left",
"directions": 4
},
{
"name": "on-inhand-right",
"directions": 4
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

@@ -10,17 +10,33 @@
{
"name": "icon",
"directions": 1
},
{
"name": "light-icon",
"directions": 1
},
{
"name": "equipped-HELMET",
"name": "off-equipped-HELMET",
"directions": 4
},
{
"name": "inhand-left",
"name": "off-inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"name": "off-inhand-right",
"directions": 4
},
{
"name": "on-equipped-HELMET",
"directions": 4
},
{
"name": "on-inhand-left",
"directions": 4
},
{
"name": "on-inhand-right",
"directions": 4
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 725 B