mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user