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 (!)

      




![dreamseeker_9eImatpaTd](https://github.com/user-attachments/assets/796463a0-9c88-4f77-aa1a-98d079a3050f)
(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




![dreammaker_odBCfLOltA](https://github.com/user-attachments/assets/7cb212de-cc3b-4298-9121-d82569f455ba)


![Aseprite_eEG9E3PLlY](https://github.com/user-attachments/assets/3264733e-e58a-4c3b-b1b2-27693b73924a)


![Aseprite_kCZV4Akb3x](https://github.com/user-attachments/assets/27ae4b49-fed5-414f-9dba-90a2441835f8)


## 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:
fevryk
2024-11-18 23:58:39 +01:00
committed by GitHub
co-authored by S someone Niron3206 Ghom Fikou
parent e25278f026
commit 1e0372bc6c
10 changed files with 137 additions and 0 deletions
+41
View File
@@ -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)