mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
New Black Market Uplink Weapon - Carpenter Hammer (#87070)
## About The Pull Request
There are maints hidden under every station in the world.
Everyone knew about them, but lied to you about them your entire life.
This PR adds carpenter hammer as a new black market uplink weapon with a
sliiiight psychopomp reference (!)

(code is mostly done with the help of my awesome friend Sensum)
## Why It's Good For The Game
More use for black market uplink, and new weapon with cool killsound
feature.
I want black market to be more content filled with various stuff.
https://github.com/user-attachments/assets/f726d292-dc14-43b2-a536-21901bb7f9b9



## Changelog
🆑
add: Added new weapon carpenter hammer to black market uplink
add: Added killsound feature
/🆑
---------
Co-authored-by: S <121913313+SSensum@users.noreply.github.com>
Co-authored-by: someone <someone@anydomain.not>
Co-authored-by: Niron3206 <68388770+Niron3206@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
This commit is contained in:
co-authored by
S
someone
Niron3206
Ghom
Fikou
parent
e25278f026
commit
1e0372bc6c
@@ -0,0 +1,41 @@
|
||||
/datum/component/item_killsound
|
||||
/// list of allowed types, not null/empty
|
||||
var/list/allowed_mobs
|
||||
/// list of blacklisted types
|
||||
var/list/blacklisted_mobs
|
||||
var/killsound
|
||||
var/killsound_volume = 100
|
||||
/**
|
||||
* on true will act as replacement for mob's death sound,
|
||||
* otherwise it will just play sound on death
|
||||
*/
|
||||
var/replace_default_death_sound
|
||||
|
||||
/datum/component/item_killsound/Initialize(
|
||||
allowed_mobs,
|
||||
blacklisted_mobs,
|
||||
killsound,
|
||||
killsound_volume = 100,
|
||||
replace_default_death_sound = FALSE
|
||||
)
|
||||
src.allowed_mobs = allowed_mobs
|
||||
src.blacklisted_mobs = blacklisted_mobs
|
||||
src.killsound = killsound
|
||||
src.killsound_volume = killsound_volume
|
||||
src.replace_default_death_sound = replace_default_death_sound
|
||||
|
||||
/datum/component/item_killsound/RegisterWithParent()
|
||||
var/obj/item/item_parent = parent
|
||||
RegisterSignal(item_parent, COMSIG_ITEM_ATTACK, PROC_REF(on_attack))
|
||||
|
||||
/datum/component/item_killsound/proc/on_attack(host, target_mob, user, params)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!allowed_mobs || is_type_in_list(target_mob, allowed_mobs))
|
||||
if(is_type_in_list(target_mob, blacklisted_mobs))
|
||||
return
|
||||
var/mob/living/mob = target_mob
|
||||
if(replace_default_death_sound)
|
||||
mob.apply_status_effect(/datum/status_effect/replace_death_sound, 1 SECONDS, killsound)
|
||||
else
|
||||
mob.apply_status_effect(/datum/status_effect/death_sound, 1 SECONDS, killsound, killsound_volume)
|
||||
Reference in New Issue
Block a user