pre attack refactor
This commit is contained in:
@@ -344,7 +344,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe, /obj/structure/window, /obj/structure/grille))
|
||||
var/can_make_pipe = (isturf(A) || is_type_in_typecache(A, make_pipe_whitelist))
|
||||
|
||||
. = FALSE
|
||||
. = TRUE
|
||||
|
||||
if((mode&DESTROY_MODE) && istype(A, /obj/item/pipe) || istype(A, /obj/structure/disposalconstruct) || istype(A, /obj/structure/c_transit_tube) || istype(A, /obj/structure/c_transit_tube_pod) || istype(A, /obj/item/pipe_meter))
|
||||
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/obj/item/hand_tele/pre_attack(atom/target, mob/user, params)
|
||||
if(try_dispel_portal(target, user))
|
||||
return FALSE
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/hand_tele/proc/try_dispel_portal(atom/target, mob/user)
|
||||
|
||||
Reference in New Issue
Block a user