mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +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
@@ -53,7 +53,7 @@
|
||||
starts_with = null
|
||||
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
if(istype(loc, /mob/living)) return
|
||||
if(isliving(loc)) return
|
||||
var/obj/item/I
|
||||
for(I in loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
@@ -554,7 +554,7 @@
|
||||
set category = "Object"
|
||||
set name = "Devour Occupants" //ChompEDIT vore as a verb is cronge
|
||||
|
||||
if(!istype(usr, /mob/living)) //no ghosts
|
||||
if(!isliving(usr)) //no ghosts
|
||||
return
|
||||
|
||||
if(!(usr in src.contents))
|
||||
@@ -564,7 +564,7 @@
|
||||
var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT.
|
||||
|
||||
for(var/mob/living/L in src.contents)
|
||||
if(!istype(L, /mob/living)) //Don't eat anything that isn't mob/living. Failsafe.
|
||||
if(!isliving(L)) //Don't eat anything that isn't mob/living. Failsafe.
|
||||
continue
|
||||
if(L == usr) //no eating yourself. 1984.
|
||||
continue
|
||||
@@ -580,7 +580,7 @@
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(!istype(target, /mob/living)) //Safety.
|
||||
if(!isliving(target)) //Safety.
|
||||
to_chat(src, span_warning("You need to select a living target!"))
|
||||
return
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to
|
||||
if (isAI(user)) //Added by Strumpetplaya - AI shouldn't be able to
|
||||
return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc)
|
||||
if(!amount)
|
||||
to_chat(user, "<spawn class='notice'>It's empty..")
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
if(gargoyle.adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist))
|
||||
gargoyle.hitby(AM, speed)
|
||||
return
|
||||
else if(istype(AM,/mob/living) && gargoyle)
|
||||
else if(isliving(AM) && gargoyle)
|
||||
var/mob/living/L = AM
|
||||
if(gargoyle.throw_vore && L.throw_vore && gargoyle.can_be_drop_pred && L.can_be_drop_prey)
|
||||
var/drop_prey_temp = FALSE
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
var/damage_dealt = 1
|
||||
var/attack_message = "kicks"
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(H))
|
||||
attack_message = "mangles"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(!istype(victim))
|
||||
return
|
||||
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(istype(H.species, /datum/species/monkey))
|
||||
meat_type = H.species.meat_type
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
set name = "Toggle IV Mode"
|
||||
set src in view(1)
|
||||
|
||||
if(!istype(usr, /mob/living))
|
||||
if(!isliving(usr))
|
||||
to_chat(usr, span_warning("You can't do that."))
|
||||
return
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!(I in allowed_items))
|
||||
to_chat(user, span_notice("\The [src] cannot cremate while there are items inside!"))
|
||||
return
|
||||
if(istype(I, /mob/living))
|
||||
if(isliving(I))
|
||||
var/mob/living/cremated = I
|
||||
for(var/Z in cremated.contents)
|
||||
if(!(Z in allowed_items))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/list/active_beams
|
||||
|
||||
/obj/structure/cult/pylon/swarm/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /mob/living))
|
||||
if(isliving(mover))
|
||||
var/mob/living/L = mover
|
||||
if(L.faction == FACTION_SWARMER)
|
||||
return TRUE
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
// Handle harm intent grabbing/tabling.
|
||||
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
if (isliving(G.affecting))
|
||||
var/mob/living/M = G.affecting
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#undef NEST_RESIST_TIME
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || ispAI(user) )
|
||||
return
|
||||
|
||||
unbuckle_mob()
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
occupant.apply_effect(6, STUTTER, blocked)
|
||||
occupant.apply_damage(10, BRUTE, def_zone, blocked, soaked)
|
||||
playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/victim = A
|
||||
def_zone = ran_zone()
|
||||
blocked = victim.run_armor_check(def_zone, "melee")
|
||||
|
||||
@@ -73,7 +73,7 @@ var/global/list/stool_cache = list() //haha stool
|
||||
update_icon()
|
||||
|
||||
/obj/item/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
if (prob(5) && isliving(M))
|
||||
user.visible_message(span_danger("[user] breaks [src] over [M]'s back!"))
|
||||
user.setClickCooldown(user.get_attack_speed())
|
||||
user.do_attack_animation(M)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
occupant.apply_effect(6, STUTTER, blocked)
|
||||
occupant.apply_damage(10, BRUTE, def_zone, soaked)
|
||||
playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/victim = A
|
||||
def_zone = ran_zone()
|
||||
blocked = victim.run_armor_check(def_zone, "melee")
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
else if (user.a_intent == I_HURT)
|
||||
|
||||
if (istype(user,/mob/living/carbon/human))
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(H))
|
||||
attack_generic(H,25)
|
||||
@@ -247,7 +247,7 @@
|
||||
// Slamming.
|
||||
if (istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/grab/G = W
|
||||
if(istype(G.affecting,/mob/living))
|
||||
if(isliving(G.affecting))
|
||||
var/mob/living/M = G.affecting
|
||||
var/state = G.state
|
||||
qdel(W) //gotta delete it here because if window breaks, it won't get deleted
|
||||
|
||||
Reference in New Issue
Block a user