Mass replace

This commit is contained in:
Tigercat2000
2016-07-07 19:34:02 -07:00
parent dc408f090d
commit 71e5344a98
870 changed files with 7679 additions and 7679 deletions
+9 -9
View File
@@ -1,10 +1,10 @@
//Blocks an attempt to connect before even creating our client datum thing.
world/IsBanned(key,address,computer_id)
if (!key || !address || !computer_id)
if(!key || !address || !computer_id)
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, please try again. Error message: Your computer provided invalid or blank information to the server on connection (BYOND Username, IP, and Computer ID). Provided information for reference: Username: '[key]' IP: '[address]' Computer ID: '[computer_id]'. If you continue to get this error, please restart byond or contact byond support.")
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
if(text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.")
var/admin = 0
@@ -34,7 +34,7 @@ world/IsBanned(key,address,computer_id)
//Ban Checking
. = CheckBan(ckey(key), computer_id, address)
if(.)
if (admin)
if(admin)
log_admin("The admin [key] has been allowed to bypass a matching ban on [.["key"]]")
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching ban on [.["key"]]</span>")
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching ban on [.["key"]].</span>")
@@ -71,13 +71,13 @@ world/IsBanned(key,address,computer_id)
var/duration = query.item[7]
var/bantime = query.item[8]
var/bantype = query.item[9]
if (bantype == "ADMIN_PERMABAN" || bantype == "ADMIN_TEMPBAN")
if(bantype == "ADMIN_PERMABAN" || bantype == "ADMIN_TEMPBAN")
//admin bans MUST match on ckey to prevent cid-spoofing attacks
// as well as dynamic ip abuse
if (pckey != ckey)
if(pckey != ckey)
continue
if (admin)
if (bantype == "ADMIN_PERMABAN" || bantype == "ADMIN_TEMPBAN")
if(admin)
if(bantype == "ADMIN_PERMABAN" || bantype == "ADMIN_TEMPBAN")
log_admin("The admin [key] is admin banned, and has been disallowed access")
message_admins("<span class='adminnotice'>The admin [key] is admin banned, and has been disallowed access</span>")
else
@@ -102,11 +102,11 @@ world/IsBanned(key,address,computer_id)
return .
. = ..() //default pager ban stuff
if (.)
if(.)
//byond will not trigger isbanned() for "global" host bans,
//ie, ones where the "apply to this game only" checkbox is not checked (defaults to not checked)
//So it's safe to let admins walk thru host/sticky bans here
if (admin)
if(admin)
log_admin("The admin [key] has been allowed to bypass a matching host/sticky ban")
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching host/sticky ban</span>")
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching host/sticky ban.</span>")
+22 -22
View File
@@ -15,8 +15,8 @@ var/savefile/Banlist
Banlist.cd = "/base"
if( "[ckey][id]" in Banlist.dir )
Banlist.cd = "[ckey][id]"
if (Banlist["temp"])
if (!GetExp(Banlist["minutes"]))
if(Banlist["temp"])
if(!GetExp(Banlist["minutes"]))
ClearTempbans()
return 0
else
@@ -27,7 +27,7 @@ var/savefile/Banlist
.["reason"] = "ckey/id"
return .
else
for (var/A in Banlist.dir)
for(var/A in Banlist.dir)
Banlist.cd = "/base/[A]"
var/matches
if( ckey == Banlist["key"] )
@@ -43,7 +43,7 @@ var/savefile/Banlist
if(matches)
if(Banlist["temp"])
if (!GetExp(Banlist["minutes"]))
if(!GetExp(Banlist["minutes"]))
ClearTempbans()
return 0
else
@@ -66,13 +66,13 @@ var/savefile/Banlist
Banlist = new("data/banlist.bdb")
log_admin("Loading Banlist")
if (!length(Banlist.dir)) log_admin("Banlist is empty.")
if(!length(Banlist.dir)) log_admin("Banlist is empty.")
if (!Banlist.dir.Find("base"))
if(!Banlist.dir.Find("base"))
log_admin("Banlist missing base dir.")
Banlist.dir.Add("base")
Banlist.cd = "/base"
else if (Banlist.dir.Find("base"))
else if(Banlist.dir.Find("base"))
Banlist.cd = "/base"
ClearTempbans()
@@ -82,16 +82,16 @@ var/savefile/Banlist
UpdateTime()
Banlist.cd = "/base"
for (var/A in Banlist.dir)
for(var/A in Banlist.dir)
Banlist.cd = "/base/[A]"
if (!Banlist["key"] || !Banlist["id"])
if(!Banlist["key"] || !Banlist["id"])
RemoveBan(A)
log_admin("Invalid Ban.")
message_admins("Invalid Ban.")
continue
if (!Banlist["temp"]) continue
if (CMinutes >= Banlist["minutes"]) RemoveBan(A)
if(!Banlist["temp"]) continue
if(CMinutes >= Banlist["minutes"]) RemoveBan(A)
return 1
@@ -100,12 +100,12 @@ var/savefile/Banlist
var/bantimestamp
if (temp)
if(temp)
UpdateTime()
bantimestamp = CMinutes + minutes
Banlist.cd = "/base"
if ( Banlist.dir.Find("[ckey][computerid]") )
if( Banlist.dir.Find("[ckey][computerid]") )
to_chat(usr, "<span class='danger'>Ban already exists.</span>")
return 0
else
@@ -117,7 +117,7 @@ var/savefile/Banlist
Banlist["reason"] << reason
Banlist["bannedby"] << bannedby
Banlist["temp"] << temp
if (temp)
if(temp)
Banlist["minutes"] << bantimestamp
if(!temp)
add_note(ckey, "Permanently banned - [reason]", null, bannedby, 0)
@@ -134,7 +134,7 @@ var/savefile/Banlist
Banlist["id"] >> id
Banlist.cd = "/base"
if (!Banlist.dir.Remove(foldername)) return 0
if(!Banlist.dir.Remove(foldername)) return 0
if(!usr)
log_admin("Ban Expired: [key]")
@@ -145,9 +145,9 @@ var/savefile/Banlist
message_admins("[key_name_admin(usr)] unbanned: [key]")
feedback_inc("ban_unban",1)
usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN)
for (var/A in Banlist.dir)
for(var/A in Banlist.dir)
Banlist.cd = "/base/[A]"
if (key == Banlist["key"] /*|| id == Banlist["id"]*/)
if(key == Banlist["key"] /*|| id == Banlist["id"]*/)
Banlist.cd = "/base"
Banlist.dir.Remove(A)
continue
@@ -157,13 +157,13 @@ var/savefile/Banlist
/proc/GetExp(minutes as num)
UpdateTime()
var/exp = minutes - CMinutes
if (exp <= 0)
if(exp <= 0)
return 0
else
var/timeleftstring
if (exp >= 1440) //1440 = 1 day in minutes
if(exp >= 1440) //1440 = 1 day in minutes
timeleftstring = "[round(exp / 1440, 0.1)] Days"
else if (exp >= 60) //60 = 1 hour in minutes
else if(exp >= 60) //60 = 1 hour in minutes
timeleftstring = "[round(exp / 60, 0.1)] Hours"
else
timeleftstring = "[exp] Minutes"
@@ -174,7 +174,7 @@ var/savefile/Banlist
var/dat
//var/dat = "<HR><B>Unban Player:</B> \blue(U) = Unban , (E) = Edit Ban\green (Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >"
Banlist.cd = "/base"
for (var/A in Banlist.dir)
for(var/A in Banlist.dir)
count++
Banlist.cd = "/base/[A]"
var/ref = "\ref[src]"
@@ -228,6 +228,6 @@ var/savefile/Banlist
/proc/ClearAllBans()
Banlist.cd = "/base"
for (var/A in Banlist.dir)
for(var/A in Banlist.dir)
RemoveBan(A)
+28 -28
View File
@@ -103,7 +103,7 @@ var/global/nologevent = 0
<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A>
"}
if (M.client)
if(M.client)
if(!istype(M, /mob/new_player))
body += "<br><br>"
body += "<b>Transformation:</b>"
@@ -191,7 +191,7 @@ var/global/nologevent = 0
<A href='?_src_=holder;simplemake=shade;mob=\ref[M]'>Shade</A>
"}
if (M.client)
if(M.client)
body += {"<br><br>
<b>Other actions:</b>
<br>
@@ -243,7 +243,7 @@ var/global/nologevent = 0
if(!check_rights(R_EVENT))
return
if (!istype(src,/datum/admins))
if(!istype(src,/datum/admins))
src = usr.client.holder
var/dat
@@ -576,7 +576,7 @@ var/global/nologevent = 0
return
config.looc_allowed = !(config.looc_allowed)
if (config.looc_allowed)
if(config.looc_allowed)
to_chat(world, "<B>The LOOC channel has been globally enabled!</B>")
else
to_chat(world, "<B>The LOOC channel has been globally disabled!</B>")
@@ -592,7 +592,7 @@ var/global/nologevent = 0
return
config.dsay_allowed = !(config.dsay_allowed)
if (config.dsay_allowed)
if(config.dsay_allowed)
to_chat(world, "<B>Deadchat has been globally enabled!</B>")
else
to_chat(world, "<B>Deadchat has been globally disabled!</B>")
@@ -643,7 +643,7 @@ var/global/nologevent = 0
return
enter_allowed = !( enter_allowed )
if (!( enter_allowed ))
if(!( enter_allowed ))
to_chat(world, "<B>New players may no longer enter the game.</B>")
else
to_chat(world, "<B>New players may now enter the game.</B>")
@@ -661,7 +661,7 @@ var/global/nologevent = 0
return
config.allow_ai = !( config.allow_ai )
if (!( config.allow_ai ))
if(!( config.allow_ai ))
to_chat(world, "<B>The AI job is no longer chooseable.</B>")
else
to_chat(world, "<B>The AI job is chooseable now.</B>")
@@ -679,7 +679,7 @@ var/global/nologevent = 0
return
abandon_allowed = !( abandon_allowed )
if (abandon_allowed)
if(abandon_allowed)
to_chat(world, "<B>You may now respawn.</B>")
else
to_chat(world, "<B>You may no longer respawn :(</B>")
@@ -709,13 +709,13 @@ var/global/nologevent = 0
if(!check_rights(R_SERVER))
return
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
if(!ticker || ticker.current_state != GAME_STATE_PREGAME)
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
return //alert("Round end delayed", null, null, null, null, null)
going = !( going )
if (!( going ))
if(!( going ))
to_chat(world, "<b>The game start has been delayed.</b>")
log_admin("[key_name(usr)] delayed the game.")
else
@@ -728,34 +728,34 @@ var/global/nologevent = 0
/proc/is_special_character(mob/M as mob) // returns 1 for specail characters and 2 for heroes of gamemode
if(!ticker || !ticker.mode)
return 0
if (!istype(M))
if(!istype(M))
return 0
if((M.mind in ticker.mode.head_revolutionaries) || (M.mind in ticker.mode.revolutionaries))
if (ticker.mode.config_tag == "revolution")
if(ticker.mode.config_tag == "revolution")
return 2
return 1
if(M.mind in ticker.mode.cult)
if (ticker.mode.config_tag == "cult")
if(ticker.mode.config_tag == "cult")
return 2
return 1
if(M.mind in ticker.mode.malf_ai)
if (ticker.mode.config_tag == "malfunction")
if(ticker.mode.config_tag == "malfunction")
return 2
return 1
if(M.mind in ticker.mode.syndicates)
if (ticker.mode.config_tag == "nuclear")
if(ticker.mode.config_tag == "nuclear")
return 2
return 1
if(M.mind in ticker.mode.wizards)
if (ticker.mode.config_tag == "wizard")
if(ticker.mode.config_tag == "wizard")
return 2
return 1
if(M.mind in ticker.mode.changelings)
if (ticker.mode.config_tag == "changeling")
if(ticker.mode.config_tag == "changeling")
return 2
return 1
if(M.mind in ticker.mode.abductors)
if (ticker.mode.config_tag == "abduction")
if(ticker.mode.config_tag == "abduction")
return 2
return 1
if(isrobot(M))
@@ -829,7 +829,7 @@ var/global/nologevent = 0
return
guests_allowed = !( guests_allowed )
if (!( guests_allowed ))
if(!( guests_allowed ))
to_chat(world, "<B>Guests may no longer enter the game.</B>")
else
to_chat(world, "<B>Guests may now enter the game.</B>")
@@ -846,7 +846,7 @@ var/global/nologevent = 0
else if(isrobot(S))
var/mob/living/silicon/robot/R = S
to_chat(usr, "<b>CYBORG [key_name(S, usr)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:</b>")
else if (ispAI(S))
else if(ispAI(S))
var/mob/living/silicon/pai/P = S
to_chat(usr, "<b>pAI [key_name(S, usr)]'s laws:</b>")
to_chat(usr, "[P.pai_law0]")
@@ -856,7 +856,7 @@ var/global/nologevent = 0
else
to_chat(usr, "<b>SILICON [key_name(S, usr)]'s laws:</b>")
if (S.laws == null)
if(S.laws == null)
to_chat(usr, "[key_name(S, usr)]'s laws are null. Contact a coder.")
else
S.laws.show_laws(usr)
@@ -888,7 +888,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
/proc/move_gamma_ship()
var/area/fromArea
var/area/toArea
if (gamma_ship_location == 1)
if(gamma_ship_location == 1)
fromArea = locate(/area/shuttle/gamma/space)
toArea = locate(/area/shuttle/gamma/station)
else
@@ -905,7 +905,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
for(var/obj/machinery/alarm/A in toArea)
A.first_run()
if (gamma_ship_location)
if(gamma_ship_location)
gamma_ship_location = 0
else
gamma_ship_location = 1
@@ -955,18 +955,18 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
return //extra sanity check to make sure only observers are shoved into things
//same as assume-direct-control perm requirements.
if (!check_rights(R_VAREDIT,0)) //no varedit, check if they have r_admin and r_debug
if(!check_rights(R_VAREDIT,0)) //no varedit, check if they have r_admin and r_debug
if(!check_rights(R_ADMIN|R_DEBUG,0)) //if they don't have r_admin and r_debug, return
return 0 //otherwise, if they have no varedit, but do have r_admin and r_debug, execute the rest of the code
if (!frommob.ckey)
if(!frommob.ckey)
return 0
if(istype(tothing, /obj/item))
var/mob/living/toitem = tothing
var/ask = alert("Are you sure you want to allow [frommob.name]([frommob.key]) to possess [toitem.name]?", "Place ghost in control of item?", "Yes", "No")
if (ask != "Yes")
if(ask != "Yes")
return 1
if(!frommob || !toitem) //make sure the mobs don't go away while we waited for a response
@@ -986,12 +986,12 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
var/mob/living/tomob = tothing
var/question = ""
if (tomob.ckey)
if(tomob.ckey)
question = "This mob already has a user ([tomob.key]) in control of it! "
question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?"
var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
if (ask != "Yes")
if(ask != "Yes")
return 1
if(!frommob || !tomob) //make sure the mobs don't go away while we waited for a response
+9 -9
View File
@@ -615,7 +615,7 @@ var/list/admin_verbs_snpc = list(
var/message = input("What do you want the message to be?", "Make Sound") as text|null
if(!message)
return
for (var/mob/V in hearers(O))
for(var/mob/V in hearers(O))
V.show_message(message, 2)
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z] make a sound")
message_admins("\blue [key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z] make a sound")
@@ -643,7 +643,7 @@ var/list/admin_verbs_snpc = list(
if(mob.control_object)
if(!msg)
return
for (var/mob/V in hearers(mob.control_object))
for(var/mob/V in hearers(mob.control_object))
V.show_message("<b>[mob.control_object.name]</b> says: \"" + msg + "\"", 2)
log_admin("[key_name(usr)] used oSay on [mob.control_object]: [msg]")
message_admins("[key_name_admin(usr)] used oSay on [mob.control_object]: [msg]")
@@ -857,14 +857,14 @@ var/list/admin_verbs_snpc = list(
return
var/list/jobs = list()
for (var/datum/job/J in job_master.occupations)
if (J.current_positions >= J.total_positions && J.total_positions != -1)
for(var/datum/job/J in job_master.occupations)
if(J.current_positions >= J.total_positions && J.total_positions != -1)
jobs += J.title
if (!jobs.len)
if(!jobs.len)
to_chat(usr, "There are no fully staffed jobs.")
return
var/job = input("Please select job slot to free", "Free Job Slot") as null|anything in jobs
if (job)
if(job)
job_master.FreeRole(job)
log_admin("[key_name(usr)] has freed a job slot for [job].")
message_admins("[key_name_admin(usr)] has freed a job slot for [job].")
@@ -878,7 +878,7 @@ var/list/admin_verbs_snpc = list(
prefs.toggles ^= CHAT_ATTACKLOGS
prefs.save_preferences(src)
if (prefs.toggles & CHAT_ATTACKLOGS)
if(prefs.toggles & CHAT_ATTACKLOGS)
to_chat(usr, "You now will get attack log messages")
else
to_chat(usr, "You now won't get attack log messages")
@@ -903,7 +903,7 @@ var/list/admin_verbs_snpc = list(
prefs.toggles ^= CHAT_DEBUGLOGS
prefs.save_preferences(src)
if (prefs.toggles & CHAT_DEBUGLOGS)
if(prefs.toggles & CHAT_DEBUGLOGS)
to_chat(usr, "You now will get debug log messages")
else
to_chat(usr, "You now won't get debug log messages")
@@ -933,7 +933,7 @@ var/list/admin_verbs_snpc = list(
var/confirm = alert("Are you sure you want to send the global message?", "Confirm Man Up Global", "Yes", "No")
if(confirm == "Yes")
for (var/mob/T as mob in mob_list)
for(var/mob/T as mob in mob_list)
to_chat(T, "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>")
T << 'sound/voice/ManUp1.ogg'
+4 -4
View File
@@ -4,12 +4,12 @@ var/appearanceban_runonce //Updates legacy bans with new info
var/appearance_keylist[0] //to store the keys
/proc/appearance_fullban(mob/M, reason)
if (!M || !M.key) return
if(!M || !M.key) return
appearance_keylist.Add(text("[M.ckey] ## [reason]"))
appearance_savebanfile()
/proc/appearance_client_fullban(ckey)
if (!ckey) return
if(!ckey) return
appearance_keylist.Add(text("[ckey]"))
appearance_savebanfile()
@@ -47,7 +47,7 @@ DEBUG
log_admin("Loading appearance_rank")
S["runonce"] >> appearanceban_runonce
if (!length(appearance_keylist))
if(!length(appearance_keylist))
appearance_keylist=list()
log_admin("appearance_keylist was empty")
else
@@ -86,7 +86,7 @@ DEBUG
/proc/appearance_remove(X)
for (var/i = 1; i <= length(appearance_keylist); i++)
for(var/i = 1; i <= length(appearance_keylist); i++)
if( findtext(appearance_keylist[i], "[X]") )
appearance_keylist.Remove(appearance_keylist[i])
appearance_savebanfile()
+6 -6
View File
@@ -4,12 +4,12 @@ var/jobban_runonce // Updates legacy bans with new info
var/jobban_keylist[0] //to store the keys & ranks
/proc/jobban_fullban(mob/M, rank, reason)
if (!M || !M.key) return
if(!M || !M.key) return
jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]"))
jobban_savebanfile()
/proc/jobban_client_fullban(ckey, rank)
if (!ckey || !rank) return
if(!ckey || !rank) return
jobban_keylist.Add(text("[ckey] - [rank]"))
jobban_savebanfile()
@@ -18,13 +18,13 @@ var/jobban_keylist[0] //to store the keys & ranks
if(M && rank)
//if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban
if (guest_jobbans(rank))
if(guest_jobbans(rank))
if(config.guest_jobban && IsGuestKey(M.key))
return "Guest Job-ban"
// if(config.usewhitelist && !check_whitelist(M))
// return "Karma Job"
for (var/s in jobban_keylist)
for(var/s in jobban_keylist)
if( findtext(s,"[M.ckey] - [rank]") == 1 )
var/startpos = findtext(s, "## ")+3
if(startpos && startpos<length(s))
@@ -59,7 +59,7 @@ DEBUG
log_admin("Loading jobban_rank")
S["runonce"] >> jobban_runonce
if (!length(jobban_keylist))
if(!length(jobban_keylist))
jobban_keylist=list()
log_admin("jobban_keylist was empty")
else
@@ -104,7 +104,7 @@ DEBUG
/proc/jobban_remove(X)
for (var/i = 1; i <= length(jobban_keylist); i++)
for(var/i = 1; i <= length(jobban_keylist); i++)
if( findtext(jobban_keylist[i], "[X]") )
jobban_keylist.Remove(jobban_keylist[i])
jobban_savebanfile()
+1 -1
View File
@@ -1,6 +1,6 @@
/var/create_mob_html = null
/datum/admins/proc/create_mob(var/mob/user)
if (!create_mob_html)
if(!create_mob_html)
var/mobjs = null
mobjs = jointext(typesof(/mob), ";")
create_mob_html = file2text('html/create_object.html')
+2 -2
View File
@@ -2,7 +2,7 @@ var/create_object_html = null
var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/effect, /obj/item, /obj/mecha, /obj/item/weapon, /obj/item/clothing, /obj/item/stack, /obj/item/device, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun)
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
if(!create_object_html)
var/objectjs = null
objectjs = jointext(typesof(/obj), ";")
create_object_html = file2text('html/create_object.html')
@@ -14,7 +14,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms
var/html_form = create_object_forms[path]
if (!html_form)
if(!html_form)
var/objectjs = jointext(typesof(path), ";")
html_form = file2text('html/create_object.html')
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
+1 -1
View File
@@ -1,6 +1,6 @@
/var/create_turf_html = null
/datum/admins/proc/create_turf(var/mob/user)
if (!create_turf_html)
if(!create_turf_html)
var/turfjs = null
turfjs = jointext(typesof(/turf), ";")
create_turf_html = file2text('html/create_object.html')
+22 -22
View File
@@ -6,17 +6,17 @@ var/savefile/Banlistjob
ClearTempbansjob()
var/id = clientvar.computer_id
var/key = clientvar.ckey
if (guest_jobbans(rank))
if(guest_jobbans(rank))
if(config.guest_jobban && IsGuestKey(key))
return 1
Banlistjob.cd = "/base"
if (Banlistjob.dir.Find("[key][id][rank]"))
if(Banlistjob.dir.Find("[key][id][rank]"))
return 1
Banlistjob.cd = "/base"
for (var/A in Banlistjob.dir)
for(var/A in Banlistjob.dir)
Banlistjob.cd = "/base/[A]"
if ((id == Banlistjob["id"] || key == Banlistjob["key"]) && rank == Banlistjob["rank"])
if((id == Banlistjob["id"] || key == Banlistjob["key"]) && rank == Banlistjob["rank"])
return 1
return 0
@@ -25,13 +25,13 @@ var/savefile/Banlistjob
Banlistjob = new("data/job_fullnew.bdb")
log_admin("Loading Banlistjob")
if (!length(Banlistjob.dir)) log_admin("Banlistjob is empty.")
if(!length(Banlistjob.dir)) log_admin("Banlistjob is empty.")
if (!Banlistjob.dir.Find("base"))
if(!Banlistjob.dir.Find("base"))
log_admin("Banlistjob missing base dir.")
Banlistjob.dir.Add("base")
Banlistjob.cd = "/base"
else if (Banlistjob.dir.Find("base"))
else if(Banlistjob.dir.Find("base"))
Banlistjob.cd = "/base"
ClearTempbansjob()
@@ -41,16 +41,16 @@ var/savefile/Banlistjob
UpdateTime()
Banlistjob.cd = "/base"
for (var/A in Banlistjob.dir)
for(var/A in Banlistjob.dir)
Banlistjob.cd = "/base/[A]"
//if (!Banlistjob["key"] || !Banlistjob["id"])
//if(!Banlistjob["key"] || !Banlistjob["id"])
// RemoveBanjob(A, "full")
// log_admin("Invalid Ban.")
// message_admins("Invalid Ban.")
// continue
if (!Banlistjob["temp"]) continue
if (CMinutes >= Banlistjob["minutes"]) RemoveBanjob(A)
if(!Banlistjob["temp"]) continue
if(CMinutes >= Banlistjob["minutes"]) RemoveBanjob(A)
return 1
@@ -58,7 +58,7 @@ var/savefile/Banlistjob
/proc/AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, rank)
UpdateTime()
var/bantimestamp
if (temp)
if(temp)
UpdateTime()
bantimestamp = CMinutes + minutes
if(rank == "Heads")
@@ -140,7 +140,7 @@ var/savefile/Banlistjob
return 1
Banlistjob.cd = "/base"
if ( Banlistjob.dir.Find("[ckey][computerid][rank]") )
if( Banlistjob.dir.Find("[ckey][computerid][rank]") )
to_chat(usr, text("\red Banjob already exists."))
return 0
else
@@ -152,7 +152,7 @@ var/savefile/Banlistjob
to_chat(Banlistjob["reason"], reason)
to_chat(Banlistjob["bannedby"], bannedby)
to_chat(Banlistjob["temp"], temp)
if (temp)
if(temp)
to_chat(Banlistjob["minutes"], bantimestamp)
return 1
@@ -167,7 +167,7 @@ var/savefile/Banlistjob
Banlistjob["rank"] >> rank
Banlistjob.cd = "/base"
if (!Banlistjob.dir.Remove(foldername)) return 0
if(!Banlistjob.dir.Remove(foldername)) return 0
if(!usr)
log_admin("Banjob Expired: [key]")
@@ -179,9 +179,9 @@ var/savefile/Banlistjob
feedback_inc("ban_job_unban",1)
feedback_add_details("ban_job_unban","- [rank]")
for (var/A in Banlistjob.dir)
for(var/A in Banlistjob.dir)
Banlistjob.cd = "/base/[A]"
if ((key == Banlistjob["key"] || id == Banlistjob["id"]) && (rank == Banlistjob["rank"]))
if((key == Banlistjob["key"] || id == Banlistjob["id"]) && (rank == Banlistjob["rank"]))
Banlistjob.cd = "/base"
Banlistjob.dir.Remove(A)
continue
@@ -191,13 +191,13 @@ var/savefile/Banlistjob
/proc/GetBanExpjob(minutes as num)
UpdateTime()
var/exp = minutes - CMinutes
if (exp <= 0)
if(exp <= 0)
return 0
else
var/timeleftstring
if (exp >= 1440) //1440 = 1 day in minutes
if(exp >= 1440) //1440 = 1 day in minutes
timeleftstring = "[round(exp / 1440, 0.1)] Days"
else if (exp >= 60) //60 = 1 hour in minutes
else if(exp >= 60) //60 = 1 hour in minutes
timeleftstring = "[round(exp / 60, 0.1)] Hours"
else
timeleftstring = "[exp] Minutes"
@@ -208,7 +208,7 @@ var/savefile/Banlistjob
var/dat
//var/dat = "<HR><B>Unban Player:</B> \blue(U) = Unban , (E) = Edit Ban\green (Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >"
Banlistjob.cd = "/base"
for (var/A in Banlistjob.dir)
for(var/A in Banlistjob.dir)
count++
Banlistjob.cd = "/base/[A]"
dat += text("<tr><td><A href='?src=\ref[src];unjobbanf=[Banlistjob["key"]][Banlistjob["id"]][Banlistjob["rank"]]'>(U)</A> Key: <B>[Banlistjob["key"]] </B>Rank: <B>[Banlistjob["rank"]]</B></td><td> ([Banlistjob["temp"] ? "[GetBanExpjob(Banlistjob["minutes"]) ? GetBanExpjob(Banlistjob["minutes"]) : "Removal pending" ]" : "Permaban"])</td><td>(By: [Banlistjob["bannedby"]])</td><td>(Reason: [Banlistjob["reason"]])</td></tr>")
@@ -270,5 +270,5 @@ var/savefile/Banlistjob
/proc/ClearAllBansjob()
Banlistjob.cd = "/base"
for (var/A in Banlistjob.dir)
for(var/A in Banlistjob.dir)
RemoveBanjob(A, "full")
@@ -156,7 +156,7 @@
/datum/admins/proc/updateranktodb(ckey,newrank)
establish_db_connection()
if (!dbcon.IsConnected())
if(!dbcon.IsConnected())
return
var/sql_ckey = sanitizeSQL(ckey)
var/sql_admin_rank = sanitizeSQL(newrank)
+7 -7
View File
@@ -1,6 +1,6 @@
/datum/admins/proc/player_panel_new()//The new one
if (!usr.client.holder)
if(!usr.client.holder)
return
var/dat = "<html><head><title>Admin Player Panel</title></head>"
@@ -29,7 +29,7 @@
var maintable_data = document.getElementById('maintable_data');
var ltr = maintable_data.getElementsByTagName("tr");
for ( var i = 0; i < ltr.length; ++i )
for( var i = 0; i < ltr.length; ++i )
{
try{
var tr = ltr\[i\];
@@ -42,7 +42,7 @@
var search = lsearch\[0\];
//var inner_span = li.getElementsByTagName("span")\[1\] //Should only ever contain one element.
//document.write("<p>"+search.innerText+"<br>"+filter+"<br>"+search.innerText.indexOf(filter))
if ( search.innerText.toLowerCase().indexOf(filter) == -1 )
if( search.innerText.toLowerCase().indexOf(filter) == -1 )
{
//document.write("a");
//ltr.removeChild(tr);
@@ -332,7 +332,7 @@
//The old one
/datum/admins/proc/player_panel_old()
if (!usr.client.holder)
if(!usr.client.holder)
return
var/dat = "<html><head><title>Player Menu</title></head>"
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name</th><th>Real Name</th><th>Assigned Job</th><th>Key</th><th>Options</th><th>PM</th><th>Traitor?</th></tr></B>"
@@ -406,7 +406,7 @@
/datum/admins/proc/check_antagonists()
if(!check_rights(R_ADMIN)) return
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
if(ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)]:[add_zero(num2text(ROUND_TIME / 10 % 60), 2)]</B><BR>"
@@ -547,12 +547,12 @@
return txt
/datum/admins/proc/check_role_table_row(mob/M, show_objectives)
if (!istype(M))
if(!istype(M))
return "<tr><td><i>Not found!</i></td></tr>"
var/txt = check_antagonists_line(M, close = 0)
if (show_objectives)
if(show_objectives)
txt += {"
<td>
<a href='?src=\ref[src];traitor=\ref[M]'>Show Objective</a>
+3 -3
View File
@@ -14,7 +14,7 @@
dat += "</center>"
dat += "<HR>"
switch(current_tab)
if (0) // Debug
if(0) // Debug
if(check_rights(R_ADMIN,0))
dat += {"
<center><B><h2>Admin Secrets</h2></B>
@@ -67,7 +67,7 @@
</center>
"}
if (1)
if(1)
if(check_rights((R_EVENT|R_SERVER),0))
dat += {"
<center>
@@ -86,7 +86,7 @@
<BR>
</center>"}
if (2)
if(2)
if(check_rights((R_SERVER|R_EVENT),0))
dat += {"
<center>
+1 -1
View File
@@ -33,7 +33,7 @@
return
var/admin_sql_ckey = sanitizeSQL(adminckey)
if(!server)
if (config && config.server_name)
if(config && config.server_name)
server = config.server_name
server = sanitizeSQL(server)
var/DBQuery/query_noteadd = dbcon.NewQuery("INSERT INTO [format_table_name("notes")] (ckey, timestamp, notetext, adminckey, server) VALUES ('[target_sql_ckey]', '[timestamp]', '[notetext]', '[admin_sql_ckey]', '[server]')")
+42 -42
View File
@@ -2,32 +2,32 @@
if(!check_rights(R_BAN))
return
switch (action)
if ("show")
switch(action)
if("show")
stickyban_show()
return
if ("add")
if("add")
var/list/ban = list()
var/ckey
ban["admin"] = usr.key
ban["type"] = list("sticky")
ban["reason"] = "(InGameBan)([usr.key])" //this will be displayed in dd only
if (data["ckey"])
if(data["ckey"])
ckey = ckey(data["ckey"])
else
ckey = input(usr,"Ckey","Ckey","") as text|null
if (!ckey)
if(!ckey)
return
ckey = ckey(ckey)
if (get_stickyban_from_ckey(ckey))
if(get_stickyban_from_ckey(ckey))
to_chat(usr, "<span class='adminnotice'>Error: Can not add a stickyban: User already has a current sticky ban</span>")
if (data["reason"])
if(data["reason"])
ban["message"] = data["reason"]
else
var/reason = input(usr,"Reason","Reason","Ban Evasion") as text|null
if (!reason)
if(!reason)
return
ban["message"] = "[reason]"
@@ -36,18 +36,18 @@
log_admin("[key_name(usr)] has stickybanned [ckey].\nReason: [ban["message"]]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has stickybanned [ckey].\nReason: [ban["message"]]</span>")
if ("remove")
if (!data["ckey"])
if("remove")
if(!data["ckey"])
return
var/ckey = data["ckey"]
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
if(!ban)
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
return
if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
if(alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
return
if (!get_stickyban_from_ckey(ckey))
if(!get_stickyban_from_ckey(ckey))
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
return
world.SetConfig("ban", ckey, null)
@@ -55,46 +55,46 @@
log_admin("[key_name(usr)] removed [ckey]'s stickyban")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed [ckey]'s stickyban</span>")
if ("remove_alt")
if (!data["ckey"])
if("remove_alt")
if(!data["ckey"])
return
var/ckey = data["ckey"]
if (!data["alt"])
if(!data["alt"])
return
var/alt = ckey(data["alt"])
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
if(!ban)
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
return
var/found = 0
//we have to do it this way because byond keeps the case in its sticky ban matches WHY!!!
for (var/key in ban["keys"])
if (ckey(key) == alt)
for(var/key in ban["keys"])
if(ckey(key) == alt)
found = 1
break
if (!found)
if(!found)
to_chat(usr, "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>")
return
if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them","Are you sure","Yes","No") == "No")
if(alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them","Are you sure","Yes","No") == "No")
return
//we have to do this again incase something changes
ban = get_stickyban_from_ckey(ckey)
if (!ban)
if(!ban)
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
return
found = 0
for (var/key in ban["keys"])
if (ckey(key) == alt)
for(var/key in ban["keys"])
if(ckey(key) == alt)
ban["keys"] -= key
found = 1
break
if (!found)
if(!found)
to_chat(usr, "<span class='adminnotice'>Error: [alt] link to [ckey]'s sticky ban disappeared.</span>")
return
@@ -103,21 +103,21 @@
log_admin("[key_name(usr)] has disassociated [alt] from [ckey]'s sticky ban")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has disassociated [alt] from [ckey]'s sticky ban</span>")
if ("edit")
if (!data["ckey"])
if("edit")
if(!data["ckey"])
return
var/ckey = data["ckey"]
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
if(!ban)
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!")
return
var/oldreason = ban["message"]
var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null
if (!reason || reason == oldreason)
if(!reason || reason == oldreason)
return
//we have to do this again incase something changed while we waited for input
ban = get_stickyban_from_ckey(ckey)
if (!ban)
if(!ban)
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
return
ban["message"] = "[reason]"
@@ -133,13 +133,13 @@
/datum/admins/proc/stickyban_gethtml(ckey, ban)
. = "<a href='?_src_=holder;stickyban=remove&ckey=[ckey]'>\[-\]</a><b>[ckey]</b><br />"
. += "[ban["message"]] <b><a href='?_src_=holder;stickyban=edit&ckey=[ckey]'>\[Edit\]</a></b><br />"
if (ban["admin"])
if(ban["admin"])
. += "[ban["admin"]]<br />"
else
. += "LEGACY<br />"
. += "Caught keys<br />\n<ol>"
for (var/key in ban["keys"])
if (ckey(key) == ckey)
for(var/key in ban["keys"])
if(ckey(key) == ckey)
continue
. += "<li><a href='?_src_=holder;stickyban=remove_alt&ckey=[ckey]&alt=[ckey(key)]'>\[-\]</a>[key]</li>"
. += "</ol>\n"
@@ -168,17 +168,17 @@
usr << browse(html,"window=stickybans;size=700x400")
/proc/get_stickyban_from_ckey(var/ckey)
if (!ckey)
if(!ckey)
return null
ckey = ckey(ckey)
. = null
for (var/key in world.GetConfig("ban"))
if (ckey(key) == ckey)
for(var/key in world.GetConfig("ban"))
if(ckey(key) == ckey)
. = stickyban2list(world.GetConfig("ban",key))
break
/proc/stickyban2list(var/ban)
if (!ban)
if(!ban)
return null
. = params2list(ban)
.["keys"] = splittext(.["keys"], ",")
@@ -187,16 +187,16 @@
.["computer_id"] = splittext(.["computer_id"], ",")
/proc/list2stickyban(var/list/ban)
if (!ban || !islist(ban))
if(!ban || !islist(ban))
return null
. = ban.Copy()
if (.["keys"])
if(.["keys"])
.["keys"] = jointext(.["keys"], ",")
if (.["type"])
if(.["type"])
.["type"] = jointext(.["type"], ",")
if (.["IP"])
if(.["IP"])
.["IP"] = jointext(.["IP"], ",")
if (.["computer_id"])
if(.["computer_id"])
.["computer_id"] = jointext(.["computer_id"], ",")
. = list2params(.)
+39 -39
View File
@@ -877,7 +877,7 @@
else if(href_list["boot2"])
var/mob/M = locate(href_list["boot2"])
if (ismob(M))
if(ismob(M))
if(!check_if_greater_rights_than(M.client))
return
to_chat(M, "\red You have been kicked from the server")
@@ -1094,7 +1094,7 @@
else if(href_list["c_mode2"])
if(!check_rights(R_ADMIN|R_SERVER)) return
if (ticker && ticker.mode)
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [master_mode].")
@@ -1592,10 +1592,10 @@
if(isliving(M))
var/mob/living/L = M
var/status
switch (M.stat)
if (0) status = "Alive"
if (1) status = "<font color='orange'><b>Unconscious</b></font>"
if (2) status = "<font color='red'><b>Dead</b></font>"
switch(M.stat)
if(0) status = "Alive"
if(1) status = "<font color='orange'><b>Unconscious</b></font>"
if(2) status = "<font color='red'><b>Dead</b></font>"
health_description = "Status = [status]"
health_description += "<BR>Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()]"
else
@@ -1867,19 +1867,19 @@
return
var/obj/item/fax = locate(href_list["AdminFaxView"])
if (istype(fax, /obj/item/weapon/paper))
if(istype(fax, /obj/item/weapon/paper))
var/obj/item/weapon/paper/P = fax
P.show_content(usr,1)
else if (istype(fax, /obj/item/weapon/photo))
else if(istype(fax, /obj/item/weapon/photo))
var/obj/item/weapon/photo/H = fax
H.show(usr)
else if (istype(fax, /obj/item/weapon/paper_bundle))
else if(istype(fax, /obj/item/weapon/paper_bundle))
//having multiple people turning pages on a paper_bundle can cause issues
//open a browse window listing the contents instead
var/data = ""
var/obj/item/weapon/paper_bundle/B = fax
for (var/page = 1, page <= B.amount + 1, page++)
for(var/page = 1, page <= B.amount + 1, page++)
var/obj/pageobj = B.contents[page]
data += "<A href='?src=\ref[src];AdminFaxViewPage=[page];paper_bundle=\ref[B]'>Page [page] - [pageobj.name]</A><BR>"
@@ -1887,19 +1887,19 @@
else
to_chat(usr, "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]")
else if (href_list["AdminFaxViewPage"])
else if(href_list["AdminFaxViewPage"])
if(!check_rights(R_ADMIN))
return
var/page = text2num(href_list["AdminFaxViewPage"])
var/obj/item/weapon/paper_bundle/bundle = locate(href_list["paper_bundle"])
if (!bundle) return
if(!bundle) return
if (istype(bundle.contents[page], /obj/item/weapon/paper))
if(istype(bundle.contents[page], /obj/item/weapon/paper))
var/obj/item/weapon/paper/P = bundle.contents[page]
P.show_content(usr, 1)
else if (istype(bundle.contents[page], /obj/item/weapon/photo))
else if(istype(bundle.contents[page], /obj/item/weapon/photo))
var/obj/item/weapon/photo/H = bundle.contents[page]
H.show(usr)
return
@@ -2124,9 +2124,9 @@
var/atom/loc = usr.loc
var/dirty_paths
if (istext(href_list["object_list"]))
if(istext(href_list["object_list"]))
dirty_paths = list(href_list["object_list"])
else if (istype(href_list["object_list"], /list))
else if(istype(href_list["object_list"], /list))
dirty_paths = href_list["object_list"]
var/paths = list()
@@ -2160,22 +2160,22 @@
var/atom/target //Where the object will be spawned
var/where = href_list["object_where"]
if (!( where in list("onfloor","inhand","inmarked") ))
if(!( where in list("onfloor","inhand","inmarked") ))
where = "onfloor"
switch(where)
if("inhand")
if (!iscarbon(usr) && !isrobot(usr))
if(!iscarbon(usr) && !isrobot(usr))
to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.")
where = "onfloor"
target = usr
if("onfloor")
switch(href_list["offset_type"])
if ("absolute")
if("absolute")
target = locate(0 + X,0 + Y,0 + Z)
if ("relative")
if("relative")
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
if("inmarked")
if(!marked_datum)
@@ -2188,8 +2188,8 @@
target = marked_datum
if(target)
for (var/path in paths)
for (var/i = 0; i < number; i++)
for(var/path in paths)
for(var/i = 0; i < number; i++)
if(path in typesof(/turf))
var/turf/O = target
var/turf/N = O.ChangeTurf(path)
@@ -2217,7 +2217,7 @@
R.activate_module(I)
R.module.fix_modules()
if (number == 1)
if(number == 1)
log_admin("[key_name(usr)] created a [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
@@ -2287,7 +2287,7 @@
/* for(var/obj/machinery/vehicle/pod/O in world)
for(var/mob/M in src)
M.loc = src.loc
if (M.client)
if(M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
qdel(O)
@@ -2385,9 +2385,9 @@
continue
//don't strip organs
H.unEquip(W)
if (H.client)
if(H.client)
H.client.screen -= W
if (W)
if(W)
W.loc = H.loc
W.dropped(H)
W.layer = initial(W.layer)
@@ -2439,9 +2439,9 @@
feedback_add_details("admin_secrets_fun_used","BC")
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", MAX_EX_LIGHT_RANGE) as num|null
if (newBombCap < 4)
if(newBombCap < 4)
return
if (newBombCap > 128)
if(newBombCap > 128)
newBombCap = 128
MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
@@ -2728,7 +2728,7 @@
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
if(ok)
to_chat(world, text("<B>A secret has been activated by []!</B>", usr.key))
else if(href_list["secretsadmin"])
@@ -2768,7 +2768,7 @@
if("showgm")
if(!ticker)
alert("The game hasn't started yet!")
else if (ticker.mode)
else if(ticker.mode)
alert("The game mode is [ticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
if("manifest")
@@ -2803,9 +2803,9 @@
dat += "</table>"
usr << browse(dat, "window=fingerprints;size=440x410")
else
if (usr)
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]")
if (ok)
if(ok)
to_chat(world, text("<B>A secret has been activated by []!</B>", usr.key))
else if(href_list["secretscoder"])
@@ -2821,12 +2821,12 @@
usr << browse(dat, "window=admin_log")
if("maint_access_brig")
for(var/obj/machinery/door/airlock/maintenance/M in world)
if (access_maint_tunnels in M.req_access)
if(access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
for(var/obj/machinery/door/airlock/maintenance/M in world)
if (access_maint_tunnels in M.req_access)
if(access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
@@ -2843,7 +2843,7 @@
else if(href_list["ac_set_channel_name"])
src.admincaster_feed_channel.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
while (findtext(src.admincaster_feed_channel.channel_name," ") == 1)
while(findtext(src.admincaster_feed_channel.channel_name," ") == 1)
src.admincaster_feed_channel.channel_name = copytext(src.admincaster_feed_channel.channel_name,2,lentext(src.admincaster_feed_channel.channel_name)+1)
src.access_news_network()
@@ -2882,7 +2882,7 @@
else if(href_list["ac_set_new_message"])
src.admincaster_feed_message.body = adminscrub(input(usr, "Write your Feed story", "Network Channel Handler", ""))
while (findtext(src.admincaster_feed_message.body," ") == 1)
while(findtext(src.admincaster_feed_message.body," ") == 1)
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.body,2,lentext(src.admincaster_feed_message.body)+1)
src.access_news_network()
@@ -2936,13 +2936,13 @@
else if(href_list["ac_set_wanted_name"])
src.admincaster_feed_message.author = adminscrub(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
while (findtext(src.admincaster_feed_message.author," ") == 1)
while(findtext(src.admincaster_feed_message.author," ") == 1)
src.admincaster_feed_message.author = copytext(admincaster_feed_message.author,2,lentext(admincaster_feed_message.author)+1)
src.access_news_network()
else if(href_list["ac_set_wanted_desc"])
src.admincaster_feed_message.body = adminscrub(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
while (findtext(src.admincaster_feed_message.body," ") == 1)
while(findtext(src.admincaster_feed_message.body," ") == 1)
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.body,2,lentext(src.admincaster_feed_message.body)+1)
src.access_news_network()
@@ -3025,7 +3025,7 @@
else if(href_list["ac_setScreen"]) //Brings us to the main menu and resets all fields~
src.admincaster_screen = text2num(href_list["ac_setScreen"])
if (src.admincaster_screen == 0)
if(src.admincaster_screen == 0)
if(src.admincaster_feed_channel)
src.admincaster_feed_channel = new /datum/feed_channel
if(src.admincaster_feed_message)
+2 -2
View File
@@ -412,7 +412,7 @@
else if(expression[start + 1] == "\[" && islist(v))
var/list/L = v
var/index = SDQL_expression(source, expression[start + 2])
if (isnum(index) && (!IsInteger(index) || L.len < index))
if(isnum(index) && (!IsInteger(index) || L.len < index))
to_chat(world, "<span class='danger'>Invalid list index: [index]</span>")
return null
return L[index]
@@ -424,7 +424,7 @@
for(var/arg in arguments)
new_args[++new_args.len] = SDQL_expression(source, arg)
if (object == world) // Global proc.
if(object == world) // Global proc.
procname = "/proc/[procname]"
return call(procname)(arglist(new_args))
@@ -358,7 +358,7 @@
else if(token(i + 1) == "\[") // list index
var/list/expression = list()
i = expression(i + 2, expression)
if (token(i) != "]")
if(token(i) != "]")
parse_error("Missing ] at the end of list access.")
L += "\["
+1 -1
View File
@@ -99,7 +99,7 @@
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
//clean the message if it's not sent by a high-rank admin
+1 -1
View File
@@ -27,7 +27,7 @@
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("MOD: [key_name(src)] : [msg]")
if (!msg)
if(!msg)
return
var/spanclass = "mod_channel"
+9 -9
View File
@@ -12,18 +12,18 @@
to_chat(usr, "Checking for disconnected pipes...")
//all plumbing - yes, some things might get stated twice, doesn't matter.
for (var/obj/machinery/atmospherics/plumbing in world)
if (plumbing.nodealert)
for(var/obj/machinery/atmospherics/plumbing in world)
if(plumbing.nodealert)
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
//Manifolds
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
if(!pipe.node1 || !pipe.node2 || !pipe.node3)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
//Pipes
for (var/obj/machinery/atmospherics/pipe/simple/pipe in world)
if (!pipe.node1 || !pipe.node2)
for(var/obj/machinery/atmospherics/pipe/simple/pipe in world)
if(!pipe.node1 || !pipe.node2)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
to_chat(usr, "Checking for overlapping pipes...")
@@ -47,13 +47,13 @@
return
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/datum/powernet/PN in powernets)
if (!PN.nodes || !PN.nodes.len)
for(var/datum/powernet/PN in powernets)
if(!PN.nodes || !PN.nodes.len)
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
if (!PN.cables || (PN.cables.len < 10))
if(!PN.cables || (PN.cables.len < 10))
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
+5 -5
View File
@@ -17,24 +17,24 @@
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
return
if (handle_spam_prevention(msg,MUTE_DEADCHAT))
if(handle_spam_prevention(msg,MUTE_DEADCHAT))
return
var/stafftype = null
if (check_rights(R_MENTOR, 0))
if(check_rights(R_MENTOR, 0))
stafftype = "MENTOR"
if (check_rights(R_MOD, 0))
if(check_rights(R_MOD, 0))
stafftype = "MOD"
if (check_rights(R_ADMIN, 0))
if(check_rights(R_ADMIN, 0))
stafftype = "ADMIN"
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("[key_name(src)] : [msg]")
if (!msg)
if(!msg)
return
var/prefix = "[stafftype] ([src.key])"
+20 -20
View File
@@ -194,7 +194,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
var/turf/T = mob.loc
if (!( istype(T, /turf) ))
if(!( istype(T, /turf) ))
return
var/datum/gas_mixture/env = T.return_air()
@@ -399,12 +399,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!check_rights(R_EVENT))
return
if (!ticker)
if(!ticker)
alert("Wait until the game starts")
return
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if (H.wear_id)
if(H.wear_id)
var/obj/item/weapon/card/id/id = H.wear_id
if(istype(H.wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = H.wear_id
@@ -616,32 +616,32 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(isnull(dostrip))
return
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
if (isnull(dresscode))
if(isnull(dresscode))
return
var/datum/job/jobdatum
if (dresscode == "as job...")
if(dresscode == "as job...")
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
jobdatum = job_master.GetJob(jobname)
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(dostrip)
for (var/obj/item/I in M)
if (istype(I, /obj/item/weapon/implant))
for(var/obj/item/I in M)
if(istype(I, /obj/item/weapon/implant))
continue
if(istype(I, /obj/item/organ))
continue
qdel(I)
switch(dresscode)
if ("strip")
if("strip")
//do nothing
if ("as job...")
if("as job...")
if(jobdatum)
dresscode = "[jobdatum.title]"
jobdatum.equip(M)
if ("standard space gear")
if("standard space gear")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
@@ -652,7 +652,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
J.toggle()
M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask)
J.Topic(null, list("stat" = 1))
if ("Engineer RIG","CE RIG","Mining RIG","Syndi RIG","Wizard RIG","Medical RIG","Atmos RIG")
if("Engineer RIG","CE RIG","Mining RIG","Syndi RIG","Wizard RIG","Medical RIG","Atmos RIG")
if(dresscode=="Engineer RIG")
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig(M), slot_head)
@@ -680,8 +680,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask)
J.Topic(null, list("stat" = 1))
if ("tournament standard red","tournament standard green") //we think stunning weapon is too overpowered to use it on tournaments. --rastaf0
if (dresscode=="tournament standard red")
if("tournament standard red","tournament standard green") //we think stunning weapon is too overpowered to use it on tournaments. --rastaf0
if(dresscode=="tournament standard red")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
else
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/green(M), slot_w_uniform)
@@ -695,7 +695,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/smokebomb(M), slot_r_store)
if ("tournament gangster") //gangster are supposed to fight each other. --rastaf0
if("tournament gangster") //gangster are supposed to fight each other. --rastaf0
M.equip_to_slot_or_del(new /obj/item/clothing/under/det(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
@@ -707,7 +707,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/proto(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_l_store)
if ("tournament chef") //Steven Seagal FTW
if("tournament chef") //Steven Seagal FTW
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
@@ -718,7 +718,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_s_store)
if ("tournament janitor")
if("tournament janitor")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
var/obj/item/weapon/storage/backpack/backpack = new(M)
@@ -741,14 +741,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
if ("pirate")
if("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
if ("space pirate")
if("space pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/pirate(M), slot_wear_suit)
@@ -757,7 +757,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
if ("soviet soldier")
if("soviet soldier")
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
+6 -6
View File
@@ -83,20 +83,20 @@
"_default" = "NO_FILTER"
)
var/output = "<b>Radio Report</b><hr>"
for (var/fq in radio_controller.frequencies)
for(var/fq in radio_controller.frequencies)
output += "<b>Freq: [fq]</b><br>"
var/list/datum/radio_frequency/fqs = radio_controller.frequencies[fq]
if (!fqs)
if(!fqs)
output += "&nbsp;&nbsp;<b>ERROR</b><br>"
continue
for (var/filter in fqs.devices)
for(var/filter in fqs.devices)
var/list/f = fqs.devices[filter]
if (!f)
if(!f)
output += "&nbsp;&nbsp;[filters[filter]]: ERROR<br>"
continue
output += "&nbsp;&nbsp;[filters[filter]]: [f.len]<br>"
for (var/device in f)
if (isobj(device))
for(var/device in f)
if(isobj(device))
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
else
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device]<br>"
+1 -1
View File
@@ -93,7 +93,7 @@ var/global/list/frozen_mob_list = list()
return
else
if(usr)
if (usr.client)
if(usr.client)
if(usr.client.holder)
var/adminomaly = new/obj/effect/overlay/adminoverlay
if(M.can_move == 1)
+1 -1
View File
@@ -50,7 +50,7 @@ var/global/sent_honksquad = 0
//Spawns HONKsquad and equips them.
for(var/obj/effect/landmark/L in landmarks_list)
if(honksquad_number<=0) break
if (L.name == "HONKsquad")
if(L.name == "HONKsquad")
honk_leader_selected = honksquad_number == 1?1:0
var/mob/living/carbon/human/new_honksquad = create_honksquad(L, honk_leader_selected)
+2 -2
View File
@@ -86,7 +86,7 @@ var/intercom_range_display_status = 0
if(!(locate(/obj/structure/grille,T)))
var/window_check = 0
for(var/obj/structure/window/W in T)
if (W.dir == turn(C1.dir,180) || W.is_fulltile() )
if(W.dir == turn(C1.dir,180) || W.is_fulltile() )
window_check = 1
break
if(!window_check)
@@ -115,7 +115,7 @@ var/intercom_range_display_status = 0
for(var/obj/item/device/radio/intercom/I in world)
for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc)))
if(!(F in view(7,I.loc)))
qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+38 -38
View File
@@ -34,7 +34,7 @@
return
var/list/names = list()
for (var/V in O.vars)
for(var/V in O.vars)
names += V
names = sortList(names)
@@ -123,7 +123,7 @@
var/original_name
if (!istype(O, /atom))
if(!istype(O, /atom))
original_name = "\ref[O] ([O])"
else
original_name = O:name
@@ -135,33 +135,33 @@
if(method)
if(istype(O, /mob))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
if("edit referenced object")
@@ -175,32 +175,32 @@
if(method)
if(istype(O, /mob))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
if("num")
@@ -216,7 +216,7 @@
if(method)
if(istype(O, /mob))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if( istype(M , O.type) )
if(variable=="light_range")
M.set_light(new_value)
else
@@ -224,7 +224,7 @@
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
if(variable=="light_range")
A.set_light(new_value)
else
@@ -232,7 +232,7 @@
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
if(variable=="light_range")
A.set_light(new_value)
else
@@ -241,7 +241,7 @@
else
if(istype(O, /mob))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(M.type == O.type)
if(variable=="light_range")
M.set_light(new_value)
else
@@ -249,7 +249,7 @@
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(A.type == O.type)
if(variable=="light_range")
A.set_light(new_value)
else
@@ -257,7 +257,7 @@
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(A.type == O.type)
if(variable=="light_range")
A.set_light(new_value)
else
@@ -271,32 +271,32 @@
if(method)
if(istype(O, /mob))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
if("file")
@@ -307,32 +307,32 @@
if(method)
if(istype(O, /mob))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O.type, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O.type, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O.type, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O.type, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
if("icon")
@@ -342,33 +342,33 @@
if(method)
if(istype(O, /mob))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(A.type == O.type)
A.vars[variable] = O.vars[variable]
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
+3 -3
View File
@@ -17,7 +17,7 @@ var/list/forbidden_varedit_object_types = list(
set category = "Debug"
set name = "Edit Ticker Variables"
if (ticker == null)
if(ticker == null)
to_chat(src, "Game hasn't started yet.")
else
src.modify_variables(ticker)
@@ -308,7 +308,7 @@ var/list/forbidden_varedit_object_types = list(
else
var/list/names = list()
for (var/V in O.vars)
for(var/V in O.vars)
names += V
names = sortList(names)
@@ -347,7 +347,7 @@ var/list/forbidden_varedit_object_types = list(
var/original_name
if (!istype(O, /atom))
if(!istype(O, /atom))
original_name = "\ref[O] ([O])"
else
original_name = O:name
+13 -13
View File
@@ -62,7 +62,7 @@ client/proc/one_click_antag()
if(player_old_enough_antag(applicant.client,ROLE_TRAITOR))
if(!applicant.stat)
if(applicant.mind)
if (!applicant.mind.special_role)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.mind.assigned_role in temp.restricted_jobs))
if(!(applicant.client.prefs.species in temp.protected_species))
@@ -96,7 +96,7 @@ client/proc/one_click_antag()
if(player_old_enough_antag(applicant.client,ROLE_CHANGELING))
if(!applicant.stat)
if(applicant.mind)
if (!applicant.mind.special_role)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.mind.assigned_role in temp.restricted_jobs))
if(!(applicant.client.prefs.species in temp.protected_species))
@@ -277,13 +277,13 @@ client/proc/one_click_antag()
if(closet_spawn)
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
for (var/obj/effect/landmark/A in /area/syndicate_station/start)//Because that's the only place it can BE -Sieve
if (A.name == "Syndicate-Gear-Closet")
for(var/obj/effect/landmark/A in /area/syndicate_station/start)//Because that's the only place it can BE -Sieve
if(A.name == "Syndicate-Gear-Closet")
new /obj/structure/closet/syndicate/personal(A.loc)
qdel(A)
continue
if (A.name == "Syndicate-Bomb")
if(A.name == "Syndicate-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(A.loc)
qdel(A)
continue
@@ -303,7 +303,7 @@ client/proc/one_click_antag()
var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
synd_mind.current.client.images += I
for (var/obj/machinery/nuclearbomb/bomb in world)
for(var/obj/machinery/nuclearbomb/bomb in world)
bomb.r_code = nuke_code // All the nukes are set to this code.
return 1
@@ -356,10 +356,10 @@ client/proc/one_click_antag()
if(candidates.len)
var/numagents = 6
//Spawns commandos and equips them.
for (var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad)
for(var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad)
if(numagents<=0)
break
if (L.name == "Syndicate-Commando")
if(L.name == "Syndicate-Commando")
syndicate_leader_selected = numagents == 1?1:0
var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected)
@@ -386,8 +386,8 @@ client/proc/one_click_antag()
if(numagents >= 6)
return 0
for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite)
if (L.name == "Syndicate-Commando-Bomb")
for(var/obj/effect/landmark/L in /area/shuttle/syndicate_elite)
if(L.name == "Syndicate-Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
return 1
@@ -469,7 +469,7 @@ client/proc/one_click_antag()
var/max_raiders = 1
var/raiders = max_raiders
//Spawns vox raiders and equips them.
for (var/obj/effect/landmark/L in world)
for(var/obj/effect/landmark/L in world)
if(L.name == "voxstart")
if(raiders<=0)
break
@@ -551,7 +551,7 @@ client/proc/one_click_antag()
if(player_old_enough_antag(applicant.client,ROLE_VAMPIRE))
if(!applicant.stat)
if(applicant.mind)
if (!applicant.mind.special_role)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "vampire") && !jobban_isbanned(applicant, "Syndicate"))
if(!(applicant.job in temp.restricted_jobs))
if(!(applicant.client.prefs.species in temp.protected_species))
@@ -600,7 +600,7 @@ client/proc/one_click_antag()
var/teamOneMembers = 5
var/teamTwoMembers = 5
var/datum/preferences/A = new()
for (var/obj/effect/landmark/L in world)
for(var/obj/effect/landmark/L in world)
if(L.name == "tdome1")
if(teamOneMembers<=0)
break
+2 -2
View File
@@ -27,8 +27,8 @@
to_chat(H, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
for (var/obj/item/I in H)
if (istype(I, /obj/item/weapon/implant))
for(var/obj/item/I in H)
if(istype(I, /obj/item/weapon/implant))
continue
if(istype(I, /obj/item/organ))
continue
+2 -2
View File
@@ -15,8 +15,8 @@
var/datum/preferences/A = new() // Randomize appearance
A.copy_to(H)
for (var/obj/item/I in H)
if (istype(I, /obj/item/weapon/implant))
for(var/obj/item/I in H)
if(istype(I, /obj/item/weapon/implant))
continue
if(istype (I, /obj/item/organ))
continue
+1 -1
View File
@@ -53,7 +53,7 @@
/proc/ERT_Announce(var/text , var/mob/Sender, var/repeat_warning)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "<span class='adminnotice'><b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>RESPOND</A>):</b> [msg]</span>"
if (repeat_warning)
if(repeat_warning)
msg += "<BR><span class='adminnotice'><b>WARNING: ERT request has gone 5 minutes with no reply!</b></span>"
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
+14 -14
View File
@@ -23,7 +23,7 @@
if(!check_rights(R_ADMIN))
return
if (ismob(M))
if(ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to prison you jerk!", null, null, null, null, null)
return
@@ -56,10 +56,10 @@
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
if (!msg)
if(!msg)
return
if(usr)
if (usr.client)
if(usr.client)
if(usr.client.holder)
to_chat(M, "\bold You hear a voice in your head... \italic [msg]")
@@ -108,7 +108,7 @@
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
if (!msg)
if(!msg)
return
to_chat(world, "[msg]")
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
@@ -561,7 +561,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("No")
to_chat(world, "\red [from] available at all communications consoles.")
for (var/obj/machinery/computer/communications/C in machines)
for(var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
P.name = "[from]"
@@ -581,7 +581,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("No")
to_chat(world, "\red New Nanotrasen Update available at all communication consoles.")
for (var/obj/machinery/computer/communications/C in machines)
for(var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
P.name = "'[command_name()] Update.'"
@@ -603,7 +603,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
if (alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
if(alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -643,9 +643,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
if((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
if(alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
return
explosion(O, devastation, heavy, light, flash, null, null,flames)
@@ -668,7 +668,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/light = input("Range of light pulse.", text("Input")) as num|null
if(light == null) return
if (heavy || light)
if(heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])")
@@ -710,7 +710,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm == "Yes")
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
if(istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
return
else
mob.gib()
@@ -791,7 +791,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Toggle Deny Shuttle"
if (!ticker)
if(!ticker)
return
if(!check_rights(R_ADMIN))
@@ -824,7 +824,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_SERVER|R_EVENT))
return
if (ticker && ticker.mode)
if(ticker && ticker.mode)
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
return
+7 -7
View File
@@ -55,7 +55,7 @@ var/global/sent_strike_team = 0
//Spawns commandos and equips them.
for(var/obj/effect/landmark/L in landmarks_list)
if(commando_number<=0) break
if (L.name == "Commando")
if(L.name == "Commando")
leader_selected = commando_number == 1?1:0
var/mob/living/carbon/human/new_commando = create_death_commando(L, leader_selected)
@@ -76,8 +76,8 @@ var/global/sent_strike_team = 0
commando_number--
//Spawns the rest of the commando gear.
for (var/obj/effect/landmark/L in landmarks_list)
if (L.name == "Commando_Manual")
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Commando_Manual")
//new /obj/item/weapon/gun/energy/pulse_rifle(L.loc)
var/obj/item/weapon/paper/P = new(L.loc)
P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>"
@@ -87,8 +87,8 @@ var/global/sent_strike_team = 0
P.stamp(stamp)
qdel(stamp)
for (var/obj/effect/landmark/L in landmarks_list)
if (L.name == "Commando-Bomb")
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
qdel(L)
@@ -125,7 +125,7 @@ var/global/sent_strike_team = 0
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/alt(src)
R.set_frequency(DTH_FREQ)
equip_to_slot_or_del(R, slot_l_ear)
if (leader_selected == 0)
if(leader_selected == 0)
equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform)
else
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
@@ -143,7 +143,7 @@ var/global/sent_strike_team = 0
equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack)
if (!leader_selected)
if(!leader_selected)
equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_in_backpack)
else
equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack)
@@ -32,7 +32,7 @@ var/global/sent_syndicate_strike_team = 0
sent_syndicate_strike_team = 1
//if (emergency_shuttle.can_recall())
//if(emergency_shuttle.can_recall())
// emergency_shuttle.recall() //why, exactly? Admins can do this themselves.
var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader
@@ -62,7 +62,7 @@ var/global/sent_syndicate_strike_team = 0
//Spawns commandos and equips them.
for(var/obj/effect/landmark/L in landmarks_list)
if(syndicate_commando_number<=0) break
if (L.name == "Syndicate-Commando")
if(L.name == "Syndicate-Commando")
syndicate_leader_selected = syndicate_commando_number == 1?1:0
var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected)
@@ -83,15 +83,15 @@ var/global/sent_syndicate_strike_team = 0
syndicate_commando_number--
//Spawns the rest of the commando gear.
// for (var/obj/effect/landmark/L)
// if (L.name == "Commando_Manual")
// for(var/obj/effect/landmark/L)
// if(L.name == "Commando_Manual")
//new /obj/item/weapon/gun/energy/pulse_rifle(L.loc)
// var/obj/item/weapon/paper/P = new(L.loc)
// P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>"
// P.name = "Spec. Ops. Manual"
for (var/obj/effect/landmark/L in landmarks_list)
if (L.name == "Syndicate-Commando-Bomb")
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Syndicate-Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
qdel(L)
@@ -131,12 +131,12 @@ var/global/sent_syndicate_strike_team = 0
equip_to_slot_or_del(R, slot_l_ear)
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/syndie/advance(src), slot_shoes)
if (!syndicate_leader_selected)
if(!syndicate_leader_selected)
equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit)
else
equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/red/strike(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves)
if (!syndicate_leader_selected)
if(!syndicate_leader_selected)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head)
else
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/red/strike(src), slot_head)
@@ -150,7 +150,7 @@ var/global/sent_syndicate_strike_team = 0
equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack)
if (!syndicate_leader_selected)
if(!syndicate_leader_selected)
equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_in_backpack)
else
+1 -1
View File
@@ -75,6 +75,6 @@ var/global/vox_tick = 1
*/
vox_tick++
if (vox_tick > 4) vox_tick = 1
if(vox_tick > 4) vox_tick = 1
return 1
+1 -1
View File
@@ -54,7 +54,7 @@
return alarms
/datum/alarm_handler/proc/check_alarm_cleared(var/datum/alarm/alarm)
if ((alarm.end_time && world.time > alarm.end_time) || !alarm.sources.len)
if((alarm.end_time && world.time > alarm.end_time) || !alarm.sources.len)
alarms -= alarm
alarms_assoc -= alarm.origin
on_alarm_change(alarm, ALARM_CLEARED)
+1 -1
View File
@@ -97,7 +97,7 @@
/obj/machinery/arcade/proc/pay_with_card(var/obj/item/weapon/card/id/I, var/mob/user)
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
var/datum/money_account/customer_account = attempt_account_access_nosec(I.associated_account_number)
if (!customer_account)
if(!customer_account)
to_chat(user, "Error: Unable to access account. Please contact technical support if problem persists.")
return 0
+1 -1
View File
@@ -171,7 +171,7 @@ td.cost.toomuch {
if(href_list["eject"])
print_tickets()
if (href_list["buy"])
if(href_list["buy"])
var/itemID = text2num(href_list["buy"])
var/datum/prize_item/item = global_prizes.prizes[itemID]
var/sure = alert(usr,"Are you sure you wish to purchase [item.name] for [item.cost] tickets?","You sure?","Yes","No") in list("Yes","No")
+2 -2
View File
@@ -141,7 +141,7 @@
if(strength >=1)
explosion(ground_zero, 0, round(strength,1), round(strength*2,1), round(strength*3,1))
else if (strength >=0.5)
else if(strength >=0.5)
explosion(ground_zero, -1, 0, 1, 2)
else
ground_zero.assume_air(air_contents)
@@ -150,7 +150,7 @@
else if(air_contents.temperature > (T0C + 100))
strength = (fuel_moles/25)
if (strength >=1)
if(strength >=1)
explosion(ground_zero, -1, 0, round(strength,1), round(strength*3,1))
else
ground_zero.assume_air(air_contents)
+4 -4
View File
@@ -68,8 +68,8 @@
examine(mob/user)
..(user)
if ((in_range(src, user) || src.loc == user))
if (src.secured)
if((in_range(src, user) || src.loc == user))
if(src.secured)
to_chat(user, "\The [src] is ready!")
else
to_chat(user, "\The [src] can be attached!")
@@ -202,11 +202,11 @@
qdel(src)
return
if(2.0)
if (prob(50))
if(prob(50))
qdel(src)
return
if(3.0)
if (prob(25))
if(prob(25))
qdel(src)
return
return
+4 -4
View File
@@ -25,12 +25,12 @@
if(!..()) return 0//Cooldown check
var/turf/location = get_turf(loc)
if(location) location.hotspot_expose(1000,1000)
if (istype(src.loc,/obj/item/device/assembly_holder))
if (istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
if(istype(src.loc,/obj/item/device/assembly_holder))
if(istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
if (tank)
if(tank)
tank.boom()
if (istype(src.loc.loc, /obj/item/weapon/reagent_containers/glass/beaker/))
if(istype(src.loc.loc, /obj/item/weapon/reagent_containers/glass/beaker/))
var/obj/item/weapon/reagent_containers/glass/beaker/beakerbomb = src.loc.loc
if(beakerbomb)
beakerbomb.heat_beaker()
+2 -2
View File
@@ -42,8 +42,8 @@
HasProximity(atom/movable/AM as mob|obj)
if (istype(AM, /obj/effect/beam)) return
if (AM.move_speed < 12) sense()
if(istype(AM, /obj/effect/beam)) return
if(AM.move_speed < 12) sense()
return
+2 -2
View File
@@ -51,7 +51,7 @@
/obj/item/device/assembly/signaler/interact(mob/user as mob, flag1)
var/t1 = "-------"
// if ((src.b_stat && !( flag1 )))
// if((src.b_stat && !( flag1 )))
// t1 = text("-------<BR>\nGreen Wire: []<BR>\nRed Wire: []<BR>\nBlue Wire: []<BR>\n", (src.wires & 4 ? text("<A href='?src=\ref[];wires=4'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=4'>Mend Wire</A>", src)), (src.wires & 2 ? text("<A href='?src=\ref[];wires=2'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=2'>Mend Wire</A>", src)), (src.wires & 1 ? text("<A href='?src=\ref[];wires=1'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=1'>Mend Wire</A>", src)))
// else
// t1 = "-------" Speaker: [src.listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
@@ -94,7 +94,7 @@
onclose(usr, "radio")
return
if (href_list["freq"])
if(href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if(new_frequency < RADIO_LOW_FREQ || new_frequency > RADIO_HIGH_FREQ)
new_frequency = sanitize_frequency(new_frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
+1 -1
View File
@@ -61,7 +61,7 @@
if(!(A.returntype in valid_returntypes))
continue
choices[A.name]=A
if (choices.len==0)
if(choices.len==0)
testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
return 0
var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
@@ -32,7 +32,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260)
ui.set_initial_data(data)
ui.open()
+2 -2
View File
@@ -236,10 +236,10 @@ obj/machinery/gateway/centerstation/process()
if(!ready) return
if(!active) return
if(istype(M, /mob/living/carbon))
if (exilecheck(M)) return
if(exilecheck(M)) return
if(istype(M, /obj))
for(var/mob/living/carbon/F in M)
if (exilecheck(F)) return
if(exilecheck(F)) return
M.forceMove(get_step(stationgate.loc, SOUTH))
M.dir = SOUTH
@@ -175,7 +175,7 @@ var/sc_safecode5 = "[rand(0,9)]"
/obj/singularity/narsie/sc_Narsie/consume(var/atom/A)
if(is_type_in_list(A, uneatable))
return 0
if (istype(A,/mob/living))
if(istype(A,/mob/living))
var/mob/living/L = A
L.gib()
else if(istype(A,/obj/))
@@ -65,7 +65,7 @@
else if(is_special_character(user))
to_chat(user, "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away.")
else if (!insistinga)
else if(!insistinga)
to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?")
insistinga++
+7 -7
View File
@@ -30,27 +30,27 @@
Lines = file2list("config/example/away_mission_config.txt")
if(!Lines.len) return
for (var/t in Lines)
if (!t)
for(var/t in Lines)
if(!t)
continue
t = trim(t)
if (length(t) == 0)
if(length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
else if(copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
// var/value = null
if (pos)
if(pos)
name = lowertext(copytext(t, 1, pos))
// value = copytext(t, pos + 1)
else
name = lowertext(t)
if (!name)
if(!name)
continue
potentialRandomZlevels.Add(t)
@@ -68,7 +68,7 @@
log_to_dd(" Away mission loaded: [map]")
for(var/obj/effect/landmark/L in landmarks_list)
if (L.name != "awaystart")
if(L.name != "awaystart")
continue
awaydestinations.Add(L)
+11 -11
View File
@@ -46,10 +46,10 @@ You can set verify to TRUE if you want send() to sleep until the client has the
client << browse_rsc(asset_cache[asset_name], asset_name)
if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip.
if (client)
if(client)
client.cache += asset_name
return 1
if (!client)
if(!client)
return 0
client.sending |= asset_name
@@ -91,17 +91,17 @@ You can set verify to TRUE if you want send() to sleep until the client has the
var/list/unreceived = asset_list - (client.cache + client.sending)
if(!unreceived || !unreceived.len)
return 0
if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
if(unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
to_chat(client, "Sending Resources...")
for(var/asset in unreceived)
if (asset in asset_cache)
if(asset in asset_cache)
client << browse_rsc(asset_cache[asset], asset)
if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip.
if (client)
if(client)
client.cache += unreceived
return 1
if (!client)
if(!client)
return 0
client.sending |= unreceived
var/job = ++client.last_asset_job
@@ -129,9 +129,9 @@ You can set verify to TRUE if you want send() to sleep until the client has the
//The proc calls procs that sleep for long times.
proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
for(var/file in files)
if (!client)
if(!client)
break
if (register_asset)
if(register_asset)
register_asset(file,files[file])
send_asset(client,file)
sleep(-1) //queuing calls like this too quickly can cause issues in some client versions
@@ -159,7 +159,7 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
//get a assetdatum or make a new one
/proc/get_asset_datum(var/type)
if (!(type in asset_datums))
if(!(type in asset_datums))
return new type()
return asset_datums[type]
@@ -240,14 +240,14 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
/datum/asset/nanoui/register()
// Crawl the directories to find files.
for (var/path in common_dirs)
for(var/path in common_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // Ignore directories.
if(fexists(path + filename))
common[filename] = fcopy_rsc(path + filename)
register_asset(filename, common[filename])
for (var/path in uncommon_dirs)
for(var/path in uncommon_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // Ignore directories.
+4 -4
View File
@@ -210,7 +210,7 @@
switch(href_list["action"])
if ("openLink")
if("openLink")
src << link(href_list["link"])
..() //redirect to hsrc.Topic()
@@ -321,8 +321,8 @@
log_client_to_db()
if (ckey in clientmessages)
for (var/message in clientmessages[ckey])
if(ckey in clientmessages)
for(var/message in clientmessages[ckey])
to_chat(src, message)
clientmessages.Remove(ckey)
@@ -362,7 +362,7 @@
/client/proc/log_client_to_db()
if ( IsGuestKey(src.key) )
if( IsGuestKey(src.key) )
return
establish_db_connection()
+2 -2
View File
@@ -2,8 +2,8 @@ var/list/clientmessages = list()
proc/addclientmessage(var/ckey, var/message)
ckey = ckey(ckey)
if (!ckey || !message)
if(!ckey || !message)
return
if (!(ckey in clientmessages))
if(!(ckey in clientmessages))
clientmessages[ckey] = list()
clientmessages[ckey] += message
+24 -24
View File
@@ -526,7 +526,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
if (!job_master) return
if(!job_master) return
for(var/datum/job/job in job_master.occupations)
if(job.admin_only)
@@ -650,10 +650,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
return
/datum/preferences/proc/SetJobPreferenceLevel(var/datum/job/job, var/level)
if (!job)
if(!job)
return 0
if (level == 1) // to high
if(level == 1) // to high
// remove any other job(s) set to high
job_support_med |= job_support_high
job_engsec_med |= job_engsec_high
@@ -664,59 +664,59 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
job_medsci_high = 0
job_karma_high = 0
if (job.department_flag == SUPPORT)
if(job.department_flag == SUPPORT)
job_support_low &= ~job.flag
job_support_med &= ~job.flag
job_support_high &= ~job.flag
switch(level)
if (1)
if(1)
job_support_high |= job.flag
if (2)
if(2)
job_support_med |= job.flag
if (3)
if(3)
job_support_low |= job.flag
return 1
else if (job.department_flag == ENGSEC)
else if(job.department_flag == ENGSEC)
job_engsec_low &= ~job.flag
job_engsec_med &= ~job.flag
job_engsec_high &= ~job.flag
switch(level)
if (1)
if(1)
job_engsec_high |= job.flag
if (2)
if(2)
job_engsec_med |= job.flag
if (3)
if(3)
job_engsec_low |= job.flag
return 1
else if (job.department_flag == MEDSCI)
else if(job.department_flag == MEDSCI)
job_medsci_low &= ~job.flag
job_medsci_med &= ~job.flag
job_medsci_high &= ~job.flag
switch(level)
if (1)
if(1)
job_medsci_high |= job.flag
if (2)
if(2)
job_medsci_med |= job.flag
if (3)
if(3)
job_medsci_low |= job.flag
return 1
else if (job.department_flag == KARMA)
else if(job.department_flag == KARMA)
job_karma_low &= ~job.flag
job_karma_med &= ~job.flag
job_karma_high &= ~job.flag
switch(level)
if (1)
if(1)
job_karma_high |= job.flag
if (2)
if(2)
job_karma_med |= job.flag
if (3)
if(3)
job_karma_low |= job.flag
return 1
@@ -731,7 +731,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
ShowChoices(user)
return
if (!isnum(desiredLvl))
if(!isnum(desiredLvl))
to_chat(user, "\red UpdateJobPreference - desired level was not a number. Please notify coders!")
ShowChoices(user)
return
@@ -991,9 +991,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
else
return 0
SetChoices(user)
if ("alt_title")
if("alt_title")
var/datum/job/job = locate(href_list["job"])
if (job)
if(job)
var/choices = list(job.title) + job.alt_titles
var/choice = input("Pick a title for [job.title].", "Character Generation", GetPlayerAltTitle(job)) as anything in choices | null
if(choice)
@@ -1149,7 +1149,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
switch(href_list["preference"])
if("name")
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
if(!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
var/new_name = reject_bad_name(raw_name)
if(new_name)
real_name = new_name
@@ -1817,7 +1817,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
close_load_dialog(user)
if("tab")
if (href_list["tab"])
if(href_list["tab"])
current_tab = text2num(href_list["tab"])
ShowChoices(user)
@@ -59,7 +59,7 @@
/datum/preferences/proc/save_preferences(client/C)
// Might as well scrub out any malformed be_special list entries while we're here
for (var/role in be_special)
for(var/role in be_special)
if(!(role in special_roles))
log_to_dd("[C.key] had a malformed role entry: '[role]'. Removing!")
be_special -= role
+15 -15
View File
@@ -31,7 +31,7 @@
/obj/item/clothing/mob_can_equip(M as mob, slot)
//if we can equip the item anyway, don't bother with species_restricted (aslo cuts down on spam)
if (!..())
if(!..())
return 0
if(species_restricted && istype(M,/mob/living/carbon/human))
@@ -66,12 +66,12 @@
species_restricted = list(target_species)
//Set icon
if (sprite_sheets && (target_species in sprite_sheets))
if(sprite_sheets && (target_species in sprite_sheets))
icon_override = sprite_sheets[target_species]
else
icon_override = initial(icon_override)
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
if(sprite_sheets_obj && (target_species in sprite_sheets_obj))
icon = sprite_sheets_obj[target_species]
else
icon = initial(icon)
@@ -84,9 +84,9 @@
slot_flags = SLOT_EARS
/obj/item/clothing/ears/attack_hand(mob/user as mob)
if (!user) return
if(!user) return
if (src.loc != user || !istype(user,/mob/living/carbon/human))
if(src.loc != user || !istype(user,/mob/living/carbon/human))
..()
return
@@ -110,7 +110,7 @@
user.unEquip(src)
if (O)
if(O)
user.put_in_hands(O)
O.add_fingerprint(user)
@@ -212,8 +212,8 @@ BLIND // can't see anything
/obj/item/clothing/under/proc/set_sensors(mob/user as mob)
var/mob/M = user
if (istype(M, /mob/dead/)) return
if (user.stat || user.restrained()) return
if(istype(M, /mob/dead/)) return
if(user.stat || user.restrained()) return
if(has_sensor >= 2)
to_chat(user, "The controls are locked.")
return 0
@@ -228,7 +228,7 @@ BLIND // can't see anything
return
sensor_mode = modes.Find(switchMode) - 1
if (src.loc == user)
if(src.loc == user)
switch(sensor_mode)
if(0)
to_chat(user, "You disable your suit's remote sensing equipment.")
@@ -243,7 +243,7 @@ BLIND // can't see anything
if(H.w_uniform == src)
H.update_suit_sensors()
else if (istype(src.loc, /mob))
else if(istype(src.loc, /mob))
switch(sensor_mode)
if(0)
for(var/mob/V in viewers(user, 1))
@@ -591,7 +591,7 @@ BLIND // can't see anything
return 0
if(accessories.len && (A.slot in list("utility","armband")))
for(var/obj/item/clothing/accessory/AC in accessories)
if (AC.slot == A.slot)
if(AC.slot == A.slot)
return 0
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
@@ -624,18 +624,18 @@ BLIND // can't see anything
A.attack_hand(user)
return
if (ishuman(usr) && src.loc == user) //make it harder to accidentally undress yourself
if(ishuman(usr) && src.loc == user) //make it harder to accidentally undress yourself
return
..()
/obj/item/clothing/under/MouseDrop(obj/over_object as obj)
if (ishuman(usr))
if(ishuman(usr))
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
if (!(src.loc == usr))
if(!(src.loc == usr))
return
if (!( usr.restrained() ) && !( usr.stat ) && ( over_object ))
if(!( usr.restrained() ) && !( usr.stat ) && ( over_object ))
switch(over_object.name)
if("r_hand")
usr.unEquip(src)
+1 -1
View File
@@ -18,7 +18,7 @@
name = "prescription [name]"
/obj/item/clothing/glasses/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (user.stat || user.restrained() || !ishuman(user))
if(user.stat || user.restrained() || !ishuman(user))
return ..()
var/mob/living/carbon/human/H = user
if(prescription_upgradable)
+2 -2
View File
@@ -96,13 +96,13 @@
if(M.l_hand == src || M.r_hand == src || M.head == src)
location = M.loc
if (istype(location, /turf))
if(istype(location, /turf))
location.hotspot_expose(700, 1)
/obj/item/clothing/head/cakehat/attack_self(mob/user as mob)
if(status > 1) return
src.onfire = !( src.onfire )
if (src.onfire)
if(src.onfire)
src.force = 3
src.damtype = "fire"
src.icon_state = "cake1"
+3 -3
View File
@@ -88,7 +88,7 @@
item_color = "orange"
/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
if (src.chained)
if(src.chained)
src.chained = null
src.slowdown = SHOES_SLOWDOWN
new /obj/item/weapon/restraints/handcuffs( user.loc )
@@ -97,8 +97,8 @@
/obj/item/clothing/shoes/orange/attackby(obj/H, loc, params)
..()
if (istype(H, /obj/item/weapon/restraints/handcuffs) && !chained && !(H.flags & NODROP))
if (src.icon_state != "orange") return
if(istype(H, /obj/item/weapon/restraints/handcuffs) && !chained && !(H.flags & NODROP))
if(src.icon_state != "orange") return
qdel(H)
src.chained = 1
src.slowdown = 15
+2 -2
View File
@@ -195,7 +195,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if (H.shoes != src)
if(H.shoes != src)
to_chat(user, "You will have to put on the [src] before you can do that.")
return
@@ -217,7 +217,7 @@
/obj/item/clothing/shoes/magboots/vox/examine(mob/user)
..(user)
if (magpulse)
if(magpulse)
to_chat(user, "It would be hard to take these off without relaxing your grip first.")//theoretically this message should only be seen by the wearer when the claws are equipped.
+3 -3
View File
@@ -106,7 +106,7 @@ var/global/list/breach_burn_descriptors = list(
if(existing.damtype != damtype)
continue
if (existing.class < 5)
if(existing.class < 5)
var/needs = 5 - existing.class
if(amount < needs)
existing.class += amount
@@ -120,7 +120,7 @@ var/global/list/breach_burn_descriptors = list(
else if(existing.damtype == BURN)
T.visible_message("<span class = 'warning'>\The [existing.descriptor] on [src] widens!</span>")
if (amount)
if(amount)
//Spawn a new breach.
var/datum/breach/B = new()
breaches += B
@@ -200,7 +200,7 @@ var/global/list/breach_burn_descriptors = list(
to_chat(user, "\red How do you intend to patch a hardsuit while someone is wearing it?")
return
if (!damage || ! brute_damage)
if(!damage || ! brute_damage)
to_chat(user, "There is no structural damage on \the [src] to repair.")
return
+3 -3
View File
@@ -431,7 +431,7 @@
if(!offline)
if(istype(wearer))
if(flags & NODROP)
if (offline_slowdown < 3)
if(offline_slowdown < 3)
to_chat(wearer, "<span class='danger'>Your suit beeps stridently, and suddenly goes dead.</span>")
else
to_chat(wearer, "<span class='danger'>Your suit beeps stridently, and suddenly you're wearing a leaden mass of metal and plastic composites instead of a powered suit.</span>")
@@ -576,7 +576,7 @@
data["modules"] = module_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
ui.set_initial_data(data)
ui.open()
@@ -819,7 +819,7 @@
take_hit((100/severity_class), "electrical pulse", 1)
/obj/item/weapon/rig/proc/shock(mob/user)
if (electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
if(electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
spark_system.start()
if(user.stunned)
return 1
+3 -3
View File
@@ -14,11 +14,11 @@
return ..()
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
if (pockets.handle_attack_hand(user))
if(pockets.handle_attack_hand(user))
..(user)
/obj/item/clothing/suit/storage/MouseDrop(obj/over_object as obj)
if (pockets.handle_mousedrop(usr, over_object))
if(pockets.handle_mousedrop(usr, over_object))
..(over_object)
/obj/item/clothing/suit/storage/attackby(obj/item/W as obj, mob/user as mob, params)
@@ -47,6 +47,6 @@
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
if(istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
@@ -236,7 +236,7 @@
..()
/obj/item/clothing/accessory/holobadge/emag_act(user as mob)
if (emagged)
if(emagged)
to_chat(user, "\red [src] is already cracked.")
return
else
@@ -424,15 +424,15 @@
return
var/list/A = U.accessories
var/total = A.len
if (total == 1)
if(total == 1)
return "\a [A[1]]"
else if (total == 2)
else if(total == 2)
return "\a [A[1]] and \a [A[2]]"
else
var/output = ""
var/index = 1
var/comma_text = ", "
while (index < total)
while(index < total)
output += "\a [A[index]][comma_text]"
index++
@@ -67,8 +67,8 @@
holstered = null
/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob)
if (has_suit) //if we are part of a suit
if (holstered)
if(has_suit) //if we are part of a suit
if(holstered)
unholster(user)
return
@@ -78,13 +78,13 @@
holster(W, user)
/obj/item/clothing/accessory/holster/emp_act(severity)
if (holstered)
if(holstered)
holstered.emp_act(severity)
..()
/obj/item/clothing/accessory/holster/examine(mob/user)
..(user)
if (holstered)
if(holstered)
to_chat(user, "A [holstered] is holstered here.")
else
to_chat(user, "It is empty.")
@@ -106,14 +106,14 @@
if(usr.stat) return
var/obj/item/clothing/accessory/holster/H = null
if (istype(src, /obj/item/clothing/accessory/holster))
if(istype(src, /obj/item/clothing/accessory/holster))
H = src
else if (istype(src, /obj/item/clothing/under))
else if(istype(src, /obj/item/clothing/under))
var/obj/item/clothing/under/S = src
if (S.accessories.len)
if(S.accessories.len)
H = locate() in S.accessories
if (!H)
if(!H)
to_chat(usr, "<span class='warning'>Something is very wrong.</span>")
if(!H.holstered)
@@ -15,18 +15,18 @@
hold.storage_slots = slots
/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob)
if (has_suit) //if we are part of a suit
if(has_suit) //if we are part of a suit
hold.open(user)
return
if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
if(hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
..(user)
/obj/item/clothing/accessory/storage/MouseDrop(obj/over_object as obj)
if (has_suit)
if(has_suit)
return
if (hold.handle_mousedrop(usr, over_object))
if(hold.handle_mousedrop(usr, over_object))
..(over_object)
/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob, params)
@@ -54,12 +54,12 @@
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
if(istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/obj/item/clothing/accessory/storage/attack_self(mob/user as mob)
if (has_suit) //if we are part of a suit
if(has_suit) //if we are part of a suit
hold.open(user)
else
to_chat(user, "<span class='notice'>You empty [src].</span>")
+9 -9
View File
@@ -116,9 +116,9 @@
if(3)
if(equip_to_reader(card, L))
to_chat(usr, "You insert the card into reader slot")
else if (equip_to_writer(card, L) && dualslot)
else if(equip_to_writer(card, L) && dualslot)
to_chat(usr, "You insert the card into writer slot")
else if (dualslot)
else if(dualslot)
to_chat(usr, "There is already something in both slots.")
else
to_chat(usr, "There is already something in the reader slot.")
@@ -146,18 +146,18 @@
var/mob/living/L = usr
switch(slot)
if(1)
if (remove_reader(L))
if(remove_reader(L))
to_chat(L, "You remove the card from reader slot")
else
to_chat(L, "There is no card in the reader slot")
if(2)
if (remove_writer(L))
if(remove_writer(L))
to_chat(L, "You remove the card from writer slot")
else
to_chat(L, "There is no card in the writer slot")
if(3)
if (remove_reader(L))
if (remove_writer(L))
if(remove_reader(L))
if(remove_writer(L))
to_chat(L, "You remove cards from both slots")
else
to_chat(L, "You remove the card from reader slot")
@@ -167,10 +167,10 @@
else
to_chat(L, "There are no cards in both slots")
if(4)
if (!remove_reader(L))
if (remove_writer(L))
if(!remove_reader(L))
if(remove_writer(L))
to_chat(L, "You remove the card from writer slot")
else if (!dualslot)
else if(!dualslot)
to_chat(L, "There is no card in the reader slot")
else
to_chat(L, "There are no cards in both slots")
+5 -5
View File
@@ -212,15 +212,15 @@
qdel(src)
return
if(2.0)
if (prob(25))
if(prob(25))
qdel(src)
return
if (prob(50))
if(prob(50))
for(var/x in verbs)
verbs -= x
set_broken()
if(3.0)
if (prob(25))
if(prob(25))
for(var/x in verbs)
verbs -= x
set_broken()
@@ -229,7 +229,7 @@
blob_act()
if (prob(75))
if(prob(75))
set_broken()
density = 0
@@ -443,7 +443,7 @@
//Returns percentage of battery charge remaining. Returns -1 if no battery is installed.
proc/check_battery_status()
if (battery)
if(battery)
var/obj/item/weapon/stock_parts/cell/B = battery
return round(B.charge / (B.maxcharge / 100))
else
+12 -12
View File
@@ -19,7 +19,7 @@
if(!computer.cradle.occupant)
overlay.icon_state = "ai-fixer-empty"
else
if (computer.cradle.occupant.health >= 0 && computer.cradle.occupant.stat != 2)
if(computer.cradle.occupant.health >= 0 && computer.cradle.occupant.stat != 2)
overlay.icon_state = "ai-fixer-full"
else
overlay.icon_state = "ai-fixer-404"
@@ -39,34 +39,34 @@
proc/aifixer_menu()
var/dat = ""
if (computer.cradle.occupant)
if(computer.cradle.occupant)
var/laws
dat += "<h3>Stored AI: [computer.cradle.occupant.name]</h3>"
dat += "<b>System integrity:</b> [(computer.cradle.occupant.health+100)/2]%<br>"
if (computer.cradle.occupant.laws.zeroth)
if(computer.cradle.occupant.laws.zeroth)
laws += "<b>0:</b> [computer.cradle.occupant.laws.zeroth]<BR>"
var/number = 1
for (var/index = 1, index <= computer.cradle.occupant.laws.inherent.len, index++)
for(var/index = 1, index <= computer.cradle.occupant.laws.inherent.len, index++)
var/law = computer.cradle.occupant.laws.inherent[index]
if (length(law) > 0)
if(length(law) > 0)
laws += "<b>[number]:</b> [law]<BR>"
number++
for (var/index = 1, index <= computer.cradle.occupant.laws.supplied.len, index++)
for(var/index = 1, index <= computer.cradle.occupant.laws.supplied.len, index++)
var/law = computer.cradle.occupant.laws.supplied[index]
if (length(law) > 0)
if(length(law) > 0)
laws += "<b>[number]:</b> [law]<BR>"
number++
dat += "<b>Laws:</b><br>[laws]<br>"
if (computer.cradle.occupant.stat == 2)
if(computer.cradle.occupant.stat == 2)
dat += "<span class='bad'>AI non-functional</span>"
else
dat += "<span class='good'>AI functional</span>"
if (!computer.cradle.busy)
if(!computer.cradle.busy)
dat += "<br><br>[topic_link(src,"fix","Begin Reconstruction")]"
else
dat += "<br><br>Reconstruction in process, please wait.<br>"
@@ -77,7 +77,7 @@
if(!interactable() || !computer.cradle || ..(href,href_list))
return
if ("fix" in href_list)
if("fix" in href_list)
var/mob/living/silicon/ai/occupant = computer.cradle.occupant
if(!occupant) return
@@ -85,7 +85,7 @@
computer.overlays += image('icons/obj/computer.dmi', "ai-fixer-on")
var/i = 0
while (occupant.health < 100)
while(occupant.health < 100)
if(!computer || (computer.stat&~MAINT)) // takes some time, keep checking
break
@@ -94,7 +94,7 @@
occupant.adjustToxLoss(-1)
occupant.adjustBruteLoss(-1)
occupant.updatehealth()
if (occupant.health >= 0 && computer.cradle.occupant.stat == 2)
if(occupant.health >= 0 && computer.cradle.occupant.stat == 2)
occupant.stat = 0
occupant.lying = 0
dead_mob_list -= occupant
+11 -11
View File
@@ -76,7 +76,7 @@
dat += "<br><center><h3>[temp]</h3></center>"
dat += "<br><center>Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]</center>"
if (gameover)
if(gameover)
dat += "<center><b>[topic_link(src,"newgame","New Game")]"
else
dat += "<center><b>[topic_link(src,"attack","Attack")] | [topic_link(src,"heal","Heal")] | [topic_link(src,"charge","Recharge Power")]"
@@ -89,8 +89,8 @@
/datum/file/program/arcade/Topic(href, list/href_list)
if(!interactable() || ..(href,href_list))
return
if (!blocked && !gameover)
if ("attack" in href_list)
if(!blocked && !gameover)
if("attack" in href_list)
blocked = 1
var/attackamt = rand(2,6)
temp = "You attack for [attackamt] damage!"
@@ -102,7 +102,7 @@
enemy_hp -= attackamt
arcade_action()
else if ("heal" in href_list)
else if("heal" in href_list)
blocked = 1
var/pointamt = rand(1,3)
var/healamt = rand(6,8)
@@ -117,7 +117,7 @@
computer.updateUsrDialog()
arcade_action()
else if ("charge" in href_list)
else if("charge" in href_list)
blocked = 1
var/chargeamt = rand(4,7)
temp = "You regain [chargeamt] points"
@@ -129,7 +129,7 @@
sleep(10)
arcade_action()
if ("newgame" in href_list) //Reset everything
if("newgame" in href_list) //Reset everything
temp = "New Round"
player_hp = 30
player_mp = 10
@@ -141,25 +141,25 @@
/datum/file/program/arcade/proc/arcade_action()
if ((enemy_mp <= 0) || (enemy_hp <= 0))
if((enemy_mp <= 0) || (enemy_hp <= 0))
if(!gameover)
gameover = 1
temp = "[enemy_name] has fallen! Rejoice!"
if(computer.toybox)
computer.toybox.dispense()
else if ((enemy_mp <= 5) && (prob(70)))
else if((enemy_mp <= 5) && (prob(70)))
var/stealamt = rand(2,3)
temp = "[enemy_name] steals [stealamt] of your power!"
player_mp -= stealamt
if (player_mp <= 0)
if(player_mp <= 0)
gameover = 1
sleep(10)
temp = "You have been drained! GAME OVER"
feedback_inc("arcade_loss_mana_normal")
else if ((enemy_hp <= 10) && (enemy_mp > 4))
else if((enemy_hp <= 10) && (enemy_mp > 4))
temp = "[enemy_name] heals for 4 health!"
enemy_hp += 4
enemy_mp -= 4
@@ -169,7 +169,7 @@
temp = "[enemy_name] attacks for [attackamt] damage!"
player_hp -= attackamt
if ((player_mp <= 0) || (player_hp <= 0))
if((player_mp <= 0) || (player_hp <= 0))
gameover = 1
temp = "You have been crushed! GAME OVER"
feedback_inc("arcade_loss_hp_normal")
@@ -41,7 +41,7 @@
priority_alarms -= zone
if(severity=="severe")
priority_alarms += zone
else if (severity=="minor")
else if(severity=="minor")
minor_alarms += zone
update_icon()
return
+1 -1
View File
@@ -181,7 +181,7 @@
//proc/camera_list(var/datum/file/camnet_key/key)
get_machines(var/datum/file/camnet_key/key)
if (!computer || computer.z > 6)
if(!computer || computer.z > 6)
return null
var/list/L = list()
+3 -3
View File
@@ -181,7 +181,7 @@
// assume linked_db since called by interact()
var/crew = ""
var/list/L = list()
for (var/datum/data/record/t in data_core.general)
for(var/datum/data/record/t in data_core.general)
var/R = t.fields["name"] + " - " + t.fields["rank"]
L += R
for(var/R in sortList(L))
@@ -269,7 +269,7 @@
computer.cardslot.insert(card,1)
if("print" in href_list)
if (printing)
if(printing)
return
printing = 1
@@ -277,7 +277,7 @@
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( computer.loc )
P.info = "<B>Crew Manifest:</B><BR>"
var/list/L = list()
for (var/datum/data/record/t in data_core.general)
for(var/datum/data/record/t in data_core.general)
var/R = t.fields["name"] + " - " + t.fields["rank"]
L += R
for(var/R in sortList(L))
+35 -35
View File
@@ -35,29 +35,29 @@
scanner = locate(/obj/machinery/dna_scannernew) in nearby
pod1 = locate(/obj/machinery/clonepod) in nearby
if (pod1)
if(pod1)
pod1.connected = src // Some variable the pod needs
proc/ScanningMenu()
if (isnull(scanner))
if(isnull(scanner))
return "<font class='bad'>ERROR: No Scanner detected!</font><br>"
var/dat = "<h3>Scanner Functions</h3>"
dat += "<div class='statusDisplay'>"
if (!scanner.occupant)
if(!scanner.occupant)
dat += "Scanner Unoccupied"
else if(loading)
dat += "[scanner.occupant] => Scanning..."
else
if (scanner.occupant.ckey != scantemp_ckey)
if(scanner.occupant.ckey != scantemp_ckey)
scantemp = "Ready to Scan"
scantemp_ckey = scanner.occupant.ckey
dat += "[scanner.occupant] => [scantemp]"
dat += "</div>"
if (scanner.occupant)
if(scanner.occupant)
dat += topic_link(src,"scan","Start Scan") + "<br>"
if(scanner.locked)
dat += topic_link(src,"lock","Unlock Scanner")
@@ -68,12 +68,12 @@
// Footer
dat += "<h3>Database Functions</h3>"
if (records.len > 0)
if(records.len > 0)
dat += topic_link(src,"menu=2","View Records ([records.len])") + "<br>"
else
dat += fake_link("View Records (0)")
if (has_disk)
if(has_disk)
dat += topic_link(src,"eject_disk","Eject Disk") + "<br>"
return dat
@@ -88,7 +88,7 @@
var/dat = "<h3>Selected Record</h3>"
to_chat(dat += topic_link(src,"menu=2",", Back") + "<br><br>")
if (!active_record)
if(!active_record)
dat += "<font class='bad'>Record not found.</font>"
else
dat += "<h4>[active_record.fields["name"]]</h4>"
@@ -96,7 +96,7 @@
var/obj/item/weapon/implant/health/H = locate(active_record.fields["imp"])
if ((H) && (istype(H)))
if((H) && (istype(H)))
dat += "<b>Health Implant Data:</b><br />[H.sensehealth()]<br><br />"
else
dat += "<font class='bad'>Unable to locate Health Implant.</font><br /><br />"
@@ -104,11 +104,11 @@
dat += "<b>Unique Identifier:</b><br /><span class='highlight'>[active_record.fields["UI"]]</span><br>"
dat += "<b>Structural Enzymes:</b><br /><span class='highlight'>[active_record.fields["SE"]]</span><br>"
if (has_disk)
if(has_disk)
dat += "<div class='block'>"
dat += "<h4>Inserted Disk</h4>"
dat += "<b>Contents:</b> "
if (computer.floppy.inserted.files.len == 0)
if(computer.floppy.inserted.files.len == 0)
dat += "<i>Empty</i>"
else
for(var/datum/file/data/genome/G in computer.floppy.inserted.files)
@@ -170,9 +170,9 @@
if(loading || !interactable())
return
if (href_list["menu"])
if(href_list["menu"])
menu = text2num(href_list["menu"])
else if (("scan" in href_list) && !isnull(scanner))
else if(("scan" in href_list) && !isnull(scanner))
scantemp = ""
loading = 1
@@ -186,16 +186,16 @@
//No locking an open scanner.
else if (("lock" in href_list) && !isnull(scanner))
if ((!scanner.locked) && (scanner.occupant))
else if(("lock" in href_list) && !isnull(scanner))
if((!scanner.locked) && (scanner.occupant))
scanner.locked = 1
else
scanner.locked = 0
else if ("view_rec" in href_list)
else if("view_rec" in href_list)
active_record = locate(href_list["view_rec"])
if(istype(active_record,/datum/data/record))
if ( !active_record.fields["ckey"] || active_record.fields["ckey"] == "" )
if( !active_record.fields["ckey"] || active_record.fields["ckey"] == "" )
del(active_record)
temp = "<font class='bad'>Record Corrupt</font>"
else
@@ -204,16 +204,16 @@
active_record = null
temp = "Record missing."
else if ("del_rec" in href_list)
if ((!active_record) || (menu < 3))
else if("del_rec" in href_list)
if((!active_record) || (menu < 3))
return
if (menu == 3) //If we are viewing a record, confirm deletion
if(menu == 3) //If we are viewing a record, confirm deletion
temp = "Delete record?"
menu = 4
else if (menu == 4)
else if(menu == 4)
var/obj/item/weapon/card/id/C = usr.get_active_hand()
if (istype(C)||istype(C, /obj/item/device/pda))
if(istype(C)||istype(C, /obj/item/device/pda))
if(check_access(C))
temp = "[active_record.fields["name"]] => Record deleted."
records.Remove(active_record)
@@ -222,7 +222,7 @@
else
temp = "<font class='bad'>Access Denied.</font>"
else if ("eject_disk" in href_list)
else if("eject_disk" in href_list)
if(computer.floppy)
computer.floppy.eject_disk()
@@ -243,7 +243,7 @@
if(/datum/file/data/genome/cloning)
active_record = G:record
else if("savefile" in href_list)
if (!active_record || !computer || !computer.floppy)
if(!active_record || !computer || !computer.floppy)
temp = "<font class='bad'>Save error.</font>"
computer.updateUsrDialog()
return
@@ -272,10 +272,10 @@
if(!rval)
temp = "<font class='bad'>Disk write error.</font>"
else if ("refresh" in href_list)
else if("refresh" in href_list)
computer.updateUsrDialog()
else if ("clone" in href_list)
else if("clone" in href_list)
//Look for that player! They better be dead!
if(active_record)
//Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs.
@@ -303,22 +303,22 @@
return
proc/scan_mob(mob/living/carbon/human/subject as mob)
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna))
if((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna))
scantemp = "<font class='bad'>Unable to locate valid genetic data.</font>"
return
if (!getbrain(subject))
if(!getbrain(subject))
scantemp = "<font class='bad'>No signs of intelligence detected.</font>"
return
if (subject.suiciding == 1)
if(subject.suiciding == 1)
scantemp = "<font class='bad'>Subject's brain is not responding to scanning stimuli.</font>"
return
if ((!subject.ckey) || (!subject.client))
if((!subject.ckey) || (!subject.client))
scantemp = "<font class='bad'>Mental interface failure.</font>"
return
if (NOCLONE in subject.mutations)
if(NOCLONE in subject.mutations)
scantemp = "<font class='bad'>Mental interface failure.</font>"
return
if (!isnull(find_record(subject.ckey)))
if(!isnull(find_record(subject.ckey)))
scantemp = "<font class='average'>Subject already in database.</font>"
return
@@ -341,7 +341,7 @@
//Add an implant if needed
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
if (isnull(imp))
if(isnull(imp))
imp = new /obj/item/weapon/implant/health(subject)
imp.implanted = subject
R.fields["imp"] = "\ref[imp]"
@@ -349,7 +349,7 @@
else
R.fields["imp"] = "\ref[imp]"
if (!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning.
if(!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning.
R.fields["mind"] = "\ref[subject.mind]"
records += R
@@ -358,6 +358,6 @@
//Find a specific record by key.
proc/find_record(var/find_key)
for(var/datum/data/record/R in records)
if (R.fields["ckey"] == find_key)
if(R.fields["ckey"] == find_key)
return R
return null
@@ -59,7 +59,7 @@
Topic(var/href, var/list/href_list)
if(!interactable() || !computer.radio || ..(href,href_list) )
return
if (!(computer.z in config.station_levels))
if(!(computer.z in config.station_levels))
to_chat(usr, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
return
@@ -85,7 +85,7 @@
var/obj/item/I = M.get_active_hand()
I = I.GetID()
if (istype(I,/obj/item/weapon/card/id))
if(istype(I,/obj/item/weapon/card/id))
if(access_captain in I.GetAccess())
var/old_level = security_level
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
@@ -146,7 +146,7 @@
state = STATE_MESSAGELIST
if("viewmessage" in href_list)
state = STATE_VIEWMESSAGE
if (!currmsg)
if(!currmsg)
if(href_list["message-num"])
currmsg = text2num(href_list["message-num"])
else
@@ -247,7 +247,7 @@
aistate = STATE_MESSAGELIST
if("ai-viewmessage" in href_list)
aistate = STATE_VIEWMESSAGE
if (!aicurrmsg)
if(!aicurrmsg)
if(href_list["message-num"])
aicurrmsg = text2num(href_list["message-num"])
else
@@ -281,16 +281,16 @@
proc/main_menu()
var/dat = ""
if (computer.radio.subspace)
if(computer.radio.subspace)
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
var/timeleft = shuttle_master.emergency.timeLeft()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
refresh = 1
else
refresh = 0
if (authenticated)
if(authenticated)
dat += "<BR>\[ <A HREF='?src=\ref[src];logout'>Log Out</A> \]"
if (authenticated==2)
if(authenticated==2)
dat += "<BR>\[ <A HREF='?src=\ref[src];announce'>Make An Announcement</A> \]"
if(computer.emagged == 0)
dat += "<BR>\[ <A HREF='?src=\ref[src];MessageCentcomm'>Send an emergency message to Centcomm</A> \]"
@@ -300,7 +300,7 @@
dat += "<BR>\[ <A HREF='?src=\ref[src];changeseclevel'>Change alert level</A> \]"
/*if(emergency_shuttle.location())
if (emergency_shuttle.online())
if(emergency_shuttle.online())
dat += "<BR>\[ <A HREF='?src=\ref[src];cancelshuttle'>Cancel Shuttle Call</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];callshuttle'>Call Emergency Shuttle</A> \]"*/
@@ -335,16 +335,16 @@
for(var/i = 1; i<=messagetitle.len; i++)
dat += "<BR><A HREF='?src=\ref[src];viewmessage;message-num=[i]'>[messagetitle[i]]</A>"
if(STATE_VIEWMESSAGE)
if (currmsg)
if(currmsg)
dat += "<B>[messagetitle[currmsg]]</B><BR><BR>[messagetext[currmsg]]"
if (authenticated)
if(authenticated)
dat += "<BR><BR>\[ <A HREF='?src=\ref[src];delmessage'>Delete \]"
else
state = STATE_MESSAGELIST
interact()
return
if(STATE_DELMESSAGE)
if (currmsg)
if(currmsg)
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=\ref[src];delmessage2'>OK</A> | <A HREF='?src=\ref[src];viewmessage'>Cancel</A> \]"
else
state = STATE_MESSAGELIST
+3 -3
View File
@@ -24,7 +24,7 @@
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params)
if (user.z > 6)
if(user.z > 6)
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
return
if(istype(module, /obj/item/weapon/aiModule))
@@ -43,7 +43,7 @@
src.current = select_active_ai(user)
if (!src.current)
if(!src.current)
to_chat(usr, "No active AIs detected.")
else
to_chat(usr, "[src.current.name] selected for law changes.")
@@ -75,7 +75,7 @@
src.current = freeborg()
if (!src.current)
if(!src.current)
to_chat(usr, "No free cyborgs detected.")
else
to_chat(usr, "[src.current.name] selected for law changes.")
+89 -89
View File
@@ -49,21 +49,21 @@
scan = computer.cardslot.reader
if(!interactable())
return
if (computer.z > 6)
if(computer.z > 6)
to_chat(usr, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
return
var/dat
if (temp)
if(temp)
dat = text("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
else
dat = text("Confirm Identity (R): <A href='?src=\ref[];cardr=1'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
if (computer.cardslot.dualslot)
if(computer.cardslot.dualslot)
dat += text("Check Identity (W): <A href='?src=\ref[];cardw=1'>[]</A><BR>", src, (scan2 ? text("[]", scan2.name) : "----------"))
if(scan2 && !scan)
dat += text("<div class='notice'>Insert card into reader slot to log in.</div><br>")
if (src.authenticated)
if(src.authenticated)
switch(src.screen)
if(1.0)
dat += {"
@@ -87,7 +87,7 @@
dat += text("<B>Records Maintenance</B><HR>\n<A href='?src=\ref[];back=1'>Backup To Disk</A><BR>\n<A href='?src=\ref[];u_load=1'>Upload From disk</A><BR>\n<A href='?src=\ref[];del_all=1'>Delete All Records</A><BR>\n<BR>\n<A href='?src=\ref[];screen=1'>Back</A>", src, src, src, src)
if(4.0)
dat += "<CENTER><B>Medical Record</B></CENTER><BR>"
if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
if((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
dat += "<table><tr><td>Name: [active1.fields["name"]] \
ID: [active1.fields["id"]]<BR>\n \
Sex: <A href='?src=\ref[src];field=sex'>[active1.fields["sex"]]</A><BR>\n \
@@ -99,7 +99,7 @@
<img src=[active1.fields["photo-west"]] height=64 width=64 border=5></td></tr></table>"
else
dat += "<B>General Record Lost!</B><BR>"
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
if((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
dat += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: <A href='?src=\ref[];field=b_type'>[]</A><BR>\nDNA: <A href='?src=\ref[];field=b_dna'>[]</A><BR>\n<BR>\nMinor Disabilities: <A href='?src=\ref[];field=mi_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_dis_d'>[]</A><BR>\n<BR>\nMajor Disabilities: <A href='?src=\ref[];field=ma_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_dis_d'>[]</A><BR>\n<BR>\nAllergies: <A href='?src=\ref[];field=alg'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=alg_d'>[]</A><BR>\n<BR>\nCurrent Diseases: <A href='?src=\ref[];field=cdi'>[]</A> (per disease info placed in log/comment section)<BR>\nDetails: <A href='?src=\ref[];field=cdi_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, src.active2.fields["b_type"], src, src.active2.fields["b_dna"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, decode(src.active2.fields["notes"]))
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
@@ -154,16 +154,16 @@
Topic(href, href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return
if (!( data_core.general.Find(src.active1) ))
if(!( data_core.general.Find(src.active1) ))
src.active1 = null
if (!( data_core.medical.Find(src.active2) ))
if(!( data_core.medical.Find(src.active2) ))
src.active2 = null
if (href_list["temp"])
if(href_list["temp"])
src.temp = null
if (href_list["cardr"])
if (scan)
if(href_list["cardr"])
if(scan)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
computer.cardslot.remove(1)
else
@@ -171,12 +171,12 @@
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
computer.cardslot.insert(I, 1)
scan = I
if (href_list["cardw"])
if (scan2)
if(href_list["cardw"])
if(scan2)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
computer.cardslot.remove(2)
else
@@ -184,26 +184,26 @@
scan2 = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
computer.cardslot.insert(I, 2)
scan2 = I
else if (href_list["logout"])
else if(href_list["logout"])
src.authenticated = null
src.screen = null
src.active1 = null
src.active2 = null
else if (href_list["login"])
else if(href_list["login"])
if (istype(usr, /mob/living/silicon/ai))
if(istype(usr, /mob/living/silicon/ai))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
src.rank = "AI"
src.screen = 1
else if (istype(usr, /mob/living/silicon/robot))
else if(istype(usr, /mob/living/silicon/robot))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
@@ -211,16 +211,16 @@
src.rank = "[R.modtype] [R.braintype]"
src.screen = 1
else if (istype(src.scan, /obj/item/weapon/card/id))
else if(istype(src.scan, /obj/item/weapon/card/id))
src.active1 = null
src.active2 = null
if (src.check_access(src.scan))
if(src.check_access(src.scan))
src.authenticated = src.scan.registered_name
src.rank = src.scan.assignment
src.screen = 1
if (src.authenticated)
if(src.authenticated)
if(href_list["screen"])
src.screen = text2num(href_list["screen"])
@@ -238,125 +238,125 @@
src.temp += "<br><b>Spread:</b> [v.fields["spread type"]] "
src.temp += "<br><b>Details:</b><br> <A href='?src=\ref[src];field=vir_desc;edit_vir=\ref[v]'>[v.fields["description"]]</A>"
if (href_list["del_all"])
if(href_list["del_all"])
src.temp = text("Are you sure you wish to delete all records?<br>\n\t<A href='?src=\ref[];temp=1;del_all2=1'>Yes</A><br>\n\t<A href='?src=\ref[];temp=1'>No</A><br>", src, src)
if (href_list["del_all2"])
if(href_list["del_all2"])
for(var/datum/data/record/R in data_core.medical)
//R = null
qdel(R)
//Foreach goto(494)
src.temp = "All records deleted."
if (href_list["field"])
if(href_list["field"])
var/a1 = src.active1
var/a2 = src.active2
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
if(istype(src.active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
if("sex")
if (istype(src.active1, /datum/data/record))
if (src.active1.fields["sex"] == "Male")
if(istype(src.active1, /datum/data/record))
if(src.active1.fields["sex"] == "Male")
src.active1.fields["sex"] = "Female"
else
src.active1.fields["sex"] = "Male"
if("age")
if (istype(src.active1, /datum/data/record))
if(istype(src.active1, /datum/data/record))
var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
if("p_stat")
if (istype(src.active1, /datum/data/record))
if(istype(src.active1, /datum/data/record))
src.temp = text("<B>Physical Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=ssd'>*SSD*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unfit'>Physically Unfit</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=disabled'>Disabled</A><BR>", src, src, src, src, src)
if("m_stat")
if (istype(src.active1, /datum/data/record))
if(istype(src.active1, /datum/data/record))
src.temp = text("<B>Mental Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=insane'>*Insane*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=unstable'>*Unstable*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=watch'>*Watch*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=stable'>Stable</A><BR>", src, src, src, src)
if("b_type")
if (istype(src.active2, /datum/data/record))
if(istype(src.active2, /datum/data/record))
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active1, /datum/data/record))
if(istype(src.active1, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
if(v)
var/t1 = sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
if(v)
var/t1 = sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
else
if (href_list["p_stat"])
if (src.active1)
if(href_list["p_stat"])
if(src.active1)
switch(href_list["p_stat"])
if("deceased")
src.active1.fields["p_stat"] = "*Deceased*"
@@ -369,8 +369,8 @@
if("disabled")
src.active1.fields["p_stat"] = "Disabled"
if (href_list["m_stat"])
if (src.active1)
if(href_list["m_stat"])
if(src.active1)
switch(href_list["m_stat"])
if("insane")
src.active1.fields["m_stat"] = "*Insane*"
@@ -382,8 +382,8 @@
src.active1.fields["m_stat"] = "Stable"
if (href_list["b_type"])
if (src.active2)
if(href_list["b_type"])
if(src.active2)
switch(href_list["b_type"])
if("an")
src.active2.fields["b_type"] = "A-"
@@ -403,23 +403,23 @@
src.active2.fields["b_type"] = "O+"
if (href_list["del_r"])
if (src.active2)
if(href_list["del_r"])
if(src.active2)
src.temp = text("Are you sure you wish to delete the record (Medical Portion Only)?<br>\n\t<A href='?src=\ref[];temp=1;del_r2=1'>Yes</A><br>\n\t<A href='?src=\ref[];temp=1'>No</A><br>", src, src)
if (href_list["del_r2"])
if (src.active2)
if(href_list["del_r2"])
if(src.active2)
//src.active2 = null
qdel(src.active2)
if (href_list["d_rec"])
if(href_list["d_rec"])
var/datum/data/record/R = locate(href_list["d_rec"])
var/datum/data/record/M = locate(href_list["d_rec"])
if (!( data_core.general.Find(R) ))
if(!( data_core.general.Find(R) ))
src.temp = "Record Not Found!"
return
for(var/datum/data/record/E in data_core.medical)
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
M = E
else
//Foreach continue //goto(2540)
@@ -427,8 +427,8 @@
src.active2 = M
src.screen = 4
if (href_list["new"])
if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
if(href_list["new"])
if((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
var/datum/data/record/R = new /datum/data/record( )
R.fields["name"] = src.active1.fields["name"]
R.fields["id"] = src.active1.fields["id"]
@@ -448,63 +448,63 @@
src.active2 = R
src.screen = 4
if (href_list["add_c"])
if (!( istype(src.active2, /datum/data/record) ))
if(href_list["add_c"])
if(!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
counter++
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["del_c"])
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
if(href_list["del_c"])
if((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
src.active2.fields[text("com_[]", href_list["del_c"])] = "<B>Deleted</B>"
if (href_list["search"])
if(href_list["search"])
var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text
if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!interactable()) && (!istype(usr, /mob/living/silicon)))))
if((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!interactable()) && (!istype(usr, /mob/living/silicon)))))
return
src.active1 = null
src.active2 = null
t1 = lowertext(t1)
for(var/datum/data/record/R in data_core.medical)
if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])))
if((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])))
src.active2 = R
else
//Foreach continue //goto(3229)
if (!( src.active2 ))
if(!( src.active2 ))
src.temp = text("Could not locate record [].", t1)
else
for(var/datum/data/record/E in data_core.general)
if ((E.fields["name"] == src.active2.fields["name"] || E.fields["id"] == src.active2.fields["id"]))
if((E.fields["name"] == src.active2.fields["name"] || E.fields["id"] == src.active2.fields["id"]))
src.active1 = E
else
//Foreach continue //goto(3334)
src.screen = 4
if (href_list["print_p"])
if (!( src.printing ))
if(href_list["print_p"])
if(!( src.printing ))
src.printing = 1
var/datum/data/record/record1 = null
var/datum/data/record/record2 = null
if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
if((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
record1 = active1
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
if((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
record2 = active2
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( computer.loc )
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
if (record1)
if(record1)
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", record1.fields["name"], record1.fields["id"], record1.fields["sex"], record1.fields["age"], record1.fields["fingerprint"], record1.fields["p_stat"], record1.fields["m_stat"])
P.name = text("Medical Record ([])", record1.fields["name"])
else
P.info += "<B>General Record Lost!</B><BR>"
P.name = "Medical Record"
if (record2)
if(record2)
P.info += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: []<BR>\nDNA: []<BR>\n<BR>\nMinor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nMajor Disabilities: []<BR>\nDetails: []<BR>\n<BR>\nAllergies: []<BR>\nDetails: []<BR>\n<BR>\nCurrent Diseases: [] (per disease info placed in log/comment section)<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", record2.fields["b_type"], record2.fields["b_dna"], record2.fields["mi_dis"], record2.fields["mi_dis_d"], record2.fields["ma_dis"], record2.fields["ma_dis_d"], record2.fields["alg"], record2.fields["alg_d"], record2.fields["cdi"], record2.fields["cdi_d"], decode(record2.fields["notes"]))
var/counter = 1
while(record2.fields[text("com_[]", counter)])
+19 -19
View File
@@ -242,7 +242,7 @@
if(!interactable() || ..(href,href_list))
return
if ("auth" in href_list)
if("auth" in href_list)
if(auth)
auth = 0
screen = 0
@@ -255,10 +255,10 @@
message = incorrectkey
//Turn the server on/off.
if ("active" in href_list)
if("active" in href_list)
if(auth) linkedServer.active = !linkedServer.active
//Find a server
if ("find" in href_list)
if("find" in href_list)
if(message_servers && message_servers.len > 1)
src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers
message = "<span class='alert'>NOTICE: Server selected.</span>"
@@ -269,7 +269,7 @@
message = noserver
//View the logs - KEY REQUIRED
if ("view" in href_list)
if("view" in href_list)
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
@@ -277,7 +277,7 @@
src.screen = 1
//Clears the logs - KEY REQUIRED
if ("clear" in href_list)
if("clear" in href_list)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
@@ -285,7 +285,7 @@
src.linkedServer.pda_msgs = list()
message = "<span class='notice'>NOTICE: Logs cleared.</span>"
//Clears the request console logs - KEY REQUIRED
if ("clearr" in href_list)
if("clearr" in href_list)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
@@ -293,7 +293,7 @@
src.linkedServer.rc_msgs = list()
message = "<span class='notice'>NOTICE: Logs cleared.</span>"
//Change the password - KEY REQUIRED
if ("pass" in href_list)
if("pass" in href_list)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
@@ -313,7 +313,7 @@
message = incorrectkey
//Hack the Console to get the password
if ("hack" in href_list)
if("hack" in href_list)
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
src.hacking = 1
src.screen = 2
@@ -323,7 +323,7 @@
if(src && src.linkedServer && usr)
BruteForce(usr)
//Delete the log.
if ("delete" in href_list)
if("delete" in href_list)
//Are they on the view logs screen?
if(screen == 1)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
@@ -332,7 +332,7 @@
src.linkedServer.pda_msgs -= locate(href_list["delete"])
message = "<span class='notice'>NOTICE: Log Deleted!</span>"
//Delete the request console log.
if ("deleter" in href_list)
if("deleter" in href_list)
//Are they on the view logs screen?
if(screen == 4)
if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
@@ -341,14 +341,14 @@
src.linkedServer.rc_msgs -= locate(href_list["deleter"])
message = "<span class='notice'>NOTICE: Log Deleted!</span>"
//Create a custom message
if ("msg" in href_list)
if("msg" in href_list)
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
else
if(auth)
src.screen = 3
//Fake messaging selection - KEY REQUIRED
if ("select" in href_list)
if("select" in href_list)
if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
screen = 0
@@ -400,17 +400,17 @@
return src.attack_hand(usr)
var/obj/item/device/pda/PDARec = null
for (var/obj/item/device/pda/P in PDAs)
if (!P.owner || P.toff || P.hidden) continue
for(var/obj/item/device/pda/P in PDAs)
if(!P.owner || P.toff || P.hidden) continue
if(P.owner == customsender)
PDARec = P
//Sender isn't faking as someone who exists
if(isnull(PDARec))
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
if(!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc))
for(var/mob/O in hearers(3, customrecepient.loc))
O.show_message(text("[bicon(customrecepient)] *[customrecepient.ttone]*"))
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
@@ -423,9 +423,9 @@
else
src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[PDARec]'>[PDARec.owner]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
if(!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc))
for(var/mob/O in hearers(3, customrecepient.loc))
O.show_message(text("[bicon(customrecepient)] *[customrecepient.ttone]*"))
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
@@ -447,6 +447,6 @@
// to_chat(usr, href_list["select"])
if ("back" in href_list)
if("back" in href_list)
src.screen = 0
interact()
@@ -40,12 +40,12 @@ var/prison_shuttle_timeleft = 0
if(do_after(user, 20, target = src))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/part/board/circuit/prison_shuttle/M = new /obj/item/part/board/circuit/prison_shuttle( A )
for (var/obj/C in src)
for(var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
if (src.stat & BROKEN)
if(src.stat & BROKEN)
to_chat(user, "\blue The broken glass falls out.")
new /obj/item/trash/shard( src.loc )
A.state = 3
@@ -75,7 +75,7 @@ var/prison_shuttle_timeleft = 0
user.set_machine(src)
post_signal("prison")
var/dat
if (src.temp)
if(src.temp)
dat = src.temp
else
dat += {"<b>Location:</b> [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]<BR>
@@ -95,11 +95,11 @@ var/prison_shuttle_timeleft = 0
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) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["sendtodock"])
if (!prison_can_move())
if(href_list["sendtodock"])
if(!prison_can_move())
to_chat(usr, "\red The prison shuttle is unable to leave.")
return
if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
@@ -112,8 +112,8 @@ var/prison_shuttle_timeleft = 0
spawn(0)
prison_process()
else if (href_list["sendtostation"])
if (!prison_can_move())
else if(href_list["sendtostation"])
if(!prison_can_move())
to_chat(usr, "\red The prison shuttle is unable to leave.")
return
if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
@@ -126,7 +126,7 @@ var/prison_shuttle_timeleft = 0
spawn(0)
prison_process()
else if (href_list["mainmenu"])
else if(href_list["mainmenu"])
src.temp = null
src.add_fingerprint(usr)
@@ -141,13 +141,13 @@ var/prison_shuttle_timeleft = 0
/*
proc/prison_break()
switch(prison_break)
if (0)
if(0)
if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return
prison_shuttle_moving_to_prison = 1
prison_shuttle_at_station = prison_shuttle_at_station
if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station)
if(!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station)
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
spawn(0)
prison_process()
@@ -183,9 +183,9 @@ var/prison_shuttle_timeleft = 0
if(0)
prison_shuttle_at_station = 1
if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
if (!prison_can_move())
if(!prison_can_move())
to_chat(usr, "\red The prison shuttle is unable to leave.")
return
@@ -212,9 +212,9 @@ var/prison_shuttle_timeleft = 0
if(1)
prison_shuttle_at_station = 0
if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
if (!prison_can_move())
if(!prison_can_move())
to_chat(usr, "\red The prison shuttle is unable to leave.")
return
+20 -20
View File
@@ -34,7 +34,7 @@
if(!interactable() || computer.z > 6)
return
var/dat
if (src.temp)
if(src.temp)
dat = "<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>"
else
if(screen == 0)
@@ -44,10 +44,10 @@
if(screen == 1)
for(var/mob/living/silicon/robot/R in mob_list)
if(istype(usr, /mob/living/silicon/ai))
if (R.connected_ai != usr)
if(R.connected_ai != usr)
continue
if(istype(usr, /mob/living/silicon/robot))
if (R != usr)
if(R != usr)
continue
if(R.scrambledcodes)
continue
@@ -55,11 +55,11 @@
dat += "[R.name] |"
if(R.stat)
dat += " Not Responding |"
else if (!R.canmove)
else if(!R.canmove)
dat += " Locked Down |"
else
dat += " Operating Normally |"
if (!R.canmove)
if(!R.canmove)
else if(R.cell)
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
else
@@ -72,7 +72,7 @@
dat += " Slaved to [R.connected_ai.name] |"
else
dat += " Independent from AI |"
if (istype(usr, /mob/living/silicon))
if(istype(usr, /mob/living/silicon))
if(issilicon(usr) && is_special_character(usr) && !R.emagged)
dat += "<A href='?src=\ref[src];magbot=\ref[R]'>(<i>Hack</i>)</A> "
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<i>[R.canmove ? "Lockdown" : "Release"]</i>)</A> "
@@ -105,19 +105,19 @@
if(!interactable() || ..(href,href_list))
return
if ("killall" in href_list)
if("killall" in href_list)
src.temp = {"Destroy Robots?<BR>
<BR><B><A href='?src=\ref[src];do_killall'>\[Swipe ID to initiate destruction sequence\]</A></B><BR>
<A href='?src=\ref[src];temp=1'>Cancel</A>"}
if ("do_killall" in href_list)
if("do_killall" in href_list)
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if (istype(I, /obj/item/device/pda))
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
if (istype(I))
if(istype(I))
if(src.check_access(I))
if (!status)
if(!status)
message_admins("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!")
log_game("\blue [key_name(usr)] has initiated the global cyborg killswitch!")
src.status = 1
@@ -127,23 +127,23 @@
else
to_chat(usr, "\red Access Denied.")
if ("stop" in href_list)
if("stop" in href_list)
src.temp = {"
Stop Robot Destruction Sequence?<BR>
<BR><A href='?src=\ref[src];stop2=1'>Yes</A><BR>
<A href='?src=\ref[src];temp=1'>No</A>"}
if ("stop2" in href_list)
if("stop2" in href_list)
src.stop = 1
src.temp = null
src.status = 0
if ("reset" in href_list)
if("reset" in href_list)
src.timeleft = 60
if ("temp" in href_list)
if("temp" in href_list)
src.temp = null
if ("screen" in href_list)
if("screen" in href_list)
switch(href_list["screen"])
if("0")
screen = 0
@@ -151,7 +151,7 @@
screen = 1
if("2")
screen = 2
if ("killbot" in href_list)
if("killbot" in href_list)
if(computer.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["killbot"])
if(R)
@@ -169,7 +169,7 @@
else
to_chat(usr, "\red Access Denied.")
if ("stopbot" in href_list)
if("stopbot" in href_list)
if(computer.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["stopbot"])
if(R && istype(R)) // Extra sancheck because of input var references
@@ -179,7 +179,7 @@
message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
R.canmove = !R.canmove
if (R.lockcharge)
if(R.lockcharge)
// R.cell.charge = R.lockcharge
R.lockcharge = !R.lockcharge
to_chat(R, "Your lockdown has been lifted!")
@@ -191,7 +191,7 @@
else
to_chat(usr, "\red Access Denied.")
if ("magbot" in href_list)
if("magbot" in href_list)
if(computer.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["magbot"])
if(R)
+169 -169
View File
@@ -279,7 +279,7 @@
var/rejuvenators = round(occupant.reagents.get_reagent_amount("inaprovaline") / REJUVENATORS_MAX * 100)
status_html += "<div class='line'><div class='statusLabel'>Rejuvenators:</div><div class='progressBar'><div style='width: [rejuvenators]%;' class='progressFill highlight'></div></div><div class='statusValue'>[occupant.reagents.get_reagent_amount("inaprovaline")] units</div></div>"
if (dna_summary)
if(dna_summary)
status_html += "<div class='line'><div class='statusLabel'>Unique Enzymes :</div><div class='statusValue'><span class='highlight'>[uppertext(occupant.dna.unique_enzymes)]</span></div></div>"
status_html += "<div class='line'><div class='statusLabel'>Unique Identifier:</div><div class='statusValue'><span class='highlight'>[occupant.dna.uni_identity]</span></div></div>"
status_html += "<div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><span class='highlight'>[occupant.dna.struc_enzymes]</span></div></div>"
@@ -384,7 +384,7 @@
proc/emitter_menu()
to_chat(var/dat = topic_link(src,"mode=0",", Main Menu") + "<br>")
dat += "<h3>Radiation Emitter Settings</h3>"
if (viable)
if(viable)
dat += topic_link(src,"pulse","Pulse Radiation")
else
dat += fake_link("Pulse Radiation")
@@ -454,7 +454,7 @@
updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
scanner.occupant.apply_effect(radstrength+radduration, IRRADIATE)
if("ui-f")
if (prob(20+radstrength))
if(prob(20+radstrength))
randmutb(scanner.occupant)
domutcheck(scanner.occupant,scanner)
else
@@ -466,8 +466,8 @@
var/se = scanner.occupant.dna.struc_enzymes
var/targetblock = se_block
if (!(se_block in list(2,8,10,12)) && prob (20)) // shifts the target slightly
if (se_block <= 5)
if(!(se_block in list(2,8,10,12)) && prob (20)) // shifts the target slightly
if(se_block <= 5)
targetblock++
else
targetblock--
@@ -484,7 +484,7 @@
domutcheck(scanner.occupant,scanner)
scanner.occupant.apply_effect(radstrength+radduration, IRRADIATE)
if("se-f")
if (prob(80-radduration))
if(prob(80-radduration))
randmutb(scanner.occupant)
domutcheck(scanner.occupant,scanner)
else
@@ -493,7 +493,7 @@
scanner.occupant.apply_effect((radstrength*2)+radduration, IRRADIATE)
if(null)
if (prob(95))
if(prob(95))
if(prob(75))
randmutb(scanner.occupant)
else
@@ -517,7 +517,7 @@
if(istype(H))
var/inap = H.reagents.get_reagent_amount("inaprovaline") // oh my *god* this section was ugly before I shortened it
if (inap < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
if(inap < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
H.reagents.add_reagent("inaprovaline", REJUVENATORS_INJECT)
else
H.reagents.add_reagent("inaprovaline", max(REJUVENATORS_MAX - inap,0))
@@ -534,32 +534,32 @@
var/viable_occupant = (occupant && occupant.dna && !(NOCLONE in occupant.mutations))
var/mob/living/carbon/human/human_occupant = scanner.occupant
if (href_list["screen"]) // Passing a screen is only a request, we set current_screen here but it can be overridden below if necessary
if(href_list["screen"]) // Passing a screen is only a request, we set current_screen here but it can be overridden below if necessary
current_screen = href_list["screen"]
if (!viable_occupant) // If there is no viable occupant only allow certain screens
if(!viable_occupant) // If there is no viable occupant only allow certain screens
var/allowed_no_occupant_screens = list("mainmenu", "radsetmenu", "buffermenu") //These are the screens which will be allowed if there's no occupant
if (!(current_screen in allowed_no_occupant_screens))
if(!(current_screen in allowed_no_occupant_screens))
href_list = new /list(0) // clear list of options
current_screen = "mainmenu"
if (!current_screen) // If no screen is set default to mainmenu
if(!current_screen) // If no screen is set default to mainmenu
current_screen = "mainmenu"
if (!scanner) //Is the scanner not connected?
if(!scanner) //Is the scanner not connected?
scanner_status_html = "<span class='bad'>ERROR: No DNA Scanner connected.</span>"
current_screen = null // blank does not exist in the switch below, so no screen will be outputted
updateUsrDialog()
return
usr.set_machine(src)
if (href_list["locked"])
if (scanner.occupant)
if(href_list["locked"])
if(scanner.occupant)
scanner.locked = !( scanner.locked )
////////////////////////////////////////////////////////
if (href_list["genpulse"])
if(href_list["genpulse"])
if(!viable_occupant)//Makes sure someone is in there (And valid) before trying anything
temp_html = text("No viable occupant detected.")//More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
//usr << browse(temp_html, "window=scannernew;size=550x650")
@@ -574,10 +574,10 @@
var/lock_state = scanner.locked
scanner.locked = 1//lock it
sleep(10*radduration)
if (!scanner.occupant)
if(!scanner.occupant)
temp_html = null
return null
if (prob(95))
if(prob(95))
if(prob(75))
randmutb(scanner.occupant)
else
@@ -591,59 +591,59 @@
scanner.locked = lock_state
temp_html = null
dopage(src,"screen=radsetmenu")
if (href_list["radleplus"])
if(href_list["radleplus"])
if(!viable_occupant)
temp_html = text("No viable occupant detected.")
popup.set_content(temp_html)
popup.open()
if (radduration < 20)
if(radduration < 20)
radduration++
radduration++
dopage(src,"screen=radsetmenu")
if (href_list["radleminus"])
if(href_list["radleminus"])
if(!viable_occupant)
temp_html = text("No viable occupant detected.")
popup.set_content(temp_html)
popup.open()
if (radduration > 2)
if(radduration > 2)
radduration--
radduration--
dopage(src,"screen=radsetmenu")
if (href_list["radinplus"])
if (radstrength < 10)
if(href_list["radinplus"])
if(radstrength < 10)
radstrength++
dopage(src,"screen=radsetmenu")
if (href_list["radinminus"])
if (radstrength > 1)
if(href_list["radinminus"])
if(radstrength > 1)
radstrength--
dopage(src,"screen=radsetmenu")
////////////////////////////////////////////////////////
if (href_list["unimenuplus"])
if (ui_block < 13)
if(href_list["unimenuplus"])
if(ui_block < 13)
ui_block++
else
ui_block = 1
dopage(src,"screen=unimenu")
if (href_list["unimenuminus"])
if (ui_block > 1)
if(href_list["unimenuminus"])
if(ui_block > 1)
ui_block--
else
ui_block = 13
dopage(src,"screen=unimenu")
if (href_list["unimenusubplus"])
if (subblock < 3)
if(href_list["unimenusubplus"])
if(subblock < 3)
subblock++
else
subblock = 1
dopage(src,"screen=unimenu")
if (href_list["unimenusubminus"])
if (subblock > 1)
if(href_list["unimenusubminus"])
if(subblock > 1)
subblock--
else
subblock = 3
dopage(src,"screen=unimenu")
if (href_list["unimenutargetplus"])
if (unitarget < 15)
if(href_list["unimenutargetplus"])
if(unitarget < 15)
unitarget++
unitargethex = unitarget
switch(unitarget)
@@ -663,8 +663,8 @@
unitarget = 0
unitargethex = 0
dopage(src,"screen=unimenu")
if (href_list["unimenutargetminus"])
if (unitarget > 0)
if(href_list["unimenutargetminus"])
if(unitarget > 0)
unitarget--
unitargethex = unitarget
switch(unitarget)
@@ -682,15 +682,15 @@
unitarget = 15
unitargethex = "F"
dopage(src,"screen=unimenu")
if (href_list["uimenuset"] && href_list["uimenusubset"]) // This chunk of code updates selected block / sub-block based on click
if(href_list["uimenuset"] && href_list["uimenusubset"]) // This chunk of code updates selected block / sub-block based on click
var/menuset = text2num(href_list["uimenuset"])
var/menusubset = text2num(href_list["uimenusubset"])
if ((menuset <= 13) && (menuset >= 1))
if((menuset <= 13) && (menuset >= 1))
ui_block = menuset
if ((menusubset <= 3) && (menusubset >= 1))
if((menusubset <= 3) && (menusubset >= 1))
subblock = menusubset
dopage(src, "unimenu")
if (href_list["unipulse"])
if(href_list["unipulse"])
if(scanner.occupant)
var/block
var/newblock
@@ -703,22 +703,22 @@
var/lock_state = scanner.locked
scanner.locked = 1//lock it
sleep(10*radduration)
if (!scanner.occupant)
if(!scanner.occupant)
temp_html = null
return null
///
if (prob((80 + (radduration / 2))))
if(prob((80 + (radduration / 2))))
block = miniscrambletarget(num2text(unitarget), radstrength, radduration)
newblock = null
if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + block
if(subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
if(subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
if(subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + block
tstructure2 = setblock(scanner.occupant.dna.uni_identity, ui_block, newblock,3)
scanner.occupant.dna.uni_identity = tstructure2
updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
scanner.occupant.apply_effect(radstrength+radduration, IRRADIATE)
else
if (prob(20+radstrength))
if(prob(20+radstrength))
randmutb(scanner.occupant)
domutcheck(scanner.occupant,scanner)
else
@@ -729,61 +729,61 @@
dopage(src,"screen=unimenu")
////////////////////////////////////////////////////////
if (href_list["rejuv"])
if(href_list["rejuv"])
if(!viable_occupant)
temp_html = text("No viable occupant detected.")
popup.set_content(temp_html)
popup.open()
else
if(human_occupant)
if (human_occupant.reagents.get_reagent_amount("inaprovaline") < REJUVENATORS_MAX)
if (human_occupant.reagents.get_reagent_amount("inaprovaline") < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
if(human_occupant.reagents.get_reagent_amount("inaprovaline") < REJUVENATORS_MAX)
if(human_occupant.reagents.get_reagent_amount("inaprovaline") < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
human_occupant.reagents.add_reagent("inaprovaline", REJUVENATORS_INJECT)
else
human_occupant.reagents.add_reagent("inaprovaline", round(REJUVENATORS_MAX - human_occupant.reagents.get_reagent_amount("inaprovaline")))
// to_chat(usr, text("Occupant now has [] units of rejuvenation in his/her bloodstream.", human_occupant.reagents.get_reagent_amount("inaprovaline")))
////////////////////////////////////////////////////////
if (href_list["strucmenuplus"])
if (se_block < 14)
if(href_list["strucmenuplus"])
if(se_block < 14)
se_block++
else
se_block = 1
dopage(src,"screen=strucmenu")
if (href_list["strucmenuminus"])
if (se_block > 1)
if(href_list["strucmenuminus"])
if(se_block > 1)
se_block--
else
se_block = 14
dopage(src,"screen=strucmenu")
if (href_list["strucmenusubplus"])
if (subblock < 3)
if(href_list["strucmenusubplus"])
if(subblock < 3)
subblock++
else
subblock = 1
dopage(src,"screen=strucmenu")
if (href_list["strucmenusubminus"])
if (subblock > 1)
if(href_list["strucmenusubminus"])
if(subblock > 1)
subblock--
else
subblock = 3
dopage(src,"screen=strucmenu")
if (href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
if(href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
var/menuset = text2num(href_list["semenuset"])
var/menusubset = text2num(href_list["semenusubset"])
if ((menuset <= 14) && (menuset >= 1))
if((menuset <= 14) && (menuset >= 1))
se_block = menuset
if ((menusubset <= 3) && (menusubset >= 1))
if((menusubset <= 3) && (menusubset >= 1))
subblock = menusubset
dopage(src, "strucmenu")
if (href_list["strucpulse"])
if(href_list["strucpulse"])
var/block
var/newblock
var/tstructure2
var/oldblock
var/lock_state = scanner.locked
scanner.locked = 1//lock it
if (viable_occupant)
if(viable_occupant)
block = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),subblock,1)
temp_html = text("Working ... Please wait ([] Seconds)", radduration)
@@ -795,18 +795,18 @@
return null
///
if(viable_occupant)
if (prob((80 + (radduration / 2))))
if ((se_block != 2 || se_block != 12 || se_block != 8 || se_block || 10) && prob (20))
if(prob((80 + (radduration / 2))))
if((se_block != 2 || se_block != 12 || se_block != 8 || se_block || 10) && prob (20))
oldblock = se_block
block = miniscramble(block, radstrength, radduration)
newblock = null
if (se_block > 1 && se_block < 5)
if(se_block > 1 && se_block < 5)
se_block++
else if (se_block > 5 && se_block < 14)
else if(se_block > 5 && se_block < 14)
se_block--
if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
if(subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if(subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if(subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
tstructure2 = setblock(scanner.occupant.dna.struc_enzymes, se_block, newblock,3)
scanner.occupant.dna.struc_enzymes = tstructure2
domutcheck(scanner.occupant,scanner)
@@ -816,15 +816,15 @@
//
block = miniscramble(block, radstrength, radduration)
newblock = null
if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
if(subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if(subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
if(subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
tstructure2 = setblock(scanner.occupant.dna.struc_enzymes, se_block, newblock,3)
scanner.occupant.dna.struc_enzymes = tstructure2
domutcheck(scanner.occupant,scanner)
scanner.occupant.apply_effect(radstrength+radduration, IRRADIATE)
else
if (prob(80-radduration))
if(prob(80-radduration))
randmutb(scanner.occupant)
domutcheck(scanner.occupant,scanner)
else
@@ -836,21 +836,21 @@
dopage(src,"screen=strucmenu")
////////////////////////////////////////////////////////
if (href_list["b1addui"])
if(href_list["b1addui"])
if(scanner.occupant && scanner.occupant.dna)
buffer1iue = 0
buffer1 = scanner.occupant.dna.uni_identity
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer1owner = scanner.occupant.name
else
buffer1owner = scanner.occupant.real_name
buffer1label = "Unique Identifier"
buffer1type = "ui"
dopage(src,"screen=buffermenu")
if (href_list["b1adduiue"])
if(href_list["b1adduiue"])
if(scanner.occupant && scanner.occupant.dna)
buffer1 = scanner.occupant.dna.uni_identity
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer1owner = scanner.occupant.name
else
buffer1owner = scanner.occupant.real_name
@@ -858,10 +858,10 @@
buffer1type = "ui"
buffer1iue = 1
dopage(src,"screen=buffermenu")
if (href_list["b2adduiue"])
if(href_list["b2adduiue"])
if(scanner.occupant && scanner.occupant.dna)
buffer2 = scanner.occupant.dna.uni_identity
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer2owner = scanner.occupant.name
else
buffer2owner = scanner.occupant.real_name
@@ -869,10 +869,10 @@
buffer2type = "ui"
buffer2iue = 1
dopage(src,"screen=buffermenu")
if (href_list["b3adduiue"])
if(href_list["b3adduiue"])
if(scanner.occupant && scanner.occupant.dna)
buffer3 = scanner.occupant.dna.uni_identity
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer3owner = scanner.occupant.name
else
buffer3owner = scanner.occupant.real_name
@@ -880,141 +880,141 @@
buffer3type = "ui"
buffer3iue = 1
dopage(src,"screen=buffermenu")
if (href_list["b2addui"])
if(href_list["b2addui"])
if(scanner.occupant && scanner.occupant.dna)
buffer2iue = 0
buffer2 = scanner.occupant.dna.uni_identity
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer2owner = scanner.occupant.name
else
buffer2owner = scanner.occupant.real_name
buffer2label = "Unique Identifier"
buffer2type = "ui"
dopage(src,"screen=buffermenu")
if (href_list["b3addui"])
if(href_list["b3addui"])
if(scanner.occupant && scanner.occupant.dna)
buffer3iue = 0
buffer3 = scanner.occupant.dna.uni_identity
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer3owner = scanner.occupant.name
else
buffer3owner = scanner.occupant.real_name
buffer3label = "Unique Identifier"
buffer3type = "ui"
dopage(src,"screen=buffermenu")
if (href_list["b1addse"])
if(href_list["b1addse"])
if(scanner.occupant && scanner.occupant.dna)
buffer1iue = 0
buffer1 = scanner.occupant.dna.struc_enzymes
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer1owner = scanner.occupant.name
else
buffer1owner = scanner.occupant.real_name
buffer1label = "Structural Enzymes"
buffer1type = "se"
dopage(src,"screen=buffermenu")
if (href_list["b2addse"])
if(href_list["b2addse"])
if(scanner.occupant && scanner.occupant.dna)
buffer2iue = 0
buffer2 = scanner.occupant.dna.struc_enzymes
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer2owner = scanner.occupant.name
else
buffer2owner = scanner.occupant.real_name
buffer2label = "Structural Enzymes"
buffer2type = "se"
dopage(src,"screen=buffermenu")
if (href_list["b3addse"])
if(href_list["b3addse"])
if(scanner.occupant && scanner.occupant.dna)
buffer3iue = 0
buffer3 = scanner.occupant.dna.struc_enzymes
if (!istype(scanner.occupant,/mob/living/carbon/human))
if(!istype(scanner.occupant,/mob/living/carbon/human))
buffer3owner = scanner.occupant.name
else
buffer3owner = scanner.occupant.real_name
buffer3label = "Structural Enzymes"
buffer3type = "se"
dopage(src,"screen=buffermenu")
if (href_list["b1clear"])
if(href_list["b1clear"])
buffer1 = null
buffer1owner = null
buffer1label = null
buffer1iue = null
dopage(src,"screen=buffermenu")
if (href_list["b2clear"])
if(href_list["b2clear"])
buffer2 = null
buffer2owner = null
buffer2label = null
buffer2iue = null
dopage(src,"screen=buffermenu")
if (href_list["b3clear"])
if(href_list["b3clear"])
buffer3 = null
buffer3owner = null
buffer3label = null
buffer3iue = null
dopage(src,"screen=buffermenu")
if (href_list["b1label"])
if(href_list["b1label"])
buffer1label = sanitize(input("New Label:","Edit Label","Infos here"))
dopage(src,"screen=buffermenu")
if (href_list["b2label"])
if(href_list["b2label"])
buffer2label = sanitize(input("New Label:","Edit Label","Infos here"))
dopage(src,"screen=buffermenu")
if (href_list["b3label"])
if(href_list["b3label"])
buffer3label = sanitize(input("New Label:","Edit Label","Infos here"))
dopage(src,"screen=buffermenu")
if (href_list["b1transfer"])
if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
if(href_list["b1transfer"])
if(!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
return
if (buffer1type == "ui")
if (buffer1iue)
if(buffer1type == "ui")
if(buffer1iue)
scanner.occupant.real_name = buffer1owner
scanner.occupant.name = buffer1owner
scanner.occupant.dna.uni_identity = buffer1
updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
else if (buffer1type == "se")
else if(buffer1type == "se")
scanner.occupant.dna.struc_enzymes = buffer1
domutcheck(scanner.occupant,scanner)
temp_html = "Transfered."
scanner.occupant.apply_effect(rand(20,50), IRRADIATE)
if (href_list["b2transfer"])
if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
if(href_list["b2transfer"])
if(!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
return
if (buffer2type == "ui")
if (buffer2iue)
if(buffer2type == "ui")
if(buffer2iue)
scanner.occupant.real_name = buffer2owner
scanner.occupant.name = buffer2owner
scanner.occupant.dna.uni_identity = buffer2
updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
else if (buffer2type == "se")
else if(buffer2type == "se")
scanner.occupant.dna.struc_enzymes = buffer2
domutcheck(scanner.occupant,scanner)
temp_html = "Transfered."
scanner.occupant.apply_effect(rand(20,50), IRRADIATE)
if (href_list["b3transfer"])
if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
if(href_list["b3transfer"])
if(!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
return
if (buffer3type == "ui")
if (buffer3iue)
if(buffer3type == "ui")
if(buffer3iue)
scanner.occupant.real_name = buffer3owner
scanner.occupant.name = buffer3owner
scanner.occupant.dna.uni_identity = buffer3
updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
else if (buffer3type == "se")
else if(buffer3type == "se")
scanner.occupant.dna.struc_enzymes = buffer3
domutcheck(scanner.occupant,scanner)
temp_html = "Transfered."
scanner.occupant.apply_effect(rand(20,50), IRRADIATE)
if (href_list["b1injector"])
if (injectorready)
if(href_list["b1injector"])
if(injectorready)
var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
I.dna = buffer1
I.dnatype = buffer1type
I.loc = loc
I.name += " ([buffer1label])"
if (buffer1iue) I.ue = buffer1owner //lazy haw haw
if(buffer1iue) I.ue = buffer1owner //lazy haw haw
temp_html = "Injector created."
injectorready = 0
@@ -1023,14 +1023,14 @@
else
temp_html = "Replicator not ready yet."
if (href_list["b2injector"])
if (injectorready)
if(href_list["b2injector"])
if(injectorready)
var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
I.dna = buffer2
I.dnatype = buffer2type
I.loc = loc
I.name += " ([buffer2label])"
if (buffer2iue) I.ue = buffer2owner //lazy haw haw
if(buffer2iue) I.ue = buffer2owner //lazy haw haw
temp_html = "Injector created."
injectorready = 0
@@ -1039,14 +1039,14 @@
else
temp_html = "Replicator not ready yet."
if (href_list["b3injector"])
if (injectorready)
if(href_list["b3injector"])
if(injectorready)
var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
I.dna = buffer3
I.dnatype = buffer3type
I.loc = loc
I.name += " ([buffer3label])"
if (buffer3iue) I.ue = buffer3owner //lazy haw haw
if(buffer3iue) I.ue = buffer3owner //lazy haw haw
temp_html = "Injector created."
injectorready = 0
@@ -1056,11 +1056,11 @@
temp_html = "Replicator not ready yet."
////////////////////////////////////////////////////////
if (href_list["load_disk"])
if(href_list["load_disk"])
var/buffernum = text2num(href_list["load_disk"])
if ((buffernum > 3) || (buffernum < 1))
if((buffernum > 3) || (buffernum < 1))
return
if ((isnull(diskette)) || (!diskette.data) || (diskette.data == ""))
if((isnull(diskette)) || (!diskette.data) || (diskette.data == ""))
return
switch(buffernum)
if(1)
@@ -1080,11 +1080,11 @@
buffer3owner = diskette.owner
temp_html = "Data loaded."
if (href_list["save_disk"])
if(href_list["save_disk"])
var/buffernum = text2num(href_list["save_disk"])
if ((buffernum > 3) || (buffernum < 1))
if((buffernum > 3) || (buffernum < 1))
return
if ((isnull(diskette)) || (diskette.read_only))
if((isnull(diskette)) || (diskette.read_only))
return
switch(buffernum)
if(1)
@@ -1106,8 +1106,8 @@
diskette.owner = buffer3owner
diskette.name = "data disk - '[buffer3owner]'"
temp_html = "Data saved."
if (href_list["eject_disk"])
if (!diskette)
if(href_list["eject_disk"])
if(!diskette)
return
diskette.loc = get_turf(src)
diskette = null
@@ -1115,9 +1115,9 @@
temp_html = temp_header_html
switch(current_screen)
if ("mainmenu")
if("mainmenu")
temp_html += "<h3>Main Menu</h3>"
if (viable_occupant) //is there REALLY someone in there who can be modified?
if(viable_occupant) //is there REALLY someone in there who can be modified?
temp_html += text("<A href='?src=\ref[];screen=unimenu'>Modify Unique Identifier</A><br />", src)
temp_html += text("<A href='?src=\ref[];screen=strucmenu'>Modify Structural Enzymes</A><br /><br />", src)
else
@@ -1126,7 +1126,7 @@
temp_html += text("<A href='?src=\ref[];screen=radsetmenu'>Radiation Emitter Settings</A><br /><br />", src)
temp_html += text("<A href='?src=\ref[];screen=buffermenu'>Transfer Buffer</A><br /><br />", src)
if ("unimenu")
if("unimenu")
if(!viable_occupant)
temp_html = text("No viable occupant detected.")
popup.set_content(temp_html)
@@ -1141,7 +1141,7 @@
temp_html += "<B>Modify Block</B><br />"
temp_html += "<A href='?src=\ref[src];unipulse=1'>Irradiate</A></div>"
if ("strucmenu")
if("strucmenu")
if(!viable_occupant)
temp_html = text("No viable occupant detected.")
popup.set_content(temp_html)
@@ -1155,61 +1155,61 @@
temp_html += "<B>Modify Block</B><br />"
temp_html += "<A href='?src=\ref[src];strucpulse=1'>Irradiate</A></div>"
if ("radsetmenu")
if("radsetmenu")
temp_html = "<A href='?src=\ref[src];screen=mainmenu'><< Main Menu</A><br />"
temp_html += "<h3>Radiation Emitter Settings</h3>"
if (viable_occupant)
if(viable_occupant)
temp_html += text("<A href='?src=\ref[];genpulse=1'>Pulse Radiation</A>", src)
else
temp_html += "<span class='linkOff'>Pulse Radiation</span>"
temp_html += "<br /><br />Radiation Duration: <A href='?src=\ref[src];radleminus=1'>-</A> <font color='green'><B>[radduration]</B></FONT> <A href='?src=\ref[src];radleplus=1'>+</A><br />"
temp_html += "Radiation Intensity: <A href='?src=\ref[src];radinminus=1'>-</A> <font color='green'><B>[radstrength]</B></FONT> <A href='?src=\ref[src];radinplus=1'>+</A><br /><br />"
if ("buffermenu")
if("buffermenu")
temp_html = "<A href='?src=\ref[src];screen=mainmenu'><< Main Menu</A><br />"
temp_html += "<h3>Transfer Buffer</h3>"
temp_html += "<h4>Buffer 1:</h4>"
if (!(buffer1))
if(!(buffer1))
temp_html += "<i>Buffer Empty</i><br />"
else
temp_html += text("Data: <font class='highlight'>[]</FONT><br />", buffer1)
temp_html += text("By: <font class='highlight'>[]</FONT><br />", buffer1owner)
temp_html += text("Label: <font class='highlight'>[]</FONT><br />", buffer1label)
if (viable_occupant) temp_html += text("Save : <A href='?src=\ref[];b1addui=1'>UI</A> - <A href='?src=\ref[];b1adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b1addse=1'>SE</A><br />", src, src, src)
if (buffer1) temp_html += text("Transfer to: <A href='?src=\ref[];b1transfer=1'>Occupant</A> - <A href='?src=\ref[];b1injector=1'>Injector</A><br />", src, src)
//if (buffer1) temp_html += text("<A href='?src=\ref[];b1iso=1'>Isolate Block</A><br />", src)
if (buffer1) temp_html += "Disk: <A href='?src=\ref[src];save_disk=1'>Save To</a> | <A href='?src=\ref[src];load_disk=1'>Load From</a><br />"
if (buffer1) temp_html += text("<A href='?src=\ref[];b1label=1'>Edit Label</A><br />", src)
if (buffer1) temp_html += text("<A href='?src=\ref[];b1clear=1'>Clear Buffer</A><br /><br />", src)
if (!buffer1) temp_html += "<br />"
if(viable_occupant) temp_html += text("Save : <A href='?src=\ref[];b1addui=1'>UI</A> - <A href='?src=\ref[];b1adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b1addse=1'>SE</A><br />", src, src, src)
if(buffer1) temp_html += text("Transfer to: <A href='?src=\ref[];b1transfer=1'>Occupant</A> - <A href='?src=\ref[];b1injector=1'>Injector</A><br />", src, src)
//if(buffer1) temp_html += text("<A href='?src=\ref[];b1iso=1'>Isolate Block</A><br />", src)
if(buffer1) temp_html += "Disk: <A href='?src=\ref[src];save_disk=1'>Save To</a> | <A href='?src=\ref[src];load_disk=1'>Load From</a><br />"
if(buffer1) temp_html += text("<A href='?src=\ref[];b1label=1'>Edit Label</A><br />", src)
if(buffer1) temp_html += text("<A href='?src=\ref[];b1clear=1'>Clear Buffer</A><br /><br />", src)
if(!buffer1) temp_html += "<br />"
temp_html += "<h4>Buffer 2:</h4>"
if (!(buffer2))
if(!(buffer2))
temp_html += "<i>Buffer Empty</i><br />"
else
temp_html += text("Data: <font class='highlight'>[]</FONT><br />", buffer2)
temp_html += text("By: <font class='highlight'>[]</FONT><br />", buffer2owner)
temp_html += text("Label: <font class='highlight'>[]</FONT><br />", buffer2label)
if (viable_occupant) temp_html += text("Save : <A href='?src=\ref[];b2addui=1'>UI</A> - <A href='?src=\ref[];b2adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b2addse=1'>SE</A><br />", src, src, src)
if (buffer2) temp_html += text("Transfer to: <A href='?src=\ref[];b2transfer=1'>Occupant</A> - <A href='?src=\ref[];b2injector=1'>Injector</A><br />", src, src)
//if (buffer2) temp_html += text("<A href='?src=\ref[];b2iso=1'>Isolate Block</A><br />", src)
if (buffer2) temp_html += "Disk: <A href='?src=\ref[src];save_disk=2'>Save To</a> | <A href='?src=\ref[src];load_disk=2'>Load From</a><br />"
if (buffer2) temp_html += text("<A href='?src=\ref[];b2label=1'>Edit Label</A><br />", src)
if (buffer2) temp_html += text("<A href='?src=\ref[];b2clear=1'>Clear Buffer</A><br /><br />", src)
if (!buffer2) temp_html += "<br />"
if(viable_occupant) temp_html += text("Save : <A href='?src=\ref[];b2addui=1'>UI</A> - <A href='?src=\ref[];b2adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b2addse=1'>SE</A><br />", src, src, src)
if(buffer2) temp_html += text("Transfer to: <A href='?src=\ref[];b2transfer=1'>Occupant</A> - <A href='?src=\ref[];b2injector=1'>Injector</A><br />", src, src)
//if(buffer2) temp_html += text("<A href='?src=\ref[];b2iso=1'>Isolate Block</A><br />", src)
if(buffer2) temp_html += "Disk: <A href='?src=\ref[src];save_disk=2'>Save To</a> | <A href='?src=\ref[src];load_disk=2'>Load From</a><br />"
if(buffer2) temp_html += text("<A href='?src=\ref[];b2label=1'>Edit Label</A><br />", src)
if(buffer2) temp_html += text("<A href='?src=\ref[];b2clear=1'>Clear Buffer</A><br /><br />", src)
if(!buffer2) temp_html += "<br />"
temp_html += "<h4>Buffer 3:</h4>"
if (!(buffer3))
if(!(buffer3))
temp_html += "<i>Buffer Empty</i><br />"
else
temp_html += text("Data: <font class='highlight'>[]</FONT><br />", buffer3)
temp_html += text("By: <font class='highlight'>[]</FONT><br />", buffer3owner)
temp_html += text("Label: <font class='highlight'>[]</FONT><br />", buffer3label)
if (viable_occupant) temp_html += text("Save : <A href='?src=\ref[];b3addui=1'>UI</A> - <A href='?src=\ref[];b3adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b3addse=1'>SE</A><br />", src, src, src)
if (buffer3) temp_html += text("Transfer to: <A href='?src=\ref[];b3transfer=1'>Occupant</A> - <A href='?src=\ref[];b3injector=1'>Injector</A><br />", src, src)
//if (buffer3) temp_html += text("<A href='?src=\ref[];b3iso=1'>Isolate Block</A><br />", src)
if (buffer3) temp_html += "Disk: <A href='?src=\ref[src];save_disk=3'>Save To</a> | <A href='?src=\ref[src];load_disk=3'>Load From</a><br />"
if (buffer3) temp_html += text("<A href='?src=\ref[];b3label=1'>Edit Label</A><br />", src)
if (buffer3) temp_html += text("<A href='?src=\ref[];b3clear=1'>Clear Buffer</A><br /><br />", src)
if (!buffer3) temp_html += "<br />"
if(viable_occupant) temp_html += text("Save : <A href='?src=\ref[];b3addui=1'>UI</A> - <A href='?src=\ref[];b3adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b3addse=1'>SE</A><br />", src, src, src)
if(buffer3) temp_html += text("Transfer to: <A href='?src=\ref[];b3transfer=1'>Occupant</A> - <A href='?src=\ref[];b3injector=1'>Injector</A><br />", src, src)
//if(buffer3) temp_html += text("<A href='?src=\ref[];b3iso=1'>Isolate Block</A><br />", src)
if(buffer3) temp_html += "Disk: <A href='?src=\ref[src];save_disk=3'>Save To</a> | <A href='?src=\ref[src];load_disk=3'>Load From</a><br />"
if(buffer3) temp_html += text("<A href='?src=\ref[];b3label=1'>Edit Label</A><br />", src)
if(buffer3) temp_html += text("<A href='?src=\ref[];b3clear=1'>Clear Buffer</A><br /><br />", src)
if(!buffer3) temp_html += "<br />"
temp_html += temp_footer_html
if(viable_occupant && !scanner_status_html && occupant) //is there REALLY someone in there?
@@ -1219,7 +1219,7 @@
var/rejuvenators = round(human_occupant.reagents.get_reagent_amount("inaprovaline") / REJUVENATORS_MAX * 100)
scanner_status_html += "<div class='line'><div class='statusLabel'>Rejuvenators:</div><div class='progressBar'><div style='width: [rejuvenators]%;' class='progressFill highlight'></div></div><div class='statusValue'>[human_occupant.reagents.get_reagent_amount("inaprovaline")] units</div></div>"
if (current_screen == "mainmenu")
if(current_screen == "mainmenu")
scanner_status_html += "<div class='line'><div class='statusLabel'>Unique Enzymes :</div><div class='statusValue'><span class='highlight'>[uppertext(occupant.dna.unique_enzymes)]</span></div></div>"
scanner_status_html += "<div class='line'><div class='statusLabel'>Unique Identifier:</div><div class='statusValue'><span class='highlight'>[occupant.dna.uni_identity]</span></div></div>"
scanner_status_html += "<div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><span class='highlight'>[occupant.dna.struc_enzymes]</span></div></div>"
@@ -1228,7 +1228,7 @@
var/occupant_status = "Scanner Unoccupied"
if(occupant && occupant.dna) //is there REALLY someone in there?
if (!istype(occupant,/mob/living/carbon/human))
if(!istype(occupant,/mob/living/carbon/human))
sleep(1)
if(NOCLONE in occupant.mutations)
occupant_status = "<span class='bad'>Invalid DNA structure</span>"
@@ -1246,14 +1246,14 @@
dat += "<div class='statusDisplay'>[occupant_status][scanner_status_html]</div>"
var/scanner_access_text = "Lock Scanner"
if (scanner.locked)
if(scanner.locked)
scanner_access_text = "Unlock Scanner"
dat += "<A href='?src=\ref[src];'>Scan</A> "
if (occupant && occupant.dna)
if(occupant && occupant.dna)
dat += "<A href='?src=\ref[src];locked=1'>[scanner_access_text]</A> "
if (human_occupant)
if(human_occupant)
dat += "<A href='?src=\ref[src];rejuv=1'>Inject Rejuvenators</A><br />"
else
dat += "<span class='linkOff'>Inject Rejuvenators</span><br />"
@@ -1261,12 +1261,12 @@
dat += "<span class='linkOff'>[scanner_access_text]</span> "
dat += "<span class='linkOff'>Inject Rejuvenators</span><br />"
if (!isnull(diskette))
if(!isnull(diskette))
dat += text("<A href='?src=\ref[];eject_disk=1'>Eject Disk</A><br />", src)
dat += "<br />"
if (temp_html)
if(temp_html)
dat += temp_html
popup.set_content(dat)
+83 -83
View File
@@ -51,26 +51,26 @@
usr.set_machine(src)
scan = computer.cardslot.reader
if (computer.cardslot.dualslot)
if(computer.cardslot.dualslot)
scan2 = computer.cardslot.writer
if(!interactable())
return
if (computer.z > 6)
if(computer.z > 6)
to_chat(usr, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
return
var/dat
if (temp)
if(temp)
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
else
dat = text("Confirm Identity (R): <A href='?src=\ref[];choice=Confirm Identity R'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
if (computer.cardslot.dualslot)
if(computer.cardslot.dualslot)
dat += text("Check Identity (W): <A href='?src=\ref[];choice=Confirm Identity W'>[]</A><BR>", src, (scan2 ? text("[]", scan2.name) : "----------"))
if(scan2 && !scan)
dat += text("<div class='notice'>Insert card into reader slot to log in.</div><br>")
if (authenticated)
if(authenticated)
switch(screen)
if(1.0)
dat += {"
@@ -96,7 +96,7 @@
for(var/datum/data/record/R in sortRecord(data_core.general, sortBy, order))
var/crimstat = ""
for(var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
if((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
crimstat = E.fields["criminal"]
var/background
switch(crimstat)
@@ -126,7 +126,7 @@
dat += "<BR><A href='?src=\ref[src];choice=Delete All Records'>Delete All Records</A><BR><BR><A href='?src=\ref[src];choice=Return'>Back</A>"
if(3.0)
dat += "<CENTER><B>Security Record</B></CENTER><BR>"
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
if((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
dat += text("<table><tr><td> \
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
@@ -140,7 +140,7 @@
<img src=[active1.fields["photo-west"]] height=80 width=80 border=4></td></tr></table>")
else
dat += "<B>General Record Lost!</B><BR>"
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
if((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
dat += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: <A href='?src=\ref[];choice=Edit Field;field=criminal'>[]</A><BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];choice=Edit Field;field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];choice=Edit Field;field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];choice=Edit Field;field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, active2.fields["criminal"], src, active2.fields["mi_crim"], src, active2.fields["mi_crim_d"], src, active2.fields["ma_crim"], src, active2.fields["ma_crim_d"], src, decode(active2.fields["notes"]))
var/counter = 1
while(active2.fields[text("com_[]", counter)])
@@ -215,9 +215,9 @@ What a mess.*/
Topic(href, href_list)
if(!interactable() || !computer.cardslot || ..(href,href_list))
return
if (!( data_core.general.Find(active1) ))
if(!( data_core.general.Find(active1) ))
active1 = null
if (!( data_core.security.Find(active2) ))
if(!( data_core.security.Find(active2) ))
active2 = null
switch(href_list["choice"])
// SORTING!
@@ -236,13 +236,13 @@ What a mess.*/
if("Clear Screen")
temp = null
if ("Return")
if("Return")
screen = 1
active1 = null
active2 = null
if("Confirm Identity R")
if (scan)
if(scan)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
computer.cardslot.remove(1)
else
@@ -250,12 +250,12 @@ What a mess.*/
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
computer.cardslot.insert(I, 1)
scan = I
if("Confirm Identity W")
if (scan2)
if(scan2)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
computer.cardslot.remove(2)
else
@@ -263,7 +263,7 @@ What a mess.*/
scan2 = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
computer.cardslot.insert(I, 2)
scan2 = I
@@ -274,20 +274,20 @@ What a mess.*/
active2 = null
if("Log In")
if (istype(usr, /mob/living/silicon/ai))
if(istype(usr, /mob/living/silicon/ai))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
src.rank = "AI"
src.screen = 1
else if (istype(usr, /mob/living/silicon/robot))
else if(istype(usr, /mob/living/silicon/robot))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
var/mob/living/silicon/robot/R = usr
src.rank = "[R.modtype] [R.braintype]"
src.screen = 1
else if (istype(scan, /obj/item/weapon/card/id))
else if(istype(scan, /obj/item/weapon/card/id))
active1 = null
active2 = null
if(authenticate())
@@ -297,7 +297,7 @@ What a mess.*/
//RECORD FUNCTIONS
if("Search Records")
var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !interactable()))
if((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !interactable()))
return
Perp = new/list()
t1 = lowertext(t1)
@@ -314,7 +314,7 @@ What a mess.*/
for(var/i = 1, i<=Perp.len, i+=2)
for(var/datum/data/record/E in data_core.security)
var/datum/data/record/R = Perp[i]
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
if((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
Perp[i+1] = E
tempname = t1
screen = 4
@@ -324,56 +324,56 @@ What a mess.*/
active1 = null
active2 = null
if ("Browse Record")
if("Browse Record")
var/datum/data/record/R = locate(href_list["d_rec"])
var/S = locate(href_list["d_rec"])
if (!( data_core.general.Find(R) ))
if(!( data_core.general.Find(R) ))
temp = "Record Not Found!"
else
for(var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
S = E
active1 = R
active2 = S
screen = 3
/* if ("Search Fingerprints")
/* if("Search Fingerprints")
var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!interactable()) && (!istype(usr, /mob/living/silicon))))
if((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!interactable()) && (!istype(usr, /mob/living/silicon))))
return
active1 = null
active2 = null
t1 = lowertext(t1)
for(var/datum/data/record/R in data_core.general)
if (lowertext(R.fields["fingerprint"]) == t1)
if(lowertext(R.fields["fingerprint"]) == t1)
active1 = R
if (!( active1 ))
if(!( active1 ))
temp = text("Could not locate record [].", t1)
else
for(var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == active1.fields["name"] || E.fields["id"] == active1.fields["id"]))
if((E.fields["name"] == active1.fields["name"] || E.fields["id"] == active1.fields["id"]))
active2 = E
screen = 3 */
if ("Print Record")
if (!( printing ))
if("Print Record")
if(!( printing ))
printing = 1
var/datum/data/record/record1 = null
var/datum/data/record/record2 = null
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
if((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
record1 = active1
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
if((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
record2 = active2
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( computer.loc )
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
if (record1)
if(record1)
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", record1.fields["name"], record1.fields["id"], record1.fields["sex"], record1.fields["age"], record1.fields["fingerprint"], record1.fields["p_stat"], record1.fields["m_stat"])
P.name = text("Security Record ([])", record1.fields["name"])
else
P.info += "<B>General Record Lost!</B><BR>"
P.name = "Security Record"
if (record2)
if(record2)
P.info += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: []<BR>\n<BR>\nMinor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nMajor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", record2.fields["criminal"], record2.fields["mi_crim"], record2.fields["mi_crim_d"], record2.fields["ma_crim"], record2.fields["ma_crim_d"], decode(record2.fields["notes"]))
var/counter = 1
while(record2.fields[text("com_[]", counter)])
@@ -385,47 +385,47 @@ What a mess.*/
printing = null
computer.updateUsrDialog()
//RECORD DELETE
if ("Delete All Records")
if("Delete All Records")
temp = ""
temp += "Are you sure you wish to delete all Security records?<br>"
temp += "<a href='?src=\ref[src];choice=Purge All Records'>Yes</a><br>"
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
if ("Purge All Records")
if("Purge All Records")
for(var/datum/data/record/R in data_core.security)
qdel(R)
temp = "All Security records deleted."
if ("Add Entry")
if (!( istype(active2, /datum/data/record) ))
if("Add Entry")
if(!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
while(active2.fields[text("com_[]", counter)])
counter++
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if ("Delete Record (ALL)")
if (active1)
if("Delete Record (ALL)")
if(active1)
temp = "<h5>Are you sure you wish to delete the record (ALL)?</h5>"
temp += "<a href='?src=\ref[src];choice=Delete Record (ALL) Execute'>Yes</a><br>"
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
if ("Delete Record (Security)")
if (active2)
if("Delete Record (Security)")
if(active2)
temp = "<h5>Are you sure you wish to delete the record (Security Portion Only)?</h5>"
temp += "<a href='?src=\ref[src];choice=Delete Record (Security) Execute'>Yes</a><br>"
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
if ("Delete Entry")
if ((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
if("Delete Entry")
if((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
active2.fields[text("com_[]", href_list["del_c"])] = "<B>Deleted</B>"
//RECORD CREATE
if ("New Record (Security)")
if ((istype(active1, /datum/data/record) && !( istype(active2, /datum/data/record) )))
if("New Record (Security)")
if((istype(active1, /datum/data/record) && !( istype(active2, /datum/data/record) )))
var/datum/data/record/R = new /datum/data/record()
R.fields["name"] = active1.fields["name"]
R.fields["id"] = active1.fields["id"]
@@ -440,7 +440,7 @@ What a mess.*/
active2 = R
screen = 3
if ("New Record (General)")
if("New Record (General)")
var/datum/data/record/G = new /datum/data/record()
G.fields["name"] = "New Record"
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
@@ -457,72 +457,72 @@ What a mess.*/
active2 = null
//FIELD FUNCTIONS
if ("Edit Field")
if("Edit Field")
var/a1 = active1
var/a2 = active2
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
if(istype(active1, /datum/data/record))
var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
if((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
if(istype(active1, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
if("sex")
if (istype(active1, /datum/data/record))
if (active1.fields["sex"] == "Male")
if(istype(active1, /datum/data/record))
if(active1.fields["sex"] == "Male")
active1.fields["sex"] = "Female"
else
active1.fields["sex"] = "Male"
if("age")
if (istype(active1, /datum/data/record))
if(istype(active1, /datum/data/record))
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input minor crimes list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please summarize minor crimes:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please input major crimes list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
var/t1 = sanitize(copytext(input("Please summarize major crimes:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor crimes:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["notes"] = t1
if("criminal")
if (istype(active2, /datum/data/record))
if(istype(active2, /datum/data/record))
temp = "<h5>Criminal Status:</h5>"
temp += "<ul>"
temp += "<li><a href='?src=\ref[src];choice=Change Criminal Status;criminal2=none'>None</a></li>"
@@ -534,7 +534,7 @@ What a mess.*/
if("rank")
var/list/L = list( "Head of Personnel", "Captain", "AI" )
//This was so silly before the change. Now it actually works without beating your head against the keyboard. /N
if ((istype(active1, /datum/data/record) && L.Find(rank)))
if((istype(active1, /datum/data/record) && L.Find(rank)))
temp = "<h5>Rank:</h5>"
temp += "<ul>"
for(var/rank in joblist)
@@ -543,9 +543,9 @@ What a mess.*/
else
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
if(istype(active1, /datum/data/record))
var/t1 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
if((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
@@ -553,14 +553,14 @@ What a mess.*/
else//To properly clear as per clear screen.
temp=null
switch(href_list["choice"])
if ("Change Rank")
if (active1)
if("Change Rank")
if(active1)
active1.fields["rank"] = href_list["rank"]
if(href_list["rank"] in joblist)
active1.fields["real_rank"] = href_list["real_rank"]
if ("Change Criminal Status")
if (active2)
if("Change Criminal Status")
if(active2)
switch(href_list["criminal2"])
if("none")
@@ -576,18 +576,18 @@ What a mess.*/
for(var/mob/living/carbon/human/H in mob_list)
H.sec_hud_set_security_status()
if ("Delete Record (Security) Execute")
if (active2)
if("Delete Record (Security) Execute")
if(active2)
qdel(active2)
if ("Delete Record (ALL) Execute")
if (active1)
if("Delete Record (ALL) Execute")
if(active1)
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
if((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
qdel(R)
else
qdel(active1)
if (active2)
if(active2)
qdel(active2)
else
temp = "This function does not appear to be working at the moment. Our apologies."
+6 -6
View File
@@ -13,12 +13,12 @@
attackby(var/obj/item/card/W as obj, var/mob/user as mob, params)
if(stat & (BROKEN|NOPOWER)) return
if ((!( istype(W, /obj/item/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
if (istype(W, /obj/item/device/pda))
if((!( istype(W, /obj/item/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
if(istype(W, /obj/item/device/pda))
var/obj/item/device/pda/pda = W
W = pda.id
if (!W:access) //no access
if(!W:access) //no access
to_chat(user, "The access level of [W:registered_name]\'s card is not high enough. ")
return
@@ -38,7 +38,7 @@
if("Authorize")
src.authorized -= W:registered_name
src.authorized += W:registered_name
if (src.auth_need - src.authorized.len > 0)
if(src.auth_need - src.authorized.len > 0)
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
log_game("[user.ckey] has authorized early shuttle launch")
to_chat(world, text("\blue <B>Alert: [] authorizations needed until shuttle is launched early</B>", src.auth_need - src.authorized.len))
@@ -63,7 +63,7 @@
return
emag_act(user as mob)
if (!emagged)
if(!emagged)
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
if(!emagged && emergency_shuttle.location == 1)
@@ -55,9 +55,9 @@ var/specops_shuttle_timeleft = 0
specops_shuttle_moving_to_centcom = 0
specops_shuttle_at_station = 1
if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
if(!specops_can_move())
to_chat(usr, "\red The Special Operations shuttle is unable to leave.")
return
@@ -179,7 +179,7 @@ var/specops_shuttle_timeleft = 0
to_chat(user, "\red Access Denied.")
return
if (sent_strike_team == 0)
if(sent_strike_team == 0)
to_chat(usr, "\red The strike team has not yet deployed.")
return
@@ -188,7 +188,7 @@ var/specops_shuttle_timeleft = 0
user.set_machine(src)
var/dat
if (temp)
if(temp)
dat = temp
else
dat += {"
@@ -208,19 +208,19 @@ var/specops_shuttle_timeleft = 0
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) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["sendtodock"])
if(href_list["sendtodock"])
if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
to_chat(usr, "\blue Central Command will not allow the Special Operations shuttle to return.")
return
else if (href_list["sendtostation"])
else if(href_list["sendtostation"])
if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
if(!specops_can_move())
to_chat(usr, "\red The Special Operations shuttle is unable to leave.")
return
@@ -238,7 +238,7 @@ var/specops_shuttle_timeleft = 0
spawn(0)
specops_process()
else if (href_list["mainmenu"])
else if(href_list["mainmenu"])
temp = null
add_fingerprint(usr)
@@ -16,18 +16,18 @@
return
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
for (var/cat in src.alarms)
for(var/cat in src.alarms)
dat += text("<B>[]</B><BR>\n", cat)
var/list/L = src.alarms[cat]
if (L.len)
for (var/alarm in L)
if(L.len)
for(var/alarm in L)
var/list/alm = L[alarm]
var/area/A = alm[1]
var/list/sources = alm[3]
dat += "<NOBR>"
dat += "&bull; "
dat += "[A.name]"
if (sources.len > 1)
if(sources.len > 1)
dat += text(" - [] sources", sources.len)
dat += "</NOBR><BR>\n"
else
@@ -49,20 +49,20 @@
proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
var/list/L = src.alarms[class]
for (var/I in L)
if (I == A.name)
for(var/I in L)
if(I == A.name)
var/list/alarm = L[I]
var/list/sources = alarm[3]
if (!(alarmsource in sources))
if(!(alarmsource in sources))
sources += alarmsource
return 1
var/obj/machinery/camera/C = null
var/list/CL = null
if (O && istype(O, /list))
if(O && istype(O, /list))
CL = O
if (CL.len == 1)
if(CL.len == 1)
C = CL[1]
else if (O && istype(O, /obj/machinery/camera))
else if(O && istype(O, /obj/machinery/camera))
C = O
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
return 1
@@ -71,13 +71,13 @@
proc/cancelAlarm(var/class, area/A as area, obj/origin)
var/list/L = src.alarms[class]
var/cleared = 0
for (var/I in L)
if (I == A.name)
for(var/I in L)
if(I == A.name)
var/list/alarm = L[I]
var/list/srcs = alarm[3]
if (origin in srcs)
if(origin in srcs)
srcs -= origin
if (srcs.len == 0)
if(srcs.len == 0)
cleared = 1
L -= I
return !cleared
@@ -86,7 +86,7 @@
process()
var/active_alarms = 0
for (var/cat in src.alarms)
for(var/cat in src.alarms)
var/list/L = src.alarms[cat]
if(L.len) active_alarms = 1
if(active_alarms)
@@ -55,9 +55,9 @@ var/syndicate_elite_shuttle_timeleft = 0
syndicate_elite_shuttle_moving_to_mothership = 0
syndicate_elite_shuttle_at_station = 1
if (syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
if (!syndicate_elite_can_move())
if(!syndicate_elite_can_move())
to_chat(usr, "\red The Syndicate Elite shuttle is unable to leave.")
return
@@ -192,7 +192,7 @@ var/syndicate_elite_shuttle_timeleft = 0
to_chat(user, "\red Access Denied.")
return
// if (sent_syndicate_strike_team == 0)
// if(sent_syndicate_strike_team == 0)
// to_chat(usr, "\red The strike team has not yet deployed.")
// return
@@ -201,7 +201,7 @@ var/syndicate_elite_shuttle_timeleft = 0
user.set_machine(src)
var/dat
if (temp)
if(temp)
dat = temp
else
dat = {"<b>Location:</b> [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "Departing for [station_name] in ([syndicate_elite_shuttle_timeleft] seconds.)":syndicate_elite_shuttle_at_station ? "Station":"Dock"]<BR>
@@ -220,19 +220,19 @@ var/syndicate_elite_shuttle_timeleft = 0
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) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["sendtodock"])
if(href_list["sendtodock"])
if(!syndicate_elite_shuttle_at_station|| syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
to_chat(usr, "\blue The Syndicate will not allow the Elite Squad shuttle to return.")
return
else if (href_list["sendtostation"])
else if(href_list["sendtostation"])
if(syndicate_elite_shuttle_at_station || syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
if (!specops_can_move())
if(!specops_can_move())
to_chat(usr, "\red The Syndicate Elite shuttle is unable to leave.")
return
@@ -251,7 +251,7 @@ var/syndicate_elite_shuttle_timeleft = 0
syndicate_elite_process()
else if (href_list["mainmenu"])
else if(href_list["mainmenu"])
temp = null
add_fingerprint(usr)
+28 -28
View File
@@ -29,7 +29,7 @@
/obj/machinery/lapvend/blob_act()
if (prob(50))
if(prob(50))
spawn(0)
qdel(src)
return
@@ -82,7 +82,7 @@
dat += "<b>Total: [total()]</b><br>"
if(cardreader == 1)
dat += "<A href='?src=\ref[src];choice=single_rem'>Card Reader: (single) (50)</a><br>"
else if (cardreader == 2)
else if(cardreader == 2)
dat += "<A href='?src=\ref[src];choice=dual_rem'>Card Reader: (double) (125)</a><br>"
else
dat += "Card Reader: None<br>"
@@ -106,9 +106,9 @@
dat += "<A href='?src=\ref[src];choice=cable_rem'>Network card: Powernet (25)</a><br>"
else
dat += "Network card: None<br>"
if (power == 0)
if(power == 0)
dat += "Power source: Regular<br>"
else if (power == 1)
else if(power == 1)
dat += "<A href='?src=\ref[src];choice=high_rem'>Power source: Extended (175)</a><br>"
else
dat += "<A href='?src=\ref[src];choice=super_rem'>Power source: Unreal (250)</a><br>"
@@ -133,41 +133,41 @@
/obj/machinery/lapvend/Topic(href, href_list)
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
switch(href_list["choice"])
if("single_add")
cardreader = 1
if ("dual_add")
if("dual_add")
cardreader = 2
if ("floppy_add")
if("floppy_add")
floppy = 1
if ("radio_add")
if("radio_add")
radionet = 1
if ("camnet_add")
if("camnet_add")
camera = 1
if ("area_add")
if("area_add")
network = 1
if ("prox_add")
if("prox_add")
network = 2
if ("cable_add")
if("cable_add")
network = 3
if ("high_add")
if("high_add")
power = 1
if ("super_add")
if("super_add")
power = 2
if ("single_rem" || "dual_rem")
if("single_rem" || "dual_rem")
cardreader = 0
if ("floppy_rem")
if("floppy_rem")
floppy = 0
if ("radio_rem")
if("radio_rem")
radionet = 0
if ("camnet_rem")
if("camnet_rem")
camera = 0
if ("area_rem" || "prox_rem" || "cable_rem")
if("area_rem" || "prox_rem" || "cable_rem")
network = 0
if ("high_rem" || "super_rem")
if("high_rem" || "super_rem")
power = 0
if("vend")
@@ -194,23 +194,23 @@
newlap.spawn_parts += (/obj/item/part/computer/networking/radio)
if(camera == 1)
newlap.spawn_parts += (/obj/item/part/computer/networking/cameras)
if (network == 1)
if(network == 1)
newlap.spawn_parts += (/obj/item/part/computer/networking/area)
if (network == 2)
if(network == 2)
newlap.spawn_parts += (/obj/item/part/computer/networking/prox)
if (network == 3)
if(network == 3)
newlap.spawn_parts += (/obj/item/part/computer/networking/cable)
if (power == 1)
if(power == 1)
qdel(newlap.battery)
newlap.battery = new /obj/item/weapon/stock_parts/cell/high(newlap)
if (power == 2)
if(power == 2)
qdel(newlap.battery)
newlap.battery = new /obj/item/weapon/stock_parts/cell/super(newlap)
newlap.spawn_parts()
/obj/machinery/lapvend/proc/scan_card(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(vendor_account)
@@ -312,7 +312,7 @@
newlap.spawn_files += (/datum/file/program/communications)
if((access_medical in C.access) || (access_forensics_lockers in C.access)) //Gives detective the medical records program, but not the crew monitoring one.
newlap.spawn_files += (/datum/file/program/med_data)
if (access_medical in C.access)
if(access_medical in C.access)
newlap.spawn_files += (/datum/file/program/crew)
if(access_engine in C.access)
newlap.spawn_files += (/datum/file/program/powermon)
@@ -359,7 +359,7 @@
/obj/machinery/lapvend/proc/reimburse(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(vendor_account)
+1 -1
View File
@@ -71,7 +71,7 @@
..()
if(istype(I, /obj/item/stack/packageWrap))
var/obj/item/stack/packageWrap/C = I
if (C.use(5))
if(C.use(5))
var/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/W = new /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
user.unEquip(src)
user.put_in_hands(W)
+2 -2
View File
@@ -48,7 +48,7 @@
to_chat(M, "<span class='notice'>Your [Item.name] has been added to your [M.back.name].</span>")
if(ok == 0)
for(var/obj/item/weapon/storage/S in M.contents) // Try to place it in any item that can store stuff, on the mob.
if (S.contents.len < S.storage_slots)
if(S.contents.len < S.storage_slots)
Item.loc = S
ok = 1
to_chat(M, "<span class='notice'>Your [Item.name] has been added to your [S.name].</span>")
@@ -58,7 +58,7 @@
if(newname)
Item.name = newname
if (ok == 0) // Finally, since everything else failed, place it on the ground
if(ok == 0) // Finally, since everything else failed, place it on the ground
Item.loc = get_turf(M.loc)
HackProperties(Item,propadjust)
+7 -7
View File
@@ -18,7 +18,7 @@
/obj/item/device/detective_scanner/attack_self(var/mob/user)
var/search = input(user, "Enter name, fingerprint or blood DNA.", "Find record", "")
if (!search || user.stat || user.incapacitated())
if(!search || user.stat || user.incapacitated())
return
search = lowertext(search)
@@ -29,21 +29,21 @@
// I really, really wish I didn't have to split this into two seperate loops. But the datacore is awful.
for (var/record in data_core.general)
for(var/record in data_core.general)
var/datum/data/record/S = record
if(S && (search == lowertext(S.fields["fingerprint"]) || search == lowertext(S.fields["name"])))
name = S.fields["name"]
fingerprint = S.fields["fingerprint"]
continue
for (var/record in data_core.medical)
for(var/record in data_core.medical)
var/datum/data/record/M = record
if (M && ( search == lowertext(M.fields["b_dna"]) || name == M.fields["name"]) )
if(M && ( search == lowertext(M.fields["b_dna"]) || name == M.fields["name"]) )
dna = M.fields["b_dna"]
if(fingerprint == "FINGERPRINT NOT FOUND") // We have searched by DNA, and do not have the relevant information from the fingerprint records.
name = M.fields["name"]
for (var/gen_record in data_core.general)
for(var/gen_record in data_core.general)
var/datum/data/record/S = gen_record
if(S && (name == S.fields["name"]))
fingerprint = S.fields["fingerprint"]
@@ -132,7 +132,7 @@
if(ishuman(A))
var/mob/living/carbon/human/H = A
if (istype(H.dna, /datum/dna) && !H.gloves)
if(istype(H.dna, /datum/dna) && !H.gloves)
fingerprints += md5(H.dna.uni_identity)
else if(!ismob(A))
@@ -170,7 +170,7 @@
found_something = 1
// Blood
if (blood && blood.len)
if(blood && blood.len)
sleep(30)
add_log("<span class='info'><B>Blood:</B></span>")
found_something = 1
+1 -1
View File
@@ -364,7 +364,7 @@ log transactions
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
held_card = I
+1 -1
View File
@@ -318,7 +318,7 @@ var/global/list/all_money_accounts = list()
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
usr.drop_item()
C.loc = src
+9 -9
View File
@@ -18,7 +18,7 @@
/obj/machinery/computer/account_database/proc/get_access_level(var/mob/user)
if(user.can_admin_interact())
return 2
if (!held_card)
if(!held_card)
return 0
if(access_cent_commander in held_card.access)
return 2
@@ -91,14 +91,14 @@
data["transactions"] = null
data["accounts"] = null
if (detailed_account_view)
if(detailed_account_view)
data["account_number"] = detailed_account_view.account_number
data["owner_name"] = detailed_account_view.owner_name
data["money"] = detailed_account_view.money
data["suspended"] = detailed_account_view.suspended
var/list/trx[0]
for (var/datum/transaction/T in detailed_account_view.transaction_log)
for(var/datum/transaction/T in detailed_account_view.transaction_log)
trx.Add(list(list(\
"date" = T.date, \
"time" = T.time, \
@@ -107,7 +107,7 @@
"amount" = T.amount, \
"source_terminal" = T.source_terminal)))
if (trx.len > 0)
if(trx.len > 0)
data["transactions"] = trx
var/list/accounts[0]
@@ -119,11 +119,11 @@
"suspended"=D.suspended ? "SUSPENDED" : "",\
"account_index"=i)))
if (accounts.len > 0)
if(accounts.len > 0)
data["accounts"] = accounts
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
ui.set_initial_data(data)
ui.open()
@@ -142,7 +142,7 @@
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
usr.drop_item()
C.forceMove(src)
@@ -220,7 +220,7 @@
var/text
playsound(loc, "sound/goonstation/machines/printer_thermal.ogg", 50, 1)
var/obj/item/weapon/paper/P = new(loc)
if (detailed_account_view)
if(detailed_account_view)
P.name = "account #[detailed_account_view.account_number] details"
var/title = "Account #[detailed_account_view.account_number] Details"
text = {"
@@ -242,7 +242,7 @@
<tbody>
"}
for (var/datum/transaction/T in detailed_account_view.transaction_log)
for(var/datum/transaction/T in detailed_account_view.transaction_log)
text += {"
<tr>
<td>[T.date] [T.time]</td>
+4 -4
View File
@@ -175,26 +175,26 @@
reconnect_database()
if(linked_db && linked_account)
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card))
if(istype(I, /obj/item/weapon/card))
scan_card(I)
else
to_chat(usr, "[bicon(src)]<span class='warning'>Unable to link accounts.</span>")
if("reset")
//reset the access code - requires HoP/captain access
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card))
if(istype(I, /obj/item/weapon/card))
var/obj/item/weapon/card/id/C = I
if(access_cent_commander in C.access || access_hop in C.access || access_captain in C.access)
access_code = 0
to_chat(usr, "[bicon(src)]<span class='info'>Access code reset to 0.</span>")
else if (istype(I, /obj/item/weapon/card/emag))
else if(istype(I, /obj/item/weapon/card/emag))
access_code = 0
to_chat(usr, "[bicon(src)]<span class='info'>Access code reset to 0.</span>")
src.attack_self(usr)
/obj/item/device/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(transaction_locked && !transaction_paid)
+1 -1
View File
@@ -16,7 +16,7 @@
/obj/proc/get_card_account(var/obj/item/weapon/card/I, var/mob/user=null, var/terminal_name="", var/transaction_purpose="", var/require_pin=0)
if(terminal_name=="")
terminal_name=src.name
if (istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
var/attempt_pin=0
var/datum/money_account/D = get_money_account(C.associated_account_number)
+1 -1
View File
@@ -42,7 +42,7 @@
var/y_distance = TO.y - FROM.y
var/x_distance = TO.x - FROM.x
for (var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area
for(var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area
if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
if(A.anchored) continue
+2 -2
View File
@@ -34,9 +34,9 @@
num_groups = min(num_groups, spawn_locations.len)
var/i = 1
while (i <= num_groups)
while(i <= num_groups)
var/group_size = rand(group_size_min, group_size_max)
for (var/j = 1, j <= group_size, j++)
for(var/j = 1, j <= group_size, j++)
var/carptype = /mob/living/simple_animal/hostile/carp
if(prob(5))
carptype = /mob/living/simple_animal/hostile/carp/megacarp
+1 -1
View File
@@ -73,7 +73,7 @@
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
if(A)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if(ismob(A))
+5 -5
View File
@@ -337,18 +337,18 @@
var/list/event_areas = list()
for (var/areapath in the_station_areas)
for(var/areapath in the_station_areas)
event_areas += typesof(areapath)
for (var/areapath in safe_areas)
for(var/areapath in safe_areas)
event_areas -= typesof(areapath)
for (var/areapath in danger_areas)
for(var/areapath in danger_areas)
event_areas += typesof(areapath)
while (event_areas.len > 0)
while(event_areas.len > 0)
var/list/event_turfs = null
candidate = locate(pick_n_take(event_areas))
event_turfs = get_area_turfs(candidate)
if (event_turfs.len > 0)
if(event_turfs.len > 0)
break
return candidate

Some files were not shown because too many files have changed in this diff Show More