Files
Bubberstation/code/__HELPERS/honkerblast.dm
SkyratBot 0a1f06a2d1 [MIRROR] This tail refactor turned into an organ refactor. Funny how that works. [MDB IGNORE] (#14017)
* This tail refactor turned into an organ refactor. Funny how that works.

* Firstly, fixing all the conflicts.

* Fixes all our maps (hopefully)

* Actually, this should fix pod people hair :)

* Almost everything is working, just two major things to fix

* Fixed a certain kind of external organ

* Cleaning up some more stuff

* Turned tail_cat into tail because why the fuck are they separate?

* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file

* Adds relevant_layers to organs to help with rendering

* Makes stored_feature_id also check mutant_bodyparts

* Fixes the icon_state names of ALL the tails (pain)

* Fixes wagging, gotta refactor most mutant bodyparts later on

* I Love Added Failures

* Fixed some organs that slipped through my searches

* This could possibly fix the CI for this?

* It doesn't look like it did fix it

* This will make it pass, even if it's ugly as sin.

* Fixed Felinids having a weird ghost tail

* Fixes instances of snouts and tails not being properly colored

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-06-11 23:20:16 -04:00

48 lines
2.1 KiB
Plaintext

///Unleashes a honkerblast similar to the honkmech weapon, but with more granular control.
/proc/honkerblast(atom/origin, light_range = 1, medium_range = 0, heavy_range = 0)
var/origin_turf = get_turf(origin)
var/list/lightly_honked = list()
var/list/properly_honked = list()
var/list/severely_honked = list()
playsound(origin_turf, 'sound/items/airhorn.ogg', 100, TRUE)
for(var/mob/living/carbon/victim as anything in hearers(max(light_range, medium_range, heavy_range), origin_turf))
if(!victim.can_hear())
continue
var/distance = get_dist(origin_turf, victim.loc)
if(distance <= heavy_range)
severely_honked += victim
else if(distance <= medium_range)
properly_honked += victim
else if(distance <= light_range)
lightly_honked += victim
for(var/mob/living/carbon/victim in severely_honked)
victim.Unconscious(40)
victim.Stun(100)
victim.adjust_timed_status_effect(30 SECONDS, /datum/status_effect/speech/stutter)
victim.set_timed_status_effect(1000 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
var/obj/item/organ/internal/ears/ears = victim.getorganslot(ORGAN_SLOT_EARS)
ears?.adjustEarDamage(10, 15)
to_chat(victim, "<font color='red' size='8'>HONK</font>")
var/obj/item/clothing/shoes/victim_shoes = victim.get_item_by_slot(ITEM_SLOT_FEET)
if(!victim_shoes?.can_be_tied)
continue
victim_shoes.adjust_laces(SHOES_KNOTTED)
for(var/mob/living/carbon/victim in properly_honked)
victim.Paralyze(20)
victim.Stun(50)
victim.set_timed_status_effect(500 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
var/obj/item/organ/internal/ears/ears = victim.getorganslot(ORGAN_SLOT_EARS)
ears?.adjustEarDamage(7, 10)
to_chat(victim, "<font color='red' size='5'>HONK</font>")
for(var/mob/living/carbon/victim in lightly_honked)
victim.Knockdown(20)
victim.set_timed_status_effect(200 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
var/obj/item/organ/internal/ears/ears = victim.getorganslot(ORGAN_SLOT_EARS)
ears?.adjustEarDamage(4, 5)
to_chat(victim, "<font color='red' size='2'>HONK</font>")