From: zzylex <146784470+zzylex@users.noreply.github.com> Date: Wed, 3 Jan 2024 05:36:16 +0000 (-0500) Subject: Allow plungers to be fired by bows and embedded into entities (#23406) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=0f85e10747e3ab3c99b6e300802658cbe343c5f9;p=space-station-14.git 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 --- diff --git a/Resources/Audio/Weapons/attributions.yml b/Resources/Audio/Weapons/attributions.yml index b29f498fee..310b01b728 100644 --- a/Resources/Audio/Weapons/attributions.yml +++ b/Resources/Audio/Weapons/attributions.yml @@ -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/" diff --git a/Resources/Audio/Weapons/pop.ogg b/Resources/Audio/Weapons/pop.ogg new file mode 100644 index 0000000000..99b58b26d3 Binary files /dev/null and b/Resources/Audio/Weapons/pop.ogg differ diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml index 8774dbf60e..e819d6c39f 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml index 4b7125f571..db98c6eabe 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml @@ -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 } diff --git a/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/meta.json index f19b1121c1..71e01e8b14 100644 --- a/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/meta.json +++ b/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/meta.json @@ -12,12 +12,18 @@ }, { "name": "unwielded-arrow" + }, + { + "name": "unwielded-plunger" }, { "name": "wielded" }, { "name": "wielded-arrow" + }, + { + "name": "wielded-plunger" }, { "name": "equipped-BACKPACK", diff --git a/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/unwielded-plunger.png b/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/unwielded-plunger.png new file mode 100644 index 0000000000..9b1c3a79b5 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/unwielded-plunger.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/wielded-plunger.png b/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/wielded-plunger.png new file mode 100644 index 0000000000..4c2ec4441b Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Bow/bow.rsi/wielded-plunger.png differ