diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index bcdb727781f3..dfccaa1320c3 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -350,7 +350,7 @@ continue else if(human_check && !ishuman(M)) continue - else if(istype(M, /mob/new_player)) // exclude people in the lobby + else if(isnewplayer(M)) // exclude people in the lobby continue else if(isobserver(M)) // Ghosts are fine if they were playing once (didn't start as observers) var/mob/dead/observer/O = M diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 244229615b2b..b524a6144983 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -360,7 +360,7 @@ Proc for attack log creation, because really why not var/adminoverride = 0 if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD)) adminoverride = 1 - if(istype(M, /mob/new_player) && !adminoverride) + if(isnewplayer(M) && !adminoverride) continue if(M.stat != DEAD && !adminoverride) continue @@ -375,7 +375,7 @@ Proc for attack log creation, because really why not if(prefs.toggles & DISABLE_ARRIVALRATTLE) continue - if(istype(M, /mob/dead/observer) && follow_target) + if(isobserver(M) && follow_target) var/link = FOLLOW_LINK(M, follow_target) M << "[link] [message]" else diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index cb46d3f136c0..5a0316437336 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -234,7 +234,7 @@ var/datum/subsystem/shuttle/SSshuttle var/callShuttle = 1 for(var/thing in shuttle_caller_list) - if(istype(thing, /mob/living/silicon/ai)) + if(isAI(thing)) var/mob/living/silicon/ai/AI = thing if(AI.stat || !AI.client) continue diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 4294595a0a75..8719dc10b25d 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -349,7 +349,7 @@ var/datum/subsystem/ticker/ticker SSjob.EquipRank(player, player.mind.assigned_role, 0) if(captainless) for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) + if(!isnewplayer(M)) M << "Captainship not forced on anyone." diff --git a/code/datums/diseases/magnitis.dm b/code/datums/diseases/magnitis.dm index 769495d1ac21..9518156f582f 100644 --- a/code/datums/diseases/magnitis.dm +++ b/code/datums/diseases/magnitis.dm @@ -22,7 +22,8 @@ if(!M.anchored && (M.flags & CONDUCT)) step_towards(M,affected_mob) for(var/mob/living/silicon/S in orange(2,affected_mob)) - if(istype(S, /mob/living/silicon/ai)) continue + if(isAI(S)) + continue step_towards(S,affected_mob) if(3) if(prob(2)) @@ -37,7 +38,8 @@ for(i=0,iYou hold \the [itemname] up to the camera..." U.changeNext_move(CLICK_CD_MELEE) for(var/mob/O in player_list) - if(istype(O, /mob/living/silicon/ai)) + if(isAI(O)) var/mob/living/silicon/ai/AI = O if(AI.control_disabled || (AI.stat == DEAD)) return diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 4b6b1e4ce71c..e540942b4905 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -25,7 +25,8 @@ lostTarget(target) /obj/machinery/camera/proc/newTarget(mob/target) - if (istype(target, /mob/living/silicon/ai)) return 0 + if(isAI(target)) + return 0 if (detectTime == 0) detectTime = world.time // start the clock if (!(target in motionTargets)) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index ba4fbd860ee8..65368175f4e8 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -337,7 +337,7 @@ var/time_last_changed_position = 0 scan = I authenticated = 0 if ("auth") - if ((!( authenticated ) && (scan || (istype(usr, /mob/living/silicon))) && (modify || mode))) + if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode))) if (check_access(scan)) region_access = list() head_subordinates = list() @@ -368,7 +368,7 @@ var/time_last_changed_position = 0 get_subordinates("Chief Engineer") if(region_access) authenticated = 1 - else if ((!( authenticated ) && (istype(usr, /mob/living/silicon))) && (!modify)) + else if ((!( authenticated ) && issilicon(usr)) && (!modify)) usr << "You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in." if ("logout") region_access = null @@ -417,7 +417,7 @@ var/time_last_changed_position = 0 if (authenticated) var/t2 = modify //var/t1 = input(usr, "What name?", "ID computer", null) as text - if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) + if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc))) var/newName = reject_bad_name(href_list["reg"]) if(newName) modify.registered_name = newName diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 8713750077a7..78b5e0a577f9 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -365,7 +365,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - if (istype(user, /mob/living/silicon)) + if(issilicon(user)) var/dat2 = src.interact_ai(user) // give the AI a different interact proc to limit its access if(dat2) dat += dat2 diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 7df6df633624..a4dee33e6038 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -72,7 +72,7 @@ /obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change) if(!user) return var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window - if(!( in_range(src, user) || istype(user, /mob/living/silicon) )) + if(!(in_range(src, user) || issilicon(user))) popup.close() return popup.add_stylesheet("scannernew", 'html/browser/scannernew.css') @@ -316,7 +316,7 @@ return if(!isturf(usr.loc)) return - if(!( (isturf(loc) && in_range(src, usr)) || istype(usr, /mob/living/silicon) )) + if(!((isturf(loc) && in_range(src, usr)) || issilicon(usr))) return if(current_screen == "working") return diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index c9d112e27e93..5d5ea0d6a07b 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -206,7 +206,7 @@ if(!(active2 in data_core.medical)) src.active2 = null - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr)) usr.set_machine(src) if(href_list["temp"]) src.temp = null @@ -243,7 +243,7 @@ sortBy = href_list["sort"] order = initial(order) else if(href_list["login"]) - if(istype(usr, /mob/living/silicon)) + if(issilicon(usr)) src.active1 = null src.active2 = null src.authenticated = 1 diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index b277e7b5e8d1..baef6d418263 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -131,7 +131,7 @@ dat += "" //Hacking screen. if(2) - if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) + if(isAI(user) || iscyborg(user)) dat += "Brute-forcing for server key.
It will take 20 seconds for every character that the password has." dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time." else @@ -247,7 +247,7 @@ if(..()) return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) //Authenticate if (href_list["auth"]) if(!linkedServer || linkedServer.stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 8d503badceaf..2b26f1e35829 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -88,7 +88,7 @@ /obj/machinery/computer/pod/Topic(href, href_list) if(..()) return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) usr.set_machine(src) if(href_list["power"]) var/t = text2num(href_list["power"]) diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 9858e48f257b..583b4cf8f14d 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -88,7 +88,7 @@ /obj/machinery/computer/prisoner/Topic(href, href_list) if(..()) return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) usr.set_machine(src) if(href_list["id"]) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 4dda0b11057c..f22497b08c2e 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -13,10 +13,10 @@ /obj/machinery/computer/robotics/proc/can_control(mob/user, mob/living/silicon/robot/R) if(!istype(R)) return 0 - if(istype(user, /mob/living/silicon/ai)) + if(isAI(user)) if (R.connected_ai != user) return 0 - if(istype(user, /mob/living/silicon/robot)) + if(iscyborg(user)) if (R != user) return 0 if(R.scrambledcodes) @@ -59,7 +59,7 @@ dat += " Slaved to [R.connected_ai.name] |" else dat += " Independent from AI |" - if (istype(user, /mob/living/silicon) || IsAdminGhost(user)) + if(issilicon(user) || IsAdminGhost(user)) if(((issilicon(user) && is_special_character(user)) || IsAdminGhost(user)) && !R.emagged && (user != R || R.syndicate)) dat += "(Hack) " dat += "([R.canmove ? "Lockdown" : "Release"]) " diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index a742d120f0b9..05c689e7ea71 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -269,7 +269,7 @@ What a mess.*/ active1 = null if(!( data_core.security.Find(active2) )) active2 = null - if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr)) usr.set_machine(src) switch(href_list["choice"]) // SORTING! @@ -315,7 +315,7 @@ What a mess.*/ active2 = null if("Log In") - if(istype(usr, /mob/living/silicon)) + if(issilicon(usr)) var/mob/living/silicon/borg = usr active1 = null active2 = null @@ -734,7 +734,7 @@ What a mess.*/ /obj/machinery/computer/secure_data/proc/get_photo(mob/user) var/obj/item/weapon/photo/P = null - if(istype(user, /mob/living/silicon)) + if(issilicon(user)) var/mob/living/silicon/tempAI = user var/datum/picture/selection = tempAI.GetPhoto() if(selection) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 89e3a0ffdb43..4a53e8e7d531 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -599,7 +599,7 @@ var/list/airlock_overlays = list() return src.attack_hand(user) /obj/machinery/door/airlock/attack_hand(mob/user) - if(!(istype(user, /mob/living/silicon) || IsAdminGhost(user))) + if(!(issilicon(user) || IsAdminGhost(user))) if(src.isElectrified()) if(src.shock(user, 100)) return @@ -644,7 +644,7 @@ var/list/airlock_overlays = list() - if((istype(usr, /mob/living/silicon) && src.canAIControl(usr)) || IsAdminGhost(usr)) + if((issilicon(usr) && src.canAIControl(usr)) || IsAdminGhost(usr)) //AI //aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door, 8 door safties, 9 door speed, 11 emergency access //aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door, 8 door safties, 9 door speed, 11 emergency access diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 9d6f5fc555e0..e487e65223d0 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -192,7 +192,8 @@ step_towards(M, center) for(var/mob/living/silicon/S in orange(magnetic_field, center)) - if(istype(S, /mob/living/silicon/ai)) continue + if(isAI(S)) + continue step_towards(S, center) use_power(electricity_level * 5) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index fb778f0be608..43dea27aad0a 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -512,7 +512,7 @@ var/list/obj/machinery/newscaster/allCasters = list() /obj/machinery/newscaster/Topic(href, href_list) if(..()) return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon))) + if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(loc))) || issilicon(usr)) usr.set_machine(src) scan_user(usr) if(href_list["set_channel_name"]) @@ -797,15 +797,15 @@ var/list/obj/machinery/newscaster/allCasters = list() if(!user.drop_item()) return photo.loc = src - if(istype(user,/mob/living/silicon)) + if(issilicon(user)) var/list/nametemp = list() var/find var/datum/picture/selection var/obj/item/device/camera/siliconcam/targetcam = null - if(istype(user,/mob/living/silicon/ai)) + if(isAI(user)) var/mob/living/silicon/ai/R = user targetcam = R.aicamera - else if(istype(user,/mob/living/silicon/robot)) + else if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(R.connected_ai) targetcam = R.connected_ai.aicamera @@ -846,7 +846,7 @@ var/list/obj/machinery/newscaster/allCasters = list() scanned_user ="Unknown" else scanned_user ="Unknown" - else if(istype(user,/mob/living/silicon)) + else if(issilicon(user)) var/mob/living/silicon/ai_user = user scanned_user = "[ai_user.name] ([ai_user.job])" else diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 6afc1d4855c8..b4b048ae15cc 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -742,7 +742,7 @@ user << "You link \the [M.buffer] with \the [src]" return - if (istype(user, /mob/living/silicon)) + if (issilicon(user)) return src.attack_hand(user) if( get_dist(src, user) == 0 ) // trying to unlock the interface @@ -789,10 +789,10 @@ var/area/area = get_area(src) var/t = "" - if(src.locked && (!(istype(user, /mob/living/silicon) || IsAdminGhost(user)))) + if(src.locked && !(issilicon(user) || IsAdminGhost(user))) t += "
Swipe ID card to unlock interface
" else - if (!istype(user, /mob/living/silicon) && !IsAdminGhost(user)) + if(!issilicon(user) && !IsAdminGhost(user)) t += "
Swipe ID card to lock interface
" t += text("Turrets [] - []?
\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable") t += text("Currently set for [] - Change to []?
\n", src.lethal?"lethal":"stun repeatedly", src, src.lethal?"Stun repeatedly":"Lethal") @@ -808,7 +808,7 @@ if(..()) return if (src.locked) - if (!(istype(usr, /mob/living/silicon) || IsAdminGhost(usr))) + if(!(issilicon(usr) || IsAdminGhost(usr))) usr << "Control panel is locked!" return if (href_list["toggleOn"]) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index ec4449127679..39030726ac26 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -313,7 +313,7 @@ if(!anchored) user << "\The [src] needs to be firmly secured to the floor first!" return 1 - if(locked && !istype(user, /mob/living/silicon)) + if(locked && !issilicon(user)) user << "The controls are locked!" return 1 if(power != 1) diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index 478ef77fe6f0..b5af371a2756 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -94,7 +94,7 @@ race = "Artificial Life" language = "Humanoid" //Ais and borgs speak human, and binary isnt picked up. - else if(istype(mobtype, /obj)) + else if(isobj(mobtype)) race = "Machinery" language = race diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 6a58f4a5acc4..16086fc4f7f9 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -410,8 +410,8 @@ if(..()) return - if(istype(usr,/mob/living/silicon)) - if(istype(usr,/mob/living/silicon/robot)) + if(issilicon(usr)) + if(iscyborg(usr)) var/mob/living/silicon/robot/R = usr if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) )) usr << "The vending machine refuses to interface with you, as you are not in its target demographic!" diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 791dd42a8e95..e40f3cbaf698 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -31,7 +31,7 @@ return if(!cargo_holder) return - if(istype(target,/obj)) + if(isobj(target)) var/obj/O = target if(!O.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) @@ -78,9 +78,11 @@ energy_drain = 0 /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target) - if(!action_checks(target)) return - if(!cargo_holder) return - if(istype(target,/obj)) + if(!action_checks(target)) + return + if(!cargo_holder) + return + if(isobj(target)) var/obj/O = target if(!O.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 12e6d5f0005f..62f50eb2c42f 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -550,7 +550,7 @@ obstacle.mech_melee_attack(src) if(!obstacle || (obstacle && !obstacle.density)) step(src,dir) - if(istype(obstacle, /obj)) + if(isobj(obstacle)) var/obj/O = obstacle if(!O.anchored) step(obstacle, dir) diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index 5c2c5ede2ff2..24391c955503 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -111,7 +111,7 @@ else deflection = 100 //will bounce off - if(istype(A, /obj)) + if(isobj(A)) var/obj/O = A if(O.throwforce) visible_message("[name] is hit by [A].") diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 1754dfa6e467..1c21051ab651 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -14,7 +14,7 @@ ..() if(!H) return - if(istype(H, /mob/dead/observer) && !affect_ghosts) + if(isobserver(H) && !affect_ghosts) return if(!istype(H, /mob) && mobs_only) return diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 8300db6ca5f1..fc89e92de9bf 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -110,7 +110,7 @@ /obj/item/device/radio/interact(mob/user) if (..()) return - if(b_stat && !istype(user, /mob/living/silicon/ai)) + if(b_stat && !isAI(user)) wires.interact(user) else ui_interact(user) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index e8a53bdaa110..79f51f68e459 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1035,7 +1035,7 @@ if(!..()) playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1) for(var/mob/M in urange(10, src)) - if(!M.stat && !istype(M, /mob/living/silicon/ai))\ + if(!M.stat && !isAI(M)) shake_camera(M, 3, 1) qdel(src) @@ -1082,7 +1082,7 @@ user.visible_message("[user] presses the big red button.", "You press the button, it plays a loud noise!", "The button clicks loudly.") playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, surround = 0) for(var/mob/M in urange(10, src)) // Checks range - if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI + if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI sleep(8) // Short delay to match up with the explosion sound shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second. diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index a8730411187c..6603dfd69269 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -82,7 +82,7 @@ if ((M.client && M.machine == src)) is_in_use = 1 src.attack_hand(M) - if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot) || IsAdminGhost(usr)) + if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr)) if (!(usr in nearby)) if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. is_in_use = 1 diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 7f1220f9e316..d162b55b7c5e 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -81,7 +81,7 @@ var/adjusted_climb_time = climb_time if(user.restrained()) //climbing takes twice as long when restrained. adjusted_climb_time *= 2 - if(istype(user, /mob/living/carbon/alien)) + if(isalien(user)) adjusted_climb_time *= 0.25 //aliens are terrifyingly fast structureclimber = user if(do_mob(user, user, adjusted_climb_time)) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 50064c3bbc49..8711288b545e 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -34,7 +34,7 @@ var/global/BSACooldown = 0 body += " played by [M.client] " body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]" - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) body += " Hasn't Entered Game " else body += " \[Heal\] " @@ -91,7 +91,7 @@ var/global/BSACooldown = 0 body += "Subtle message" if (M.client) - if(!istype(M, /mob/new_player)) + if(!isnewplayer(M)) body += "

" body += "Transformation:" body += "
" @@ -773,8 +773,8 @@ var/global/BSACooldown = 0 /proc/kick_clients_in_lobby(message, kick_only_afk = 0) var/list/kicked_client_names = list() for(var/client/C in clients) - if(istype(C.mob, /mob/new_player)) - if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk + if(isnewplayer(C.mob)) + if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk continue if(message) C << message diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 43cd0a61fdcc..061209c64db3 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -358,7 +358,7 @@ var/list/admin_verbs_hideable = list( set name = "Aghost" if(!holder) return - if(istype(mob,/mob/dead/observer)) + if(isobserver(mob)) //re-enter var/mob/dead/observer/ghost = mob if(!ghost.mind || !ghost.mind.current) //won't do anything if there is no body @@ -369,7 +369,7 @@ var/list/admin_verbs_hideable = list( ghost.can_reenter_corpse = 1 //force re-entering even when otherwise not possible ghost.reenter_corpse() feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - else if(istype(mob,/mob/new_player)) + else if(isnewplayer(mob)) src << "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first." else //ghostize diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 04c9ed14ae5e..f744922369a8 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -260,7 +260,7 @@ else M_job = "Living" - else if(istype(M,/mob/new_player)) + else if(isnewplayer(M)) M_job = "New player" else if(isobserver(M)) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 613e28ff4efb..a5157a252982 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1339,7 +1339,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1387,7 +1387,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1417,7 +1417,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1447,7 +1447,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1470,7 +1470,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1569,7 +1569,7 @@ return var/mob/M = locate(href_list["makeanimal"]) - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) usr << "This cannot be used on instances of type /mob/new_player." return diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 0b55145c8465..718bc116192e 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -23,9 +23,9 @@ var/list/client/targets[0] for(var/client/T) if(T.mob) - if(istype(T.mob, /mob/new_player)) + if(isnewplayer(T.mob)) targets["(New Player) - [T]"] = T - else if(istype(T.mob, /mob/dead/observer)) + else if(isobserver(T.mob)) targets["[T.mob.name](Ghost) - [T]"] = T else targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 53ba86ca1d56..fe3d5f35575d 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -263,7 +263,7 @@ else if(istype(object,/turf/closed/wall/r_wall)) var/turf/T = object T.ChangeTurf(/turf/closed/wall) - else if(istype(object,/obj)) + else if(isobj(object)) qdel(object) return else if(istype(object,/turf) && alt_click && left_click) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index e152c347d06f..f562ec3bdb75 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -24,7 +24,7 @@ var/rendered = "DEAD: ADMIN([src.holder.fakekey ? pick(nicknames) : src.key]) says, \"[msg]\"" for (var/mob/M in player_list) - if (istype(M, /mob/new_player)) + if(isnewplayer(M)) continue if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above M.show_message(rendered, 2) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 27be73487c41..01bff9da6890 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -280,7 +280,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that alert("That mob doesn't seem to exist, close the panel and try again.") return - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) alert("The mob must not be a new_player.") return @@ -301,7 +301,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available if(!choice) return 0 - if(!istype(choice, /mob/dead/observer)) + if(!isobserver(choice)) var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No") if(confirm != "Yes") return 0 diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index 364a5af47508..39e162e66c28 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -147,32 +147,32 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -227,7 +227,7 @@ M.vars[variable] = new_value CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) new_value = pre_processing @@ -272,7 +272,7 @@ M.vars[variable] = new_value CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) new_value = pre_processing @@ -322,7 +322,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) if(variable=="luminosity") @@ -350,7 +350,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) if(variable=="luminosity") @@ -380,7 +380,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] @@ -399,7 +399,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -423,7 +423,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O.type, /obj)) + else if(isobj(O.type)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] @@ -441,7 +441,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -464,7 +464,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] @@ -483,7 +483,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -496,38 +496,38 @@ CHECK_TICK if(method) - if(istype(O,/mob)) + if(ismob(O)) for(var/mob/M in mob_list) if(istype(M,O.type)) M.on_varedit(variable) CHECK_TICK - else if(istype(O,/obj)) + else if(isobj(O)) for(var/obj/A in world) if(istype(A,O.type)) A.on_varedit(variable) CHECK_TICK - else if(istype(O,/turf)) + else if(isturf(O)) for(var/turf/A in block(locate(1,1,1),locate(world.maxx,world.maxy,world.maxz))) if(istype(A,O.type)) A.on_varedit(variable) CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if(M.type == O.type) M.on_varedit(variable) CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if(A.type == O.type) A.on_varedit(variable) CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if(A.type == O.type) A.on_varedit(variable) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 843edc9bdc2f..8ecbdd3ee97c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -594,7 +594,7 @@ Traitors and the like can also be revived with the previous role mostly intact. log_admin("[key_name(usr)] has gibbed [key_name(M)]") message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]") - if(istype(M, /mob/dead/observer)) + if(isobserver(M)) new /obj/effect/gibspawner/generic(M.loc, M.viruses) return if(confirm == "Yes") diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 7a489bfe815a..4da89a01bc2a 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -12,8 +12,8 @@ anchored = 1 /obj/machinery/artillerycontrol/process() - if(src.reload= 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals countdown += 1 for(var/mob/living/simple_animal/F in living_mob_list) //If you cull the heard before the next replication, things will be easier for you - if(!istype(F, /mob/living/simple_animal/hostile)) + if(!ishostile(F)) new F.type(F.loc) \ No newline at end of file diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index 0065687b1248..10349f42d3f5 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -150,7 +150,7 @@ /obj/machinery/computer/holodeck/Topic(href, list/href_list) if(..()) return - if(!Adjacent(usr) && !istype(usr, /mob/living/silicon)) + if(!Adjacent(usr) && !issilicon(usr)) return usr.set_machine(src) add_fingerprint(usr) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 7e8a209857ee..d9945de3f949 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -104,7 +104,7 @@ return var/datum/browser/popup = new(user, "plantdna", "Plant DNA Manipulator", 450, 600) - if(!( in_range(src, user) || istype(user, /mob/living/silicon) )) + if(!(in_range(src, user) || issilicon(user))) popup.close() return diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 598f97c06401..ed1ee69456ef 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -58,7 +58,7 @@ if(config.revival_pod_plants) if(ckey) for(var/mob/M in player_list) - if(istype(M, /mob/dead/observer)) + if(isobserver(M)) var/mob/dead/observer/O = M if(O.ckey == ckey && O.can_reenter_corpse) make_podman = 1 diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 744b4126cb3e..7b38596b2e37 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -870,7 +870,7 @@ return ..() /obj/machinery/hydroponics/attack_hand(mob/user) - if(istype(user, /mob/living/silicon)) //How does AI know what plant is? + if(issilicon(user)) //How does AI know what plant is? return if(harvest) myseed.harvest(user) diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index 83cec3a131e3..0dfc814eae1e 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -106,8 +106,8 @@ //check if it doesn't require any access at all if(src.check_access(null)) return 1 - if(istype(M, /mob/living/silicon)) - //AI can do whatever he wants + if(issilicon(M)) + //AI can do whatever it wants return 1 if(IsAdminGhost(M)) //Access can't stop the abuse diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm index 076d1a7afe04..276d4d288696 100644 --- a/code/modules/mining/equipment.dm +++ b/code/modules/mining/equipment.dm @@ -294,7 +294,7 @@ if(M.stat == DEAD) M.faction = list("neutral") M.revive(full_heal = 1, admin_revive = 1) - if(istype(target, /mob/living/simple_animal/hostile)) + if(ishostile(target)) var/mob/living/simple_animal/hostile/H = M if(malfunctioning) H.faction |= list("lazarus", "\ref[user]") diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 368f813f2822..88c0e85baf4a 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -440,7 +440,7 @@ if(I) attackby(I,H) return - else if(istype(AM,/mob/living/silicon/robot)) + else if(iscyborg(AM)) var/mob/living/silicon/robot/R = AM if(istype(R.module_active,/obj/item/weapon/pickaxe)) src.attackby(R.module_active,R) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 3f36349ff7fc..932def45a6ac 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -345,7 +345,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" set name = "Teleport" set desc= "Teleport to a location" - if(!istype(usr, /mob/dead/observer)) + if(!isobserver(usr)) usr << "Not when you're not dead!" return var/A @@ -417,7 +417,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Jump to Mob" set desc = "Teleport to a mob" - if(istype(usr, /mob/dead/observer)) //Make sure they're an observer! + if(isobserver(usr)) //Make sure they're an observer! var/list/dest = list() //List of possible destinations (mobs) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index b6ea44474215..a190b47b448e 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -12,7 +12,7 @@ if(radio_freq) var/atom/movable/virtualspeaker/V = speaker - if(istype(V.source, /mob/living/silicon/ai)) + if(isAI(V.source)) var/mob/living/silicon/ai/S = V.source speaker = S.eyeobj else diff --git a/code/modules/mob/living/brain/emote.dm b/code/modules/mob/living/brain/emote.dm index 8ab505f7a9ef..a225c3ad819a 100644 --- a/code/modules/mob/living/brain/emote.dm +++ b/code/modules/mob/living/brain/emote.dm @@ -59,7 +59,7 @@ log_emote("[name]/[key] : [message]") for(var/mob/M in dead_mob_list) - if (!M.client || istype(M, /mob/new_player)) + if (!M.client || isnewplayer(M)) continue //skip monkeys, leavers, and new_players if(M.stat == DEAD && (M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index f7ad95798a5a..e85698618825 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -125,7 +125,7 @@ var/global/posibrain_notif_cooldown = 0 if(!usr || !src) return - if( (usr.disabilities & BLIND || usr.stat) && !istype(usr,/mob/dead/observer) ) + if((usr.disabilities & BLIND || usr.stat) && !isobserver(usr)) usr << "Something is there but you can't see it." return diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index 1f1717517df1..651001d0dfe5 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -188,7 +188,7 @@ // Maybe some people are okay with that. for(var/mob/M in dead_mob_list) - if(!M.client || istype(M, /mob/new_player)) + if(!M.client || isnewplayer(M)) continue //skip monkeys, leavers and new players if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 91b85c8a40a5..a645926076e2 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -364,7 +364,7 @@ // Maybe some people are okay with that. for(var/mob/M in dead_mob_list) - if(!M.client || istype(M, /mob/new_player)) + if(!M.client || isnewplayer(M)) continue //skip monkeys, leavers and new players if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 8145741e009e..856d49a6bb3f 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -212,7 +212,7 @@ if ("pout","pouts") message = "[src] pouts." m_type = 2 - + if ("scream","screams") message = "[src] screams!" m_type = 2 @@ -339,7 +339,7 @@ // Maybe some people are okay with that. for(var/mob/M in dead_mob_list) - if(!M.client || istype(M, /mob/new_player)) + if(!M.client || isnewplayer(M)) continue //skip monkeys, leavers and new players var/T = get_turf(src) if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T,null))) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 0114c3dc9fa4..d778554cc8d9 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -304,7 +304,7 @@ var/list/ai_list = list() /mob/living/silicon/ai/proc/ai_call_shuttle() if(stat == DEAD) return //won't work if dead - if(istype(usr,/mob/living/silicon/ai)) + if(isAI(usr)) var/mob/living/silicon/ai/AI = src if(AI.control_disabled) usr << "Wireless control is disabled!" @@ -343,7 +343,7 @@ var/list/ai_list = list() set category = "Malfunction" if(stat == DEAD) return //won't work if dead - if(istype(usr,/mob/living/silicon/ai)) + if(isAI(usr)) var/mob/living/silicon/ai/AI = src if(AI.control_disabled) src << "Wireless control is disabled!" diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 116fa63d7165..e80591bfadbe 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -42,7 +42,7 @@ return ..() /atom/proc/move_camera_by_click() - if(istype(usr, /mob/living/silicon/ai)) + if(isAI(usr)) var/mob/living/silicon/ai/AI = usr if(AI.eyeobj && AI.client.eye == AI.eyeobj) AI.cameraFollow = null diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index a56ef87aedca..b3a74621c222 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -46,7 +46,7 @@ /mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user) add_fingerprint(user) - if(opened && !wiresexposed && (!istype(user, /mob/living/silicon))) + if(opened && !wiresexposed && !issilicon(user)) if(cell) cell.updateicon() cell.add_fingerprint(user) diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 3a50f6cb7e56..67872852f927 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -5,14 +5,14 @@ /mob/living/proc/robot_talk(message) log_say("[key_name(src)] : [message]") var/desig = "Default Cyborg" //ezmode for taters - if(istype(src, /mob/living/silicon)) + if(issilicon(src)) var/mob/living/silicon/S = src desig = trim_left(S.designation + " " + S.job) var/message_a = say_quote(message, get_spans()) var/rendered = "Robotic Talk, [name] [message_a]" for(var/mob/M in player_list) if(M.binarycheck()) - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) var/renderedAI = "Robotic Talk, [name] ([desig]) [message_a]" M << renderedAI else @@ -21,7 +21,7 @@ var/following = src // If the AI talks on binary chat, we still want to follow // it's camera eye, like if it talked on the radio - if(istype(src, /mob/living/silicon/ai)) + if(isAI(src)) var/mob/living/silicon/ai/ai = src following = ai.eyeobj var/link = FOLLOW_LINK(M, following) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 2d82b9e4a531..5ec565852e50 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -157,10 +157,10 @@ var/global/mulebot_count = 0 wires.cut_random() /mob/living/simple_animal/bot/mulebot/interact(mob/user) - if(open && !istype(user, /mob/living/silicon/ai)) + if(open && !isAI(user)) wires.interact(user) else - if(wires.is_cut(WIRE_RX) && istype(user, /mob/living/silicon/ai)) + if(wires.is_cut(WIRE_RX) && isAI(user)) return ui_interact(user) @@ -636,7 +636,7 @@ var/global/mulebot_count = 0 if(wires.is_cut(WIRE_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs var/mob/M = obs if(ismob(M)) - if(istype(M,/mob/living/silicon/robot)) + if(iscyborg(M)) visible_message("[src] bumps into [M]!") else if(!paicard) @@ -738,7 +738,7 @@ var/global/mulebot_count = 0 unload(get_dir(loc, A)) else ..() - + /mob/living/simple_animal/bot/mulebot/insertpai(mob/user, obj/item/device/paicard/card) if(..()) visible_message("[src] safeties are locked on.") diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index 74fca2da05ed..1aef1490baf1 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -63,7 +63,7 @@ break if(Target in view(1,src)) - if(istype(Target, /mob/living/silicon)) + if(issilicon(Target)) if(!Atkcool) Atkcool = 1 spawn(45) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 95a76f3ddc57..16e9bd9ae775 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -483,7 +483,7 @@ var/next_mob_id = 0 set name = "Observe" set category = "OOC" - if(stat != DEAD || istype(src, /mob/new_player)) + if(stat != DEAD || isnewplayer(src)) usr << "You must be observing to use this!" return @@ -565,7 +565,7 @@ var/next_mob_id = 0 return if(!Adjacent(usr)) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) return show_inv(usr) diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 826b248c60b4..88dbc1e492bb 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -4,8 +4,8 @@ //Note that this proc does NOT do MMI related stuff! /mob/proc/change_mob_type(new_type = null, turf/location = null, new_name = null as text, delete_old_mob = 0 as num) - if(istype(src,/mob/new_player)) - usr << "cannot convert players who have not entered yet." + if(isnewplayer(src)) + usr << "Cannot convert players who have not entered yet." return if(!new_type) @@ -18,8 +18,8 @@ usr << "Invalid type path (new_type = [new_type]) in change_mob_type(). Contact a coder." return - if( new_type == /mob/new_player ) - usr << "cannot convert into a new_player mob type." + if(ispath(new_type, /mob/new_player)) + usr << "Cannot convert into a new_player mob type." return var/mob/M diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index ede40532dcc3..526fc3818ef6 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -49,7 +49,7 @@ dat += "Printing in [greytoggle]

" else if(toner) dat += "Please insert paper to copy.

" - if(istype(user,/mob/living/silicon/ai)) + if(isAI(user)) dat += "Print photo from database

" dat += "Current toner level: [toner]" if(!toner) @@ -195,7 +195,8 @@ copies++ updateUsrDialog() else if(href_list["aipic"]) - if(!istype(usr,/mob/living/silicon/ai)) return + if(!isAI(usr)) + return if(toner >= 5 && !busy) var/list/nametemp = list() var/find diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index c43dcda5bb9a..a5b37664c7ee 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -188,7 +188,7 @@ for(var/atom/movable/A in T) if(A.invisibility) if(see_ghosts) - if(istype(A, /mob/dead/observer)) + if(isobserver(A)) var/mob/dead/observer/O = A if(O.orbiting) //so you dont see ghosts following people like antags, etc. continue @@ -236,7 +236,7 @@ var/mob_detail for(var/mob/M in the_turf) if(M.invisibility) - if(see_ghosts && istype(M,/mob/dead/observer)) + if(see_ghosts && isobserver(M)) var/mob/dead/observer/O = M if(O.orbiting) continue @@ -270,7 +270,7 @@ /obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag) //Proc for both regular and AI-based camera to take the image var/mobs = "" - var/isAi = istype(user, /mob/living/silicon/ai) + var/isAi = isAI(user) var/list/seen if(!isAi) //crappy check, but without it AI photos would be subject to line of sight from the AI Eye object. Made the best of it by moving the sec camera check inside if(user.client) //To make shooting through security cameras possible diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 89d63ba3f066..4540a53a9728 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -278,7 +278,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 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a394940966d4..5a9875accdaf 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -368,7 +368,7 @@ /obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params) - if (istype(user, /mob/living/silicon) && get_dist(src,user)>1) + if(issilicon(user) && get_dist(src,user)>1) return src.attack_hand(user) if (istype(W, /obj/item/weapon/crowbar) && opened) if (has_electronics==1) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 01e28bb0f7c7..0eea1f239254 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -271,7 +271,7 @@ display round(lastgen) and plasmatank amount /obj/machinery/power/port_gen/pacman/interact(mob/user) if (get_dist(src, user) > 1 ) - if (!istype(user, /mob/living/silicon/ai)) + if(!isAI(user)) user.unset_machine() user << browse(null, "window=port_gen") return diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index e64d304c065d..ac2ef7fdf4f1 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -226,7 +226,7 @@ /obj/machinery/particle_accelerator/control_box/interact(mob/user) if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER))) - if(!istype(user, /mob/living/silicon)) + if(!issilicon(user)) user.unset_machine() user << browse(null, "window=pacontrol") return diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 714e490aa25a..5586ab594351 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -253,7 +253,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics, else if(closest_mob) var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5) closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = 1) - if(istype(closest_mob, /mob/living/silicon)) + if(issilicon(closest_mob)) var/mob/living/silicon/S = closest_mob S.emp_act(2) tesla_zap(S, 7, power / 1.5) // metallic folks bounce it further diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index cb2d5457682a..b43b7b0f4eff 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -291,7 +291,7 @@ /obj/machinery/power/turbine/interact(mob/user) - if ( !Adjacent(user) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon)) ) + if(!Adjacent(user) || (stat & (NOPOWER|BROKEN)) && !issilicon(user)) user.unset_machine(src) user << browse(null, "window=turbine") return diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 8bb247ed06b3..fe6dd50c645b 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -164,7 +164,7 @@ var/list/contents = M.contents.Copy() - if(istype(M, /mob/living/silicon/robot)) + if(iscyborg(M)) var/mob/living/silicon/robot/Robot = M if(Robot.mmi) qdel(Robot.mmi) diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm index ab2da6b7189e..d185fa41adcc 100644 --- a/code/modules/recycling/disposal-unit.dm +++ b/code/modules/recycling/disposal-unit.dm @@ -516,7 +516,7 @@ if(WEST) if(AM.loc.x != loc.x-1) return - if(istype(AM, /obj)) + if(isobj(AM)) var/obj/O = AM O.loc = src else if(istype(AM, /mob)) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 31a752c9bda4..89e662e3c051 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -570,7 +570,7 @@ continue M.Stun(10, 1, 1) M.anchored = 1 - if(istype(M, /mob/living/simple_animal/hostile)) + if(ishostile(M)) var/mob/living/simple_animal/hostile/H = M H.AIStatus = AI_OFF H.LoseTarget() diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index 50b73da7bc21..c3e7d9b0c987 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -20,7 +20,7 @@ if(!state) return - if(istype(user, /mob/dead/observer)) + if(isobserver(user)) // If they turn on ghost AI control, admins can always interact. if(IsAdminGhost(user)) . = max(., UI_INTERACTIVE) diff --git a/code/orphaned_procs/priority_announce.dm b/code/orphaned_procs/priority_announce.dm index 38e1a24d5d33..1ad4a33f8f4f 100644 --- a/code/orphaned_procs/priority_announce.dm +++ b/code/orphaned_procs/priority_announce.dm @@ -25,7 +25,7 @@ announcement += "
" for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !M.ear_deaf) + if(!isnewplayer(M) && !M.ear_deaf) M << announcement if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS) M << sound(sound) @@ -45,7 +45,7 @@ return for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !M.ear_deaf) + if(!isnewplayer(M) && !M.ear_deaf) M << "[title]
[message]

" if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS) if(alert)