mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 09:03:23 +01:00
Getting thrown into things actually hurts now [ready for review] (#21022)
* Getting thrown into things actually hurts now * add the blob one too dingus * more changes consoles windows ect * fucking hell one sec * now up to date * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * early returns * rename of proc --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -268,6 +268,10 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
return B.blob_reagent_datum.description
|
||||
return "something unknown"
|
||||
|
||||
/obj/structure/blob/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
|
||||
damage *= 0.25 // Lets not have sorium be too much of a blender / rapidly kill itself
|
||||
return ..()
|
||||
|
||||
/obj/structure/blob/normal
|
||||
icon_state = "blob"
|
||||
light_range = 0
|
||||
|
||||
@@ -612,31 +612,13 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
|
||||
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100, TRUE)
|
||||
return
|
||||
|
||||
var/hurt = TRUE
|
||||
var/damage = 10 + 1.5 * speed // speed while thrower is standing still is 2, while walking with an aggressive grab is 2.4, highest speed is 14
|
||||
/*if(istype(throwingdatum, /datum/thrownthing))
|
||||
var/datum/thrownthing/D = throwingdatum
|
||||
if(isrobot(D.thrower))
|
||||
var/mob/living/silicon/robot/R = D.thrower
|
||||
if(!R.emagged)
|
||||
hurt = FALSE*/
|
||||
if(hit_atom.density && isturf(hit_atom))
|
||||
if(hurt)
|
||||
visible_message("<span class='danger'>[src] slams into [hit_atom]!</span>", "<span class='userdanger'>You slam into [hit_atom]!</span>")
|
||||
take_organ_damage(damage)
|
||||
KnockDown(3 SECONDS)
|
||||
playsound(src, 'sound/weapons/punch1.ogg', 35, 1)
|
||||
if(iscarbon(hit_atom) && hit_atom != src)
|
||||
var/mob/living/carbon/victim = hit_atom
|
||||
if(victim.flying)
|
||||
return
|
||||
if(hurt)
|
||||
victim.take_organ_damage(damage)
|
||||
take_organ_damage(damage)
|
||||
victim.KnockDown(3 SECONDS)
|
||||
KnockDown(3 SECONDS)
|
||||
visible_message("<span class='danger'>[src] crashes into [victim], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [victim]!</span>")
|
||||
playsound(src, 'sound/weapons/punch1.ogg', 50, 1)
|
||||
|
||||
hit_atom.hit_by_thrown_carbon(src, throwingdatum, damage, FALSE, FALSE)
|
||||
|
||||
/mob/living/carbon/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
|
||||
. = ..()
|
||||
KnockDown(3 SECONDS)
|
||||
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
if(in_throw_mode)
|
||||
|
||||
@@ -1139,3 +1139,15 @@
|
||||
/mob/living/throw_at(atom/target, range, speed, mob/thrower, spin, diagonals_first, datum/callback/callback, force, dodgeable)
|
||||
stop_pulling()
|
||||
return ..()
|
||||
|
||||
/mob/living/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
|
||||
if(C == src || flying || !density)
|
||||
return
|
||||
playsound(src, 'sound/weapons/punch1.ogg', 50, 1)
|
||||
if(mob_hurt)
|
||||
return
|
||||
if(!self_hurt)
|
||||
take_organ_damage(damage)
|
||||
C.take_organ_damage(damage)
|
||||
C.KnockDown(3 SECONDS)
|
||||
C.visible_message("<span class='danger'>[C] crashes into [src], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [src]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user