Files
Bubberstation/code/modules/projectiles/projectile/bullets/foam_dart.dm
SmArtKar 57a01623a6 Adds a new syringe gun mode and improves foam darts. (#89510)
## About The Pull Request

This PR implements multiple new features:

Foam darts now can stick to people as long as their cap isn't removed.
Riot foam darts have a chance to jostle when you move with one stuck
inside of you, dealing a bit of stamina damage from the weight stuck to
your limbs.

Syringe guns received a second "low power" mode, toggleable with in-hand
right click. In this mode, syringes fired will embed into their target
and slowly leak their reagents instead of instantly delivering them.
Thankfully, they can be plucked out pretty quickly.

You can also insert syringes into uncapped (screwdriver-ed) foam darts
(similarly to pens) to achieve the same result, allowing you to get a
bootleg low-efficiency syringe gun.

Additionally, I fixed/cleaned up some embedding issues/code which I
found while coding this.

## Why It's Good For The Game

This allows players to explore new funny interactions between items and
chems, as we don't have a reliable slow release mechanism aside from IV
drips currently. And foam darts embedding it just (mostly) harmless
fluff, if someone figures out a way to cause havoc with it then I'll be
very proud of them (someone totally will).

## Changelog
🆑
add: Foam darts now stick to people when they have their cap on, riot
foam darts also can passively deal a bit of stamina damage when you move
with one.
add: Syringes can be inserted into foam darts, making them embed and
slowly leak their reagents into their victim.
add: Syringe guns can be toggled (with right click) between high power
and low power modes, former being their normal functionality and latter
making syringes embed and slowly leak their contents.
fix: Fixed projectiles sometimes not embedding when they should've
code: Cleaned embedding code up
/🆑
2025-03-12 16:52:51 -04:00

51 lines
1.5 KiB
Plaintext

/obj/projectile/bullet/foam_dart
name = "foam dart"
desc = "I hope you're wearing eye protection."
damage = 0 // It's a damn toy.
damage_type = OXY
icon = 'icons/obj/weapons/guns/toy.dmi'
icon_state = "foamdart_proj"
base_icon_state = "foamdart"
range = 10
embed_type = /datum/embedding/foam_dart
shrapnel_type = /obj/item/ammo_casing/foam_dart
embed_falloff_tile = 0
var/modified = FALSE
/datum/embedding/foam_dart
embed_chance = 85
fall_chance = 2
jostle_chance = 0
ignore_throwspeed_threshold = TRUE
pain_mult = 0
jostle_pain_mult = 0
rip_time = 0.5 SECONDS
/obj/projectile/bullet/foam_dart/Initialize(mapload)
. = ..()
RegisterSignals(src, list(COMSIG_PROJECTILE_ON_SPAWN_DROP, COMSIG_PROJECTILE_ON_SPAWN_EMBEDDED), PROC_REF(handle_drop))
/obj/projectile/bullet/foam_dart/proc/handle_drop(datum/source, obj/item/ammo_casing/foam_dart/newcasing)
SIGNAL_HANDLER
newcasing.modified = modified
newcasing.update_appearance()
var/obj/projectile/bullet/foam_dart/newdart = newcasing.loaded_projectile
newdart.modified = modified
newdart.damage_type = damage_type
newdart.update_appearance()
/obj/projectile/bullet/foam_dart/riot
name = "riot foam dart"
icon_state = "foamdart_riot_proj"
base_icon_state = "foamdart_riot"
shrapnel_type = /obj/item/ammo_casing/foam_dart/riot
stamina = 25
/datum/embedding/foam_dart/riot
fall_chance = 1.5
jostle_chance = 5
pain_mult = 1
jostle_pain_mult = 4 // These things are heavy and weigh you down a bit when stuck
pain_stam_pct = 1
rip_time = 1 SECONDS