mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Refactors throwing (#25946)
* refactors datum/thrownthing * cleanup * lewc review * calling parent doesn't do anything lmao
This commit is contained in:
@@ -87,7 +87,8 @@
|
||||
|
||||
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(isitem(AM) && !isprojectile(AM))
|
||||
if(prob(50) || HAS_TRAIT(throwingdatum.thrower, TRAIT_BADASS))
|
||||
var/atom/movable/thrower = throwingdatum?.get_thrower()
|
||||
if(prob(50) || HAS_TRAIT(thrower, TRAIT_BADASS))
|
||||
AM.forceMove(get_turf(src))
|
||||
visible_message("<span class='notice'>Swish! [AM] lands in [src].</span>")
|
||||
else
|
||||
|
||||
@@ -210,8 +210,8 @@
|
||||
var/mob/living/victim = hit_atom
|
||||
if(victim.incorporeal_move || victim.status_flags & GODMODE || HAS_TRAIT(victim, TRAIT_SUPERMATTER_IMMUNE)) //try to keep this in sync with supermatter's consume fail conditions
|
||||
return ..()
|
||||
if(throwingdatum?.thrower)
|
||||
var/mob/user = throwingdatum.thrower
|
||||
var/mob/user = throwingdatum?.get_thrower()
|
||||
if(user)
|
||||
add_attack_logs(user, victim, "[victim] consumed by [src] thrown by [user] ")
|
||||
message_admins("[src] has consumed [key_name_admin(victim)] [ADMIN_JMP(src)], thrown by [key_name_admin(user)].")
|
||||
investigate_log("has consumed [key_name(victim)], thrown by [key_name(user)]", "supermatter")
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
self_hurt = TRUE
|
||||
..()
|
||||
if(shattered)
|
||||
C.throw_at(throwingdatum.target, throwingdatum.maxrange - 1, throwingdatum.speed - 1) //Annnnnnnd yeet them into space, but slower, now that everything is dealt with
|
||||
C.throw_at(locateUID(throwingdatum.initial_target_uid), throwingdatum.maxrange - 1, throwingdatum.speed - 1) //Annnnnnnd yeet them into space, but slower, now that everything is dealt with
|
||||
|
||||
/obj/structure/window/GetExplosionBlock()
|
||||
return reinf && fulltile ? real_explosion_block : 0
|
||||
|
||||
Reference in New Issue
Block a user