Files
WaterpigandMajkl-J bb70889f6e TG Upstream Part 1
3591 individual conflicts

Update build.js

Update install_node.sh

Update byond.js

oh my fucking god

hat

slow

huh

holy shit

we all fall down

2 more I missed

2900 individual conflicts

2700 Individual conflicts

replaces yarn file with tg version, bumping us down to 2200-ish

Down to 2000 individual conflicts

140 down

mmm

aaaaaaaaaaaaaaaaaaa

not yt

575

soon

900 individual conflicts

600 individual conflicts, 121 file conflicts

im not okay

160 across 19 files

29 in 4 files

0 conflicts, compiletime fix time

some minor incap stuff

missed ticks

weird dupe definition stuff

missed ticks 2

incap fixes

undefs and pie fix

Radio update and some extra minor stuff

returns a single override

no more dupe definitions, 175 compiletime errors

Unticked file fix

sound and emote stuff

honk and more radio stuff
2024-10-19 08:04:33 -07:00

47 lines
2.0 KiB
Plaintext

/**
* Crusher Loot; which makes the attached mob drop a crusher trophy of some type if the majority damage was from a crusher!
*
* Used for all the mobs droppin' crusher trophies
*/
/datum/element/crusher_loot
element_flags = ELEMENT_BESPOKE
argument_hash_start_idx = 2
/// Path of the trophy dropped
var/trophy_type
/// chance to drop the trophy, lowered by the mob only taking partial crusher damage instead of full
/// for example, 25% would mean ~4 mobs need to die before you find one.
/// but it would be more if you didn't deal full crusher damage to them.
var/drop_mod
/// If true, will immediately spawn the item instead of putting it in butcher loot.
var/drop_immediately
/datum/element/crusher_loot/Attach(datum/target, trophy_type, drop_mod = 25, drop_immediately = FALSE)
. = ..()
if(!isliving(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_LIVING_DEATH, PROC_REF(on_death))
src.trophy_type = trophy_type
src.drop_mod = drop_mod
src.drop_immediately = drop_immediately
/datum/element/crusher_loot/Detach(datum/target)
UnregisterSignal(target, COMSIG_LIVING_DEATH)
return ..()
/datum/element/crusher_loot/proc/on_death(mob/living/target, gibbed)
SIGNAL_HANDLER
var/datum/status_effect/crusher_damage/damage = target.has_status_effect(/datum/status_effect/crusher_damage)
// SKYRAT EDIT START - ASHWALKER TROPHIES
var/datum/status_effect/ashwalker_damage/ashie_damage = target.has_status_effect(/datum/status_effect/ashwalker_damage) // SKYRAT EDIT ADDITION
var/damage_total = damage?.total_damage + ashie_damage?.total_damage // SKYRAT EDIT ADDITION
if(damage_total && prob((damage_total/target.maxHealth) * drop_mod)) //on average, you'll need to kill 4 creatures before getting the item. by default. // SKYRAT EDIT - ORIGINAL: if(damage && prob((damage.total_damage/target.maxHealth) * drop_mod))
// SKYRAT EDIT END - ASHWALKER TROPHIES
if(drop_immediately)
new trophy_type(get_turf(target))
else
target.butcher_results[trophy_type] = 1