mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Replaces "istype"s with is_helpers macros (#28676)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(loc)
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/digester = loc
|
||||
digester.stomach_contents += gib
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return
|
||||
if(isobserver(H) && !affect_ghosts)
|
||||
return
|
||||
if(!istype(H, /mob) && mobs_only)
|
||||
if(!ismob(H) && mobs_only)
|
||||
return
|
||||
Trigger(H)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !istype(A, /atom/movable))
|
||||
if(!A || !ismovableatom(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
/proc/create_area(mob/living/creator)
|
||||
var/res = detect_room(get_turf(creator))
|
||||
if(!istype(res,/list))
|
||||
if(!islist(res))
|
||||
switch(res)
|
||||
if(ROOM_ERR_SPACE)
|
||||
to_chat(creator, "<span class='warning'>The new area must be completely airtight.</span>")
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(!check_sprite(target))
|
||||
return
|
||||
if(!active_dummy)
|
||||
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
|
||||
if(isitem(target) && !istype(target, /obj/item/weapon/disk/nuclear))
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
||||
var/obj/temp = new/obj()
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon))
|
||||
if(!iscarbon(usr))
|
||||
to_chat(usr, "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>")
|
||||
else
|
||||
var/mob/living/carbon/M = usr
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
sigdev = new
|
||||
sigdev.code = roundstart_signaller_code
|
||||
sigdev.frequency = roundstart_signaller_freq
|
||||
if(istype(loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
hide(TRUE)
|
||||
|
||||
/obj/item/device/pressure_plate/Crossed(atom/movable/AM)
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
on = !( on )
|
||||
icon_state = "electropack[on]"
|
||||
if(!( master ))
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
if(istype(master.loc, /mob))
|
||||
if(ismob(master.loc))
|
||||
attack_self(master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, master))
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
|
||||
return
|
||||
|
||||
if(!istype(M, /mob/living/carbon) && !istype(M, /mob/living/simple_animal))
|
||||
if(!iscarbon(M) && !isanimal(M))
|
||||
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
|
||||
return 1
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
if(user)
|
||||
if (M != user)
|
||||
if (istype(M, /mob/living/simple_animal))
|
||||
if (isanimal(M))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
if(new_item.amount <= 0)//if the stack is empty, i.e it has been merged with an existing stack and has been garbage collected
|
||||
return
|
||||
|
||||
if (istype(O,/obj/item))
|
||||
if (isitem(O))
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(I, /obj/item) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
if(isitem(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if(target.anchored)
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item))
|
||||
if(isitem(target))
|
||||
var/obj/item/I = target
|
||||
if(!I.can_be_package_wrapped())
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(!open)
|
||||
return
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
else
|
||||
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(istype(C, /mob/living/carbon/monkey) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
if(ismonkey(C) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = C
|
||||
M.retaliate(user)
|
||||
@@ -303,7 +303,7 @@
|
||||
addtimer(CALLBACK(src, .proc/dissipate), 100)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
if(!istype(loc, /mob))
|
||||
if(!ismob(loc))
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
|
||||
usr.set_machine(src)
|
||||
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
updateTank(tank, 1, user)
|
||||
else if(loadedWeightClass >= maxWeightClass)
|
||||
to_chat(user, "<span class='warning'>\The [src] can't hold any more items!</span>")
|
||||
else if(istype(W, /obj/item))
|
||||
else if(isitem(W))
|
||||
var/obj/item/IW = W
|
||||
load_item(IW, user)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(istype(X, /atom/movable))
|
||||
if(ismovableatom(X))
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/storage/MouseDrop_T(atom/movable/O, mob/user)
|
||||
if(istype(O, /obj/item))
|
||||
if(isitem(O))
|
||||
var/obj/item/I = O
|
||||
if(iscarbon(user) || isdrone(user))
|
||||
var/mob/living/L = user
|
||||
|
||||
@@ -114,7 +114,7 @@ Frequency:
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
if (ismob(src.loc))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
|
||||
@@ -622,7 +622,7 @@
|
||||
/obj/item/weapon/twohanded/pitchfork/demonic/ascended/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !wielded)
|
||||
return
|
||||
if(istype(target, /turf/closed/wall))
|
||||
if(iswallturf(target))
|
||||
var/turf/closed/wall/W = target
|
||||
user.visible_message("<span class='danger'>[user] blasts \the [target] with \the [src]!</span>")
|
||||
playsound(target, 'sound/magic/disintegrate.ogg', 100, 1)
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
var/actuallyismob = 0
|
||||
if(isliving(O))
|
||||
actuallyismob = 1
|
||||
else if(!istype(O, /obj/item))
|
||||
else if(!isitem(O))
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/targets = list(O, src)
|
||||
@@ -355,7 +355,7 @@
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened)
|
||||
return
|
||||
if(istype(loc, /atom/movable))
|
||||
if(ismovableatom(loc))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
|
||||
@@ -276,7 +276,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!istype(O, /atom/movable) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
if(!ismob(O))
|
||||
if(!istype(O, /obj/structure/closet/body_bag))
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
/obj/machinery/shower/proc/wash_obj(atom/movable/O)
|
||||
O.clean_blood()
|
||||
|
||||
if(istype(O,/obj/item))
|
||||
if(isitem(O))
|
||||
var/obj/item/I = O
|
||||
I.acid_level = 0
|
||||
I.extinguish()
|
||||
|
||||
Reference in New Issue
Block a user