mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Replaces "istype"s with is_helpers macros (#28676)
This commit is contained in:
@@ -13,7 +13,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
|
||||
|
||||
if(perfectcopy && O && original)
|
||||
for(var/V in original.vars - GLOB.duplicate_forbidden_vars)
|
||||
if(istype(original.vars[V],/list))
|
||||
if(islist(original.vars[V]))
|
||||
var/list/L = original.vars[V]
|
||||
O.vars[V] = L.Copy()
|
||||
else if(istype(original.vars[V],/datum))
|
||||
@@ -21,12 +21,12 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
|
||||
else
|
||||
O.vars[V] = original.vars[V]
|
||||
|
||||
if(istype(O, /obj))
|
||||
if(isobj(O))
|
||||
var/obj/N = O
|
||||
if(holoitem)
|
||||
N.resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF // holoitems do not burn
|
||||
|
||||
if(nerf && istype(O,/obj/item))
|
||||
if(nerf && isitem(O))
|
||||
var/obj/item/I = O
|
||||
I.damtype = STAMINA // thou shalt not
|
||||
|
||||
@@ -98,12 +98,12 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
|
||||
|
||||
for(var/obj/O in T)
|
||||
var/obj/O2 = DuplicateObject(O , perfectcopy=TRUE, newloc = B, nerf=nerf_weapons, holoitem=TRUE)
|
||||
if(!O2)
|
||||
if(!O2)
|
||||
continue
|
||||
copiedobjs += O2.GetAllContents()
|
||||
|
||||
for(var/mob/M in T)
|
||||
if(istype(M, /mob/camera))
|
||||
if(istype(M, /mob/camera))
|
||||
continue // If we need to check for more mobs, I'll add a variable
|
||||
var/mob/SM = DuplicateObject(M , perfectcopy=TRUE, newloc = B, holoitem=TRUE)
|
||||
copiedobjs += SM.GetAllContents()
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
/obj/machinery/computer/holodeck/proc/derez(var/obj/obj, var/silent = 1, var/forced = 0)
|
||||
// Emagging a machine creates an anomaly in the derez systems.
|
||||
if(obj && src.emagged && !src.stat && !forced)
|
||||
if((ismob(obj) || istype(obj.loc,/mob)) && prob(50))
|
||||
if((ismob(obj) || ismob(obj.loc)) && prob(50))
|
||||
spawn(50) .(obj,silent) // may last a disturbingly long time
|
||||
return
|
||||
spawned.Remove(obj)
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if (istype(mover,/obj/item) && mover.throwing)
|
||||
if (isitem(mover) && mover.throwing)
|
||||
var/obj/item/I = mover
|
||||
if(istype(I, /obj/item/projectile))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user