mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] some istype to macros (#9802)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73486c399b
commit
ed79946ade
@@ -253,7 +253,7 @@
|
||||
|
||||
/obj/machinery/power/am_control_unit/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon/ai))
|
||||
if(!isAI(user))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=AMcontrol")
|
||||
return
|
||||
@@ -293,7 +293,7 @@
|
||||
/obj/machinery/power/am_control_unit/Topic(href, href_list)
|
||||
..()
|
||||
//Ignore input if we are broken or guy is not touching us, AI can control from a ways away
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon/ai)))
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !isAI(usr)))
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=AMcontrol")
|
||||
return
|
||||
|
||||
@@ -736,7 +736,7 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
add_fingerprint(user)
|
||||
|
||||
//Human mob special interaction goes here.
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.species.can_shred(H))
|
||||
@@ -785,7 +785,7 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
if(wiresexposed && !istype(user, /mob/living/silicon/ai))
|
||||
if(wiresexposed && !isAI(user))
|
||||
wires.Interact(user)
|
||||
return //The panel is visibly dark when the wires are exposed, so we shouldn't be able to interact with it.
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ var/list/fusion_reactions
|
||||
for(var/mob/living/mob in living_mob_list)
|
||||
var/turf/T = get_turf(mob)
|
||||
if(T && (holder.z == T.z))
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
if(ishuman(mob))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
H.hallucination += rand(100,150)
|
||||
|
||||
|
||||
@@ -787,7 +787,7 @@ var/global/list/light_type_cache = list()
|
||||
to_chat(user, "There is no [get_fitting_name()] in this light.")
|
||||
return
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(H))
|
||||
user.setClickCooldown(user.get_attack_speed())
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
proc
|
||||
interact(mob/user)
|
||||
if (get_dist(src, user) > 1 )
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
if (!isAI(user))
|
||||
user.machine = null
|
||||
user << browse(null, "window=port_gen")
|
||||
return
|
||||
|
||||
@@ -324,9 +324,9 @@
|
||||
|
||||
data["active"] = active
|
||||
|
||||
if(istype(user, /mob/living/silicon/ai))
|
||||
if(isAI(user))
|
||||
data["is_ai"] = TRUE
|
||||
else if(istype(user, /mob/living/silicon/robot) && !Adjacent(user))
|
||||
else if(isrobot(user) && !Adjacent(user))
|
||||
data["is_ai"] = TRUE
|
||||
else
|
||||
data["is_ai"] = FALSE
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
//If following checks determine user is protected we won't alarm for long.
|
||||
if(PN)
|
||||
PN.trigger_warning(5)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.siemens_coefficient <= 0)
|
||||
return
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
log_debug("DEBUG: HasProximity called without reference on [src].")
|
||||
return
|
||||
// CHOMPEdit End
|
||||
if(!istype(AM, /mob/living) || AM:incorporeal_move)
|
||||
if(!isliving(AM) || AM:incorporeal_move)
|
||||
return 0
|
||||
if(!(get_dir(src,AM) in shockdirs))
|
||||
return 0
|
||||
|
||||
@@ -424,7 +424,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
if(M.status_flags & GODMODE)
|
||||
continue
|
||||
if(M.stat == CONSCIOUS)
|
||||
if (istype(M,/mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.glasses,/obj/item/clothing/glasses/meson) && current_size != STAGE_SUPER)
|
||||
to_chat(H, span_notice("You look directly into The [src.name], good thing you had your protective eyewear on!"))
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
to_chat(usr, span_warning("Connection error: Destination Unreachable."))
|
||||
|
||||
// Cyborgs standing next to the SMES can play with the wiring.
|
||||
if(istype(usr, /mob/living/silicon/robot) && Adjacent(usr) && panel_open)
|
||||
if(isrobot(usr) && Adjacent(usr) && panel_open)
|
||||
wires.Interact(usr)
|
||||
|
||||
// Proc: New()
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
if((damage > emergency_point) && !public_alert)
|
||||
global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor")
|
||||
for(var/mob/M in player_list) // Rykka adds SM Delam alarm
|
||||
if(!istype(M,/mob/new_player) && !isdeaf(M)) // Rykka adds SM Delam alarm
|
||||
if(!isnewplayer(M) && !isdeaf(M)) // Rykka adds SM Delam alarm
|
||||
M << message_sound // Rykka adds SM Delam alarm
|
||||
admin_chat_message(message = "SUPERMATTER DELAMINATING!", color = "#FF2222") //VOREStation Add
|
||||
public_alert = 1
|
||||
@@ -561,7 +561,7 @@
|
||||
/obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect))
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
var/datum/gender/T = gender_datums[M.get_visible_gender()]
|
||||
AM.visible_message(span_warning("\The [AM] slams into \the [src] inducing a resonance... [T.his] body starts to glow and catch flame before flashing into ash."),\
|
||||
|
||||
Reference in New Issue
Block a user