Allow plungers to be fired by bows and embedded into entities (#23406)
* allow plungers to be fired by bows and embedded into entities * fixed bow being able to shoot every object
This commit is contained in:
@@ -82,3 +82,8 @@
|
||||
license: "CC0-1.0"
|
||||
copyright: "Taken from ScreamStudio on freesound.org"
|
||||
source: "https://freesound.org/people/ScreamStudio/sounds/392617/"
|
||||
|
||||
- files: ["pop.ogg"]
|
||||
license: "CC0-1.0"
|
||||
copyright: "Taken from 0ne_one111yt on freesound.org"
|
||||
source: "https://freesound.org/people/0ne_one111yt/sounds/478213/"
|
||||
|
||||
BIN
Resources/Audio/Weapons/pop.ogg
Normal file
BIN
Resources/Audio/Weapons/pop.ogg
Normal file
Binary file not shown.
@@ -552,28 +552,59 @@
|
||||
parent: BaseItem
|
||||
description: A plunger with a red plastic suction-cup and a wooden handle. Used to unclog drains.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Plunger
|
||||
- WhitelistChameleon
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Janitorial/plunger.rsi
|
||||
state: plunger
|
||||
- type: Item
|
||||
sprite: Objects/Specific/Janitorial/plunger.rsi
|
||||
heldPrefix: plunger
|
||||
- type: ItemCooldown
|
||||
- type: GuideHelp
|
||||
guides:
|
||||
- Janitorial
|
||||
- type: Clothing
|
||||
sprite: Objects/Specific/Janitorial/plunger.rsi
|
||||
slots:
|
||||
- HEAD
|
||||
clothingVisuals:
|
||||
head:
|
||||
- state: equipped-HELMET
|
||||
offset: "0, 0.15625"
|
||||
- type: Tag
|
||||
tags:
|
||||
- Plunger
|
||||
- WhitelistChameleon
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Janitorial/plunger.rsi
|
||||
state: plunger
|
||||
- type: Item
|
||||
sprite: Objects/Specific/Janitorial/plunger.rsi
|
||||
heldPrefix: plunger
|
||||
- type: ItemCooldown
|
||||
- type: GuideHelp
|
||||
guides:
|
||||
- Janitorial
|
||||
- type: Clothing
|
||||
sprite: Objects/Specific/Janitorial/plunger.rsi
|
||||
slots:
|
||||
- HEAD
|
||||
clothingVisuals:
|
||||
head:
|
||||
- state: equipped-HELMET
|
||||
offset: "0, 0.15625"
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
fix1:
|
||||
shape: !type:PhysShapeCircle
|
||||
radius: 0.2
|
||||
density: 5
|
||||
mask:
|
||||
- ItemMask
|
||||
restitution: 0.3
|
||||
friction: 0.2
|
||||
projectile:
|
||||
shape:
|
||||
!type:PhysShapeAabb
|
||||
bounds: "-0.1,-0.1,0.1,0.1"
|
||||
hard: false
|
||||
mask:
|
||||
- Impassable
|
||||
- BulletImpassable
|
||||
- type: EmbeddableProjectile
|
||||
sound: /Audio/Weapons/pop.ogg
|
||||
embedOnThrow: True
|
||||
- type: ThrowingAngle
|
||||
angle: 0
|
||||
- type: Ammo
|
||||
muzzleFlash: null
|
||||
- type: Projectile
|
||||
deleteOnCollide: false
|
||||
onlyCollideWhenShot: true
|
||||
damage:
|
||||
types:
|
||||
Blunt: 3
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- type: entity
|
||||
- type: entity
|
||||
name: bow
|
||||
parent: BaseItem
|
||||
id: BaseBow
|
||||
@@ -31,18 +31,19 @@
|
||||
soundEmpty: null
|
||||
- type: ItemSlots
|
||||
slots:
|
||||
arrow:
|
||||
name: Arrow
|
||||
projectiles:
|
||||
name: Projectiles
|
||||
startingItem: null
|
||||
insertSound: /Audio/Weapons/Guns/Misc/arrow_nock.ogg
|
||||
whitelist:
|
||||
tags:
|
||||
- Arrow
|
||||
- Plunger
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
arrow: !type:ContainerSlot
|
||||
projectiles: !type:ContainerSlot
|
||||
- type: ContainerAmmoProvider
|
||||
container: arrow
|
||||
container: projectiles
|
||||
|
||||
- type: entity
|
||||
id: BowImprovised
|
||||
@@ -55,6 +56,9 @@
|
||||
- state: unwielded-arrow
|
||||
map: [ arrow ]
|
||||
visible: false
|
||||
- state: unwielded-plunger
|
||||
map: [ plunger ]
|
||||
visible: false
|
||||
# to elucidate whats intended here:
|
||||
# arrow is inserted -> ItemMapper sets layer with map `arrow` to visible
|
||||
# bow is wielded -> generic vis sets states of layers with map `arrow` and `base`
|
||||
@@ -63,17 +67,25 @@
|
||||
- type: ItemMapper
|
||||
spriteLayers:
|
||||
- arrow
|
||||
- plunger
|
||||
mapLayers:
|
||||
arrow:
|
||||
whitelist:
|
||||
tags:
|
||||
- Arrow
|
||||
plunger:
|
||||
whitelist:
|
||||
tags:
|
||||
- Plunger
|
||||
- type: GenericVisualizer
|
||||
visuals:
|
||||
enum.WieldableVisuals.Wielded:
|
||||
arrow:
|
||||
True: { state: wielded-arrow }
|
||||
False: { state: unwielded-arrow }
|
||||
plunger:
|
||||
True: { state: wielded-plunger }
|
||||
False: { state: unwielded-plunger }
|
||||
base:
|
||||
True: { state: wielded }
|
||||
False: { state: unwielded }
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
},
|
||||
{
|
||||
"name": "unwielded-arrow"
|
||||
},
|
||||
{
|
||||
"name": "unwielded-plunger"
|
||||
},
|
||||
{
|
||||
"name": "wielded"
|
||||
},
|
||||
{
|
||||
"name": "wielded-arrow"
|
||||
},
|
||||
{
|
||||
"name": "wielded-plunger"
|
||||
},
|
||||
{
|
||||
"name": "equipped-BACKPACK",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 267 B |
Binary file not shown.
|
After Width: | Height: | Size: 265 B |
Reference in New Issue
Block a user