More istypes replaced with helpers (#20767)

* shouldn't you be merging these by now

* my oh my do we have a lot of these

* a fellow pedantic shit
This commit is contained in:
Joan Lung
2016-10-02 20:40:13 -04:00
committed by oranges
parent de19e36a51
commit b5b4037e2e
87 changed files with 185 additions and 175 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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."

View File

@@ -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,i<iter,i++)
step_towards(M,affected_mob)
for(var/mob/living/silicon/S in orange(4,affected_mob))
if(istype(S, /mob/living/silicon/ai)) continue
if(isAI(S))
continue
var/i
var/iter = rand(1,2)
for(i=0,i<iter,i++)
@@ -55,7 +57,8 @@
for(i=0,i<iter,i++)
step_towards(M,affected_mob)
for(var/mob/living/silicon/S in orange(6,affected_mob))
if(istype(S, /mob/living/silicon/ai)) continue
if(isAI(S))
continue
var/i
var/iter = rand(1,3)
for(i=0,i<iter,i++)

View File

@@ -555,7 +555,7 @@
/** SILICON ***/
if (istype(current, /mob/living/silicon))
if(issilicon(current))
text = "silicon"
var/mob/living/silicon/robot/robot = current
if (istype(robot) && robot.emagged)
@@ -1220,7 +1220,7 @@
log_admin("[key_name(usr)] has unemag'ed [R].")
if("unemagcyborgs")
if (istype(current, /mob/living/silicon/ai))
if(isAI(current))
var/mob/living/silicon/ai/ai = current
for (var/mob/living/silicon/robot/R in ai.connected_robots)
R.SetEmagged(0)

View File

@@ -18,7 +18,7 @@
/datum/wires/airlock/interactable(mob/user)
var/obj/machinery/door/airlock/A = holder
if(!istype(user, /mob/living/silicon) && A.isElectrified() && A.shock(user, 100))
if(!issilicon(user) && A.isElectrified() && A.shock(user, 100))
return FALSE
if(A.panel_open)
return TRUE

View File

@@ -12,7 +12,7 @@
/datum/wires/vending/interactable(mob/user)
var/obj/machinery/vending/V = holder
if(!istype(user, /mob/living/silicon) && V.seconds_electrified && V.shock(user, 100))
if(!issilicon(user) && V.seconds_electrified && V.shock(user, 100))
return FALSE
if(V.panel_open)
return TRUE

View File

@@ -293,7 +293,7 @@
martyr_compatible = 1
/datum/objective/block/check_completion()
if(!istype(owner.current, /mob/living/silicon))
if(!issilicon(owner.current))
return 0
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
return 1
@@ -301,7 +301,7 @@
var/area/A = SSshuttle.emergency.areaInstance
for(var/mob/living/player in player_list)
if(istype(player, /mob/living/silicon))
if(issilicon(player))
continue
if(player.mind)
if(player.stat != DEAD)
@@ -337,7 +337,7 @@
martyr_compatible = 0
/datum/objective/robot_army/check_completion()
if(!istype(owner.current, /mob/living/silicon/ai))
if(!isAI(owner.current))
return 0
var/mob/living/silicon/ai/A = owner.current

View File

@@ -105,7 +105,7 @@
/datum/objective_item/steal/functionalai/check_special_completion(obj/item/device/aicard/C)
for(var/mob/living/silicon/ai/A in C)
if(istype(A, /mob/living/silicon/ai) && A.stat != 2) //See if any AI's are alive inside that card.
if(isAI(A) && A.stat != 2) //See if any AI's are alive inside that card.
return 1
return 0

View File

@@ -85,7 +85,7 @@
/datum/game_mode/proc/forge_traitor_objectives(datum/mind/traitor)
if(istype(traitor.current, /mob/living/silicon))
if(issilicon(traitor.current))
var/objective_count = 0
if(prob(30))
@@ -200,7 +200,7 @@
/datum/game_mode/proc/finalize_traitor(var/datum/mind/traitor)
if (istype(traitor.current, /mob/living/silicon))
if(issilicon(traitor.current))
add_law_zero(traitor.current)
else
equip_traitor(traitor.current)

View File

@@ -77,7 +77,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"])

View File

@@ -218,7 +218,7 @@
U << "<span class='notice'>You hold \the [itemname] up to the camera...</span>"
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

View File

@@ -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))

View File

@@ -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 << "<span class='warning'>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.</span>"
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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -131,7 +131,7 @@
dat += "</table>"
//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.<br> 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))

View File

@@ -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"])

View File

@@ -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"])

View File

@@ -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 += "<A href='?src=\ref[src];magbot=\ref[R]'>(<font color=blue><i>Hack</i></font>)</A> "
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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 += "<div class='notice icon'>Swipe ID card to unlock interface</div>"
else
if (!istype(user, /mob/living/silicon) && !IsAdminGhost(user))
if(!issilicon(user) && !IsAdminGhost(user))
t += "<div class='notice icon'>Swipe ID card to lock interface</div>"
t += text("Turrets [] - <A href='?src=\ref[];toggleOn=1'>[]?</a><br>\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable")
t += text("Currently set for [] - <A href='?src=\ref[];toggleLethal=1'>Change to []?</a><br>\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"])

View File

@@ -313,7 +313,7 @@
if(!anchored)
user << "<span class='warning'>\The [src] needs to be firmly secured to the floor first!</span>"
return 1
if(locked && !istype(user, /mob/living/silicon))
if(locked && !issilicon(user))
user << "<span class='warning'>The controls are locked!</span>"
return 1
if(power != 1)

View File

@@ -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

View File

@@ -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 << "<span class='notice'>The vending machine refuses to interface with you, as you are not in its target demographic!</span>"

View File

@@ -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)

View File

@@ -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)

View File

@@ -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("<span class='danger'>[name] is hit by [A].</span>")

View File

@@ -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

View File

@@ -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)

View File

@@ -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("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='italics'>The button clicks loudly.</span>")
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.

View File

@@ -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

View File

@@ -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))

View File

@@ -34,7 +34,7 @@ var/global/BSACooldown = 0
body += " played by <b>[M.client]</b> "
body += "\[<A href='?_src_=holder;editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
if(istype(M, /mob/new_player))
if(isnewplayer(M))
body += " <B>Hasn't Entered Game</B> "
else
body += " \[<A href='?_src_=holder;revive=\ref[M]'>Heal</A>\] "
@@ -91,7 +91,7 @@ var/global/BSACooldown = 0
body += "<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A>"
if (M.client)
if(!istype(M, /mob/new_player))
if(!isnewplayer(M))
body += "<br><br>"
body += "<b>Transformation:</b>"
body += "<br>"
@@ -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

View File

@@ -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 << "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>"
else
//ghostize

View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -24,7 +24,7 @@
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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")

View File

@@ -12,8 +12,8 @@
anchored = 1
/obj/machinery/artillerycontrol/process()
if(src.reload<ARTILLERY_RELOAD_TIME)
src.reload++
if(reload < ARTILLERY_RELOAD_TIME)
reload++
/obj/structure/artilleryplaceholder
name = "artillery"
@@ -39,11 +39,13 @@
if(..())
return
var/A
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
A = input("Area to bombard", "Open Fire", A) in teleportlocs
var/area/thearea = teleportlocs[A]
if (usr.stat || usr.restrained()) return
if(src.reload < ARTILLERY_RELOAD_TIME) return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
if(usr.stat || usr.restrained())
return
if(src.reload < ARTILLERY_RELOAD_TIME)
return
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
priority_announce("Bluespace artillery fire detected. Brace for impact.")
message_admins("[key_name_admin(usr)] has launched an artillery strike.")
var/list/L = list()

View File

@@ -147,11 +147,11 @@
prefs.save_preferences()
if(prefs.toggles & SOUND_LOBBY)
src << "You will now hear music in the game lobby."
if(istype(mob, /mob/new_player))
if(isnewplayer(mob))
playtitlemusic()
else
src << "You will no longer hear music in the game lobby."
if(istype(mob, /mob/new_player))
if(isnewplayer(mob))
mob.stopLobbySound()
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -244,7 +244,7 @@ var/global/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost",
if(new_form)
prefs.ghost_form = new_form
prefs.save_preferences()
if(istype(mob,/mob/dead/observer))
if(isobserver(mob))
var/mob/dead/observer/O = mob
O.update_icon(new_form)
@@ -258,7 +258,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
if(new_orbit)
prefs.ghost_orbit = new_orbit
prefs.save_preferences()
if(istype(mob, /mob/dead/observer))
if(isobserver(mob))
var/mob/dead/observer/O = mob
O.ghost_orbit = new_orbit
@@ -273,7 +273,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
if("default sprites")
prefs.ghost_accs = GHOST_ACCS_NONE
prefs.save_preferences()
if(istype(mob, /mob/dead/observer))
if(isobserver(mob))
var/mob/dead/observer/O = mob
O.update_icon()
@@ -306,7 +306,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
if("White Ghost")
prefs.ghost_others = GHOST_OTHERS_SIMPLE
prefs.save_preferences()
if(istype(mob, /mob/dead/observer))
if(isobserver(mob))
var/mob/dead/observer/O = mob
O.updateghostsight()
@@ -334,7 +334,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
prefs.ghost_hud = !prefs.ghost_hud
src << "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"]."
prefs.save_preferences()
if(istype(mob,/mob/dead/observer))
if(isobserver(mob))
mob.hud_used.show_hud()
/client/verb/toggle_inquisition() // warning: unexpected inquisition

View File

@@ -68,7 +68,7 @@
if(isobserver(C.mob))
msg += " - Observing"
else if(istype(C.mob,/mob/new_player))
else if(isnewplayer(C.mob))
msg += " - Lobby"
else
msg += " - Playing"

View File

@@ -13,5 +13,5 @@
if(activeFor >= 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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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]")

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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 << "<span class='notice'>Something is there but you can't see it.</span>"
return

View File

@@ -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)

View File

@@ -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)

View File

@@ -212,7 +212,7 @@
if ("pout","pouts")
message = "<B>[src]</B> pouts."
m_type = 2
if ("scream","screams")
message = "<B>[src]</B> 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)))

View File

@@ -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!"

View File

@@ -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

View File

@@ -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)

View File

@@ -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 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for(var/mob/M in player_list)
if(M.binarycheck())
if(istype(M, /mob/living/silicon/ai))
if(isAI(M))
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='?src=\ref[M];track=[html_encode(name)]'><span class='name'>[name] ([desig])</span></a> <span class='message'>[message_a]</span></span></i>"
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)

View File

@@ -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("<span class='danger'>[src] bumps into [M]!</span>")
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.")

View File

@@ -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)

View File

@@ -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 << "<span class='notice'>You must be observing to use this!</span>"
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)

View File

@@ -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 << "<span class='danger'>cannot convert players who have not entered yet.</span>"
if(isnewplayer(src))
usr << "<span class='danger'>Cannot convert players who have not entered yet.</span>"
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 << "<span class='danger'>cannot convert into a new_player mob type.</span>"
if(ispath(new_type, /mob/new_player))
usr << "<span class='danger'>Cannot convert into a new_player mob type.</span>"
return
var/mob/M

View File

@@ -49,7 +49,7 @@
dat += "Printing in <a href='byond://?src=\ref[src];colortoggle=1'>[greytoggle]</a><BR><BR>"
else if(toner)
dat += "Please insert paper to copy.<BR><BR>"
if(istype(user,/mob/living/silicon/ai))
if(isAI(user))
dat += "<a href='byond://?src=\ref[src];aipic=1'>Print photo from database</a><BR><BR>"
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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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))

View File

@@ -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()

View File

@@ -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)

View File

@@ -25,7 +25,7 @@
announcement += "<br>"
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 << "<b><font size = 3><font color = red>[title]</font color><BR>[message]</font size></b><BR>"
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
if(alert)