mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
# Conflicts: # _maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm # _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # _maps/map_files/tramstation/tramstation.dmm # code/_onclick/hud/new_player.dm # code/datums/components/squashable.dm # code/datums/diseases/advance/symptoms/heal.dm # code/datums/diseases/chronic_illness.dm # code/datums/status_effects/buffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/stamcrit.dm # code/game/machinery/computer/crew.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/wall_mounted.dm # code/game/turfs/closed/indestructible.dm # code/modules/admin/view_variables/filterrific.dm # code/modules/antagonists/heretic/influences.dm # code/modules/cargo/orderconsole.dm # code/modules/client/preferences.dm # code/modules/events/space_vines/vine_mutations.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/carbon/human/death.dm # code/modules/mob/living/carbon/human/species_types/jellypeople.dm # code/modules/mob/living/damage_procs.dm # code/modules/mob/living/living.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mob_spawn/mob_spawn.dm # code/modules/projectiles/ammunition/energy/laser.dm # code/modules/projectiles/guns/ballistic/launchers.dm # code/modules/projectiles/guns/energy/laser.dm # code/modules/reagents/chemistry/machinery/chem_dispenser.dm # code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/medicine_reagents.dm # code/modules/surgery/healing.dm # code/modules/unit_tests/designs.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # tgui/packages/tgui/interfaces/ChemDispenser.tsx
27 lines
988 B
Plaintext
27 lines
988 B
Plaintext
// Make disposal pipes hurt you if you ride them.
|
|
|
|
/obj/structure/disposalpipe
|
|
// Set this to true if you want a disposal pipe to deal no damage.
|
|
var/padded_corners = FALSE
|
|
|
|
/obj/structure/disposalpipe/transfer_to_dir(obj/structure/disposalholder/holder, nextdir)
|
|
|
|
if(padded_corners || !holder || !holder.hasmob || holder.dir == nextdir || prob(80)) //Disposals optimization.
|
|
return ..()
|
|
|
|
. = ..() //We don't put this at the start of the the proc in case the direction of the holder changes.
|
|
|
|
var/did_damage = FALSE
|
|
for(var/mob/living/found_victim in holder.contents)
|
|
if(found_victim.stat >= HARD_CRIT) //Hard crit or worse.
|
|
continue
|
|
if(HAS_TRAIT(found_victim, TRAIT_TRASHMAN))
|
|
continue
|
|
//Moon has ~100 disposal corners if you fall in the main loop, worst case scenario.
|
|
//20% * 100 * 4 = 80 damage.
|
|
found_victim.adjust_brute_loss(4)
|
|
did_damage = TRUE
|
|
|
|
if(did_damage)
|
|
playsound(src, 'modular_zubbers/code/modules/emotes/sound/effects/bonk.ogg', 25, TRUE, -1)
|