mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
please god tell me i fixed the morgue conflict
This commit is contained in:
@@ -17,6 +17,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
var/kickbannedckey //Defines whether this proc should kick the banned person, if they are connected (if banned_mob is defined).
|
||||
//some ban types kick players after this proc passes (tempban, permaban), but some are specific to db_ban, so
|
||||
//they should kick within this proc.
|
||||
var/isjobban // For job bans, which need to be inserted into the job ban lists
|
||||
switch(bantype)
|
||||
if(BANTYPE_PERMA)
|
||||
bantype_str = "PERMABAN"
|
||||
@@ -31,9 +32,11 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
bantype_str = "JOB_PERMABAN"
|
||||
duration = -1
|
||||
bantype_pass = 1
|
||||
isjobban = 1
|
||||
if(BANTYPE_JOB_TEMP)
|
||||
bantype_str = "JOB_TEMPBAN"
|
||||
bantype_pass = 1
|
||||
isjobban = 1
|
||||
if(BANTYPE_APPEARANCE)
|
||||
bantype_str = "APPEARANCE_BAN"
|
||||
duration = -1
|
||||
@@ -134,11 +137,15 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
if(banned_mob && banned_mob.client && banned_mob.client.ckey == banckey)
|
||||
del(banned_mob.client)
|
||||
|
||||
if(isjobban)
|
||||
jobban_client_fullban(ckey, job)
|
||||
|
||||
datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
var/bantype_str
|
||||
var/isjobban // For job bans, which need to be removed from the job ban lists
|
||||
if(bantype)
|
||||
var/bantype_pass = 0
|
||||
switch(bantype)
|
||||
@@ -151,9 +158,11 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
if(BANTYPE_JOB_PERMA)
|
||||
bantype_str = "JOB_PERMABAN"
|
||||
bantype_pass = 1
|
||||
isjobban = 1
|
||||
if(BANTYPE_JOB_TEMP)
|
||||
bantype_str = "JOB_TEMPBAN"
|
||||
bantype_pass = 1
|
||||
isjobban = 1
|
||||
if(BANTYPE_APPEARANCE)
|
||||
bantype_str = "APPEARANCE_BAN"
|
||||
bantype_pass = 1
|
||||
@@ -206,6 +215,8 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
return
|
||||
|
||||
DB_ban_unban_by_id(ban_id)
|
||||
if(isjobban)
|
||||
jobban_unban_client(ckey, job)
|
||||
|
||||
datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
|
||||
@@ -215,18 +226,20 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason, job FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
query.Execute()
|
||||
|
||||
var/eckey = usr.ckey //Editing admin ckey
|
||||
var/pckey //(banned) Player ckey
|
||||
var/duration //Old duration
|
||||
var/reason //Old reason
|
||||
var/job //Old job
|
||||
|
||||
if(query.NextRow())
|
||||
pckey = query.item[1]
|
||||
duration = query.item[2]
|
||||
reason = query.item[3]
|
||||
job = query.item[4]
|
||||
else
|
||||
to_chat(usr, "Invalid ban id. Contact the database admin")
|
||||
return
|
||||
@@ -259,6 +272,8 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
if("unban")
|
||||
if(alert("Unban [pckey]?", "Unban?", "Yes", "No") == "Yes")
|
||||
DB_ban_unban_by_id(banid)
|
||||
if(job && length(job))
|
||||
jobban_unban_client(pckey, job)
|
||||
return
|
||||
else
|
||||
to_chat(usr, "Cancelled")
|
||||
@@ -396,7 +411,6 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
output += "<br><input type='submit' value='search'><br>"
|
||||
output += "<input type='checkbox' value='[match]' name='dbmatch' [match? "checked=\"1\"" : null]> Match(min. 3 characters to search by key or ip, and 7 to search by cid)<br>"
|
||||
output += "</form>"
|
||||
output += "Please note that all jobban bans or unbans are in-effect the following round.<br>"
|
||||
output += "This search shows only last 100 bans."
|
||||
|
||||
if(adminckey || playerckey || playerip || playercid || dbbantype)
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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,25 +100,25 @@ var/savefile/Banlist
|
||||
|
||||
var/bantimestamp
|
||||
|
||||
if (temp)
|
||||
if(temp)
|
||||
UpdateTime()
|
||||
bantimestamp = CMinutes + minutes
|
||||
|
||||
Banlist.cd = "/base"
|
||||
if ( Banlist.dir.Find("[ckey][computerid]") )
|
||||
to_chat(usr, text("\red Ban already exists."))
|
||||
if( Banlist.dir.Find("[ckey][computerid]") )
|
||||
to_chat(usr, "<span class='danger'>Ban already exists.</span>")
|
||||
return 0
|
||||
else
|
||||
Banlist.dir.Add("[ckey][computerid]")
|
||||
Banlist.cd = "/base/[ckey][computerid]"
|
||||
to_chat(Banlist["key"], ckey)
|
||||
to_chat(Banlist["id"], computerid)
|
||||
to_chat(Banlist["ip"], address)
|
||||
to_chat(Banlist["reason"], reason)
|
||||
to_chat(Banlist["bannedby"], bannedby)
|
||||
to_chat(Banlist["temp"], temp)
|
||||
if (temp)
|
||||
to_chat(Banlist["minutes"], bantimestamp)
|
||||
Banlist["key"] << ckey
|
||||
Banlist["id"] << computerid
|
||||
Banlist["ip"] << address
|
||||
Banlist["reason"] << reason
|
||||
Banlist["bannedby"] << bannedby
|
||||
Banlist["temp"] << temp
|
||||
if(temp)
|
||||
Banlist["minutes"] << bantimestamp
|
||||
if(!temp)
|
||||
add_note(ckey, "Permanently banned - [reason]", null, bannedby, 0)
|
||||
else
|
||||
@@ -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]"
|
||||
@@ -211,23 +211,23 @@ var/savefile/Banlist
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Add("trash[i]trashid[i]")
|
||||
Banlist.cd = "/base/trash[i]trashid[i]"
|
||||
to_chat(Banlist["key"], "trash[i]")
|
||||
Banlist["key"] << "trash[i]"
|
||||
else
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Add("[last]trashid[i]")
|
||||
Banlist.cd = "/base/[last]trashid[i]"
|
||||
to_chat(Banlist["key"], last)
|
||||
to_chat(Banlist["id"], "trashid[i]")
|
||||
to_chat(Banlist["reason"], "Trashban[i].")
|
||||
to_chat(Banlist["temp"], a)
|
||||
to_chat(Banlist["minutes"], CMinutes + rand(1,2000))
|
||||
to_chat(Banlist["bannedby"], "trashmin")
|
||||
Banlist["key"] << last
|
||||
Banlist["id"] << "trashid[i]"
|
||||
Banlist["reason"] << "Trashban[i]."
|
||||
Banlist["temp"] << a
|
||||
Banlist["minutes"] << CMinutes + rand(1,2000)
|
||||
Banlist["bannedby"] << "trashmin"
|
||||
last = "trash[i]"
|
||||
|
||||
Banlist.cd = "/base"
|
||||
|
||||
/proc/ClearAllBans()
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
for(var/A in Banlist.dir)
|
||||
RemoveBan(A)
|
||||
|
||||
|
||||
+31
-30
@@ -8,8 +8,9 @@ var/global/nologevent = 0
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
|
||||
log_adminwarn(msg)
|
||||
for(var/client/C in admins)
|
||||
if(R_SERVER & C.holder.rights)
|
||||
to_chat(C, msg)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
if(C.prefs && !(C.prefs.toggles & CHAT_NO_ADMINLOGS))
|
||||
to_chat(C, msg)
|
||||
|
||||
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
|
||||
log_attack(text)
|
||||
@@ -103,7 +104,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 +192,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 +244,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 +577,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 +593,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 +644,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 +662,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 +680,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 +710,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 +729,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 +830,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 +847,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 +857,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 +889,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 +906,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 +956,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 +987,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
|
||||
|
||||
@@ -23,20 +23,20 @@
|
||||
if(!message) return
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F) return
|
||||
to_chat(F, "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>")
|
||||
investigate_log_subjects |= subject
|
||||
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","pda","singulo","atmos","watchlist","ntsl","gold core","cult", "experimentor", "wires") )
|
||||
/client/proc/investigate_show( subject in investigate_log_subjects )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder) return
|
||||
switch(subject)
|
||||
if("singulo") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
if("notes")
|
||||
show_note()
|
||||
|
||||
if("watchlist")
|
||||
watchlist_show()
|
||||
|
||||
if("hrefs") //persistant logs and stuff
|
||||
if(config && config.log_hrefs)
|
||||
@@ -49,50 +49,9 @@
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>")
|
||||
return
|
||||
|
||||
if("pda") //general one-round-only stuff
|
||||
else //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("cult")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("atmos")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("ntsl")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("experimentor")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("wires")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("watchlist")
|
||||
watchlist_show()
|
||||
|
||||
if("notes")
|
||||
show_note()
|
||||
@@ -56,6 +56,7 @@ var/list/admin_verbs_admin = list(
|
||||
/datum/admins/proc/show_player_notes,
|
||||
/client/proc/free_slot, /*frees slot for chosen job*/
|
||||
/client/proc/toggleattacklogs,
|
||||
/client/proc/toggleadminlogs,
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/update_mob_sprite,
|
||||
/client/proc/toggledrones,
|
||||
@@ -72,7 +73,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
|
||||
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
|
||||
/client/proc/debug_variables,
|
||||
/client/proc/show_snpc_verbs
|
||||
/client/proc/show_snpc_verbs,
|
||||
/client/proc/reset_all_tcs /*resets all telecomms scripts*/
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -111,7 +113,8 @@ var/list/admin_verbs_event = list(
|
||||
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
/client/proc/respawn_character
|
||||
/client/proc/respawn_character,
|
||||
/client/proc/admin_deserialize
|
||||
)
|
||||
var/list/admin_verbs_server = list(
|
||||
/client/proc/ToRban,
|
||||
@@ -149,8 +152,6 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/qdel_toggle,
|
||||
/client/proc/gc_dump_hdl,
|
||||
/client/proc/gc_toggle_profiling,
|
||||
/client/proc/gc_show_del_report,
|
||||
/client/proc/debugNatureMapGenerator,
|
||||
/client/proc/check_bomb_impacts,
|
||||
/client/proc/test_movable_UI,
|
||||
@@ -158,7 +159,10 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cinematic,
|
||||
/proc/machine_upgrade,
|
||||
/client/proc/map_template_load,
|
||||
/client/proc/map_template_upload
|
||||
/client/proc/map_template_upload,
|
||||
/client/proc/view_runtimes,
|
||||
/client/proc/admin_serialize,
|
||||
/client/proc/admin_deserialize
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
@@ -613,7 +617,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")
|
||||
@@ -641,7 +645,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]")
|
||||
@@ -855,14 +859,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].")
|
||||
@@ -876,11 +880,25 @@ 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")
|
||||
|
||||
/client/proc/toggleadminlogs()
|
||||
set name = "Toggle Admin Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
prefs.toggles ^= CHAT_NO_ADMINLOGS
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.toggles & CHAT_NO_ADMINLOGS)
|
||||
to_chat(usr, "You now won't get admin log messages.")
|
||||
else
|
||||
to_chat(usr, "You now will get admin log messages.")
|
||||
|
||||
/client/proc/toggledrones()
|
||||
set name = "Toggle Maintenance Drones"
|
||||
set category = "Server"
|
||||
@@ -901,7 +919,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")
|
||||
@@ -931,7 +949,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,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()
|
||||
|
||||
@@ -1,38 +1,48 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
var/jobban_runonce // Updates legacy bans with new info
|
||||
var/jobban_keylist[0] //to store the keys & ranks
|
||||
var/jobban_keylist[0] // Linear list of jobban strings, kept around for the legacy system
|
||||
var/jobban_assoclist[0] // Associative list, for efficiency
|
||||
|
||||
// Matches string-based jobbans into ckey, rank, and reason groups
|
||||
var/regex/jobban_regex = regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ## (.+))?")
|
||||
|
||||
/proc/jobban_assoc_insert(ckey, rank, reason)
|
||||
if(!ckey || !rank)
|
||||
return
|
||||
if(!jobban_assoclist[ckey])
|
||||
jobban_assoclist[ckey] = list()
|
||||
jobban_assoclist[ckey][rank] = reason || "Reason Unspecified"
|
||||
|
||||
/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()
|
||||
jobban_assoc_insert(M.ckey, rank, reason)
|
||||
if(config.ban_legacy_system)
|
||||
jobban_savebanfile()
|
||||
|
||||
/proc/jobban_client_fullban(ckey, rank)
|
||||
if (!ckey || !rank) return
|
||||
if(!ckey || !rank)
|
||||
return
|
||||
jobban_keylist.Add(text("[ckey] - [rank]"))
|
||||
jobban_savebanfile()
|
||||
jobban_assoc_insert(ckey, rank)
|
||||
if(config.ban_legacy_system)
|
||||
jobban_savebanfile()
|
||||
|
||||
//returns a reason if M is banned from rank, returns 0 otherwise
|
||||
/proc/jobban_isbanned(mob/M, rank)
|
||||
if(M && rank)
|
||||
if(!M || !rank)
|
||||
return 0
|
||||
|
||||
//if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
// if(config.usewhitelist && !check_whitelist(M))
|
||||
// return "Karma Job"
|
||||
if(config.guest_jobban && guest_jobbans(rank))
|
||||
if(IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
|
||||
for (var/s in jobban_keylist)
|
||||
if( findtext(s,"[M.ckey] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
if(startpos && startpos<length(s))
|
||||
var/text = copytext(s, startpos, 0)
|
||||
if(text)
|
||||
return text
|
||||
return "Reason Unspecified"
|
||||
return 0
|
||||
if(jobban_assoclist[M.ckey])
|
||||
return jobban_assoclist[M.ckey][rank]
|
||||
else
|
||||
return 0
|
||||
|
||||
/*
|
||||
DEBUG
|
||||
@@ -59,9 +69,15 @@ 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")
|
||||
|
||||
for(var/s in jobban_keylist)
|
||||
if(jobban_regex.Find(s))
|
||||
jobban_assoc_insert(jobban_regex.group[1], jobban_regex.group[2], jobban_regex.group[3])
|
||||
else
|
||||
log_debug("Skipping malformed job ban: [s]")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
log_to_dd("Database connection failed. Reverting to the legacy ban system.")
|
||||
@@ -71,42 +87,56 @@ DEBUG
|
||||
return
|
||||
|
||||
//Job permabans
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
|
||||
query.Execute()
|
||||
var/DBQuery/permabans = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
|
||||
permabans.Execute()
|
||||
// Job tempbans
|
||||
var/DBQuery/tempbans = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
|
||||
tempbans.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
var/ckey = query.item[1]
|
||||
var/job = query.item[2]
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
|
||||
//Job tempbans
|
||||
var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
|
||||
query1.Execute()
|
||||
|
||||
while(query1.NextRow())
|
||||
var/ckey = query1.item[1]
|
||||
var/job = query1.item[2]
|
||||
while(TRUE)
|
||||
var/ckey
|
||||
var/job
|
||||
if(permabans.NextRow())
|
||||
ckey = permabans.item[1]
|
||||
job = permabans.item[2]
|
||||
else if(tempbans.NextRow())
|
||||
ckey = tempbans.item[1]
|
||||
job = tempbans.item[2]
|
||||
else
|
||||
break
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
jobban_assoc_insert(ckey, job)
|
||||
|
||||
/proc/jobban_savebanfile()
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
to_chat(S["keys[0]"], jobban_keylist)
|
||||
S["keys[0]"] << jobban_keylist
|
||||
|
||||
/proc/jobban_unban(mob/M, rank)
|
||||
jobban_remove("[M.ckey] - [rank]")
|
||||
jobban_savebanfile()
|
||||
|
||||
/proc/jobban_unban_client(ckey, rank)
|
||||
jobban_remove("[ckey] - [rank]")
|
||||
|
||||
/proc/ban_unban_log_save(var/formatted_log)
|
||||
text2file(formatted_log,"data/ban_unban_log.txt")
|
||||
|
||||
|
||||
/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]") )
|
||||
// This need to be here, instead of jobban_unban, due to direct calls to jobban_remove
|
||||
if(jobban_regex.Find(X))
|
||||
var/ckey = jobban_regex.group[1]
|
||||
var/rank = jobban_regex.group[2]
|
||||
if(jobban_assoclist[ckey] && jobban_assoclist[ckey][rank])
|
||||
jobban_assoclist[ckey] -= rank
|
||||
else
|
||||
log_debug("Attempted to remove non-existent job ban: [X]")
|
||||
else
|
||||
log_debug("Failed to remove malformed job ban from associative list: [X]")
|
||||
jobban_keylist.Remove(jobban_keylist[i])
|
||||
jobban_savebanfile()
|
||||
if(config.ban_legacy_system)
|
||||
jobban_savebanfile()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
#define AREAEDIT_BUILDMODE 7
|
||||
#define FILL_BUILDMODE 8
|
||||
#define LINK_BUILDMODE 9
|
||||
#define NUM_BUILDMODES 9
|
||||
#define BOOM_BUILDMODE 10
|
||||
#define NUM_BUILDMODES 10
|
||||
|
||||
/obj/screen/buildmode
|
||||
icon = 'icons/misc/buildmode.dmi'
|
||||
@@ -92,7 +93,7 @@
|
||||
qdel(I)
|
||||
|
||||
/obj/effect/buildmode_line
|
||||
var/image/I
|
||||
var/image/I
|
||||
var/client/cl
|
||||
|
||||
/obj/effect/buildmode_line/New(var/client/c, var/atom/atom_a, var/atom/atom_b, var/linename)
|
||||
@@ -101,13 +102,13 @@
|
||||
I = image('icons/misc/mark.dmi', src, "line", 19.0)
|
||||
var/x_offset = ((atom_b.x * 32) + atom_b.pixel_x) - ((atom_a.x * 32) + atom_a.pixel_x)
|
||||
var/y_offset = ((atom_b.y * 32) + atom_b.pixel_y) - ((atom_a.y * 32) + atom_a.pixel_y)
|
||||
|
||||
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(0, 16)
|
||||
M.Scale(1, sqrt((x_offset * x_offset) + (y_offset * y_offset)) / 32)
|
||||
M.Turn(90 - Atan2(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
M.Translate(atom_a.pixel_x, atom_a.pixel_y)
|
||||
|
||||
|
||||
transform = M
|
||||
cl = c
|
||||
cl.images += I
|
||||
@@ -167,6 +168,12 @@
|
||||
var/list/link_lines = list()
|
||||
var/obj/link_obj
|
||||
var/valid_links = 0
|
||||
//Explosion mode
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
var/flames = -1
|
||||
|
||||
/datum/click_intercept/buildmode/New(client/c)
|
||||
..()
|
||||
@@ -242,6 +249,7 @@
|
||||
if(FILL_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + Alt on turf/obj/mob = Delete region</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select object type</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(LINK_BUILDMODE)
|
||||
@@ -249,6 +257,10 @@
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj = Select button to link</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj = Link/unlink to selected button")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(BOOM_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Mouse Button on obj = Kaboom</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/click_intercept/buildmode/proc/change_settings(mob/user)
|
||||
switch(mode)
|
||||
@@ -321,6 +333,17 @@
|
||||
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
|
||||
objholder = /obj/structure/closet
|
||||
deselect_region()
|
||||
if(BOOM_BUILDMODE)
|
||||
devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
||||
if(devastation == null) devastation = -1
|
||||
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
||||
if(heavy == null) heavy = -1
|
||||
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
||||
if(light == null) light = -1
|
||||
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
||||
if(flash == null) flash = -1
|
||||
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
||||
if(flames == null) flames = -1
|
||||
|
||||
/datum/click_intercept/buildmode/proc/change_dir()
|
||||
switch(build_dir)
|
||||
@@ -509,16 +532,20 @@
|
||||
cornerB = select_tile(get_turf(object))
|
||||
if(left_click) //rectangular
|
||||
if(cornerA && cornerB)
|
||||
if(!objholder)
|
||||
to_chat(user, "<span class='warning'>Select object type first.</span>")
|
||||
if(alt_click)
|
||||
empty_region(block(get_turf(cornerA),get_turf(cornerB)))
|
||||
deselect_region()
|
||||
else
|
||||
for(var/turf/T in block(get_turf(cornerA),get_turf(cornerB)))
|
||||
if(ispath(objholder,/turf))
|
||||
T.ChangeTurf(objholder)
|
||||
else
|
||||
var/obj/A = new objholder(T)
|
||||
A.dir = build_dir
|
||||
deselect_region()
|
||||
if(!objholder)
|
||||
to_chat(user, "<span class='warning'>Select object type first.</span>")
|
||||
else
|
||||
for(var/turf/T in block(get_turf(cornerA),get_turf(cornerB)))
|
||||
if(ispath(objholder,/turf))
|
||||
T.ChangeTurf(objholder)
|
||||
else
|
||||
var/obj/A = new objholder(T)
|
||||
A.dir = build_dir
|
||||
deselect_region()
|
||||
return
|
||||
|
||||
//Something wrong - Reset
|
||||
@@ -567,13 +594,13 @@
|
||||
if(P.id_tag && P.id_tag != 1 && alert(holder, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
P.id_tag = M.id
|
||||
|
||||
|
||||
line_jump // For the goto
|
||||
valid_links = 0
|
||||
for(var/obj/effect/buildmode_line/L in link_lines)
|
||||
qdel(L)
|
||||
link_lines -= L
|
||||
|
||||
|
||||
if(istype(link_obj, /obj/machinery/door_control))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
for(var/obj/machinery/door/airlock/P in range(M.range,M))
|
||||
@@ -586,7 +613,7 @@
|
||||
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
|
||||
L2.color = L.color
|
||||
link_lines += L2
|
||||
for(var/obj/machinery/door/poddoor/P in world)
|
||||
for(var/obj/machinery/door/poddoor/P in airlocks)
|
||||
if(P.id_tag == M.id)
|
||||
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
|
||||
L.color = M.normaldoorcontrol ? "#993333" : "#339933"
|
||||
@@ -596,3 +623,5 @@
|
||||
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
|
||||
L2.color = L.color
|
||||
link_lines += L2
|
||||
if(BOOM_BUILDMODE)
|
||||
explosion(object, devastation, heavy, light, flash, null, null,flames)
|
||||
|
||||
@@ -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,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,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')
|
||||
|
||||
@@ -24,6 +24,10 @@ var/list/admin_datums = list()
|
||||
rights = initial_rights
|
||||
admin_datums[ckey] = src
|
||||
|
||||
/datum/admins/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/datum/admins/proc/associate(client/C)
|
||||
if(istype(C))
|
||||
owner = C
|
||||
@@ -85,7 +89,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
admin_datums -= ckey
|
||||
if(holder)
|
||||
holder.disassociate()
|
||||
del(holder)
|
||||
qdel(holder)
|
||||
return 1
|
||||
|
||||
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
var/savefile/Banlistjob
|
||||
|
||||
|
||||
/proc/_jobban_isbanned(var/client/clientvar, var/rank)
|
||||
if(!clientvar) return 1
|
||||
ClearTempbansjob()
|
||||
var/id = clientvar.computer_id
|
||||
var/key = clientvar.ckey
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(key))
|
||||
return 1
|
||||
Banlistjob.cd = "/base"
|
||||
if (Banlistjob.dir.Find("[key][id][rank]"))
|
||||
return 1
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
for (var/A in Banlistjob.dir)
|
||||
Banlistjob.cd = "/base/[A]"
|
||||
if ((id == Banlistjob["id"] || key == Banlistjob["key"]) && rank == Banlistjob["rank"])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/LoadBansjob()
|
||||
|
||||
Banlistjob = new("data/job_fullnew.bdb")
|
||||
log_admin("Loading Banlistjob")
|
||||
|
||||
if (!length(Banlistjob.dir)) log_admin("Banlistjob is empty.")
|
||||
|
||||
if (!Banlistjob.dir.Find("base"))
|
||||
log_admin("Banlistjob missing base dir.")
|
||||
Banlistjob.dir.Add("base")
|
||||
Banlistjob.cd = "/base"
|
||||
else if (Banlistjob.dir.Find("base"))
|
||||
Banlistjob.cd = "/base"
|
||||
|
||||
ClearTempbansjob()
|
||||
return 1
|
||||
|
||||
/proc/ClearTempbansjob()
|
||||
UpdateTime()
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
for (var/A in Banlistjob.dir)
|
||||
Banlistjob.cd = "/base/[A]"
|
||||
//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)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/proc/AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, rank)
|
||||
UpdateTime()
|
||||
var/bantimestamp
|
||||
if (temp)
|
||||
UpdateTime()
|
||||
bantimestamp = CMinutes + minutes
|
||||
if(rank == "Heads")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Head of Personnel")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Captain")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Head of Security")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Engineer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
return 1
|
||||
if(rank == "Security")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Head of Security")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Warden")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Detective")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Security Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Cyborg")
|
||||
return 1
|
||||
if(rank == "Engineering")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Station Engineer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Life Support Specialist")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Engineer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Cyborg")
|
||||
return 1
|
||||
if(rank == "Research")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Scientist")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Geneticist")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director")
|
||||
return 1
|
||||
if(rank == "Medical")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Geneticist")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Medical Doctor")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chemist")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Cyborg")
|
||||
return 1
|
||||
if(rank == "CE_Station_Engineer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Station Engineer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Engineer")
|
||||
return 1
|
||||
if(rank == "CE_Atmospheric_Tech")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Life Support Specialist")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Engineer")
|
||||
return 1
|
||||
if(rank == "CE_Shaft_Miner")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Shaft Miner")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Engineer")
|
||||
return 1
|
||||
if(rank == "Chemist_RD_CMO")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chemist")
|
||||
return 1
|
||||
if(rank == "Geneticist_RD_CMO")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Geneticist")
|
||||
return 1
|
||||
if(rank == "MD_CMO")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Medical Doctor")
|
||||
return 1
|
||||
if(rank == "Scientist_RD")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Scientist")
|
||||
return 1
|
||||
if(rank == "AI_Cyborg")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Cyborg")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "AI")
|
||||
return 1
|
||||
if(rank == "Detective_HoS")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Detective")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Head of Security")
|
||||
return 1
|
||||
if(rank == "Virologist_RD_CMO")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Medical Officer")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director")
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Virologist")
|
||||
return 1
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
if ( Banlistjob.dir.Find("[ckey][computerid][rank]") )
|
||||
to_chat(usr, text("\red Banjob already exists."))
|
||||
return 0
|
||||
else
|
||||
Banlistjob.dir.Add("[ckey][computerid][rank]")
|
||||
Banlistjob.cd = "/base/[ckey][computerid][rank]"
|
||||
to_chat(Banlistjob["key"], ckey)
|
||||
to_chat(Banlistjob["id"], computerid)
|
||||
to_chat(Banlistjob["rank"], rank)
|
||||
to_chat(Banlistjob["reason"], reason)
|
||||
to_chat(Banlistjob["bannedby"], bannedby)
|
||||
to_chat(Banlistjob["temp"], temp)
|
||||
if (temp)
|
||||
to_chat(Banlistjob["minutes"], bantimestamp)
|
||||
|
||||
return 1
|
||||
|
||||
/proc/RemoveBanjob(foldername)
|
||||
var/key
|
||||
var/id
|
||||
var/rank
|
||||
Banlistjob.cd = "/base/[foldername]"
|
||||
Banlistjob["key"] >> key
|
||||
Banlistjob["id"] >> id
|
||||
Banlistjob["rank"] >> rank
|
||||
Banlistjob.cd = "/base"
|
||||
|
||||
if (!Banlistjob.dir.Remove(foldername)) return 0
|
||||
|
||||
if(!usr)
|
||||
log_admin("Banjob Expired: [key]")
|
||||
message_admins("Banjob Expired: [key]")
|
||||
else
|
||||
log_admin("[key_name_admin(usr)] unjobbanned [key] from [rank]")
|
||||
message_admins("[key_name_admin(usr)] unjobbanned:[key] from [rank]")
|
||||
ban_unban_log_save("[key_name_admin(usr)] unjobbanned [key] from [rank]")
|
||||
feedback_inc("ban_job_unban",1)
|
||||
feedback_add_details("ban_job_unban","- [rank]")
|
||||
|
||||
for (var/A in Banlistjob.dir)
|
||||
Banlistjob.cd = "/base/[A]"
|
||||
if ((key == Banlistjob["key"] || id == Banlistjob["id"]) && (rank == Banlistjob["rank"]))
|
||||
Banlistjob.cd = "/base"
|
||||
Banlistjob.dir.Remove(A)
|
||||
continue
|
||||
|
||||
return 1
|
||||
|
||||
/proc/GetBanExpjob(minutes as num)
|
||||
UpdateTime()
|
||||
var/exp = minutes - CMinutes
|
||||
if (exp <= 0)
|
||||
return 0
|
||||
else
|
||||
var/timeleftstring
|
||||
if (exp >= 1440) //1440 = 1 day in minutes
|
||||
timeleftstring = "[round(exp / 1440, 0.1)] Days"
|
||||
else if (exp >= 60) //60 = 1 hour in minutes
|
||||
timeleftstring = "[round(exp / 60, 0.1)] Hours"
|
||||
else
|
||||
timeleftstring = "[exp] Minutes"
|
||||
return timeleftstring
|
||||
|
||||
/datum/admins/proc/unjobbanpanel()
|
||||
var/count = 0
|
||||
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)
|
||||
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>")
|
||||
|
||||
dat += "</table>"
|
||||
dat = "<HR><B>Bans:</B> <FONT COLOR=blue>(U) = Unban , </FONT> - <FONT COLOR=green>([count] Bans)</FONT><HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >[dat]"
|
||||
usr << browse(dat, "window=unbanp;size=875x400")
|
||||
|
||||
/*/datum/admins/proc/permjobban(ckey, computerid, reason, bannedby, temp, minutes, rank)
|
||||
if(AddBanjob(ckey, computerid, reason, usr.ckey, 0, 0, job))
|
||||
to_chat(M, "\red<BIG><B>You have been banned from [job] by [usr.client.ckey].\nReason: [reason].</B></BIG>")
|
||||
to_chat(M, "\red This is a permanent ban.")
|
||||
if(config.banappeals)
|
||||
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
|
||||
else
|
||||
to_chat(M, "\red No ban appeals URL has been set.")
|
||||
log_admin("[usr.client.ckey] has banned from [job] [ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
message_admins("\blue[usr.client.ckey] has banned from [job] [ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
/datum/admins/proc/timejobban(ckey, computerid, reason, bannedby, temp, minutes, rank)
|
||||
if(AddBanjob(ckey, computerid, reason, usr.ckey, 1, mins, job))
|
||||
to_chat(M, "\red<BIG><B>You have been jobbanned from [job] by [usr.client.ckey].\nReason: [reason].</B></BIG>")
|
||||
to_chat(M, "\red This is a temporary ban, it will be removed in [mins] minutes.")
|
||||
if(config.banappeals)
|
||||
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
|
||||
else
|
||||
to_chat(M, "\red No ban appeals URL has been set.")
|
||||
log_admin("[usr.client.ckey] has jobbanned from [job] [ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("\blue[usr.client.ckey] has banned from [job] [ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")*/
|
||||
//////////////////////////////////// DEBUG ////////////////////////////////////
|
||||
|
||||
/proc/CreateBansjob()
|
||||
|
||||
UpdateTime()
|
||||
|
||||
var/i
|
||||
var/last
|
||||
|
||||
for(i=0, i<1001, i++)
|
||||
var/a = pick(1,0)
|
||||
var/b = pick(1,0)
|
||||
if(b)
|
||||
Banlistjob.cd = "/base"
|
||||
Banlistjob.dir.Add("trash[i]trashid[i]")
|
||||
Banlistjob.cd = "/base/trash[i]trashid[i]"
|
||||
to_chat(Banlistjob["key"], "trash[i]")
|
||||
else
|
||||
Banlistjob.cd = "/base"
|
||||
Banlistjob.dir.Add("[last]trashid[i]")
|
||||
Banlistjob.cd = "/base/[last]trashid[i]"
|
||||
to_chat(Banlistjob["key"], last)
|
||||
to_chat(Banlistjob["id"], "trashid[i]")
|
||||
to_chat(Banlistjob["reason"], "Trashban[i].")
|
||||
to_chat(Banlistjob["temp"], a)
|
||||
to_chat(Banlistjob["minutes"], CMinutes + rand(1,2000))
|
||||
to_chat(Banlistjob["bannedby"], "trashmin")
|
||||
last = "trash[i]"
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
|
||||
/proc/ClearAllBansjob()
|
||||
Banlistjob.cd = "/base"
|
||||
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)
|
||||
|
||||
@@ -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,10 +406,10 @@
|
||||
|
||||
/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(world.time / 36000)]:[add_zero(num2text(world.time / 600 % 60), 2)]:[add_zero(num2text(world.time / 10 % 60), 2)]</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>"
|
||||
dat += "<B>Emergency shuttle</B><BR>"
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_CALL)
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><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>
|
||||
|
||||
@@ -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>
|
||||
@@ -83,10 +83,13 @@
|
||||
<A href='?src=\ref[src];secretsfun=securitylevel3'>Security Level - Gamma</A>
|
||||
<A href='?src=\ref[src];secretsfun=securitylevel4'>Security Level - Epsilon</A>
|
||||
<A href='?src=\ref[src];secretsfun=securitylevel5'>Security Level - Delta</A><BR>
|
||||
<b>Create Weather</b><BR>
|
||||
<A href='?src=\ref[src];secretsfun=weatherashstorm'>Weather - Ash Storm</A>
|
||||
<A href='?src=\ref[src];secretsfun=weatherdarkness'>Weather - Advanced Darkness</A>
|
||||
<BR>
|
||||
</center>"}
|
||||
|
||||
if (2)
|
||||
if(2)
|
||||
if(check_rights((R_SERVER|R_EVENT),0))
|
||||
dat += {"
|
||||
<center>
|
||||
@@ -104,6 +107,7 @@
|
||||
<A href='?src=\ref[src];secretsfun=onlyoneteam'>Dodgeball (TDM)!</A><BR>
|
||||
<b>Round-enders</b><br>
|
||||
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=fakelava'>The floor is fake-lava! (non-harmful)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=prisonwarp'>Warp all Players to Prison</A><BR>
|
||||
|
||||
@@ -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]')")
|
||||
|
||||
@@ -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(.)
|
||||
|
||||
|
||||
+221
-144
@@ -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].")
|
||||
@@ -1124,6 +1124,8 @@
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(alert(usr, "Confirm make monkey?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]", 1)
|
||||
@@ -1138,6 +1140,9 @@
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm make corgi?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to corgize [key_name_admin(H)]", 1)
|
||||
H.corgize()
|
||||
@@ -1149,6 +1154,8 @@
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(alert(usr, "Confirm make pai?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/painame = "Default"
|
||||
var/name = ""
|
||||
@@ -1205,6 +1212,7 @@
|
||||
if(I)
|
||||
I.loc = locker
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
M.update_icons()
|
||||
|
||||
@@ -1244,6 +1252,7 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.")
|
||||
|
||||
var/mob/new_player/NP = new()
|
||||
non_respawnable_keys -= M.ckey
|
||||
NP.ckey = M.ckey
|
||||
qdel(M)
|
||||
|
||||
@@ -1266,6 +1275,7 @@
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
|
||||
M.Paralyse(5)
|
||||
@@ -1295,6 +1305,7 @@
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
|
||||
M.Paralyse(5)
|
||||
@@ -1346,6 +1357,7 @@
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
@@ -1403,6 +1415,9 @@
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm make ai?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!", 1)
|
||||
log_admin("[key_name(usr)] AIized [key_name(H)]")
|
||||
H.AIize()
|
||||
@@ -1410,6 +1425,10 @@
|
||||
|
||||
else if(href_list["makemask"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(alert(usr, "Confirm make mask?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/mob/currentMob = locate(href_list["makemask"])
|
||||
message_admins("\red Admin [key_name_admin(usr)] made [key_name_admin(currentMob)] into a Mask of Nar'Sie!", 1)
|
||||
log_admin("[key_name(usr)] made [key_name(currentMob)] into a Mask of Nar'Sie!")
|
||||
@@ -1423,6 +1442,8 @@
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(alert(usr, "Confirm make alien?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_alienize(H)
|
||||
|
||||
@@ -1433,6 +1454,8 @@
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(alert(usr, "Confirm make slime?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_slimeize(H)
|
||||
|
||||
@@ -1444,6 +1467,9 @@
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm make superhero?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_super(H)
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
@@ -1453,6 +1479,8 @@
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(alert(usr, "Confirm make robot?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
|
||||
@@ -1463,6 +1491,8 @@
|
||||
if(istype(M, /mob/new_player))
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/new_player")
|
||||
return
|
||||
if(alert(usr, "Confirm make animal?",, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
|
||||
@@ -1536,53 +1566,7 @@
|
||||
|
||||
else if(href_list["adminmoreinfo"])
|
||||
var/mob/M = locate(href_list["adminmoreinfo"])
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
var/location_description = ""
|
||||
var/special_role_description = ""
|
||||
var/health_description = ""
|
||||
var/gender_description = ""
|
||||
var/turf/T = get_turf(M)
|
||||
|
||||
//Location
|
||||
if(isturf(T))
|
||||
if(isarea(T.loc))
|
||||
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z] in area <b>[T.loc]</b>)"
|
||||
else
|
||||
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z])"
|
||||
|
||||
//Job + antagonist
|
||||
if(M.mind)
|
||||
special_role_description = "Role: <b>[M.mind.assigned_role]</b>; Antagonist: <font color='red'><b>[M.mind.special_role]</b></font>; Has been rev: [(M.mind.has_been_rev)?"Yes":"No"]"
|
||||
else
|
||||
special_role_description = "Role: <i>Mind datum missing</i> Antagonist: <i>Mind datum missing</i>; Has been rev: <i>Mind datum missing</i>;"
|
||||
|
||||
//Health
|
||||
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>"
|
||||
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
|
||||
health_description = "This mob type has no health to speak of."
|
||||
|
||||
//Gener
|
||||
switch(M.gender)
|
||||
if(MALE,FEMALE) gender_description = "[M.gender]"
|
||||
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
|
||||
|
||||
to_chat(src.owner, "<b>Info about [M.name]:</b> ")
|
||||
to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]")
|
||||
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
|
||||
to_chat(src.owner, "Location = [location_description];")
|
||||
to_chat(src.owner, "[special_role_description]")
|
||||
to_chat(src.owner, "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)")
|
||||
admin_mob_info(M)
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_EVENT)) return
|
||||
@@ -1671,10 +1655,113 @@
|
||||
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)]'s Centcom message with: \"[input]\"")
|
||||
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"")
|
||||
|
||||
else if(href_list["EvilFax"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/mob/living/carbon/human/H = locate(href_list["EvilFax"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
var/etypes = list("Borgification","Corgification","Death By Fire","Total Brain Death","Honk Tumor","Cluwne","Demotion Notice")
|
||||
var/eviltype = input(src.owner, "Which type of evil fax do you wish to send [H]?","Its good to be baaaad...", "") as null|anything in etypes
|
||||
if(!(eviltype in etypes))
|
||||
return
|
||||
var/customname = input(src.owner, "Pick a title for the evil fax.", "Fax Title") as text|null
|
||||
if(!customname)
|
||||
customname = "paper"
|
||||
var/obj/item/weapon/paper/evilfax/P = new /obj/item/weapon/paper/evilfax(null)
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
P.name = "Central Command - [customname]"
|
||||
P.info = "<b>You <i>really</i> should've known better.</b>"
|
||||
P.myeffect = eviltype
|
||||
P.mytarget = H
|
||||
if(alert("Do you want the Evil Fax to activate automatically if [H] tries to ignore it?",,"Yes", "No") == "Yes")
|
||||
P.activate_on_timeout = 1
|
||||
P.x = rand(-2, 0)
|
||||
P.y = rand(-1, 2)
|
||||
P.offset_x += P.x
|
||||
P.offset_y += P.y
|
||||
P.update_icon()
|
||||
var/stampvalue = "cent"
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-[stampvalue]"
|
||||
stampoverlay.pixel_x = P.x
|
||||
stampoverlay.pixel_y = P.y
|
||||
P.stamped = list()
|
||||
P.stamped += /obj/item/weapon/stamp/centcom
|
||||
if(!P.ico)
|
||||
P.ico = new
|
||||
P.ico += "paper_stamp-[stampvalue]"
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><img src=large_stamp-[stampvalue].png>"
|
||||
P.update_icon()
|
||||
//fax.receivefax(P) // this does not work, it does not preserve the type, we have to physically teleport the fax paper instead
|
||||
P.loc = fax.loc
|
||||
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/device/radio/headset) || istype(H.r_ear, /obj/item/device/radio/headset)))
|
||||
to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.")
|
||||
to_chat(src.owner, "You sent a [eviltype] fax to [H]")
|
||||
log_admin("[key_name(src.owner)] sent [key_name(H)] a [eviltype] fax")
|
||||
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a [eviltype] fax")
|
||||
else if(href_list["FaxReplyTemplate"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/mob/living/carbon/human/H = locate(href_list["FaxReplyTemplate"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(null)
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
P.name = "Central Command - paper"
|
||||
var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions")
|
||||
var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes
|
||||
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><B>NanoTrasen Science Station Cyberiad</B></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
|
||||
if(stype == "Handle it yourselves!")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.<BR><BR><i><small>This is an automatic message.</small>"
|
||||
else if(stype == "Illegible fax")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.<BR><BR>Please consult your nearest dictionary and/or thesaurus and try again.<BR><BR><i><small>This is an automatic message.</small>"
|
||||
else if(stype == "Fax not signed")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>Your fax has not been correctly signed and, as such, we cannot verify your identity.<BR><BR>Please sign your faxes before sending them so that we may verify your identity.<BR><BR><i><small>This is an automatic message.</small>"
|
||||
else if(stype == "Not Right Now")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.<BR><BR>This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.<BR><BR>Please try again later.<BR><BR><i><small>This is an automatic message.</small>"
|
||||
else if(stype == "You are wasting our time")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.<BR><BR>Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.<BR><BR><i><small>This is an automatic message.</i></small>"
|
||||
else if(stype == "Keep up the good work")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been received successfully by NAS Trurl Fax Registration.<BR><BR>We at the NAS Trurl appreciate the good work that you have done here, and sincerely recommend that you continue such a display of dedication to the company.<BR><BR><i><small>This is absolutely not an automated message.</i></small>"
|
||||
else if(stype == "ERT Instructions")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>Please utilize the Card Swipers if you wish to call for an ERT.<BR><BR><i><small>This is an automated message.</i></small>"
|
||||
else
|
||||
return
|
||||
tmsg += "</font>"
|
||||
P.info = tmsg
|
||||
P.x = rand(-2, 0)
|
||||
P.y = rand(-1, 2)
|
||||
P.offset_x += P.x
|
||||
P.offset_y += P.y
|
||||
P.update_icon()
|
||||
var/stampvalue = "cent"
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-[stampvalue]"
|
||||
stampoverlay.pixel_x = P.x
|
||||
stampoverlay.pixel_y = P.y
|
||||
P.stamped = list()
|
||||
P.stamped += /obj/item/weapon/stamp/centcom
|
||||
if(!P.ico)
|
||||
P.ico = new
|
||||
P.ico += "paper_stamp-[stampvalue]"
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><img src=large_stamp-[stampvalue].png>"
|
||||
P.update_icon()
|
||||
fax.receivefax(P)
|
||||
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/device/radio/headset) || istype(H.r_ear, /obj/item/device/radio/headset)))
|
||||
to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.")
|
||||
to_chat(src.owner, "You sent a standard '[stype]' fax to [H]")
|
||||
log_admin("[key_name(src.owner)] sent [key_name(H)] a standard '[stype]' fax")
|
||||
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a standard '[stype]' fax")
|
||||
|
||||
else if(href_list["SyndicateReply"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
@@ -1685,10 +1772,9 @@
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
to_chat(usr, "The person you are trying to contact is not wearing a headset")
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "")
|
||||
if(!input) return
|
||||
|
||||
if(!input)
|
||||
return
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
|
||||
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\"")
|
||||
@@ -1727,7 +1813,7 @@
|
||||
|
||||
var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "")
|
||||
if(!input) return
|
||||
|
||||
ert_request_answered = 1
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].")
|
||||
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Your ERT request has been denied for the following reasons: [input]. Message ends.\"")
|
||||
@@ -1740,19 +1826,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>"
|
||||
|
||||
@@ -1760,19 +1846,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
|
||||
@@ -1894,6 +1980,7 @@
|
||||
return
|
||||
else
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
|
||||
// TODO: Tie into space manager
|
||||
if((F.z in config.station_levels))
|
||||
spawn(0)
|
||||
if(!F.receivefax(P))
|
||||
@@ -1997,9 +2084,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()
|
||||
@@ -2033,22 +2120,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)
|
||||
@@ -2061,8 +2148,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)
|
||||
@@ -2090,7 +2177,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))
|
||||
@@ -2160,7 +2247,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)
|
||||
@@ -2241,6 +2328,7 @@
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
var/turf/loc = find_loc(H)
|
||||
var/security = 0
|
||||
// TODO: Tie into space manager
|
||||
if(!(loc.z in config.station_levels) || prisonwarped.Find(H))
|
||||
|
||||
//don't warp them if they aren't ready or are already there
|
||||
@@ -2258,12 +2346,13 @@
|
||||
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)
|
||||
W.plane = initial(W.plane)
|
||||
//teleport person to cell
|
||||
H.loc = pick(prisonwarp)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
|
||||
@@ -2311,9 +2400,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)
|
||||
@@ -2416,60 +2505,37 @@
|
||||
L.fix()
|
||||
message_admins("[key_name_admin(usr)] fixed all lights", 1)
|
||||
if("floorlava")
|
||||
if(floorIsLava)
|
||||
to_chat(usr, "The floor is lava already.")
|
||||
feedback_inc("admin_secrets_fun_used", 1)
|
||||
feedback_add_details("admin_secrets_fun_used", "LF")
|
||||
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No")
|
||||
if(sure == "No")
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","LF")
|
||||
|
||||
//Options
|
||||
var/length = input(usr, "How long will the lava last? (in seconds)", "Length", 180) as num
|
||||
length = min(abs(length), 1200)
|
||||
|
||||
var/damage = input(usr, "How deadly will the lava be?", "Damage", 2) as num
|
||||
damage = min(abs(damage), 100)
|
||||
|
||||
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "YES!", "Nah")
|
||||
if(sure == "Nah")
|
||||
weather_master.run_weather("the floor is lava")
|
||||
message_admins("[key_name_admin(usr)] made the floor lava")
|
||||
if("fakelava")
|
||||
feedback_inc("admin_secrets_fun_used", 1)
|
||||
feedback_add_details("admin_secrets_fun_used", "LZ")
|
||||
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No")
|
||||
if(sure == "No")
|
||||
return
|
||||
floorIsLava = 1
|
||||
|
||||
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1)
|
||||
|
||||
for(var/turf/simulated/floor/F in world)
|
||||
if((F.z in config.station_levels))
|
||||
F.name = "lava"
|
||||
F.desc = "The floor is LAVA!"
|
||||
F.overlays += "lava"
|
||||
F.lava = 1
|
||||
|
||||
spawn(0)
|
||||
for(var/i = i, i < length, i++) // 180 = 3 minutes
|
||||
if(damage)
|
||||
for(var/mob/living/carbon/L in living_mob_list)
|
||||
if(istype(L.loc, /turf/simulated/floor)) // Are they on LAVA?!
|
||||
var/turf/simulated/floor/F = L.loc
|
||||
if(F.lava)
|
||||
var/safe = 0
|
||||
for(var/obj/structure/O in F.contents)
|
||||
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
|
||||
safe = 1
|
||||
break
|
||||
if(!safe)
|
||||
L.adjustFireLoss(damage)
|
||||
|
||||
|
||||
sleep(10)
|
||||
|
||||
for(var/turf/simulated/floor/F in world) // Reset everything.
|
||||
if((F.z in config.station_levels))
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
F.overlays.Cut()
|
||||
F.lava = 0
|
||||
F.update_icon()
|
||||
floorIsLava = 0
|
||||
return
|
||||
weather_master.run_weather("fake lava")
|
||||
message_admins("[key_name_admin(usr)] made aesthetic lava on the floor")
|
||||
if("weatherashstorm")
|
||||
feedback_inc("admin_secrets_fun_used", 1)
|
||||
feedback_add_details("admin_secrets_fun_used", "WA")
|
||||
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No")
|
||||
if(sure == "No")
|
||||
return
|
||||
weather_master.run_weather("ash storm")
|
||||
message_admins("[key_name_admin(usr)] spawned an ash storm on the mining asteroid")
|
||||
if("weatherdarkness")
|
||||
feedback_inc("admin_secrets_fun_used", 1)
|
||||
feedback_add_details("admin_secrets_fun_used", "WD")
|
||||
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No")
|
||||
if(sure == "No")
|
||||
return
|
||||
weather_master.run_weather("advanced darkness")
|
||||
message_admins("[key_name_admin(usr)] made the station go through advanced darkness")
|
||||
if("retardify")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","RET")
|
||||
@@ -2483,7 +2549,7 @@
|
||||
for(var/obj/item/W in world)
|
||||
if(istype(W, /obj/item/clothing) || istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/weapon/disk) || istype(W, /obj/item/weapon/tank))
|
||||
continue
|
||||
W.icon = 'icons/obj/gun.dmi'
|
||||
W.icon = 'icons/obj/guns/projectile.dmi'
|
||||
W.icon_state = "revolver"
|
||||
W.item_state = "gun"
|
||||
message_admins("[key_name_admin(usr)] made every item look like a gun")
|
||||
@@ -2495,11 +2561,12 @@
|
||||
W.item_state = "w_suit"
|
||||
W.item_color = "schoolgirl"
|
||||
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
|
||||
to_chat(world, sound('sound/AI/animes.ogg'))
|
||||
world << sound('sound/AI/animes.ogg')
|
||||
if("eagles")//SCRAW
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in world)
|
||||
for(var/obj/machinery/door/airlock/W in airlocks)
|
||||
// TODO: Tie into space manager
|
||||
if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
@@ -2600,7 +2667,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"])
|
||||
@@ -2640,7 +2707,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")
|
||||
@@ -2675,9 +2742,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"])
|
||||
@@ -2692,13 +2759,13 @@
|
||||
dat += "No-one has done anything this round!"
|
||||
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)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
|
||||
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)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
|
||||
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.")
|
||||
@@ -2715,7 +2782,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()
|
||||
|
||||
@@ -2754,7 +2821,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()
|
||||
|
||||
@@ -2808,13 +2875,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()
|
||||
|
||||
@@ -2897,7 +2964,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)
|
||||
@@ -2930,6 +2997,16 @@
|
||||
Secrets(usr)
|
||||
return 1
|
||||
|
||||
else if(href_list["viewruntime"])
|
||||
var/datum/ErrorViewer/error_viewer = locate(href_list["viewruntime"])
|
||||
if(!istype(error_viewer))
|
||||
to_chat(usr, "<span class='warning'>That runtime viewer no longer exists.</span>")
|
||||
return
|
||||
if(href_list["viewruntime_backto"])
|
||||
error_viewer.showTo(usr, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
|
||||
else
|
||||
error_viewer.showTo(usr, null, href_list["viewruntime_linear"])
|
||||
|
||||
/proc/admin_jump_link(var/atom/target, var/source)
|
||||
if(!target) return
|
||||
// The way admin jump links handle their src is weirdly inconsistent...
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
if("delete")
|
||||
for(var/datum/d in objs)
|
||||
del(d)
|
||||
qdel(d)
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
@@ -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 += "\["
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
admin_forcemove(usr, T)
|
||||
log_admin("[key_name(usr)] jumped to [A]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [A]")
|
||||
if(!isobserver(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to [A]")
|
||||
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/jumptoturf(var/turf/T in world)
|
||||
@@ -35,7 +36,8 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
|
||||
if(!isobserver(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
|
||||
admin_forcemove(usr, T)
|
||||
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -48,7 +50,8 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
if(!isobserver(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
if(src.mob)
|
||||
var/mob/A = src.mob
|
||||
var/turf/T = get_turf(M)
|
||||
@@ -69,7 +72,8 @@
|
||||
if(T)
|
||||
admin_forcemove(usr, T)
|
||||
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
|
||||
if(!isobserver(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
|
||||
|
||||
/client/proc/jumptokey()
|
||||
set category = "Admin"
|
||||
@@ -87,7 +91,8 @@
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
if(!isobserver(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
|
||||
admin_forcemove(usr, M.loc)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -6,37 +6,41 @@
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
if(alert("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
|
||||
return
|
||||
|
||||
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...")
|
||||
next_turf:
|
||||
for(var/turf/T in world)
|
||||
for(var/dir in cardinal)
|
||||
var/check = 0
|
||||
for(var/obj/machinery/atmospherics/pipe in T)
|
||||
if(dir & pipe.initialize_directions)
|
||||
check++
|
||||
if(check > 1)
|
||||
for(var/turf/T in world)
|
||||
for(var/dir in cardinal)
|
||||
var/list/check = list(0, 0, 0)
|
||||
var/done = 0
|
||||
for(var/obj/machinery/atmospherics/pipe in T)
|
||||
if(dir & pipe.initialize_directions)
|
||||
for(var/ct in pipe.connect_types)
|
||||
check[ct]++
|
||||
if(check[ct] > 1)
|
||||
to_chat(usr, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")
|
||||
continue next_turf
|
||||
done = 1
|
||||
break
|
||||
if(done)
|
||||
break
|
||||
to_chat(usr, "Done")
|
||||
|
||||
/client/proc/powerdebug()
|
||||
@@ -47,13 +51,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)]")
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/client/proc/cinematic(var/cinematic as anything in list("explosion",null))
|
||||
set name = "Play cinematic"
|
||||
/client/proc/cinematic(cinematic as anything in list("explosion", null))
|
||||
set name = "cinematic"
|
||||
set category = "Debug"
|
||||
set desc = "Shows a cinematic, will work like a normal nuke" // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
|
||||
if(alert("Are you sure you want to run [cinematic]?","Confirmation","Yes","No")=="No") return
|
||||
if(!ticker) return
|
||||
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
|
||||
set hidden = 1
|
||||
if(!ticker)
|
||||
return
|
||||
switch(cinematic)
|
||||
if("explosion")
|
||||
var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
|
||||
var/parameter = input(src, "station_missed = ?", "Enter Parameter", 0) as num
|
||||
var/override
|
||||
switch(parameter)
|
||||
if(1)
|
||||
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("nuclear emergency","no override")
|
||||
override = input(src, "mode = ?","Enter Parameter", null) as anything in list("nuclear emergency", "fake", "no override")
|
||||
if(0)
|
||||
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","nuclear emergency","AI malfunction","no override")
|
||||
ticker.station_explosion_cinematic(parameter,override)
|
||||
return
|
||||
override = input(src, "mode = ?","Enter Parameter", null) as anything in list("blob", "nuclear emergency", "AI malfunction", "no override")
|
||||
ticker.station_explosion_cinematic(parameter, override)
|
||||
@@ -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])"
|
||||
|
||||
+506
-252
File diff suppressed because it is too large
Load Diff
@@ -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 += " <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 += " [filters[filter]]: ERROR<br>"
|
||||
continue
|
||||
output += " [filters[filter]]: [f.len]<br>"
|
||||
for (var/device in f)
|
||||
if (isobj(device))
|
||||
for(var/device in f)
|
||||
if(isobj(device))
|
||||
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
|
||||
else
|
||||
output += " [device]<br>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -59,7 +59,7 @@ var/global/sent_honksquad = 0
|
||||
new_honksquad.key = pick(commandos)
|
||||
commandos -= new_honksquad.key
|
||||
new_honksquad.internal = new_honksquad.s_store
|
||||
new_honksquad.internals.icon_state = "internal1"
|
||||
new_honksquad.update_internals_hud_icon(1)
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
new_honksquad.mind.store_memory("<B>Mission:</B> \red [input].")
|
||||
@@ -121,7 +121,7 @@ var/global/sent_honksquad = 0
|
||||
if(prob(50))
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/energy/clown(src), slot_in_backpack)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/grenadelauncher/piecannon(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/throw/piecannon(src), slot_in_backpack)
|
||||
src.mutations.Add(CLUMSY)
|
||||
|
||||
|
||||
@@ -134,4 +134,4 @@ var/global/sent_honksquad = 0
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/client/proc/map_template_load()
|
||||
set category = "Debug"
|
||||
set name = "Map Template - Place"
|
||||
set name = "Map template - Place"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/datum/map_template/template
|
||||
|
||||
var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in map_templates
|
||||
@@ -16,22 +15,27 @@
|
||||
if(!T)
|
||||
return
|
||||
|
||||
if(!template.fits_in_map_bounds(T, centered = TRUE))
|
||||
to_chat(usr, "Map is too large to fit in bounds. Map's dimensions: ([template.width], [template.height])")
|
||||
return
|
||||
|
||||
var/list/preview = list()
|
||||
for(var/S in template.get_affected_turfs(T,centered = TRUE))
|
||||
preview += image('icons/turf/overlays.dmi',S,"greenOverlay")
|
||||
usr.client.images += preview
|
||||
if(alert(usr,"Confirm location.","Template Confirm","Yes","No") == "Yes")
|
||||
template.load(T, centered = TRUE)
|
||||
message_admins("[key_name_admin(usr)] has placed a map template ([template.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</A>")
|
||||
var/timer = start_watch()
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has started to place the map template ([template.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a></span>")
|
||||
if(template.load(T, centered = TRUE))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>. Took [stop_watch(timer)]s.</span>")
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
usr.client.images -= preview
|
||||
|
||||
/client/proc/map_template_upload()
|
||||
set category = "Debug"
|
||||
set name = "Map Template - Upload"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/map = input(usr, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
|
||||
if(!map)
|
||||
return
|
||||
@@ -39,7 +43,12 @@
|
||||
to_chat(usr, "Bad map file: [map]")
|
||||
return
|
||||
|
||||
var/timer = start_watch()
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has begun uploading a map template ([map])</span>")
|
||||
var/datum/map_template/M = new(map=map, rename="[map]")
|
||||
M.preload_size(map)
|
||||
map_templates[M.name] = M
|
||||
message_admins("[key_name_admin(usr)] has uploaded a map template ([map])")
|
||||
if(M.preload_size(map))
|
||||
to_chat(usr, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
map_templates[M.name] = M
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has uploaded a map template ([map]). Took [stop_watch(timer)]s.</span>")
|
||||
else
|
||||
to_chat(usr, "Map template '[map]' failed to load properly")
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -139,7 +139,9 @@ var/list/admin_verbs_show_debug_verbs = list(
|
||||
/client/proc/print_jobban_old_filter,
|
||||
/client/proc/forceEvent,
|
||||
/client/proc/nanomapgen_DumpImage,
|
||||
/client/proc/reload_nanoui_resources
|
||||
/client/proc/reload_nanoui_resources,
|
||||
/client/proc/admin_redo_space_transitions,
|
||||
/client/proc/make_turf_space_map
|
||||
)
|
||||
|
||||
/client/proc/enable_debug_verbs()
|
||||
|
||||
@@ -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)
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
else if(isicon(var_value))
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
var_value = "\icon[var_value]"
|
||||
var_value = "[bicon(var_value)]"
|
||||
default = "icon"
|
||||
|
||||
else if(istype(var_value,/atom) || istype(var_value,/datum))
|
||||
@@ -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]]")
|
||||
|
||||
@@ -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)
|
||||
@@ -328,7 +328,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if(default == "num")
|
||||
dir = 1
|
||||
else if(default == "icon")
|
||||
var_value = "\icon[var_value]"
|
||||
var_value = "[bicon(var_value)]"
|
||||
|
||||
to_chat(usr, "Variable contains: [var_value]")
|
||||
if(dir)
|
||||
@@ -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
|
||||
@@ -465,7 +465,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
else if(isicon(variable))
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
variable = "\icon[variable]"
|
||||
variable = "[bicon(variable)]"
|
||||
class = "icon"
|
||||
|
||||
else if(istype(variable,/matrix))
|
||||
|
||||
@@ -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))
|
||||
@@ -146,40 +146,16 @@ client/proc/one_click_antag()
|
||||
return 0
|
||||
|
||||
/datum/admins/proc/makeWizard()
|
||||
var/list/mob/candidates = list()
|
||||
var/mob/theghost = null
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(istype(G) && G.client && (ROLE_WIZARD in G.client.prefs.be_special))
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,ROLE_WIZARD))
|
||||
spawn(0)
|
||||
switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard")
|
||||
|
||||
if(candidates.len)
|
||||
candidates = shuffle(candidates)
|
||||
for(var/mob/dead/observer/i in candidates)
|
||||
if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
|
||||
var/mob/dead/observer/selected = pick(candidates)
|
||||
candidates -= selected
|
||||
|
||||
theghost = i
|
||||
break
|
||||
|
||||
if(theghost)
|
||||
var/mob/living/carbon/human/new_character=makeBody(theghost)
|
||||
var/mob/living/carbon/human/new_character = makeBody(selected)
|
||||
new_character.mind.make_Wizard()
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -277,13 +253,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 +279,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 +332,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)
|
||||
@@ -375,7 +351,7 @@ client/proc/one_click_antag()
|
||||
|
||||
new_syndicate_commando.key = theghost.key
|
||||
new_syndicate_commando.internal = new_syndicate_commando.s_store
|
||||
new_syndicate_commando.internals.icon_state = "internal1"
|
||||
new_syndicate_commando.update_internals_hud_icon(1)
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
|
||||
@@ -386,8 +362,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 +445,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
|
||||
@@ -485,6 +461,8 @@ client/proc/one_click_antag()
|
||||
break
|
||||
|
||||
new_vox.key = theghost.key
|
||||
ticker.mode.traitors += new_vox.mind
|
||||
|
||||
to_chat(new_vox, "\blue You are a Vox Primalis, fresh out of the Shoal. Your ship has arrived at the Tau Ceti system hosting the NSV Exodus... or was it the Luna? NSS? Utopia? Nobody is really sure, but everyong is raring to start pillaging! Your current goal is: \red<B> [input]</B>")
|
||||
to_chat(new_vox, "\red Don't forget to turn on your nitrogen internals!")
|
||||
|
||||
@@ -497,9 +475,6 @@ client/proc/one_click_antag()
|
||||
|
||||
/datum/admins/proc/create_vox_raider(obj/spawn_location, leader_chosen = 0)
|
||||
|
||||
var/mob/living/carbon/human/new_vox = new(spawn_location.loc, "Vox")
|
||||
var/obj/item/organ/external/head/head_organ = new_vox.get_organ("head")
|
||||
|
||||
var/sounds = rand(2,8)
|
||||
var/i = 0
|
||||
var/newname = ""
|
||||
@@ -508,17 +483,21 @@ client/proc/one_click_antag()
|
||||
i++
|
||||
newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah"))
|
||||
|
||||
var/mob/living/carbon/human/new_vox = new /mob/living/carbon/human/vox(spawn_location.loc)
|
||||
|
||||
new_vox.add_language("Tradeband")
|
||||
new_vox.real_name = capitalize(newname)
|
||||
new_vox.dna.real_name = new_vox.real_name
|
||||
new_vox.name = new_vox.real_name
|
||||
new_vox.age = rand(12,20)
|
||||
new_vox.set_species("Vox")
|
||||
new_vox.languages = list() // Removing language from chargen.
|
||||
new_vox.flavor_text = ""
|
||||
new_vox.add_language("Vox-pidgin")
|
||||
new_vox.add_language("Galactic Common")
|
||||
new_vox.add_language("Tradeband")
|
||||
head_organ.h_style = "Short Vox Quills"
|
||||
head_organ.f_style = "Shaved"
|
||||
new_vox.change_eye_color(rand(1, 255), rand(1, 255), rand(1, 255))
|
||||
new_vox.s_tone = rand(1, 6)
|
||||
|
||||
// Do the initial caching of the player's body icons.
|
||||
new_vox.force_update_limbs()
|
||||
new_vox.update_dna()
|
||||
new_vox.update_eyes()
|
||||
|
||||
for(var/obj/item/organ/external/limb in new_vox.organs)
|
||||
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
|
||||
@@ -529,8 +508,8 @@ client/proc/one_click_antag()
|
||||
I.implanted = 1
|
||||
cortical_stacks += I
|
||||
|
||||
ticker.mode.traitors += new_vox.mind
|
||||
new_vox.equip_vox_raider()
|
||||
new_vox.regenerate_icons()
|
||||
|
||||
return new_vox
|
||||
|
||||
@@ -548,7 +527,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))
|
||||
@@ -597,7 +576,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
|
||||
|
||||
@@ -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
|
||||
@@ -55,7 +55,7 @@
|
||||
message_admins("[key_name_admin(usr)] used THERE CAN BE ONLY ONE! -NO ATTACK LOGS WILL BE SENT TO ADMINS FROM THIS POINT FORTH-", 1)
|
||||
log_admin("[key_name(usr)] used there can be only one.")
|
||||
nologevent = 1
|
||||
to_chat(world, sound('sound/music/THUNDERDOME.ogg'))
|
||||
world << sound('sound/music/THUNDERDOME.ogg')
|
||||
|
||||
/client/proc/only_me()
|
||||
if(!ticker)
|
||||
@@ -101,4 +101,4 @@
|
||||
message_admins("[key_name_admin(usr)] used THERE CAN BE ONLY ME! -NO ATTACK LOGS WILL BE SENT TO ADMINS FROM THIS POINT FORTH-", 1)
|
||||
log_admin("[key_name(usr)] used there can be only me.")
|
||||
nologevent = 1
|
||||
to_chat(world, sound('sound/music/THUNDERDOME.ogg'))
|
||||
world << sound('sound/music/THUNDERDOME.ogg')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -81,6 +81,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
for(var/O in global_intercoms)
|
||||
var/obj/item/device/radio/intercom/I = O
|
||||
// TODO: Tie into space manager
|
||||
if(I.z != ZLEVEL_STATION && !ignore_z)
|
||||
continue
|
||||
if(!I.on && !ignore_power)
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
return
|
||||
|
||||
var/image/cross = image('icons/obj/storage.dmi',"bible")
|
||||
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
msg = "\blue [bicon(cross)] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
|
||||
to_chat(usr, "Your prayers have been received by the gods.")
|
||||
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -27,41 +26,48 @@
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=orange>CENTCOMM: </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;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE: </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;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/proc/HONK_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=pink>HONK: </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;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/proc/ERT_Announce(var/text , var/mob/Sender)
|
||||
/proc/ERT_Announce(var/text , var/mob/Sender, var/repeat_warning)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <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]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
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)
|
||||
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))
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<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;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
to_chat(X, "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>")
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
@@ -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]")
|
||||
@@ -407,7 +407,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("Death Commando")//Leaves them at late-join spawn.
|
||||
new_character.equip_death_commando()
|
||||
new_character.internal = new_character.s_store
|
||||
new_character.internals.icon_state = "internal1"
|
||||
new_character.update_internals_hud_icon(1)
|
||||
else//They may also be a cyborg or AI.
|
||||
switch(new_character.mind.assigned_role)
|
||||
if("Cyborg")//More rigging to make em' work and check if they're traitor.
|
||||
@@ -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.'"
|
||||
@@ -590,7 +590,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
C.messagetitle.Add("[command_name()] Update")
|
||||
C.messagetext.Add(P.info)
|
||||
|
||||
// to_chat(world, sound('sound/AI/commandreport.ogg'))
|
||||
// world << sound('sound/AI/commandreport.ogg')
|
||||
log_admin("[key_name(src)] has created a communications report: [input]")
|
||||
message_admins("[key_name_admin(src)] has created a communications report", 1)
|
||||
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -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
|
||||
|
||||
@@ -868,6 +868,29 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/reset_all_tcs()
|
||||
set category = "Admin"
|
||||
set name = "Reset Telecomms Scripts"
|
||||
set desc = "Blanks all telecomms scripts from all telecomms servers"
|
||||
|
||||
if(!check_rights(R_ADMIN, 1, src))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure you want to blank all NTSL scripts?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/telecomms/server/S in telecomms_list)
|
||||
var/datum/TCS_Compiler/C = S.Compiler
|
||||
S.rawcode = ""
|
||||
C.Compile("")
|
||||
for(var/obj/machinery/computer/telecomms/traffic/T in machines)
|
||||
T.storedcode = ""
|
||||
log_admin("[key_name(usr)] blanked all telecomms scripts.")
|
||||
message_admins("[key_name_admin(usr)] blanked all telecomms scripts.")
|
||||
feedback_add_details("admin_verb","RAT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/toggle_ert_calling()
|
||||
set category = "Event"
|
||||
set name = "Toggle ERT"
|
||||
@@ -886,4 +909,3 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(usr, "\red ERT has been <b>Disabled</b>.")
|
||||
log_admin("Admin [key_name(src)] has disabled ERT calling.")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1)
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/client/proc/admin_serialize()
|
||||
set name = "Serialize Marked Datum"
|
||||
set desc = "Turns your marked object into a JSON string you can later use to re-create the object"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!istype(holder.marked_datum, /atom/movable))
|
||||
to_chat(src, "The marked datum is not an atom/movable!")
|
||||
return
|
||||
|
||||
var/atom/movable/AM = holder.marked_datum
|
||||
to_chat(src, json_encode(AM.serialize()))
|
||||
|
||||
/client/proc/admin_deserialize()
|
||||
set name = "Deserialize JSON datum"
|
||||
set desc = "Creates an object from a JSON string"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG))
|
||||
return
|
||||
|
||||
var/json_text = input("Enter the JSON code:","Text") as message|null
|
||||
if(json_text)
|
||||
json_to_object(json_text, get_turf(usr))
|
||||
@@ -0,0 +1,41 @@
|
||||
/client/proc/admin_redo_space_transitions()
|
||||
set name = "Remake Space Transitions"
|
||||
set desc = "Re-assigns all space transitions"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG))
|
||||
return
|
||||
|
||||
var/choice = alert("Do you want to rebuild space transitions?",,"Yes", "No")
|
||||
|
||||
if(choice == "No")
|
||||
return
|
||||
|
||||
|
||||
message_admins("[key_name_admin(usr)] re-assigned all space transitions")
|
||||
space_manager.do_transition_setup()
|
||||
log_admin("[key_name(usr)] re-assigned all space transitions")
|
||||
|
||||
feedback_add_details("admin_verb","SPCRST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
|
||||
/client/proc/make_turf_space_map()
|
||||
set name = "Make Space Map"
|
||||
set desc = "Create a map of the space levels as turfs at your feet"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG))
|
||||
return
|
||||
|
||||
var/choice = alert("Are you sure you want to make a space map out of turfs?",,"Yes","No")
|
||||
|
||||
if(choice == "No")
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] made a space map")
|
||||
|
||||
|
||||
space_manager.map_as_turfs(get_turf(usr))
|
||||
log_admin("[key_name(usr)] made a space map")
|
||||
@@ -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)
|
||||
@@ -64,7 +64,7 @@ var/global/sent_strike_team = 0
|
||||
new_commando.key = pick(commandos)
|
||||
commandos -= new_commando.key
|
||||
new_commando.internal = new_commando.s_store
|
||||
new_commando.internals.icon_state = "internal1"
|
||||
new_commando.update_internals_hud_icon(1)
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
if(nuke_code)
|
||||
@@ -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,8 +143,8 @@ 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)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_in_backpack)
|
||||
if(!leader_selected)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack)
|
||||
@@ -154,7 +154,7 @@ var/global/sent_strike_team = 0
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(src), slot_belt)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse(src), slot_r_hand)
|
||||
|
||||
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)//Here you go Deuryn
|
||||
@@ -170,4 +170,4 @@ var/global/sent_strike_team = 0
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -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)
|
||||
@@ -71,7 +71,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
new_syndicate_commando.key = pick(commandos)
|
||||
commandos -= new_syndicate_commando.key
|
||||
new_syndicate_commando.internal = new_syndicate_commando.s_store
|
||||
new_syndicate_commando.internals.icon_state = "internal1"
|
||||
new_syndicate_commando.update_internals_hud_icon(1)
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
if(nuke_code)
|
||||
@@ -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)
|
||||
@@ -144,14 +144,14 @@ var/global/sent_syndicate_strike_team = 0
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/magazine/m762, slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/magazine/mm556x45)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/magazine/m45(src), slot_in_backpack)
|
||||
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/weapon/grenade/plastic/x4(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack)
|
||||
if (!syndicate_leader_selected)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_in_backpack)
|
||||
if(!syndicate_leader_selected)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_in_backpack)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack)
|
||||
@@ -160,7 +160,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/grenade/empgrenade(src), slot_r_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/pistol/m2411(src), slot_belt)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/pistol/m1911(src), slot_belt)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/l6_saw(src), slot_r_hand)
|
||||
|
||||
@@ -173,4 +173,4 @@ var/global/sent_syndicate_strike_team = 0
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -18,7 +18,7 @@ var/global/vox_tick = 1
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
|
||||
equip_to_slot_or_del(new /obj/item/device/chameleon(src), slot_l_store)
|
||||
|
||||
var/obj/item/weapon/gun/launcher/spikethrower/W = new(src)
|
||||
var/obj/item/weapon/gun/projectile/automatic/spikethrower/W = new(src)
|
||||
equip_to_slot_or_del(W, slot_r_hand)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ var/global/vox_tick = 1
|
||||
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/dartgun/vox/medical, slot_r_hand)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/breath(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/breath/vox(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(src), slot_back)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_r_store)
|
||||
|
||||
@@ -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
|
||||
return 1
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/obj/machinery/arcade/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, var/mob/user)
|
||||
if(cashmoney.get_total() < token_price)
|
||||
to_chat(user, "\icon[cashmoney] <span class='warning'>That is not enough money.</span>")
|
||||
to_chat(user, "[bicon(cashmoney)] <span class='warning'>That is not enough money.</span>")
|
||||
return 0
|
||||
visible_message("<span class='info'>[usr] inserts a credit chip into [src].</span>")
|
||||
var/left = cashmoney.get_total() - token_price
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
throwforce = 0
|
||||
throw_speed = 1
|
||||
throw_range = 1
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
max_amount = 9999 //Dang that's a lot of tickets
|
||||
|
||||
/obj/item/stack/tickets/New(var/loc, var/amount=null)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/assemblies/new_assemblies.dmi'
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
materials = list(MAT_METAL=100)
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
icon = 'icons/obj/tank.dmi'
|
||||
item_state = "assembly"
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
flags = CONDUCT //Copied this from old code, so this may or may not be necessary
|
||||
var/status = 0 //0 - not readied //1 - bomb finished with welder
|
||||
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
|
||||
var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a plasma tank
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
/obj/item/device/onetankbomb/examine(mob/user)
|
||||
..(user)
|
||||
@@ -60,7 +61,7 @@
|
||||
return
|
||||
|
||||
/obj/item/device/onetankbomb/receive_signal() //This is mainly called by the sensor through sense() to the holder, and from the holder to here.
|
||||
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
sleep(10)
|
||||
if(!src)
|
||||
return
|
||||
@@ -140,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)
|
||||
@@ -149,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)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
health_scan = M.health
|
||||
if(health_scan <= alarm_health)
|
||||
pulse()
|
||||
audible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||
audible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
toggle_scan()
|
||||
return
|
||||
return
|
||||
@@ -76,7 +76,9 @@
|
||||
var/dat = text("<TT><B>Health Sensor</B> <A href='?src=\ref[src];scanning=1'>[scanning?"On":"Off"]</A>")
|
||||
if(scanning && health_scan)
|
||||
dat += "<BR>Health: [health_scan]"
|
||||
user << browse(dat, "window=hscan")
|
||||
var/datum/browser/popup = new(user, "hscan", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "hscan")
|
||||
return
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "assembly"
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
if(!secured || !on || cooldown > 0)
|
||||
return 0
|
||||
pulse(0)
|
||||
audible_message("\icon[src] *beep* *beep*", null, 3)
|
||||
audible_message("[bicon(src)] *beep* *beep*", null, 3)
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
@@ -139,7 +139,9 @@
|
||||
</TT>
|
||||
<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>
|
||||
<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"}
|
||||
user << browse(dat, "window=infra")
|
||||
var/datum/browser/popup = new(user, "infra", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "infra")
|
||||
|
||||
/obj/item/device/assembly/infra/Topic(href, href_list)
|
||||
|
||||
@@ -42,15 +42,15 @@
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
sense()
|
||||
if((!secured)||(!scanning)||(cooldown > 0)) return 0
|
||||
pulse(0)
|
||||
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
|
||||
dropped()
|
||||
..()
|
||||
spawn(0)
|
||||
sense()
|
||||
return
|
||||
@@ -114,7 +115,9 @@
|
||||
dat += "<BR><A href='?src=\ref[src];scanning=1'>[scanning?"Armed":"Unarmed"]</A> (Movement sensor active when armed!)"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
user << browse(dat, "window=prox")
|
||||
var/datum/browser/popup = new(user, "prox", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "prox")
|
||||
return
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/obj/item/clothing/head/helmet/part1 = null
|
||||
var/obj/item/device/radio/electropack/part2 = null
|
||||
var/status = 0
|
||||
w_class = 5.0
|
||||
w_class = 5
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
|
||||
@@ -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>
|
||||
@@ -81,7 +81,9 @@
|
||||
[t1]
|
||||
</TT>
|
||||
"}
|
||||
user << browse(dat, "window=radio")
|
||||
var/datum/browser/popup = new(user, "radio", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
@@ -94,7 +96,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)
|
||||
@@ -150,7 +152,7 @@
|
||||
pulse(1)
|
||||
|
||||
for(var/mob/O in hearers(1, src.loc))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
O.show_message("[bicon(src)] *beep* *beep*", 3, "*beep* *beep*", 2)
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/signaler/proc/set_frequency(new_frequency)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if((!secured)||(cooldown > 0)) return 0
|
||||
pulse(0)
|
||||
if(loc)
|
||||
loc.visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
|
||||
loc.visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
@@ -96,7 +96,9 @@
|
||||
<A href='?src=\ref[src];refresh=1'>Refresh</A>
|
||||
<BR><BR>
|
||||
<A href='?src=\ref[src];close=1'>Close</A>"}
|
||||
user << browse(dat, "window=timer")
|
||||
var/datum/browser/popup = new(user, "timer", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "timer")
|
||||
return
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
recorded_type = type
|
||||
listening = 0
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("\icon[src] beeps, \"Activation message is [type ? "the sound when one [recorded]" : "'[recorded]'."]\"")
|
||||
T.visible_message("[bicon(src)] beeps, \"Activation message is [type ? "the sound when one [recorded]" : "'[recorded]'."]\"")
|
||||
else
|
||||
if(findtext(msg, recorded) && type == recorded_type)
|
||||
pulse(0)
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("\icon[src] \red beeps!")
|
||||
T.visible_message("[bicon(src)] \red beeps!")
|
||||
|
||||
activate()
|
||||
return // previously this toggled listning when not in a holder, that's a little silly. It was only called in attack_self that way.
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
listening = !listening
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("\icon[src] beeps, \"[listening ? "Now" : "No longer"] recording input.\"")
|
||||
T.visible_message("[bicon(src)] beeps, \"[listening ? "Now" : "No longer"] recording input.\"")
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
/obj/effect/landmark/corpse
|
||||
name = "Unknown"
|
||||
var/mobname = "Unknown" //Unused now but it'd fuck up maps to remove it now
|
||||
var/mob_species = null //Set to make a mob of another race, currently used only in ruins
|
||||
var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse.
|
||||
var/corpsesuit = null
|
||||
var/corpseshoes = null
|
||||
@@ -37,6 +38,8 @@
|
||||
M.real_name = src.name
|
||||
M.death(1) //Kills the new mob
|
||||
M.timeofdeath = timeofdeath
|
||||
if(src.mob_species)
|
||||
M.set_species(src.mob_species)
|
||||
if(src.corpseuniform)
|
||||
M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
|
||||
if(src.corpsesuit)
|
||||
@@ -159,7 +162,7 @@
|
||||
corpseradio = /obj/item/device/radio/headset/headset_eng
|
||||
corpseuniform = /obj/item/clothing/under/rank/engineer
|
||||
corpseback = /obj/item/weapon/storage/backpack/industrial
|
||||
corpseshoes = /obj/item/clothing/shoes/orange
|
||||
corpseshoes = /obj/item/clothing/shoes/workboots
|
||||
corpsebelt = /obj/item/weapon/storage/belt/utility/full
|
||||
corpsegloves = /obj/item/clothing/gloves/color/yellow
|
||||
corpsehelmet = /obj/item/clothing/head/hardhat
|
||||
@@ -285,3 +288,10 @@
|
||||
corpseid = 1
|
||||
corpseidjob = "Commander"
|
||||
corpseidaccess = "Captain"
|
||||
|
||||
/obj/effect/landmark/corpse/abductor //Connected to ruins, for some reason?
|
||||
name = "abductor"
|
||||
mobname = "???"
|
||||
mob_species = "abductor"
|
||||
corpseuniform = /obj/item/clothing/under/color/grey
|
||||
corpseshoes = /obj/item/clothing/shoes/combat
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/exile
|
||||
name = "exile implants"
|
||||
req_access = list(access_hos)
|
||||
req_access = list(access_armory)
|
||||
|
||||
/obj/structure/closet/secure_closet/exile/New()
|
||||
..()
|
||||
|
||||
@@ -149,7 +149,7 @@ obj/machinery/gateway/centerstation/process()
|
||||
|
||||
/obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/device/multitool))
|
||||
to_chat(user, "\black The gate is already calibrated, there is no work for you to do here.")
|
||||
to_chat(user, "The gate is already calibrated, there is no work for you to do here.")
|
||||
return
|
||||
|
||||
/////////////////////////////////////Away////////////////////////
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/obj/effect/landmark/map_loader
|
||||
name = "map loader"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
invisibility = 101
|
||||
anchored = 1
|
||||
density = 0
|
||||
opacity = 0
|
||||
var/template_name = null
|
||||
var/datum/map_template/template = null
|
||||
var/centered = 1
|
||||
var/loaded = 0
|
||||
|
||||
/obj/effect/landmark/map_loader/New(turf/loc, tname)
|
||||
..()
|
||||
|
||||
if(tname)
|
||||
template_name = tname
|
||||
if(template_name)
|
||||
template = map_templates[template_name]
|
||||
|
||||
/obj/effect/landmark/map_loader/initialize()
|
||||
..()
|
||||
if(template)
|
||||
load(template)
|
||||
|
||||
/obj/effect/landmark/map_loader/set_tag()
|
||||
return
|
||||
|
||||
/obj/effect/landmark/map_loader/proc/load(datum/map_template/t)
|
||||
if(!t)
|
||||
return
|
||||
if(loaded) // I wanna be super sure this loads only once
|
||||
return
|
||||
loaded = 1
|
||||
var/turf/pos = get_turf(src)
|
||||
// Hop to nullspace so we don't get re-initialized by the map we're loading
|
||||
loc = null
|
||||
t.load(pos, centered = centered)
|
||||
t.loaded++
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/map_loader/random
|
||||
var/template_list = ""
|
||||
|
||||
/obj/effect/landmark/map_loader/random/initialize()
|
||||
..()
|
||||
if(template_list)
|
||||
template_name = safepick(splittext(template_list, ";"))
|
||||
template = map_templates[template_name]
|
||||
load(template)
|
||||
@@ -2,10 +2,22 @@
|
||||
//SS13 Optimized Map loader
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
//As of 3.6.2016
|
||||
//global datum that will preload variables on atoms instanciation
|
||||
var/global/use_preloader = FALSE
|
||||
var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
/dmm_suite
|
||||
// These regexes are global - meaning that starting the maploader again mid-load will
|
||||
// reset progress - which means we need to track our index per-map, or we'll
|
||||
// eternally recurse
|
||||
// /"([a-zA-Z]+)" = \(((?:.|\n)*?)\)\n(?!\t)|\((\d+),(\d+),(\d+)\) = \{"([a-zA-Z\n]*)"\}/g
|
||||
var/static/regex/dmmRegex = new/regex({""(\[a-zA-Z]+)" = \\(((?:.|\n)*?)\\)\n(?!\t)|\\((\\d+),(\\d+),(\\d+)\\) = \\{"(\[a-zA-Z\n]*)"\\}"}, "g")
|
||||
// /^[\s\n]+"?|"?[\s\n]+$|^"|"$/g
|
||||
var/static/regex/trimQuotesRegex = new/regex({"^\[\\s\n]+"?|"?\[\\s\n]+$|^"|"$"}, "g")
|
||||
// /^[\s\n]+|[\s\n]+$/
|
||||
var/static/regex/trimRegex = new/regex("^\[\\s\n]+|\[\\s\n]+$", "g")
|
||||
var/static/list/modelCache = list()
|
||||
|
||||
/**
|
||||
* Construct the model map and control the loading process
|
||||
@@ -16,87 +28,156 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
* e.g aa = /turf/unsimulated/wall{icon_state = "rock"}
|
||||
* 2) Read the map line by line, parsing the result (using parse_grid)
|
||||
*
|
||||
* If `measureOnly` is set, then no atoms will be created, and all this will do
|
||||
* is return the bounds after parsing the file
|
||||
*
|
||||
* If you need to freeze init while you're working, you can use the spacial allocator's
|
||||
* "add_dirt" and "remove_dirt" which will put initializations on hold until you say
|
||||
* the word. This is important for loading large maps such as the cyberiad, where
|
||||
* atmos will attempt to start before it's ready, causing runtimes galore if init is
|
||||
* allowed to romp unchecked.
|
||||
*/
|
||||
/dmm_suite/load_map(dmm_file as file, x_offset = 0 as num, y_offset = 0 as num, z_offset as num, do_sleep = 1 as num)
|
||||
if(!z_offset)//what z_level we are creating the map on
|
||||
/dmm_suite/load_map(dmm_file as file, x_offset as num, y_offset as num, z_offset as num, cropMap as num, measureOnly as num)
|
||||
var/tfile = dmm_file//the map file we're creating
|
||||
var/fname = "Lambda"
|
||||
if(isfile(tfile))
|
||||
fname = "[tfile]"
|
||||
tfile = file2text(tfile)
|
||||
|
||||
if(!x_offset)
|
||||
x_offset = 1
|
||||
if(!y_offset)
|
||||
y_offset = 1
|
||||
if(!z_offset)
|
||||
z_offset = world.maxz + 1
|
||||
|
||||
var/quote = ascii2text(34)
|
||||
var/tfile = file2text(dmm_file)//the map file we're creating
|
||||
var/tfile_len = length(tfile)
|
||||
var/lpos = 1 // the models definition index
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//first let's map model keys (e.g "aa") to their contents (e.g /turf/space{variables})
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
var/list/bounds = list(1.#INF, 1.#INF, 1.#INF, -1.#INF, -1.#INF, -1.#INF)
|
||||
var/list/grid_models = list()
|
||||
var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0)))//the length of the model key (e.g "aa" or "aba")
|
||||
var/key_len = 0
|
||||
|
||||
//proceed line by line
|
||||
for(lpos=1; lpos<tfile_len; lpos=findtext(tfile,"\n",lpos,0)+1)
|
||||
var/tline = copytext(tfile,lpos,findtext(tfile,"\n",lpos,0))
|
||||
if(copytext(tline,1,2) != quote)//we reached the map "layout"
|
||||
break
|
||||
var/model_key = copytext(tline,2,2+key_len)
|
||||
var/model_contents = copytext(tline,findtext(tfile,"=")+3,length(tline))
|
||||
grid_models[model_key] = model_contents
|
||||
if(do_sleep)
|
||||
sleep(-1)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//now let's fill the map with turf and objects using the constructed model map
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//position of the currently processed square
|
||||
var/zcrd=-1
|
||||
var/ycrd=y_offset
|
||||
var/xcrd=x_offset
|
||||
var/dmm_suite/loaded_map/LM = new
|
||||
// This try-catch is used as a budget "Finally" clause, as the dirt count
|
||||
// needs to be reset
|
||||
var/watch = start_watch()
|
||||
log_debug("[measureOnly ? "Measuring" : "Loading"] map: [fname]")
|
||||
try
|
||||
LM.index = 1
|
||||
while(dmmRegex.Find(tfile, LM.index))
|
||||
LM.index = dmmRegex.next
|
||||
|
||||
for(var/zpos=findtext(tfile,"\n(1,1,",lpos,0);zpos!=0;zpos=findtext(tfile,"\n(1,1,",zpos+1,0)) //in case there's several maps to load
|
||||
// "aa" = (/type{vars=blah})
|
||||
if(dmmRegex.group[1]) // Model
|
||||
var/key = dmmRegex.group[1]
|
||||
if(grid_models[key]) // Duplicate model keys are ignored in DMMs
|
||||
continue
|
||||
if(key_len != length(key))
|
||||
if(!key_len)
|
||||
key_len = length(key)
|
||||
else
|
||||
throw EXCEPTION("Inconsistant key length in DMM")
|
||||
if(!measureOnly)
|
||||
grid_models[key] = dmmRegex.group[2]
|
||||
|
||||
zcrd++
|
||||
world.maxz = max(world.maxz, zcrd+z_offset)//create a new z_level if needed
|
||||
// (1,1,1) = {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
|
||||
else if(dmmRegex.group[3]) // Coords
|
||||
if(!key_len)
|
||||
throw EXCEPTION("Coords before model definition in DMM")
|
||||
|
||||
var/zgrid = copytext(tfile,findtext(tfile,quote+"\n",zpos,0)+2,findtext(tfile,"\n"+quote,zpos,0)+1) //copy the whole map grid
|
||||
var/z_depth = length(zgrid)
|
||||
var/xcrdStart = text2num(dmmRegex.group[3]) + x_offset - 1
|
||||
//position of the currently processed square
|
||||
var/xcrd
|
||||
var/ycrd = text2num(dmmRegex.group[4]) + y_offset - 1
|
||||
var/zcrd = text2num(dmmRegex.group[5]) + z_offset - 1
|
||||
|
||||
//if exceeding the world max x or y, increase it
|
||||
var/x_depth = length(copytext(zgrid,1,findtext(zgrid,"\n",2,0)))
|
||||
var/x_tilecount = x_depth/key_len
|
||||
if(world.maxx<x_tilecount)
|
||||
world.maxx=x_tilecount
|
||||
if(!measureOnly)
|
||||
if(zcrd > world.maxz)
|
||||
if(cropMap)
|
||||
continue
|
||||
else
|
||||
space_manager.increase_max_zlevel_to(zcrd) //create a new z_level if needed
|
||||
|
||||
var/y_depth = z_depth / (x_depth+1)//x_depth + 1 because we're counting the '\n' characters in z_depth
|
||||
if(world.maxy<y_depth)
|
||||
world.maxy=y_depth
|
||||
bounds[MAP_MINX] = min(bounds[MAP_MINX], xcrdStart)
|
||||
bounds[MAP_MINZ] = min(bounds[MAP_MINZ], zcrd)
|
||||
bounds[MAP_MAXZ] = max(bounds[MAP_MAXZ], zcrd)
|
||||
|
||||
//then proceed it line by line, starting from top
|
||||
ycrd = y_depth
|
||||
var/list/gridLines = splittext(dmmRegex.group[6], "\n")
|
||||
|
||||
for(var/gpos=1;gpos!=0;gpos=findtext(zgrid,"\n",gpos,0)+1)
|
||||
var/grid_line = copytext(zgrid,gpos,findtext(zgrid,"\n",gpos,0))
|
||||
var/leadingBlanks = 0
|
||||
while(leadingBlanks < gridLines.len && gridLines[++leadingBlanks] == "")
|
||||
if(leadingBlanks > 1)
|
||||
gridLines.Cut(1, leadingBlanks) // Remove all leading blank lines.
|
||||
|
||||
//fill the current square using the model map
|
||||
xcrd=0
|
||||
if(!gridLines.len) // Skip it if only blank lines exist.
|
||||
continue
|
||||
|
||||
for(var/mpos in 1 to x_depth step key_len)
|
||||
xcrd++
|
||||
var/model_key = copytext(grid_line,mpos,mpos+key_len)
|
||||
parse_grid(grid_models[model_key], xcrd + x_offset, ycrd + y_offset, zcrd + z_offset, do_sleep)
|
||||
if(gridLines.len && gridLines[gridLines.len] == "")
|
||||
gridLines.Cut(gridLines.len) // Remove only one blank line at the end.
|
||||
|
||||
//reached end of current map
|
||||
if(gpos+x_depth+1>z_depth)
|
||||
break
|
||||
bounds[MAP_MINY] = min(bounds[MAP_MINY], ycrd)
|
||||
ycrd += gridLines.len - 1 // Start at the top and work down
|
||||
|
||||
ycrd--
|
||||
if(do_sleep)
|
||||
sleep(-1)
|
||||
if(!cropMap && ycrd > world.maxy)
|
||||
if(!measureOnly)
|
||||
world.maxy = ycrd // Expand Y here. X is expanded in the loop below
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], ycrd)
|
||||
else
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], min(ycrd, world.maxy))
|
||||
|
||||
//reached End Of File
|
||||
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len)
|
||||
break
|
||||
if(do_sleep)
|
||||
sleep(-1)
|
||||
var/maxx = xcrdStart
|
||||
if(measureOnly)
|
||||
for(var/line in gridLines)
|
||||
maxx = max(maxx, xcrdStart + length(line) / key_len - 1)
|
||||
else
|
||||
for(var/line in gridLines)
|
||||
if(ycrd <= world.maxy && ycrd >= 1)
|
||||
xcrd = xcrdStart
|
||||
for(var/tpos = 1 to length(line) - key_len + 1 step key_len)
|
||||
if(xcrd > world.maxx)
|
||||
if(cropMap)
|
||||
break
|
||||
else
|
||||
world.maxx = xcrd
|
||||
|
||||
if(xcrd >= 1)
|
||||
var/model_key = copytext(line, tpos, tpos + key_len)
|
||||
if(!grid_models[model_key])
|
||||
throw EXCEPTION("Undefined model key in DMM: [model_key]. Map file: [fname].")
|
||||
parse_grid(grid_models[model_key], xcrd, ycrd, zcrd, LM)
|
||||
// After this call, it is NOT safe to reference `dmmRegex` without another call to
|
||||
// "Find" - we might've hit a map loader here and changed its state
|
||||
CHECK_TICK
|
||||
|
||||
maxx = max(maxx, xcrd)
|
||||
++xcrd
|
||||
--ycrd
|
||||
|
||||
bounds[MAP_MAXX] = max(bounds[MAP_MAXX], cropMap ? min(maxx, world.maxx) : maxx)
|
||||
|
||||
CHECK_TICK
|
||||
catch(var/exception/e)
|
||||
_preloader.reset()
|
||||
throw e
|
||||
|
||||
_preloader.reset()
|
||||
log_debug("Loaded map in [stop_watch(watch)]s.")
|
||||
qdel(LM)
|
||||
if(bounds[MAP_MINX] == 1.#INF) // Shouldn't need to check every item
|
||||
log_debug("Min x: bounds[MAP_MINX]")
|
||||
log_debug("Min y: bounds[MAP_MINY]")
|
||||
log_debug("Min z: bounds[MAP_MINZ]")
|
||||
log_debug("Max x: bounds[MAP_MAXX]")
|
||||
log_debug("Max y: bounds[MAP_MAXY]")
|
||||
log_debug("Max z: bounds[MAP_MAXZ]")
|
||||
return null
|
||||
else
|
||||
if(!measureOnly)
|
||||
for(var/t in block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
||||
var/turf/T = t
|
||||
//we do this after we load everything in. if we don't; we'll have weird atmos bugs regarding atmos adjacent turfs
|
||||
T.AfterChange(1,keep_cabling = TRUE)
|
||||
return bounds
|
||||
|
||||
/**
|
||||
* Fill a given tile with its area/turf/objects/mobs
|
||||
@@ -115,48 +196,60 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
* 4) Instanciates the atom with its variables
|
||||
*
|
||||
*/
|
||||
/dmm_suite/proc/parse_grid(model as text, xcrd as num, ycrd as num, zcrd as num, do_sleep = 1)
|
||||
/dmm_suite/proc/parse_grid(model as text,xcrd as num,ycrd as num,zcrd as num, dmm_suite/loaded_map/LM)
|
||||
/*Method parse_grid()
|
||||
- Accepts a text string containing a comma separated list of type paths of the
|
||||
same construction as those contained in a .dmm file, and instantiates them.
|
||||
*/
|
||||
|
||||
var/list/members = list()//will contain all members (paths) in model (in our example : /turf/unsimulated/wall and /area/mine/explored)
|
||||
var/list/members_attributes = list()//will contain lists filled with corresponding variables, if any (in our example : list(icon_state = "rock") and list())
|
||||
var/list/members //will contain all members (paths) in model (in our example : /turf/unsimulated/wall and /area/mine/explored)
|
||||
var/list/members_attributes //will contain lists filled with corresponding variables, if any (in our example : list(icon_state = "rock") and list())
|
||||
var/list/cached = modelCache[model]
|
||||
var/index
|
||||
|
||||
if(cached)
|
||||
members = cached[1]
|
||||
members_attributes = cached[2]
|
||||
else
|
||||
/////////////////////////////////////////////////////////
|
||||
//Constructing members and corresponding variables lists
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
//Constructing members and corresponding variables lists
|
||||
////////////////////////////////////////////////////////
|
||||
members = list()
|
||||
members_attributes = list()
|
||||
index = 1
|
||||
|
||||
var/index=1
|
||||
var/old_position = 1
|
||||
var/dpos
|
||||
var/old_position = 1
|
||||
var/dpos
|
||||
|
||||
do
|
||||
//finding next member (e.g /turf/unsimulated/wall{icon_state = "rock"} or /area/mine/explored)
|
||||
dpos= find_next_delimiter_position(model,old_position,",","{","}")//find next delimiter (comma here) that's not within {...}
|
||||
do
|
||||
//finding next member (e.g /turf/unsimulated/wall{icon_state = "rock"} or /area/mine/explored)
|
||||
dpos = find_next_delimiter_position(model, old_position, ",", "{", "}") //find next delimiter (comma here) that's not within {...}
|
||||
|
||||
var/full_def = copytext(model,old_position,dpos)//full definition, e.g : /obj/foo/bar{variables=derp}
|
||||
var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{")))//path definition, e.g /obj/foo/bar
|
||||
members.Add(atom_def)
|
||||
old_position = dpos + 1
|
||||
var/full_def = trim_text(copytext(model, old_position, dpos)) //full definition, e.g : /obj/foo/bar{variables=derp}
|
||||
var/variables_start = findtext(full_def, "{")
|
||||
var/atom_def = text2path(trim_text(copytext(full_def, 1, variables_start))) //path definition, e.g /obj/foo/bar
|
||||
old_position = dpos + 1
|
||||
|
||||
//transform the variables in text format into a list (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
|
||||
var/list/fields = list()
|
||||
if(!atom_def) // Skip the item if the path does not exist. Fix your crap, mappers!
|
||||
continue
|
||||
members.Add(atom_def)
|
||||
|
||||
var/variables_start = findtext(full_def,"{")
|
||||
if(variables_start)//if there's any variable
|
||||
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
|
||||
fields = readlist(full_def, ";")
|
||||
//transform the variables in text format into a list (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
|
||||
var/list/fields = list()
|
||||
|
||||
//then fill the members_attributes list with the corresponding variables
|
||||
members_attributes.len++
|
||||
members_attributes[index++] = fields
|
||||
if(variables_start)//if there's any variable
|
||||
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
|
||||
fields = readlist(full_def, ";")
|
||||
|
||||
if(do_sleep)
|
||||
sleep(-1)
|
||||
while(dpos != 0)
|
||||
//then fill the members_attributes list with the corresponding variables
|
||||
members_attributes.len++
|
||||
members_attributes[index++] = fields
|
||||
|
||||
CHECK_TICK
|
||||
while(dpos != 0)
|
||||
|
||||
modelCache[model] = list(members, members_attributes)
|
||||
|
||||
|
||||
////////////////
|
||||
@@ -165,24 +258,25 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
//The next part of the code assumes there's ALWAYS an /area AND a /turf on a given tile
|
||||
|
||||
//in case of multiples turfs on one tile,
|
||||
//will contains the images of all underlying turfs, to simulate the DMM multiple tiles piling
|
||||
var/list/turfs_underlays = list()
|
||||
|
||||
//first instance the /area and remove it from the members list
|
||||
index = members.len
|
||||
|
||||
var/turf/crds = locate(xcrd,ycrd,zcrd)
|
||||
if(members[index] != /area/template_noop)
|
||||
// We assume `members[index]` is an area path, as above, yes? I will operate
|
||||
// on that assumption.
|
||||
if(!ispath(members[index], /area))
|
||||
throw EXCEPTION("Oh no, I thought this was an area!")
|
||||
|
||||
var/atom/instance
|
||||
_preloader.setup(members_attributes[index])//preloader for assigning set variables on atom creation
|
||||
instance = LM.area_path_to_real_area(members[index])
|
||||
|
||||
instance = locate(members[index])
|
||||
var/turf/crds = locate(xcrd,ycrd,zcrd)
|
||||
if(crds)
|
||||
instance.contents.Add(crds)
|
||||
|
||||
if(use_preloader && instance)
|
||||
_preloader.load(instance)
|
||||
members.Remove(members[index])
|
||||
|
||||
//then instance the /turf and, if multiple tiles are presents, simulates the DMM underlays piling effect
|
||||
|
||||
@@ -198,18 +292,20 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
if(T)
|
||||
//if others /turf are presents, simulates the underlays piling effect
|
||||
index = first_turf_index + 1
|
||||
while(index <= members.len)
|
||||
turfs_underlays.Insert(1,image(T.icon,null,T.icon_state,T.layer,T.dir))//add the current turf image to the underlays list
|
||||
var/turf/UT = instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)//instance new turf
|
||||
add_underlying_turf(UT,T,turfs_underlays)//simulates the DMM piling effect
|
||||
T = UT
|
||||
while(index <= members.len - 1) // Last item is an /area
|
||||
var/underlay
|
||||
if(istype(T, /turf)) // I blame this on the stupid clown who coded the BYOND map editor
|
||||
underlay = T.appearance
|
||||
T = instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)//instance new turf
|
||||
if(ispath(members[index],/turf))
|
||||
T.underlays += underlay
|
||||
|
||||
index++
|
||||
|
||||
//finally instance all remainings objects/mobs
|
||||
for(index in 1 to first_turf_index - 1)
|
||||
for(index in 1 to first_turf_index-1)
|
||||
instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)
|
||||
if(do_sleep)
|
||||
sleep(-1)
|
||||
CHECK_TICK
|
||||
|
||||
////////////////
|
||||
//Helpers procs
|
||||
@@ -222,7 +318,13 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
var/turf/T = locate(x,y,z)
|
||||
if(T)
|
||||
instance = new path (T)//first preloader pass
|
||||
if(ispath(path, /turf))
|
||||
T.ChangeTurf(path, 1, 0)
|
||||
instance = T
|
||||
else if(ispath(path, /area))
|
||||
|
||||
else
|
||||
instance = new path (T)//first preloader pass
|
||||
|
||||
if(use_preloader && instance)//second preloader pass, for those atoms that don't ..() in New()
|
||||
_preloader.load(instance)
|
||||
@@ -232,16 +334,11 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
//text trimming (both directions) helper proc
|
||||
//optionally removes quotes before and after the text (for variable name)
|
||||
/dmm_suite/proc/trim_text(what as text,trim_quotes=0)
|
||||
while(length(what) && (findtext(what," ",1,2)))
|
||||
what=copytext(what,2,0)
|
||||
while(length(what) && (findtext(what," ",length(what),0)))
|
||||
what=copytext(what,1,length(what))
|
||||
if(trim_quotes)
|
||||
while(length(what) && (findtext(what,quote,1,2)))
|
||||
what=copytext(what,2,0)
|
||||
while(length(what) && (findtext(what,quote,length(what),0)))
|
||||
what=copytext(what,1,length(what))
|
||||
return what
|
||||
return trimQuotesRegex.Replace(what, "")
|
||||
else
|
||||
return trimRegex.Replace(what, "")
|
||||
|
||||
|
||||
//find the position of the next delimiter,skipping whatever is comprised between opening_escape and closing_escape
|
||||
//returns 0 if reached the last delimiter
|
||||
@@ -313,14 +410,6 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
return to_return
|
||||
|
||||
//simulates the DM multiple turfs on one tile underlaying
|
||||
/dmm_suite/proc/add_underlying_turf(turf/placed,turf/underturf, list/turfs_underlays)
|
||||
if(underturf.density)
|
||||
placed.density = 1
|
||||
if(underturf.opacity)
|
||||
placed.opacity = 1
|
||||
placed.underlays += turfs_underlays
|
||||
|
||||
//atom creation method that preloads variables at creation
|
||||
/atom/New()
|
||||
if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
@@ -336,6 +425,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
//Preloader datum
|
||||
//////////////////
|
||||
|
||||
// This ain't re-entrant, but we had this before the maploader update
|
||||
/dmm_suite/preloader
|
||||
parent_type = /datum
|
||||
var/list/attributes
|
||||
@@ -349,11 +439,41 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
/dmm_suite/preloader/proc/load(atom/what)
|
||||
for(var/attribute in attributes)
|
||||
what.vars[attribute] = attributes[attribute]
|
||||
var/value = attributes[attribute]
|
||||
if(islist(value))
|
||||
value = deepCopyList(value)
|
||||
what.vars[attribute] = value
|
||||
use_preloader = FALSE
|
||||
|
||||
// If the map loader fails, make this safe
|
||||
/dmm_suite/preloader/proc/reset()
|
||||
use_preloader = FALSE
|
||||
attributes = list()
|
||||
target_path = null
|
||||
|
||||
// A datum for use within the context of loading a single map,
|
||||
// so that one can have separate "unpowered" areas for ruins or whatever,
|
||||
// yet have a single area type for use of mapping, instead of creating
|
||||
// a new area type for each new ruin
|
||||
/dmm_suite/loaded_map
|
||||
parent_type = /datum
|
||||
var/list/area_list = list()
|
||||
var/index = 1 // To store the state of the regex
|
||||
|
||||
/dmm_suite/loaded_map/proc/area_path_to_real_area(area/A)
|
||||
if(!ispath(A, /area))
|
||||
throw EXCEPTION("Wrong argument to `area_path_to_real_area`")
|
||||
|
||||
if(!(A in area_list))
|
||||
if(initial(A.there_can_be_many))
|
||||
area_list[A] = new A
|
||||
else
|
||||
area_list[A] = locate(A)
|
||||
|
||||
return area_list[A]
|
||||
|
||||
/area/template_noop
|
||||
name = "Area Passthrough"
|
||||
|
||||
/turf/template_noop
|
||||
name = "Turf Passthrough"
|
||||
name = "Turf Passthrough"
|
||||
|
||||
@@ -326,7 +326,7 @@ swapmap
|
||||
x2+=x1-1
|
||||
y2+=y1-1
|
||||
z2+=z1-1
|
||||
world.maxz=max(z2,world.maxz) // stretch z if necessary
|
||||
space_manager.increase_max_zlevel_to(z2) // stretch z if necessary
|
||||
if(!ischunk)
|
||||
swapmaps_loaded[src]=null
|
||||
swapmaps_byname[id]=src
|
||||
@@ -373,7 +373,7 @@ swapmap
|
||||
mz=max(mz,M.z2)
|
||||
world.maxx=mx
|
||||
world.maxy=my
|
||||
world.maxz=mz
|
||||
space_manager.cut_levels_downto(mz)
|
||||
|
||||
// save and delete
|
||||
proc/Unload()
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
#define PAY_INTERVAL 6000 // amount of ticks between payment
|
||||
|
||||
/area/awaymission/spacehotel
|
||||
name = "Deep Space Hotel 419"
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/spacehotel/kitchen
|
||||
name = "Hotel Kitchen"
|
||||
icon_state = "kitchen"
|
||||
|
||||
/area/awaymission/spacehotel/reception
|
||||
name = "Hotel Reception"
|
||||
icon_state = "entry"
|
||||
|
||||
// "Directional" map template loader for N or S hotel room
|
||||
/obj/effect/landmark/map_loader/hotel_room
|
||||
icon = 'icons/testing/turf_analysis.dmi'
|
||||
icon_state = "arrow"
|
||||
|
||||
/obj/item/weapon/paper/crumpled/hotel_scrap_1
|
||||
name = "paper scrap"
|
||||
info = "I can't believe this shitty hotel assigned me a purple-themed room. <i>Why does the shower dump grape drink everywhere??</i>"
|
||||
|
||||
/obj/item/weapon/paper/hotel_scrap_2
|
||||
name = "Journal Entry #2"
|
||||
info = "<h3>Day 7:</h3>Today, I stepped into my bathroom, only to discover that it had become a mountainside wilderness. I tried to wash my hands with snow, but it didn't particularly pan out.<br>I contacting the front desk regarding the issue, but the receptionist just stared at me with dead eyes and spouted unrepeatable curses at me. However, I convinced them to reassign me to an upgraded suite."
|
||||
|
||||
/obj/item/weapon/paper/hotel_scrap_3
|
||||
name = "Journal Entry #3"
|
||||
info = "<h3>Day 26:</h3>Well, that sucked royally. The queen-sized bed was nice, but the hottub in my room was, well, my wife described it as \"a portal to hell\". I don't know, I guess the lava and weird blood gave it that impression, but it was pretty nicely warm.<br>However, <i>\"we\"</i> decided to get assigned to a new room. Whatever."
|
||||
|
||||
/obj/item/weapon/paper/hotel_scrap_4
|
||||
name = "Diary Page"
|
||||
info = "<b>Day 7 of Bad Vacation</b><br>Thanks Qzxor this shit vacation is ending today. The novelty of the trashy pool wore off 2 days in and I'm not allowed in the bar. The tiny box they called a room that, we had to cram into, just had a poster and a couple of beds. Only one bedsheet to spare. Shower had brown water and sink just dumped its water back out the ceiling, somehow.<br><br>PS: The receptionist isn't paying attention to us when we try to check out. Apparently, we're staying another day."
|
||||
|
||||
/obj/item/weapon/paper/hotel_scrap_5
|
||||
name = "Journal Entry #5"
|
||||
info = "<h3>Day 185:</h3>I feel like the restaurant's chef is just making random dishes to mess with me. I request something from the menu, and he throws out something nobody asked for on the counter. The bartender isn't much better. At least both of them can make some nice food and drinks. I would complain to the management... but they never seem to care."
|
||||
|
||||
/obj/item/weapon/paper/crumpled/hotel_scrap_6
|
||||
name = "Journal Entry #6"
|
||||
info = "<h3>Day 386:</h3><span style='font-family: wingdings; color: red'>AMBGAT MEZLBNU</span>. Something wrong. Can't stop hugging plushies."
|
||||
|
||||
/obj/item/weapon/paper/crumpled/hotel_scrap_7
|
||||
name = "Journal Entry #8"
|
||||
info = "<span style='font-family: wingdings; color: red'>ASGATDHU NAMSPA KER OKS O OKDOFLI OSDSFKO OASKDAFO AOSDKF OINAIS ISJDDEF OSKFEREAODIK OSI ODIFOSA OEKRRO ASODFKAO PSSDOF SDFK OSDKF OSDKFSASPODFIOSASD UHGU DFYG FPO ASDFOS DFOASSD FAPSO FSPDFOIER OPWASDSA PS DODIOF OSDI</span> pizza <span style='font-family: wingdings; color: red'>OKSDFO AL OKEWORK CVBUASO SDFO AOE RAOWEIK SODDFI</span>"
|
||||
|
||||
/obj/item/weapon/paper/hotel_scrap_8
|
||||
name = "Mysterious Note"
|
||||
icon_state = "paper_talisman"
|
||||
info = "<div style='text-align: center; color: red; font: 24pt comic sans ms'>There is only one way to leave.</div>"
|
||||
|
||||
/obj/item/weapon/paper/pamphlet/hotel
|
||||
name = "space hotel pamphlet"
|
||||
info = "<h3>Welcome to Deep Space Hotel 419!</h3>Thank you for choosing our hotel. Simply hand your credit or debit card to the concierge and get your room key! To check out, hand your credit card back.<small><h4>Conditions:</h4><ul><li>The hotel is not responsible for any losses due to time or space anomalies.<li>The hotel is not responsible for events that occur outside of the hotel station, including, but not limited to, events that occur inside of dimensional pockets.<li>The hotel is not responsible for overcharging your account.<li>The hotel is not responsible for missing persons.<li>The hotel is not responsible for mind-altering effects due to drugs, magic, demons, or space worms.</ul></small>"
|
||||
|
||||
/obj/effect/landmark/map_loader/hotel_room/initialize()
|
||||
..()
|
||||
// load and randomly assign rooms
|
||||
var/global/list/south_room_templates = list()
|
||||
var/global/list/north_room_templates = list()
|
||||
var/static/path = "_maps/map_files/templates/spacehotel/"
|
||||
var/global/loaded = 0
|
||||
if(!loaded)
|
||||
loaded = 1
|
||||
for(var/map in flist(path))
|
||||
if(cmptext(copytext(map, length(map) - 3), ".dmm"))
|
||||
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
|
||||
if(copytext(map, 1, 3) == "n_")
|
||||
north_room_templates += T
|
||||
else if(copytext(map, 1, 3) == "s_")
|
||||
south_room_templates += T
|
||||
else
|
||||
// omnidirectional rooms are randomly assigned
|
||||
if(prob(50))
|
||||
north_room_templates += T
|
||||
else
|
||||
south_room_templates += T
|
||||
|
||||
var/datum/map_template/M = safepick(dir == NORTH ? north_room_templates : south_room_templates)
|
||||
if(M)
|
||||
template = M
|
||||
if(dir == NORTH)
|
||||
north_room_templates -= M
|
||||
else
|
||||
south_room_templates -= M
|
||||
load(M)
|
||||
|
||||
// The door to a hotel room, but also metadata for the room itself
|
||||
/obj/machinery/door/unpowered/hotel_door
|
||||
name = "Room Door"
|
||||
icon = 'icons/obj/doors/Doorsand.dmi'
|
||||
icon_state = "door_closed"
|
||||
autoclose = 1
|
||||
atom_say_verb = "beeps"
|
||||
var/doorOpen = 'sound/machines/airlock.ogg'
|
||||
var/doorClose = 'sound/machines/airlock.ogg'
|
||||
var/doorDeni = 'sound/machines/DeniedBeep.ogg'
|
||||
var/id // the room number, eg 101
|
||||
var/obj/item/weapon/card/hotel_card/card// room's key card
|
||||
var/mob/living/occupant = null // the current room occupant
|
||||
var/datum/money_account/account // Account we're pulling from
|
||||
var/roomtimer // timer PS handle for updating room
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/New()
|
||||
..()
|
||||
if(id)
|
||||
name = "Room [id]"
|
||||
|
||||
// in case we spawned after hotel
|
||||
var/obj/effect/hotel_controller/H
|
||||
H = H.controller
|
||||
if(H)
|
||||
H.add_room(src)
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/Destroy()
|
||||
if(roomtimer)
|
||||
deltimer(roomtimer)
|
||||
roomtimer = null
|
||||
qdel(card)
|
||||
card = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "This room is currently [occupant ? "" : "un"]occupied.")
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/allowed(mob/living/carbon/user)
|
||||
for(var/obj/item/weapon/card/hotel_card/C in user.get_all_slots())
|
||||
if(C == card && occupant)
|
||||
atom_say("Welcome, [occupant.real_name]!")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/update_icon()
|
||||
overlays.Cut()
|
||||
if(density)
|
||||
icon_state = "door_closed"
|
||||
else
|
||||
icon_state = "door_open"
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
playsound(loc, doorOpen, 30, 1)
|
||||
flick("door_opening", src)
|
||||
if("closing")
|
||||
playsound(loc, doorClose, 30, 1)
|
||||
flick("door_closing", src)
|
||||
if("deny")
|
||||
playsound(src.loc, doorDeni, 50, 0, 3)
|
||||
flick("door_deny", src)
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/autoclose()
|
||||
if(!density && !operating && autoclose)
|
||||
close()
|
||||
|
||||
/obj/machinery/door/unpowered/hotel_door/emag_act(mob/user)
|
||||
if(isliving(user) && density)
|
||||
var/obj/effect/hotel_controller/H
|
||||
if(H.controller)
|
||||
H.controller.deploy_sec(user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/hotel_card
|
||||
name = "Key Card"
|
||||
icon_state = "guest"
|
||||
color = "#0CF"
|
||||
var/id
|
||||
|
||||
/obj/item/weapon/card/hotel_card/New(loc, ID)
|
||||
..()
|
||||
if(ID)
|
||||
id = ID
|
||||
if(id)
|
||||
name = "Key Card - [id]"
|
||||
desc = "A key card to room [id]. Use it to open the door."
|
||||
|
||||
/obj/item/weapon/card/hotel_card/Destroy()
|
||||
var/mob/user = get(loc, /mob)
|
||||
if(user)
|
||||
to_chat(user, "\The [src] suddenly disappears in a flash!")
|
||||
return ..()
|
||||
|
||||
/obj/effect/hotel_controller
|
||||
var/global/obj/effect/hotel_controller/controller
|
||||
|
||||
name = "Deep Space Hotel 419"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
invisibility = 101
|
||||
anchored = 1
|
||||
density = 0
|
||||
opacity = 0
|
||||
var/list/room_doors[0] // assoc list of [room id]=hotel_door
|
||||
var/list/vacant_rooms[0] // list of vacant room doors
|
||||
var/list/guests[0] // assoc list of [guest mob]=room id
|
||||
|
||||
var/obj/item/device/radio/radio // for shouting at deadbeats
|
||||
|
||||
/obj/effect/hotel_controller/New()
|
||||
..()
|
||||
if(controller)
|
||||
qdel(src)
|
||||
controller = src
|
||||
|
||||
radio = new()
|
||||
radio.broadcasting = 0
|
||||
radio.listening = 0
|
||||
|
||||
// get room doors
|
||||
for(var/obj/machinery/door/unpowered/hotel_door/D in get_area(src))
|
||||
add_room(D)
|
||||
|
||||
/obj/effect/hotel_controller/proc/add_room(obj/machinery/door/unpowered/hotel_door/D)
|
||||
room_doors["[D.id]"] = D
|
||||
vacant_rooms += D
|
||||
|
||||
/obj/effect/hotel_controller/Destroy()
|
||||
room_doors.Cut()
|
||||
vacant_rooms.Cut()
|
||||
guests.Cut()
|
||||
|
||||
if(radio)
|
||||
qdel(radio)
|
||||
radio = null
|
||||
|
||||
return ..()
|
||||
|
||||
// to check a person into a room; no financial stuff; returns the keycard
|
||||
/obj/effect/hotel_controller/proc/checkin(roomid, mob/living/carbon/occupant, obj/item/weapon/card/id/id)
|
||||
if(!istype(occupant))
|
||||
return null
|
||||
var/obj/machinery/door/unpowered/hotel_door/D = room_doors["[roomid]"]
|
||||
if(!D || D.occupant || (occupant in guests))
|
||||
return null
|
||||
|
||||
D.account = get_card_account(id, occupant)
|
||||
if(!D.account)
|
||||
return null
|
||||
if(!D.account.charge(100, transaction_purpose = "10 minutes", dest_name = name))
|
||||
return null
|
||||
|
||||
D.occupant = occupant
|
||||
D.roomtimer = addtimer(src, "process_room", PAY_INTERVAL, 0, roomid)
|
||||
vacant_rooms -= D
|
||||
guests[occupant] = roomid
|
||||
|
||||
var/obj/item/weapon/card/hotel_card/C = new(ID = roomid)
|
||||
D.card = C
|
||||
return C
|
||||
|
||||
/obj/effect/hotel_controller/proc/process_room(roomid)
|
||||
var/obj/machinery/door/unpowered/hotel_door/D = room_doors["[roomid]"]
|
||||
if(!D || !D.occupant)
|
||||
return
|
||||
|
||||
if(D.account.charge(100, transaction_purpose = "10 minutes", dest_name = name))
|
||||
D.roomtimer = addtimer(src, "process_room", PAY_INTERVAL, 0, roomid)
|
||||
else
|
||||
force_checkout(roomid)
|
||||
|
||||
// Checks a person out of a room; no financial stuff
|
||||
/obj/effect/hotel_controller/proc/checkout(roomid)
|
||||
var/obj/machinery/door/unpowered/hotel_door/D = room_doors["[roomid]"]
|
||||
if(!D || !D.occupant)
|
||||
return 0
|
||||
|
||||
guests -= D.occupant
|
||||
D.occupant = null
|
||||
D.account = null
|
||||
deltimer(D.roomtimer)
|
||||
D.roomtimer = null
|
||||
qdel(D.card)
|
||||
vacant_rooms += D
|
||||
return 1
|
||||
|
||||
// The person's card bounced mid-stay
|
||||
/obj/effect/hotel_controller/proc/force_checkout(roomid)
|
||||
var/obj/machinery/door/unpowered/hotel_door/D = room_doors["[roomid]"]
|
||||
if(!D || !D.occupant)
|
||||
return 0
|
||||
|
||||
var/mob/deadbeat = D.occupant
|
||||
|
||||
radio.autosay("[deadbeat], your card has been rejected. You have 30 seconds to check out.", name, zlevel = list(z))
|
||||
spawn(300)
|
||||
if(D.occupant == deadbeat)
|
||||
// they still haven't checked out...
|
||||
deploy_sec(deadbeat)
|
||||
checkout(roomid)
|
||||
|
||||
/obj/effect/hotel_controller/proc/deploy_sec(mob/living/target)
|
||||
if(!istype(target) || !istype(get_area(target), /area/awaymission/spacehotel))
|
||||
return
|
||||
|
||||
var/list/secs[0]
|
||||
for(var/mob/living/carbon/human/interactive/away/hotel/guard/M in get_area(src))
|
||||
if(!M.retal)
|
||||
secs += M
|
||||
var/mob/living/carbon/human/interactive/away/hotel/guard/S = safepick(secs)
|
||||
if(!S)
|
||||
return
|
||||
|
||||
S.retal_target = target
|
||||
S.retal = 1
|
||||
|
||||
#undef CHECKOUT_TIME
|
||||
@@ -0,0 +1,118 @@
|
||||
/mob/living/carbon/human/interactive/away/hotel
|
||||
away_area = /area/awaymission/spacehotel
|
||||
override_under = /obj/item/clothing/under/mafia
|
||||
chattyness = SNPC_CHANCE_TALK / 4
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/New(loc)
|
||||
..(loc, "Skrell")
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/doSetup()
|
||||
..()
|
||||
MYID.access += access_syndicate
|
||||
RPID.access += access_syndicate
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/guard
|
||||
default_job = /datum/job/officer
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/guard/doSetup()
|
||||
..("Guard")
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/chef
|
||||
default_job = /datum/job/chef
|
||||
away_area = /area/awaymission/spacehotel/kitchen
|
||||
override_under = /obj/item/clothing/under/mafia/vest
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/bartender
|
||||
default_job = /datum/job/bartender
|
||||
override_under = /obj/item/clothing/under/mafia/vest
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/concierge
|
||||
override_under = /obj/item/clothing/under/mafia/white
|
||||
away_area = /area/awaymission/spacehotel/reception
|
||||
var/list/known_guests[0]
|
||||
var/obj/effect/hotel_controller/hotel
|
||||
var/obj/item/weapon/card/id/last_seen_id = null
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/concierge/random()
|
||||
..()
|
||||
equip_or_collect(new /obj/item/weapon/clipboard(src), slot_l_hand)
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/concierge/doSetup()
|
||||
..("Concierge")
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/concierge/setup_job()
|
||||
favoured_types = list(/obj/item/weapon/paper, /obj/item/weapon/clipboard)
|
||||
functions += list("stamping", "concierge")
|
||||
restrictedJob = 1
|
||||
|
||||
/mob/living/carbon/human/interactive/away/hotel/concierge/proc/concierge()
|
||||
if(!hotel)
|
||||
hotel = hotel.controller
|
||||
if(!hotel)
|
||||
return
|
||||
|
||||
var/verbs_use = pick_list(speak_file, "verbs_use")
|
||||
var/verbs_touch = pick_list(speak_file, "verbs_touch")
|
||||
var/verbs_move = pick_list(speak_file, "verbs_move")
|
||||
var/nouns_generic = pick_list(speak_file, "nouns_generic")
|
||||
var/adjective_insult = pick_list(speak_file, "adjective_insult")
|
||||
var/adjective_objects = pick_list(speak_file, "adjective_objects")
|
||||
var/adjective_generic = pick_list(speak_file, "adjective_generic")
|
||||
var/curse_words = pick_list(speak_file, "curse_words")
|
||||
|
||||
var/found = 0
|
||||
for(var/mob/living/carbon/human/H in nearby - known_guests)
|
||||
pointed(H)
|
||||
known_guests += H
|
||||
found = 1
|
||||
if(found)
|
||||
say("Welcome to [hotel], [nouns_generic]! Please check in by [ing_verb(verbs_move)] and [ing_verb(verbs_use)] your [adjective_objects] ID onto the table.")
|
||||
return
|
||||
|
||||
var/obj/item/weapon/card/id
|
||||
var/id_seen = 0
|
||||
for(var/obj/item/weapon/card/id/I in get_area(src))
|
||||
id_seen = 1
|
||||
if(I != last_seen_id)
|
||||
id = I
|
||||
if(!id_seen)
|
||||
last_seen_id = null
|
||||
return
|
||||
if(!id)
|
||||
return
|
||||
var/turf/idloc = get_turf(id)
|
||||
if(!Adjacent(idloc))
|
||||
tryWalk(idloc)
|
||||
else
|
||||
// is the last jerk that touched it over here?
|
||||
var/mob/id_owner
|
||||
for(var/mob/living/carbon/human/H in nearby)
|
||||
if(H.ckey == id.fingerprintslast)
|
||||
id_owner = H
|
||||
break
|
||||
|
||||
if(!id_owner)
|
||||
say("Whose card is this?")
|
||||
pointed(id)
|
||||
return
|
||||
|
||||
last_seen_id = id
|
||||
// Checking in or out?
|
||||
if(id_owner in hotel.guests)
|
||||
// Check out
|
||||
say ("Hope you enjoyed your [adjective_objects] stay at our [adjective_generic] hotel!")
|
||||
hotel.checkout(hotel.guests[id_owner])
|
||||
else
|
||||
// pick a room
|
||||
var/obj/machinery/door/unpowered/hotel_door/D = safepick(hotel.vacant_rooms)
|
||||
if(!D)
|
||||
say("Sorry, all the [adjective_objects] are occupied currently.")
|
||||
else
|
||||
// Check in
|
||||
say("$100 per 10 minutes. The cost will be automatically [past_verb(verbs_touch)] while you're checked in.")
|
||||
|
||||
var/obj/item/weapon/card/hotel_card/K = hotel.checkin(D.id, id_owner, id)
|
||||
if(K)
|
||||
K.forceMove(idloc)
|
||||
else
|
||||
say("Your [adjective_insult] [curse_words] card was rejected.")
|
||||
@@ -61,10 +61,8 @@
|
||||
*/
|
||||
//Captain's retro laser - Fires practice laser shots instead.
|
||||
obj/item/weapon/gun/energy/laser/retro/sc_retro
|
||||
name ="retro laser"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces."
|
||||
// projectile_type = "/obj/item/projectile/practice"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||
clumsy_check = 0 //No sense in having a harmless gun blow up in the clowns face
|
||||
|
||||
//Syndicate sub-machine guns.
|
||||
@@ -177,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/))
|
||||
@@ -196,4 +194,4 @@ var/sc_safecode5 = "[rand(0,9)]"
|
||||
return
|
||||
|
||||
/obj/singularity/narsie/sc_Narsie/ex_act()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
for(var/mob/O in viewers(world.view, src.loc))
|
||||
to_chat(O, "<font color='red'>[M] triggered the \icon[src] [src]</font>")
|
||||
to_chat(O, "<font color='red'>[M] triggered the [bicon(src)] [src]</font>")
|
||||
triggered = 1
|
||||
call(src,triggerproc)(M)
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/mob/living/carbon/human/interactive/away
|
||||
var/away_area = /area/awaymission // their overriden job area
|
||||
var/override_under = null // optional type for uniform, else default for job
|
||||
var/squad_member = 0 // was spawned by squad
|
||||
var/home_z
|
||||
|
||||
/mob/living/carbon/human/interactive/away/New()
|
||||
..()
|
||||
TRAITS |= TRAIT_ROBUST
|
||||
faction += "away"
|
||||
|
||||
/mob/living/carbon/human/interactive/away/random()
|
||||
if(ispath(override_under, /obj/item/clothing/under))
|
||||
equip_to_slot(new override_under(src), slot_w_uniform)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/interactive/away/doSetup()
|
||||
..()
|
||||
var/datum/data/pda/app/messenger/M = MYPDA.find_program(/datum/data/pda/app/messenger)
|
||||
M.toff = 1
|
||||
var/datum/data/pda/app/chatroom/C = MYPDA.find_program(/datum/data/pda/app/chatroom)
|
||||
C.toff = 1
|
||||
|
||||
/mob/living/carbon/human/interactive/away/job2area()
|
||||
return away_area
|
||||
|
||||
/mob/living/carbon/human/interactive/away/doProcess()
|
||||
if(!home_z)
|
||||
home_z = get_turf(z)
|
||||
if(home_z != get_turf(z))
|
||||
gib()
|
||||
..()
|
||||
|
||||
/obj/effect/spawner/snpc_squad
|
||||
name = "squad spawner"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
density = 0
|
||||
opacity = 0
|
||||
invisibility = 101
|
||||
var/squad_type = /mob/living/carbon/human/interactive/away
|
||||
var/squad_size = 3
|
||||
|
||||
var/global/list/squads[0]
|
||||
var/list/squad
|
||||
|
||||
/obj/effect/spawner/snpc_squad/New()
|
||||
processing_objects += src
|
||||
|
||||
squad = squads[squad_type]
|
||||
if(!squad)
|
||||
squad = list()
|
||||
squads[squad_type] = squad
|
||||
squad += src
|
||||
|
||||
/obj/effect/spawner/snpc_squad/Destroy()
|
||||
squad = null
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/spawner/snpc_squad/process()
|
||||
// check squad memebers
|
||||
var/living = 0
|
||||
for(var/mob/living/carbon/human/interactive/away/A in squad)
|
||||
if(!A.stat)
|
||||
living++
|
||||
else
|
||||
// see if anyone's looking, if not, despawn
|
||||
var/can_despawn = 1
|
||||
for(var/mob/living/M in viewers(A, world.view + 1))
|
||||
if(M.client)
|
||||
living++ // dead guy that can be seen still takes up a slot
|
||||
can_despawn = 0
|
||||
break
|
||||
if(can_despawn)
|
||||
squad -= A
|
||||
qdel(A)
|
||||
|
||||
// spawn new ones
|
||||
if(living < squad_size && !length(viewers(src, world.view)))
|
||||
var/mob/living/carbon/human/interactive/away/A = new squad_type(loc)
|
||||
squad += A
|
||||
A.squad_member = 1
|
||||
@@ -1,14 +1,27 @@
|
||||
var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away_mission_config.txt")
|
||||
|
||||
// Call this before you remove the last dirt on a z level - that way, all objects
|
||||
// will have proper atmos and other important enviro things
|
||||
/proc/late_setup_level(turfs, smoothTurfs)
|
||||
var/total_timer = start_watch()
|
||||
var/subtimer = start_watch()
|
||||
if(!smoothTurfs)
|
||||
smoothTurfs = turfs
|
||||
|
||||
log_debug("Setting up atmos")
|
||||
if(air_master)
|
||||
air_master.setup_allturfs(turfs)
|
||||
log_debug("\tTook [stop_watch(subtimer)]s")
|
||||
|
||||
subtimer = start_watch()
|
||||
log_debug("Initializing lighting")
|
||||
for(var/turf/T in turfs)
|
||||
if(T.dynamic_lighting)
|
||||
T.lighting_build_overlays()
|
||||
for(var/obj/structure/cable/PC in T)
|
||||
makepowernet_for(PC)
|
||||
log_debug("\tTook [stop_watch(subtimer)]s")
|
||||
|
||||
subtimer = start_watch()
|
||||
log_debug("Smoothing tiles")
|
||||
for(var/turf/T in smoothTurfs)
|
||||
if(T.smooth)
|
||||
smooth_icon(T)
|
||||
@@ -16,59 +29,45 @@
|
||||
var/atom/A = R
|
||||
if(A.smooth)
|
||||
smooth_icon(A)
|
||||
if(istype(T, /turf/simulated/mineral)) // For the listening post, among other maps
|
||||
var/turf/simulated/mineral/MT = T
|
||||
MT.add_edges()
|
||||
log_debug("\tTook [stop_watch(subtimer)]s")
|
||||
log_debug("Late setup finished - took [stop_watch(total_timer)]s")
|
||||
|
||||
/proc/empty_rect(low_x,low_y, hi_x,hi_y, z)
|
||||
var/timer = start_watch()
|
||||
log_debug("Emptying region: ([low_x], [low_y]) to ([hi_x], [hi_y]) on z '[z]'")
|
||||
empty_region(block(locate(low_x, low_y, z), locate(hi_x, hi_y, z)))
|
||||
log_debug("Took [stop_watch(timer)]s")
|
||||
|
||||
/proc/empty_region(list/turfs)
|
||||
for(var/thing in turfs)
|
||||
var/turf/T = thing
|
||||
for(var/otherthing in T)
|
||||
qdel(otherthing)
|
||||
T.ChangeTurf(/turf/space)
|
||||
|
||||
/proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
log_startup_progress("Searching for away missions...")
|
||||
var/list/Lines
|
||||
if(fexists("config/away_mission_config.txt"))
|
||||
Lines = file2list("config/away_mission_config.txt")
|
||||
else
|
||||
Lines = file2list("config/example/away_mission_config.txt")
|
||||
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
// var/value = null
|
||||
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
// value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
potentialRandomZlevels.Add(t)
|
||||
|
||||
|
||||
if(potentialRandomZlevels.len)
|
||||
if(potentialRandomZlevels && potentialRandomZlevels.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Loading away mission...")
|
||||
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file, do_sleep = 0)
|
||||
late_setup_level(block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz)))
|
||||
var/zlev = space_manager.add_new_zlevel(AWAY_MISSION, linkage = UNAFFECTED)
|
||||
space_manager.add_dirt(zlev)
|
||||
maploader.load_map(file, z_offset = zlev)
|
||||
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
|
||||
space_manager.remove_dirt(zlev)
|
||||
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)
|
||||
|
||||
@@ -76,4 +75,137 @@
|
||||
|
||||
else
|
||||
log_startup_progress(" No away missions found.")
|
||||
return
|
||||
return
|
||||
|
||||
/proc/createALLZlevels()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
if(potentialRandomZlevels && potentialRandomZlevels.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Loading away missions...")
|
||||
|
||||
for(var/map in potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
log_startup_progress("Loading away mission: [map]")
|
||||
var/zlev = space_manager.add_new_zlevel()
|
||||
space_manager.add_dirt(zlev)
|
||||
maploader.load_map(file, z_offset = zlev)
|
||||
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
|
||||
space_manager.remove_dirt(zlev)
|
||||
log_to_dd(" Away mission loaded: [map]")
|
||||
|
||||
//map_transition_config.Add(AWAY_MISSION_LIST)
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
log_startup_progress(" Away mission loaded in [stop_watch(watch)]s.")
|
||||
watch = start_watch()
|
||||
|
||||
else
|
||||
log_startup_progress(" No away missions found.")
|
||||
return
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
var/list/potentialMaps = list()
|
||||
var/list/Lines = file2list(filename)
|
||||
|
||||
if(!Lines.len)
|
||||
return
|
||||
for(var/t in Lines)
|
||||
if(!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if(length(t) == 0)
|
||||
continue
|
||||
else if(copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
|
||||
if(pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if(!name)
|
||||
continue
|
||||
|
||||
potentialMaps.Add(t)
|
||||
|
||||
return potentialMaps
|
||||
|
||||
|
||||
/proc/seedRuins(z_level = 1, budget = 0, whitelist = /area/space, list/potentialRuins = space_ruins_templates)
|
||||
var/overall_sanity = 100
|
||||
var/ruins = potentialRuins.Copy()
|
||||
var/initialbudget = budget
|
||||
var/watch = start_watch()
|
||||
|
||||
while(budget > 0 && overall_sanity > 0)
|
||||
// Pick a ruin
|
||||
var/datum/map_template/ruin/ruin = ruins[pick(ruins)]
|
||||
// Can we afford it
|
||||
if(ruin.cost > budget)
|
||||
overall_sanity--
|
||||
continue
|
||||
// If so, try to place it
|
||||
var/sanity = 100
|
||||
// And if we can't fit it anywhere, give up, try again
|
||||
|
||||
while(sanity > 0)
|
||||
sanity--
|
||||
var/turf/T = locate(rand(25, world.maxx - 25), rand(25, world.maxy - 25), z_level)
|
||||
var/valid = 1
|
||||
|
||||
for(var/turf/check in ruin.get_affected_turfs(T,1))
|
||||
var/area/new_area = get_area(check)
|
||||
if(!(istype(new_area, whitelist)))
|
||||
valid = 0
|
||||
break
|
||||
|
||||
if(!valid)
|
||||
continue
|
||||
|
||||
log_to_dd(" Ruin \"[ruin.name]\" loaded in [stop_watch(watch)]s at ([T.x], [T.y], [T.z]).")
|
||||
|
||||
var/obj/effect/ruin_loader/R = new /obj/effect/ruin_loader(T)
|
||||
R.Load(ruins,ruin)
|
||||
budget -= ruin.cost
|
||||
if(!ruin.allow_duplicates)
|
||||
ruins -= ruin.name
|
||||
break
|
||||
|
||||
|
||||
if(initialbudget == budget) //Kill me
|
||||
log_to_dd(" No ruins loaded.")
|
||||
|
||||
|
||||
/obj/effect/ruin_loader
|
||||
name = "random ruin"
|
||||
desc = "If you got lucky enough to see this..."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "syndballoon"
|
||||
invisibility = 0
|
||||
|
||||
/obj/effect/ruin_loader/proc/Load(list/potentialRuins = space_ruins_templates, datum/map_template/template = null)
|
||||
var/list/possible_ruins = list()
|
||||
for(var/A in potentialRuins)
|
||||
var/datum/map_template/T = potentialRuins[A]
|
||||
if(!T.loaded)
|
||||
possible_ruins += T
|
||||
if(!template && possible_ruins.len)
|
||||
template = safepick(possible_ruins)
|
||||
if(!template)
|
||||
return 0
|
||||
template.load(get_turf(src),centered = 1)
|
||||
template.loaded++
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,369 @@
|
||||
/area/awaymission/upperlevel
|
||||
name = "Open Space"
|
||||
color = "#888"
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
|
||||
// Used by /turf/unsimulated/floor/upperlevel as a reference for where the other floor is
|
||||
/obj/effect/levelref
|
||||
name = "level reference"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
invisibility = 101
|
||||
|
||||
var/id = null
|
||||
var/obj/effect/levelref/other = null
|
||||
var/offset_x
|
||||
var/offset_y
|
||||
var/offset_z
|
||||
var/global/list/levels[0]
|
||||
|
||||
/obj/effect/levelref/New()
|
||||
..()
|
||||
levels += src
|
||||
|
||||
/obj/effect/levelref/initialize()
|
||||
..()
|
||||
for(var/obj/effect/levelref/O in levels)
|
||||
if(id == O.id && O != src)
|
||||
other = O
|
||||
update_offset()
|
||||
O.other = src
|
||||
O.update_offset()
|
||||
for(var/turf/unsimulated/floor/upperlevel/U in get_area(loc))
|
||||
U.init(src)
|
||||
return
|
||||
|
||||
/obj/effect/levelref/Destroy()
|
||||
levels -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/levelref/proc/update_offset()
|
||||
offset_x = other.x - x
|
||||
offset_y = other.y - y
|
||||
offset_z = other.z - z
|
||||
|
||||
// Used by /turf/unsimulated/floor/upperlevel and /obj/effect/view_portal/visual
|
||||
// to know if the world changed on the remote side
|
||||
/obj/effect/portal_sensor
|
||||
invisibility = 101
|
||||
var/light_hash = -1
|
||||
var/triggered_this_tick = 0
|
||||
var/datum/owner // owner that receive signals
|
||||
var/list/params[0] // what to send to the main object to indicate which sensor
|
||||
var/trigger_limit = 5 // number of time we're allowed to trigger per ptick
|
||||
|
||||
/obj/effect/portal_sensor/New(loc, o, ...)
|
||||
..()
|
||||
owner = o
|
||||
if(args.len >= 3)
|
||||
params = args.Copy(3)
|
||||
processing_objects += src
|
||||
trigger()
|
||||
|
||||
/obj/effect/portal_sensor/Destroy()
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal_sensor/Crossed(A)
|
||||
trigger()
|
||||
|
||||
/obj/effect/portal_sensor/Uncrossed(A)
|
||||
trigger()
|
||||
|
||||
/obj/effect/portal_sensor/process()
|
||||
check_light()
|
||||
if(triggered_this_tick >= trigger_limit)
|
||||
call(owner, "trigger")(arglist(params))
|
||||
triggered_this_tick = 0
|
||||
|
||||
/obj/effect/portal_sensor/proc/trigger()
|
||||
triggered_this_tick++
|
||||
if(triggered_this_tick < trigger_limit)
|
||||
call(owner, "trigger")(arglist(params))
|
||||
|
||||
/obj/effect/portal_sensor/proc/check_light()
|
||||
var/turf/T = loc
|
||||
if(istype(T) && T.lighting_overlay && !T.lighting_overlay.needs_update)
|
||||
var/atom/movable/lighting_overlay/O = T.lighting_overlay
|
||||
var/hash = O.lum_r + O.lum_g + O.lum_b
|
||||
if(hash != light_hash)
|
||||
light_hash = hash
|
||||
trigger()
|
||||
else
|
||||
if(light_hash != -1)
|
||||
light_hash = -1
|
||||
trigger()
|
||||
|
||||
// for second floor showing floor below
|
||||
/turf/unsimulated/floor/upperlevel
|
||||
icon = 'icons/turf/areas.dmi'
|
||||
icon_state = "dark128"
|
||||
layer = AREA_LAYER + 0.5
|
||||
appearance_flags = TILE_BOUND | KEEP_TOGETHER
|
||||
var/turf/lower_turf
|
||||
var/obj/effect/portal_sensor/sensor
|
||||
|
||||
/turf/unsimulated/floor/upperlevel/New()
|
||||
..()
|
||||
var/obj/effect/levelref/R = locate() in get_area(src)
|
||||
if(R && R.other)
|
||||
init(R)
|
||||
|
||||
/turf/unsimulated/floor/upperlevel/Destroy()
|
||||
qdel(sensor)
|
||||
sensor = null
|
||||
return ..()
|
||||
|
||||
/turf/unsimulated/floor/upperlevel/proc/init(var/obj/effect/levelref/R)
|
||||
lower_turf = locate(x + R.offset_x, y + R.offset_y, z + R.offset_z)
|
||||
if(lower_turf)
|
||||
sensor = new(lower_turf, src)
|
||||
|
||||
/turf/unsimulated/floor/upperlevel/Entered(atom/movable/AM, atom/OL, ignoreRest = 0)
|
||||
if(isliving(AM) || istype(AM, /obj))
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.emote("scream")
|
||||
M.SpinAnimation(5, 1)
|
||||
AM.forceMove(lower_turf)
|
||||
|
||||
/turf/unsimulated/floor/upperlevel/attack_ghost(mob/user)
|
||||
user.forceMove(lower_turf)
|
||||
|
||||
/turf/unsimulated/floor/upperlevel/proc/trigger()
|
||||
name = lower_turf.name
|
||||
desc = lower_turf.desc
|
||||
|
||||
// render each atom
|
||||
underlays.Cut()
|
||||
for(var/X in list(lower_turf) + lower_turf.contents)
|
||||
var/atom/A = X
|
||||
if(A && A.invisibility <= SEE_INVISIBLE_LIVING)
|
||||
var/image/I = image(A, layer = AREA_LAYER + A.layer * 0.01, dir = A.dir)
|
||||
I.pixel_x = A.pixel_x
|
||||
I.pixel_y = A.pixel_y
|
||||
underlays += I
|
||||
|
||||
// remote end of narnia portal
|
||||
/obj/effect/view_portal
|
||||
name = "portal target"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
invisibility = 101
|
||||
anchored = 1
|
||||
|
||||
var/id = null // id of other portal turf we connect to
|
||||
|
||||
var/obj/effect/view_portal/other = null
|
||||
var/global/list/portals[0]
|
||||
|
||||
/obj/effect/view_portal/New()
|
||||
..()
|
||||
portals += src
|
||||
|
||||
/obj/effect/view_portal/initialize()
|
||||
..()
|
||||
if(id)
|
||||
for(var/obj/effect/view_portal/O in portals)
|
||||
if(id == O.id && O != src && can_link(O))
|
||||
other = O
|
||||
O.other = src
|
||||
linkup()
|
||||
O.linkup()
|
||||
if(other)
|
||||
return
|
||||
|
||||
/obj/effect/view_portal/Destroy()
|
||||
portals -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/view_portal/proc/can_link(obj/effect/view_portal/P)
|
||||
return P.type == /obj/effect/view_portal/visual && !P.other
|
||||
|
||||
/obj/effect/view_portal/proc/linkup()
|
||||
// allow it to link to multiple visual nodes
|
||||
other = null
|
||||
|
||||
// near end of nania portal
|
||||
/obj/effect/view_portal/visual
|
||||
name = "???"
|
||||
desc = "You'll have to get closer to clearly see what this is."
|
||||
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "loadingarea"
|
||||
opacity = 1
|
||||
density = 1
|
||||
invisibility = 0
|
||||
appearance_flags = TILE_BOUND | KEEP_TOGETHER
|
||||
var/dist = 6 // dist that we render out
|
||||
var/radius = 3 // dist we render on other axis, in each direction
|
||||
var/frustrum = 0 // if 1, get wider and wider at each step outward
|
||||
var/teleport = 1 // should teleport?
|
||||
|
||||
var/list/render_block
|
||||
var/list/sensors[0]
|
||||
var/list/tiles[0]
|
||||
|
||||
var/list/near_render_block
|
||||
var/turf/near_viewpoint
|
||||
|
||||
/obj/effect/view_portal/visual/Destroy()
|
||||
for(var/T in sensors)
|
||||
qdel(sensors[T])
|
||||
sensors.Cut()
|
||||
sensors = null
|
||||
for(var/T in tiles)
|
||||
qdel(tiles[T])
|
||||
tiles.Cut()
|
||||
tiles = null
|
||||
render_block = null
|
||||
near_render_block = null
|
||||
near_viewpoint = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/view_portal/visual/can_link(obj/effect/view_portal/P)
|
||||
return P.type == /obj/effect/view_portal
|
||||
|
||||
/obj/effect/view_portal/visual/linkup()
|
||||
icon = null
|
||||
icon_state = null
|
||||
var/turf/Tloc = get_turf(loc)
|
||||
if(Tloc)
|
||||
Tloc.icon = null
|
||||
Tloc.icon_state = null
|
||||
Tloc.dynamic_lighting = 0
|
||||
layer = AREA_LAYER + 0.5
|
||||
|
||||
// setup references
|
||||
var/crossdir = angle2dir((dir2angle(dir) + 90) % 360)
|
||||
near_viewpoint = get_step(get_turf(src), GetOppositeDir(dir))
|
||||
|
||||
// setup far turfs
|
||||
var/turf/T1 = get_turf(other)
|
||||
var/turf/T2 = T1
|
||||
|
||||
for(var/i in 1 to radius)
|
||||
T1 = get_step(T1, crossdir)
|
||||
T2 = get_step(T2, GetOppositeDir(crossdir))
|
||||
if(frustrum)
|
||||
// make a trapazoid, with length dist, short end radius*2 long,
|
||||
// and 45 degree angles
|
||||
render_block = block(T1, T2)
|
||||
for(var/i in 1 to dist)
|
||||
T1 = get_step(get_step(T1, dir), crossdir)
|
||||
T2 = get_step(get_step(T2, dir), GetOppositeDir(crossdir))
|
||||
render_block += block(T1, T2)
|
||||
else
|
||||
// else make a box dist x radius*2
|
||||
for(var/i in 1 to dist)
|
||||
T2 = get_step(T2, dir)
|
||||
render_block = block(T1, T2)
|
||||
for(var/turf/T in render_block)
|
||||
sensors[T] = new /obj/effect/portal_sensor(T, src, 0, T)
|
||||
|
||||
// setup turfs on this side of the portal to cover the map streaming
|
||||
// has to be done later for view() to be correct (so it happens when the walls exist)
|
||||
/obj/effect/view_portal/visual/proc/setup_near()
|
||||
var/nvs = dir & (EAST|WEST) ? near_viewpoint.x - x : near_viewpoint.y - y
|
||||
if(nvs)
|
||||
nvs = SIGN(nvs)
|
||||
// need a mob for view() to work correctly
|
||||
var/mob/M = new(near_viewpoint)
|
||||
M.see_invisible = SEE_INVISIBLE_LIVING
|
||||
near_render_block = view(M, world.view)
|
||||
qdel(M)
|
||||
for(var/A in near_render_block)
|
||||
var/turf/T = A
|
||||
if(istype(T))
|
||||
var/ts = dir & (EAST|WEST) ? T.x - x : T.y - y
|
||||
if(ts)
|
||||
ts = SIGN(ts)
|
||||
if(nvs == ts)
|
||||
sensors[T] = new /obj/effect/portal_sensor(T, src, 1, T)
|
||||
else
|
||||
near_render_block -= T
|
||||
else
|
||||
near_render_block -= T
|
||||
|
||||
/obj/effect/view_portal/visual/Bumped(atom/movable/thing)
|
||||
if((istype(thing, /obj) || isliving(thing)) && other && teleport)
|
||||
if(!near_render_block)
|
||||
setup_near()
|
||||
|
||||
var/mob/living/M = thing
|
||||
// make the person glide onto the dest, giving a smooth transition
|
||||
var/ox = thing.x - x
|
||||
var/oy = thing.y - y
|
||||
if(istype(M) && M.client)
|
||||
M.notransform = 1
|
||||
// cover up client-side map loading
|
||||
M.screen_loc = "CENTER"
|
||||
M.client.screen += M
|
||||
for(var/T in tiles)
|
||||
M.client.screen += tiles[T]
|
||||
|
||||
// wait a tick for the screen to replicate across network
|
||||
// or this whole exercise of covering the transition is pointless
|
||||
spawn(1)
|
||||
thing.forceMove(locate(other.x + ox, other.y + oy, other.z))
|
||||
sleep(1)
|
||||
if(istype(M) && M.client)
|
||||
for(var/T in tiles)
|
||||
M.client.screen -= tiles[T]
|
||||
M.client.screen -= M
|
||||
M.screen_loc = initial(M.screen_loc)
|
||||
thing.forceMove(get_turf(other.loc))
|
||||
if(istype(M) && M.client)
|
||||
M.notransform = 0
|
||||
|
||||
/obj/effect/view_portal/visual/attack_ghost(mob/user)
|
||||
user.forceMove(get_turf(other.loc))
|
||||
|
||||
/obj/effect/view_portal/visual/proc/trigger(near, turf/T)
|
||||
var/obj/effect/view_portal_dummy/D = tiles[T]
|
||||
if(D)
|
||||
D.overlays.Cut()
|
||||
else
|
||||
D = new(src, near, T)
|
||||
tiles[T] = D
|
||||
|
||||
// render atoms to overlays of a dummy object
|
||||
if(D.name != T.name)
|
||||
D.name = T.name
|
||||
D.desc = T.desc
|
||||
for(var/AX in list(T) + T.contents)
|
||||
var/atom/A = AX
|
||||
if(A && A.invisibility <= SEE_INVISIBLE_LIVING)
|
||||
var/image/I = image(A, layer = D.layer + A.layer * 0.01, dir = A.dir)
|
||||
I.pixel_x = A.pixel_x
|
||||
I.pixel_y = A.pixel_y
|
||||
D.overlays += I
|
||||
|
||||
// tile of rendered other side for narnia portal
|
||||
/obj/effect/view_portal_dummy
|
||||
var/obj/effect/view_portal/visual/owner
|
||||
|
||||
/obj/effect/view_portal_dummy/New(obj/effect/view_portal/visual/V, near, turf/T)
|
||||
..()
|
||||
if(!near)
|
||||
loc = V.loc
|
||||
owner = V
|
||||
|
||||
var/ox
|
||||
var/oy
|
||||
if(near)
|
||||
ox = (T.x - V.near_viewpoint.x)
|
||||
oy = (T.y - V.near_viewpoint.y)
|
||||
layer = AREA_LAYER + 0.4
|
||||
else
|
||||
ox = T.x - V.other.x + V.x - V.near_viewpoint.x
|
||||
oy = T.y - V.other.y + V.y - V.near_viewpoint.y
|
||||
pixel_x = 32 * (T.x - V.other.x)
|
||||
pixel_y = 32 * (T.y - V.other.y)
|
||||
layer = AREA_LAYER + 0.5
|
||||
if(abs(ox) <= world.view && abs(oy) <= world.view)
|
||||
screen_loc = "CENTER[ox >= 0 ? "+" : ""][ox],CENTER[oy >= 0 ? "+" : ""][oy]"
|
||||
|
||||
/obj/effect/view_portal_dummy/attack_ghost(mob/user)
|
||||
owner.attack_ghost(user)
|
||||
@@ -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.
|
||||
@@ -260,3 +260,18 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
|
||||
|
||||
send_asset_list(client, uncommon)
|
||||
send_asset_list(client, common)
|
||||
|
||||
/datum/asset/chem_master
|
||||
var/assets = list()
|
||||
var/verify = FALSE
|
||||
|
||||
/datum/asset/chem_master/register()
|
||||
for(var/i = 1 to 20)
|
||||
assets["pill[i].png"] = icon('icons/obj/chemical.dmi', "pill[i]")
|
||||
for(var/i = 1 to 20)
|
||||
assets["bottle[i].png"] = icon('icons/obj/chemical.dmi', "bottle[i]")
|
||||
for(var/asset_name in assets)
|
||||
register_asset(asset_name, assets[asset_name])
|
||||
|
||||
/datum/asset/chem_master/send(client)
|
||||
send_asset_list(client,assets,verify)
|
||||
@@ -84,4 +84,8 @@
|
||||
var/datum/click_intercept/click_intercept = null
|
||||
|
||||
//datum that controls the displaying and hiding of tooltips
|
||||
var/datum/tooltip/tooltips
|
||||
var/datum/tooltip/tooltips
|
||||
|
||||
// Their chat window, sort of important.
|
||||
// See /goon/code/datums/browserOutput.dm
|
||||
var/datum/chatOutput/chatOutput
|
||||
@@ -8,6 +8,8 @@
|
||||
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
|
||||
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
|
||||
//I would just like the code ready should it ever need to be used.
|
||||
#define SUGGESTED_CLIENT_VERSION 510 // only integers (e.g: 510, 511) useful here. Does not properly handle minor versions (e.g: 510.58, 511.848)
|
||||
|
||||
/*
|
||||
When somebody clicks a link in game, this Topic is called first.
|
||||
It does the stuff in this proc and then is redirected to the Topic() proc for the src=[0xWhatever]
|
||||
@@ -43,6 +45,9 @@
|
||||
completed_asset_jobs += job
|
||||
return
|
||||
|
||||
if(href_list["_src_"] == "chat")
|
||||
return chatOutput.Topic(href, href_list)
|
||||
|
||||
//Reduces spamming of links by dropping calls that happen during the delay period
|
||||
if(next_allowed_topic_time > world.time)
|
||||
return
|
||||
@@ -52,7 +57,6 @@
|
||||
if( findtext(href,"<script",1,0) )
|
||||
log_to_dd("Attempted use of scripts within a topic call, by [src]")
|
||||
message_admins("Attempted use of scripts within a topic call, by [src]")
|
||||
//del(usr)
|
||||
return
|
||||
|
||||
//Admin PM
|
||||
@@ -203,6 +207,11 @@
|
||||
if("prefs") return prefs.process_link(usr,href_list)
|
||||
if("vars") return view_var_Topic(href,href_list,hsrc)
|
||||
|
||||
|
||||
switch(href_list["action"])
|
||||
if("openLink")
|
||||
src << link(href_list["link"])
|
||||
|
||||
..() //redirect to hsrc.Topic()
|
||||
|
||||
/client/proc/is_content_unlocked()
|
||||
@@ -245,12 +254,15 @@
|
||||
//CONNECT//
|
||||
///////////
|
||||
/client/New(TopicData)
|
||||
chatOutput = new /datum/chatOutput(src) // Right off the bat.
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
|
||||
if(connection != "seeker") //Invalid connection type.
|
||||
return null
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
if(byond_version < MIN_CLIENT_VERSION) // Too out of date to play at all. Unfortunately, we can't send them a message here.
|
||||
return null
|
||||
if(byond_version < SUGGESTED_CLIENT_VERSION) // Update is suggested, but not required.
|
||||
to_chat(src,"<span class='userdanger'>Your BYOND client (v: [byond_version]) is out of date. This can cause glitches. We highly suggest you download the latest client from http://www.byond.com/ before playing. </span>")
|
||||
|
||||
if(IsGuestKey(key))
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
@@ -283,6 +295,7 @@
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
chatOutput.start()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
|
||||
@@ -307,8 +320,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)
|
||||
|
||||
@@ -316,10 +329,9 @@
|
||||
send_resources()
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. -CP
|
||||
if(!establish_db_connection())
|
||||
return // if we have db problems, don't show anything
|
||||
winset(src, "rpane.changelog", "background-color=#f4aa94;font-style=bold")
|
||||
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
|
||||
if(establish_db_connection())
|
||||
winset(src, "rpane.changelog", "background-color=#f4aa94;font-style=bold")
|
||||
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
|
||||
|
||||
if(!void)
|
||||
void = new()
|
||||
@@ -349,7 +361,7 @@
|
||||
|
||||
/client/proc/log_client_to_db()
|
||||
|
||||
if ( IsGuestKey(src.key) )
|
||||
if( IsGuestKey(src.key) )
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
/datum/gear_tweak/proc/get_contents(var/metadata)
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/get_metadata(var/user, var/metadata)
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/get_default()
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/tweak_gear_data(var/metadata, var/datum/gear_data)
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/tweak_item(var/obj/item/I, var/metadata)
|
||||
return
|
||||
|
||||
/*
|
||||
* Color adjustment
|
||||
*/
|
||||
|
||||
var/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
|
||||
|
||||
/datum/gear_tweak/color
|
||||
var/list/valid_colors
|
||||
|
||||
/datum/gear_tweak/color/New(var/list/colors)
|
||||
valid_colors = colors
|
||||
..()
|
||||
|
||||
/datum/gear_tweak/color/get_contents(var/metadata)
|
||||
return "Color: <font color='[metadata]'>⚫</font>"
|
||||
|
||||
/datum/gear_tweak/color/get_default()
|
||||
return valid_colors ? valid_colors[1] : COLOR_GRAY
|
||||
|
||||
/datum/gear_tweak/color/get_metadata(var/user, var/metadata)
|
||||
if(valid_colors)
|
||||
return input(user, "Choose an item color.", "Character Preference", metadata) as null|anything in valid_colors
|
||||
return input(user, "Choose an item color.", "Global Preference", metadata) as color|null
|
||||
|
||||
/datum/gear_tweak/color/tweak_item(var/obj/item/I, var/metadata)
|
||||
if(valid_colors && !(metadata in valid_colors))
|
||||
return
|
||||
I.color = metadata
|
||||
|
||||
/*
|
||||
* Path adjustment
|
||||
*/
|
||||
|
||||
/datum/gear_tweak/path
|
||||
var/list/valid_paths
|
||||
|
||||
/datum/gear_tweak/path/New(var/list/paths)
|
||||
valid_paths = paths
|
||||
..()
|
||||
|
||||
/datum/gear_tweak/path/get_contents(var/metadata)
|
||||
return "Type: [metadata]"
|
||||
|
||||
/datum/gear_tweak/path/get_default()
|
||||
return valid_paths[1]
|
||||
|
||||
/datum/gear_tweak/path/get_metadata(var/user, var/metadata)
|
||||
return input(user, "Choose a type.", "Character Preference", metadata) as null|anything in valid_paths
|
||||
|
||||
/datum/gear_tweak/path/tweak_gear_data(var/metadata, var/datum/gear_data/gear_data)
|
||||
if(!(metadata in valid_paths))
|
||||
return
|
||||
gear_data.path = valid_paths[metadata]
|
||||
|
||||
/*
|
||||
* Content adjustment
|
||||
*/
|
||||
|
||||
/datum/gear_tweak/contents
|
||||
var/list/valid_contents
|
||||
|
||||
/datum/gear_tweak/contents/New()
|
||||
valid_contents = args.Copy()
|
||||
..()
|
||||
|
||||
/datum/gear_tweak/contents/get_contents(var/metadata)
|
||||
return "Contents: [english_list(metadata, and_text = ", ")]"
|
||||
|
||||
/datum/gear_tweak/contents/get_default()
|
||||
. = list()
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
. += "Random"
|
||||
|
||||
/datum/gear_tweak/contents/get_metadata(var/user, var/list/metadata)
|
||||
. = list()
|
||||
for(var/i = metadata.len to valid_contents.len)
|
||||
metadata += "Random"
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
var/entry = input(user, "Choose an entry.", "Character Preference", metadata[i]) as null|anything in (valid_contents[i] + list("Random", "None"))
|
||||
if(entry)
|
||||
. += entry
|
||||
else
|
||||
return metadata
|
||||
|
||||
/datum/gear_tweak/contents/tweak_item(var/obj/item/I, var/list/metadata)
|
||||
if(metadata.len != valid_contents.len)
|
||||
return
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
var/path
|
||||
var/list/contents = valid_contents[i]
|
||||
if(metadata[i] == "Random")
|
||||
path = pick(contents)
|
||||
path = contents[path]
|
||||
else if(metadata[i] == "None")
|
||||
continue
|
||||
else
|
||||
path = contents[metadata[i]]
|
||||
new path(I)
|
||||
@@ -0,0 +1,79 @@
|
||||
var/list/loadout_categories = list()
|
||||
var/list/gear_datums = list()
|
||||
|
||||
/datum/loadout_category
|
||||
var/category = ""
|
||||
var/list/gear = list()
|
||||
|
||||
/datum/loadout_category/New(cat)
|
||||
category = cat
|
||||
..()
|
||||
|
||||
/hook/startup/proc/populate_gear_list()
|
||||
//create a list of gear datums to sort
|
||||
for(var/geartype in subtypesof(/datum/gear))
|
||||
var/datum/gear/G = geartype
|
||||
|
||||
var/use_name = initial(G.display_name)
|
||||
var/use_category = initial(G.sort_category)
|
||||
|
||||
if(G == initial(G.subtype_path))
|
||||
continue
|
||||
|
||||
if(!use_name)
|
||||
error("Loadout - Missing display name: [G]")
|
||||
continue
|
||||
if(!initial(G.cost))
|
||||
error("Loadout - Missing cost: [G]")
|
||||
continue
|
||||
if(!initial(G.path))
|
||||
error("Loadout - Missing path definition: [G]")
|
||||
continue
|
||||
|
||||
if(!loadout_categories[use_category])
|
||||
loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = loadout_categories[use_category]
|
||||
gear_datums[use_name] = new geartype
|
||||
LC.gear[use_name] = gear_datums[use_name]
|
||||
|
||||
loadout_categories = sortAssoc(loadout_categories)
|
||||
for(var/loadout_category in loadout_categories)
|
||||
var/datum/loadout_category/LC = loadout_categories[loadout_category]
|
||||
LC.gear = sortAssoc(LC.gear)
|
||||
return 1
|
||||
|
||||
/datum/gear
|
||||
var/display_name //Name/index. Must be unique.
|
||||
var/description //Description of this gear. If left blank will default to the description of the pathed item.
|
||||
var/path //Path to item.
|
||||
var/cost = 1 //Number of points used. Items in general cost 1 point, storage/armor/gloves/special use costs 2 points.
|
||||
var/slot //Slot to equip to.
|
||||
var/list/allowed_roles //Roles that can spawn with this item.
|
||||
var/whitelisted //Term to check the whitelist for..
|
||||
var/sort_category = "General"
|
||||
var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned.
|
||||
var/subtype_path = /datum/gear //for skipping organizational subtypes (optional)
|
||||
var/subtype_cost_overlap = TRUE //if subtypes can take points at the same time
|
||||
|
||||
/datum/gear/New()
|
||||
..()
|
||||
if(!description)
|
||||
var/obj/O = path
|
||||
description = initial(O.desc)
|
||||
|
||||
/datum/gear_data
|
||||
var/path
|
||||
var/location
|
||||
|
||||
/datum/gear_data/New(npath, nlocation)
|
||||
path = npath
|
||||
location = nlocation
|
||||
|
||||
/datum/gear/proc/spawn_item(location, metadata)
|
||||
var/datum/gear_data/gd = new(path, location)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
gt.tweak_gear_data(metadata["[gt]"], gd)
|
||||
var/item = new gd.path(gd.location)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
gt.tweak_item(item, metadata["[gt]"])
|
||||
return item
|
||||
@@ -0,0 +1,95 @@
|
||||
/datum/gear/accessory
|
||||
subtype_path = /datum/gear/accessory
|
||||
slot = slot_tie
|
||||
sort_category = "Accessories"
|
||||
|
||||
/datum/gear/accessory/scarf
|
||||
display_name = "scarf"
|
||||
path = /obj/item/clothing/accessory/scarf
|
||||
|
||||
/datum/gear/accessory/scarf/red
|
||||
display_name = "scarf, red"
|
||||
path = /obj/item/clothing/accessory/scarf/red
|
||||
|
||||
/datum/gear/accessory/scarf/green
|
||||
display_name = "scarf, green"
|
||||
path = /obj/item/clothing/accessory/scarf/green
|
||||
|
||||
/datum/gear/accessory/scarf/darkblue
|
||||
display_name = "scarf, dark blue"
|
||||
path = /obj/item/clothing/accessory/scarf/darkblue
|
||||
|
||||
/datum/gear/accessory/scarf/purple
|
||||
display_name = "scarf, purple"
|
||||
path = /obj/item/clothing/accessory/scarf/purple
|
||||
|
||||
/datum/gear/accessory/scarf/yellow
|
||||
display_name = "scarf, yellow"
|
||||
path = /obj/item/clothing/accessory/scarf/yellow
|
||||
|
||||
/datum/gear/accessory/scarf/orange
|
||||
display_name = "scarf, orange"
|
||||
path = /obj/item/clothing/accessory/scarf/orange
|
||||
|
||||
/datum/gear/accessory/scarf/lightblue
|
||||
display_name = "scarf, light blue"
|
||||
path = /obj/item/clothing/accessory/scarf/lightblue
|
||||
|
||||
/datum/gear/accessory/scarf/white
|
||||
display_name = "scarf, white"
|
||||
path = /obj/item/clothing/accessory/scarf/white
|
||||
|
||||
/datum/gear/accessory/scarf/black
|
||||
display_name = "scarf, black"
|
||||
path = /obj/item/clothing/accessory/scarf/black
|
||||
|
||||
/datum/gear/accessory/scarf/zebra
|
||||
display_name = "scarf, zebra"
|
||||
path = /obj/item/clothing/accessory/scarf/zebra
|
||||
|
||||
/datum/gear/accessory/scarf/christmas
|
||||
display_name = "scarf, christmas"
|
||||
path = /obj/item/clothing/accessory/scarf/christmas
|
||||
|
||||
/datum/gear/accessory/scarf/stripedred
|
||||
display_name = "scarf, striped red"
|
||||
path = /obj/item/clothing/accessory/stripedredscarf
|
||||
|
||||
/datum/gear/accessory/scarf/stripedgreen
|
||||
display_name = "scarf, striped green"
|
||||
path = /obj/item/clothing/accessory/stripedgreenscarf
|
||||
|
||||
/datum/gear/accessory/scarf/stripedblue
|
||||
display_name = "scarf, striped blue"
|
||||
path = /obj/item/clothing/accessory/stripedbluescarf
|
||||
|
||||
/datum/gear/accessory/holobadge
|
||||
display_name = "holobadge, pin"
|
||||
path = /obj/item/clothing/accessory/holobadge
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/accessory/holobadge_n
|
||||
display_name = "holobadge, cord"
|
||||
path = /obj/item/clothing/accessory/holobadge/cord
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/accessory/tieblue
|
||||
display_name = "tie, blue"
|
||||
path = /obj/item/clothing/accessory/blue
|
||||
|
||||
/datum/gear/accessory/tiered
|
||||
display_name = "tie, red"
|
||||
path = /obj/item/clothing/accessory/red
|
||||
|
||||
/datum/gear/accessory/tieblack
|
||||
display_name = "tie, black"
|
||||
path = /obj/item/clothing/accessory/black
|
||||
|
||||
/datum/gear/accessory/tiehorrible
|
||||
display_name = "tie, vomit green"
|
||||
path = /obj/item/clothing/accessory/horrible
|
||||
|
||||
/datum/gear/accessory/stethoscope
|
||||
display_name = "stethoscope"
|
||||
path = /obj/item/clothing/accessory/stethoscope
|
||||
allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Paramedic", "Brig Physician")
|
||||
@@ -0,0 +1,20 @@
|
||||
/datum/gear/lipstick
|
||||
display_name = "lipstick, black"
|
||||
path = /obj/item/weapon/lipstick/black
|
||||
sort_category = "Cosmetics"
|
||||
|
||||
/datum/gear/lipstick/jade
|
||||
display_name = "lipstick, jade"
|
||||
path = /obj/item/weapon/lipstick/jade
|
||||
|
||||
/datum/gear/lipstick/purple
|
||||
display_name = "lipstick, purple"
|
||||
path = /obj/item/weapon/lipstick/purple
|
||||
|
||||
/datum/gear/lipstick/red
|
||||
display_name = "lipstick, red"
|
||||
path = /obj/item/weapon/lipstick
|
||||
|
||||
/datum/gear/monocle
|
||||
display_name = "monocle"
|
||||
path = /obj/item/clothing/glasses/monocle
|
||||
@@ -0,0 +1,72 @@
|
||||
/datum/gear/dice
|
||||
display_name = "a d20"
|
||||
path = /obj/item/weapon/dice/d20
|
||||
|
||||
/datum/gear/uplift
|
||||
display_name = "a pack of Uplifts"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
|
||||
/datum/gear/robust
|
||||
display_name = "a pack of Robusts"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
|
||||
/datum/gear/carp
|
||||
display_name = "a pack of Carps"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
|
||||
/datum/gear/midori
|
||||
display_name = "a pack of Midoris"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
|
||||
/datum/gear/lighter
|
||||
display_name = "a cheap lighter"
|
||||
path = /obj/item/weapon/lighter
|
||||
|
||||
/datum/gear/rock
|
||||
display_name = "a pet rock"
|
||||
path = /obj/item/toy/pet_rock
|
||||
|
||||
/datum/gear/sechud
|
||||
display_name = "a classic security HUD"
|
||||
path = /obj/item/clothing/glasses/hud/security
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot", "Internal Affairs Agent")
|
||||
|
||||
/datum/gear/matches
|
||||
display_name = "a box of matches"
|
||||
path = /obj/item/weapon/storage/box/matches
|
||||
|
||||
/datum/gear/cards
|
||||
display_name = "a deck of cards"
|
||||
path = /obj/item/toy/cards/deck
|
||||
|
||||
/datum/gear/blackbandana
|
||||
display_name = "bandana, black"
|
||||
path = /obj/item/clothing/mask/bandana/black
|
||||
|
||||
/datum/gear/purplebandana
|
||||
display_name = "bandana, purple"
|
||||
path = /obj/item/clothing/mask/bandana/purple
|
||||
|
||||
/datum/gear/orangebandana
|
||||
display_name = "bandana, orange"
|
||||
path = /obj/item/clothing/mask/bandana/orange
|
||||
|
||||
/datum/gear/greenbandana
|
||||
display_name = "bandana, green"
|
||||
path = /obj/item/clothing/mask/bandana/green
|
||||
|
||||
/datum/gear/bluebandana
|
||||
display_name = "bandana, blue"
|
||||
path = /obj/item/clothing/mask/bandana/blue
|
||||
|
||||
/datum/gear/redbandana
|
||||
display_name = "bandana, red"
|
||||
path = /obj/item/clothing/mask/bandana/red
|
||||
|
||||
/datum/gear/goldbandana
|
||||
display_name = "bandana, gold"
|
||||
path = /obj/item/clothing/mask/bandana/gold
|
||||
|
||||
/datum/gear/skullbandana
|
||||
display_name = "bandana, skull"
|
||||
path = /obj/item/clothing/mask/bandana/skull
|
||||
@@ -0,0 +1,114 @@
|
||||
/datum/gear/hat
|
||||
subtype_path = /datum/gear/hat
|
||||
slot = slot_head
|
||||
sort_category = "Headwear"
|
||||
|
||||
/datum/gear/hat/hhat_yellow
|
||||
display_name = "hardhat, yellow"
|
||||
path = /obj/item/clothing/head/hardhat
|
||||
allowed_roles = list("Chief Engineer", "Station Engineer", "Mechanic", "Life Support Specialist")
|
||||
|
||||
/datum/gear/hat/hhat_orange
|
||||
display_name = "hardhat, orange"
|
||||
path = /obj/item/clothing/head/hardhat/orange
|
||||
allowed_roles = list("Chief Engineer", "Station Engineer", "Mechanic", "Life Support Specialist")
|
||||
|
||||
/datum/gear/hat/hhat_blue
|
||||
display_name = "hardhat, blue"
|
||||
path = /obj/item/clothing/head/hardhat/dblue
|
||||
allowed_roles = list("Chief Engineer", "Station Engineer", "Mechanic", "Life Support Specialist")
|
||||
|
||||
/datum/gear/hat/that
|
||||
display_name = "top hat"
|
||||
path = /obj/item/clothing/head/that
|
||||
|
||||
/datum/gear/hat/flatcap
|
||||
display_name = "flat cap"
|
||||
path = /obj/item/clothing/head/flatcap
|
||||
|
||||
/datum/gear/hat/fez
|
||||
display_name = "fez"
|
||||
path = /obj/item/clothing/head/fez
|
||||
|
||||
/datum/gear/hat/bfedora
|
||||
display_name = "fedora, black"
|
||||
path = /obj/item/clothing/head/fedora
|
||||
|
||||
/datum/gear/hat/wfedora
|
||||
display_name = "fedora, white"
|
||||
path = /obj/item/clothing/head/fedora/whitefedora
|
||||
|
||||
/datum/gear/hat/brfedora
|
||||
display_name = "fedora, brown"
|
||||
path = /obj/item/clothing/head/fedora/brownfedora
|
||||
|
||||
/datum/gear/hat/beretsec
|
||||
display_name = "security beret"
|
||||
path = /obj/item/clothing/head/beret/sec
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/hat/capcsec
|
||||
display_name = "security corporate cap"
|
||||
path = /obj/item/clothing/head/soft/sec/corp
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/hat/capsec
|
||||
display_name = "security cap"
|
||||
path = /obj/item/clothing/head/soft/sec
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/hat/capred
|
||||
display_name = "cap, red"
|
||||
path = /obj/item/clothing/head/soft/red
|
||||
|
||||
/datum/gear/hat/capblue
|
||||
display_name = "cap, blue"
|
||||
path = /obj/item/clothing/head/soft/blue
|
||||
|
||||
/datum/gear/hat/capgreen
|
||||
display_name = "cap, green"
|
||||
path = /obj/item/clothing/head/soft/green
|
||||
|
||||
/datum/gear/hat/capblack
|
||||
display_name = "cap, black"
|
||||
path = /obj/item/clothing/head/soft/black
|
||||
|
||||
/datum/gear/hat/cappurple
|
||||
display_name = "cap, purple"
|
||||
path = /obj/item/clothing/head/soft/purple
|
||||
|
||||
/datum/gear/hat/capwhite
|
||||
display_name = "cap, white"
|
||||
path = /obj/item/clothing/head/soft/mime
|
||||
|
||||
/datum/gear/hat/caporange
|
||||
display_name = "cap, orange"
|
||||
path = /obj/item/clothing/head/soft/orange
|
||||
|
||||
/datum/gear/hat/capgrey
|
||||
display_name = "cap, grey"
|
||||
path = /obj/item/clothing/head/soft/grey
|
||||
|
||||
/datum/gear/hat/capyellow
|
||||
display_name = "cap, yellow"
|
||||
path = /obj/item/clothing/head/soft/yellow
|
||||
|
||||
/datum/gear/hat/cowboyhat
|
||||
display_name = "cowboy hat"
|
||||
path = /obj/item/clothing/head/cowboyhat
|
||||
|
||||
/datum/gear/hat/pr_beret
|
||||
display_name = "beret, purple"
|
||||
path = /obj/item/clothing/head/beret/purple_normal
|
||||
|
||||
/datum/gear/hat/bl_beret
|
||||
display_name = "beret, black"
|
||||
path = /obj/item/clothing/head/beret/black
|
||||
|
||||
/datum/gear/hat/blu_beret
|
||||
display_name = "beret, blue"
|
||||
path = /obj/item/clothing/head/beret/blue
|
||||
|
||||
/datum/gear/hat/red_beret
|
||||
display_name = "beret, red"
|
||||
path = /obj/item/clothing/head/beret
|
||||
@@ -0,0 +1,18 @@
|
||||
/datum/gear/shoes
|
||||
subtype_path = /datum/gear/shoes
|
||||
slot = slot_shoes
|
||||
sort_category = "Shoes"
|
||||
|
||||
/datum/gear/shoes/sandals
|
||||
display_name = "sandals, wooden"
|
||||
path = /obj/item/clothing/shoes/sandal
|
||||
|
||||
/datum/gear/shoes/fancysandals
|
||||
display_name = "sandals, fancy"
|
||||
cost = 5
|
||||
path = /obj/item/clothing/shoes/sandal/fancy
|
||||
|
||||
/datum/gear/shoes/dressshoes
|
||||
display_name = "dress shoes"
|
||||
cost = 5
|
||||
path = /obj/item/clothing/shoes/centcom
|
||||
@@ -0,0 +1,160 @@
|
||||
/datum/gear/suit
|
||||
subtype_path = /datum/gear/suit
|
||||
slot = slot_wear_suit
|
||||
cost = 2
|
||||
sort_category = "External Wear"
|
||||
|
||||
//WINTER COATS
|
||||
/datum/gear/suit/coat
|
||||
subtype_path = /datum/gear/suit/coat
|
||||
|
||||
/datum/gear/suit/coat/grey
|
||||
display_name = "winter coat"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat
|
||||
|
||||
/datum/gear/suit/coat/job
|
||||
subtype_path = /datum/gear/suit/coat/job
|
||||
subtype_cost_overlap = FALSE
|
||||
|
||||
/datum/gear/suit/coat/job/sec
|
||||
display_name = "winter coat, security"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/security
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/suit/coat/job/captain
|
||||
display_name = "winter coat, captain"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/captain
|
||||
allowed_roles = list("Captain")
|
||||
|
||||
/datum/gear/suit/coat/job/med
|
||||
display_name = "winter coat, medical"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/medical
|
||||
allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Chemist", "Psychiatrist", "Paramedic", "Virologist", "Brig Physician")
|
||||
|
||||
/datum/gear/suit/coat/job/sci
|
||||
display_name = "winter coat, science"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/science
|
||||
allowed_roles = list("Scientist", "Research Director")
|
||||
|
||||
/datum/gear/suit/coat/job/engi
|
||||
display_name = "winter coat, engineering"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/engineering
|
||||
allowed_roles = list("Chief Engineer", "Station Engineer", "Mechanic")
|
||||
|
||||
/datum/gear/suit/coat/job/atmos
|
||||
display_name = "winter coat, atmospherics"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos
|
||||
allowed_roles = list("Chief Engineer", "Life Support Specialist")
|
||||
|
||||
/datum/gear/suit/coat/job/hydro
|
||||
display_name = "winter coat, hydroponics"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/hydro
|
||||
allowed_roles = list("Botanist")
|
||||
|
||||
/datum/gear/suit/coat/job/cargo
|
||||
display_name = "winter coat, cargo"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/cargo
|
||||
allowed_roles = list("Quartermaster", "Cargo Technician")
|
||||
|
||||
/datum/gear/suit/coat/job/miner
|
||||
display_name = "winter coat, miner"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/miner
|
||||
allowed_roles = list("Shaft Miner")
|
||||
|
||||
//LABCOATS
|
||||
/datum/gear/suit/labcoat_emt
|
||||
display_name = "labcoat, paramedic"
|
||||
path = /obj/item/clothing/suit/storage/labcoat/emt
|
||||
allowed_roles = list("Chief Medical Officer", "Paramedic")
|
||||
|
||||
//JACKETS
|
||||
/datum/gear/suit/leather_jacket
|
||||
display_name = "leather jacket"
|
||||
path = /obj/item/clothing/suit/jacket/leather
|
||||
|
||||
/datum/gear/suit/br_tcoat
|
||||
display_name = "trenchcoat, brown"
|
||||
path = /obj/item/clothing/suit/browntrenchcoat
|
||||
|
||||
/datum/gear/suit/bl_tcoat
|
||||
display_name = "trenchcoat, black"
|
||||
path = /obj/item/clothing/suit/blacktrenchcoat
|
||||
|
||||
/datum/gear/suit/bomber_jacket
|
||||
display_name = "bomber jacket"
|
||||
path = /obj/item/clothing/suit/jacket
|
||||
|
||||
/datum/gear/suit/ol_miljacket
|
||||
display_name = "military jacket, olive"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket
|
||||
|
||||
/datum/gear/suit/nv_miljacket
|
||||
display_name = "military jacket, navy"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket/navy
|
||||
|
||||
/datum/gear/suit/ds_miljacket
|
||||
display_name = "military jacket, desert"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket/desert
|
||||
|
||||
/datum/gear/suit/wh_miljacket
|
||||
display_name = "military jacket, white"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket/white
|
||||
|
||||
/datum/gear/suit/secjacket
|
||||
display_name = "security jacket"
|
||||
path = /obj/item/clothing/suit/armor/secjacket
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/suit/poncho
|
||||
display_name = "poncho, classic"
|
||||
path = /obj/item/clothing/suit/poncho
|
||||
|
||||
/datum/gear/suit/grponcho
|
||||
display_name = "poncho, green"
|
||||
path = /obj/item/clothing/suit/poncho/green
|
||||
|
||||
/datum/gear/suit/rdponcho
|
||||
display_name = "poncho, red"
|
||||
path = /obj/item/clothing/suit/poncho/red
|
||||
|
||||
/datum/gear/suit/tphoodie
|
||||
display_name = "hoodie, Tharsis Polytech"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/tp
|
||||
|
||||
/datum/gear/suit/nthoodie
|
||||
display_name = "hoodie, Nanotrasen"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/nt
|
||||
|
||||
/datum/gear/suit/lamhoodie
|
||||
display_name = "hoodie, Lunar Academy of Medicine"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/lam
|
||||
|
||||
/datum/gear/suit/cuthoodie
|
||||
display_name = "hoodie, Canaan University of Technology"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/cut
|
||||
|
||||
/datum/gear/suit/mithoodie
|
||||
display_name = "hoodie, Martian Institute of Technology"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/mit
|
||||
|
||||
/datum/gear/suit/bluehoodie
|
||||
display_name = "hoodie, blue"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/blue
|
||||
|
||||
/datum/gear/suit/blackhoodie
|
||||
display_name = "hoodie, black"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie
|
||||
|
||||
//SUITS!
|
||||
|
||||
/datum/gear/suit/blacksuit
|
||||
display_name = "suit jacket, black"
|
||||
path = /obj/item/clothing/suit/storage/lawyer/blackjacket
|
||||
|
||||
/datum/gear/suit/bluesuit
|
||||
display_name = "suit jacket, blue"
|
||||
path = /obj/item/clothing/suit/storage/lawyer/bluejacket
|
||||
|
||||
/datum/gear/suit/purplesuit
|
||||
display_name = "suit jacket, purple"
|
||||
path = /obj/item/clothing/suit/storage/lawyer/purpjacket
|
||||
@@ -0,0 +1,196 @@
|
||||
// Uniform slot
|
||||
/datum/gear/uniform
|
||||
subtype_path = /datum/gear/uniform
|
||||
slot = slot_w_uniform
|
||||
cost = 2
|
||||
sort_category = "Uniforms and Casual Dress"
|
||||
|
||||
/datum/gear/uniform/skirt
|
||||
subtype_path = /datum/gear/uniform/skirt
|
||||
|
||||
/datum/gear/uniform/skirt/blue
|
||||
display_name = "plaid skirt, blue"
|
||||
path = /obj/item/clothing/under/dress/plaid_blue
|
||||
|
||||
/datum/gear/uniform/skirt/purple
|
||||
display_name = "plaid skirt, purple"
|
||||
path = /obj/item/clothing/under/dress/plaid_purple
|
||||
|
||||
/datum/gear/uniform/skirt/red
|
||||
display_name = "plaid skirt, red"
|
||||
path = /obj/item/clothing/under/dress/plaid_red
|
||||
|
||||
/datum/gear/uniform/skirt/black
|
||||
display_name = "skirt, black"
|
||||
path = /obj/item/clothing/under/blackskirt
|
||||
|
||||
/datum/gear/uniform/skirt/job
|
||||
subtype_path = /datum/gear/uniform/skirt/job
|
||||
subtype_cost_overlap = FALSE
|
||||
|
||||
/datum/gear/uniform/skirt/job/ce
|
||||
display_name = "skirt, ce"
|
||||
path = /obj/item/clothing/under/rank/chief_engineer/skirt
|
||||
allowed_roles = list("Chief Engineer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/atmos
|
||||
display_name = "skirt, atmos"
|
||||
path = /obj/item/clothing/under/rank/atmospheric_technician/skirt
|
||||
allowed_roles = list("Chief Engineer","Atmospheric Technician")
|
||||
|
||||
/datum/gear/uniform/skirt/job/eng
|
||||
display_name = "skirt, engineer"
|
||||
path = /obj/item/clothing/under/rank/engineer/skirt
|
||||
allowed_roles = list("Chief Engineer","Station Engineer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/roboticist
|
||||
display_name = "skirt, roboticist"
|
||||
path = /obj/item/clothing/under/rank/roboticist/skirt
|
||||
allowed_roles = list("Research Director","Roboticist")
|
||||
|
||||
/datum/gear/uniform/skirt/job/cmo
|
||||
display_name = "skirt, cmo"
|
||||
path = /obj/item/clothing/under/rank/chief_medical_officer
|
||||
allowed_roles = list("Chief Medical Officer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/chem
|
||||
display_name = "skirt, chemist"
|
||||
path = /obj/item/clothing/under/rank/chemist/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Chemist")
|
||||
|
||||
/datum/gear/uniform/skirt/job/viro
|
||||
display_name = "skirt, virologist"
|
||||
path = /obj/item/clothing/under/rank/virologist/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Medical Doctor")
|
||||
|
||||
/datum/gear/uniform/skirt/job/med
|
||||
display_name = "skirt, medical"
|
||||
path = /obj/item/clothing/under/rank/medical/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic","Brig Physician")
|
||||
|
||||
/datum/gear/uniform/skirt/job/sci
|
||||
display_name = "skirt, scientist"
|
||||
path = /obj/item/clothing/under/rank/scientist/skirt
|
||||
allowed_roles = list("Research Director","Scientist")
|
||||
|
||||
/datum/gear/uniform/skirt/job/cargo
|
||||
display_name = "skirt, cargo"
|
||||
path = /obj/item/clothing/under/rank/cargotech/skirt
|
||||
allowed_roles = list("Quartermaster","Cargo Technician")
|
||||
|
||||
/datum/gear/uniform/skirt/job/qm
|
||||
display_name = "skirt, QM"
|
||||
path = /obj/item/clothing/under/rank/cargo/skirt
|
||||
allowed_roles = list("Quartermaster")
|
||||
|
||||
/datum/gear/uniform/skirt/job/warden
|
||||
display_name = "skirt, warden"
|
||||
path = /obj/item/clothing/under/rank/warden/skirt
|
||||
allowed_roles = list("Head of Security", "Warden")
|
||||
|
||||
/datum/gear/uniform/skirt/job/security
|
||||
display_name = "skirt, security"
|
||||
path = /obj/item/clothing/under/rank/security/skirt
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/head_of_security
|
||||
display_name = "skirt, hos"
|
||||
path = /obj/item/clothing/under/rank/head_of_security/skirt
|
||||
allowed_roles = list("Head of Security")
|
||||
|
||||
/datum/gear/uniform/sec
|
||||
subtype_path = /datum/gear/uniform/sec
|
||||
|
||||
/datum/gear/uniform/sec/formal
|
||||
display_name = "security uniform, formal"
|
||||
path = /obj/item/clothing/under/rank/security/formal
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/sec/secorporate
|
||||
display_name = "security uniform, corporate"
|
||||
path = /obj/item/clothing/under/rank/security/corp
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/sec/dispatch
|
||||
display_name = "security uniform, dispatch"
|
||||
path = /obj/item/clothing/under/rank/dispatch
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/sec/casual
|
||||
display_name = "security uniform, casual"
|
||||
path = /obj/item/clothing/under/rank/security2
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/shorts
|
||||
subtype_path = /datum/gear/uniform/shorts
|
||||
|
||||
/datum/gear/uniform/shorts/red
|
||||
display_name = "shorts, red"
|
||||
path = /obj/item/clothing/under/shorts/red
|
||||
|
||||
/datum/gear/uniform/shorts/green
|
||||
display_name = "shorts, green"
|
||||
path = /obj/item/clothing/under/shorts/green
|
||||
|
||||
/datum/gear/uniform/shorts/blue
|
||||
display_name = "shorts, blue"
|
||||
path = /obj/item/clothing/under/shorts/blue
|
||||
|
||||
/datum/gear/uniform/shorts/black
|
||||
display_name = "shorts, black"
|
||||
path = /obj/item/clothing/under/shorts/black
|
||||
|
||||
/datum/gear/uniform/shorts/grey
|
||||
display_name = "shorts, grey"
|
||||
path = /obj/item/clothing/under/shorts/grey
|
||||
|
||||
/datum/gear/uniform/pants
|
||||
subtype_path = /datum/gear/uniform/pants
|
||||
|
||||
/datum/gear/uniform/pants/jeans
|
||||
display_name = "jeans, classic"
|
||||
path = /obj/item/clothing/under/pants/classicjeans
|
||||
|
||||
/datum/gear/uniform/pants/mjeans
|
||||
display_name = "jeans, mustang"
|
||||
path = /obj/item/clothing/under/pants/mustangjeans
|
||||
|
||||
/datum/gear/uniform/pants/bljeans
|
||||
display_name = "jeans, black"
|
||||
path = /obj/item/clothing/under/pants/blackjeans
|
||||
|
||||
/datum/gear/uniform/pants/yfjeans
|
||||
display_name = "jeans, Young Folks"
|
||||
path = /obj/item/clothing/under/pants/youngfolksjeans
|
||||
|
||||
/datum/gear/uniform/pants/whitepants
|
||||
display_name = "pants, white"
|
||||
path = /obj/item/clothing/under/pants/white
|
||||
|
||||
/datum/gear/uniform/pants/redpants
|
||||
display_name = "pants, red"
|
||||
path = /obj/item/clothing/under/pants/red
|
||||
|
||||
/datum/gear/uniform/pants/blackpants
|
||||
display_name = "pants, black"
|
||||
path = /obj/item/clothing/under/pants/black
|
||||
|
||||
/datum/gear/uniform/pants/tanpants
|
||||
display_name = "pants, tan"
|
||||
path = /obj/item/clothing/under/pants/tan
|
||||
|
||||
/datum/gear/uniform/pants/bluepants
|
||||
display_name = "pants, blue"
|
||||
path = /obj/item/clothing/under/pants/blue
|
||||
|
||||
/datum/gear/uniform/pants/trackpants
|
||||
display_name = "trackpants"
|
||||
path = /obj/item/clothing/under/pants/track
|
||||
|
||||
/datum/gear/uniform/pants/khakipants
|
||||
display_name = "pants, khaki"
|
||||
path = /obj/item/clothing/under/pants/khaki
|
||||
|
||||
/datum/gear/uniform/pants/caopants
|
||||
display_name = "pants, camo"
|
||||
path = /obj/item/clothing/under/pants/camo
|
||||
+2019
-1889
File diff suppressed because it is too large
Load Diff
+12
-5
@@ -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
|
||||
@@ -158,7 +158,8 @@
|
||||
nanotrasen_relation,
|
||||
speciesprefs,
|
||||
socks,
|
||||
body_accessory
|
||||
body_accessory,
|
||||
gear
|
||||
FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' AND slot='[slot]'"})
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
@@ -236,6 +237,7 @@
|
||||
//socks
|
||||
socks = query.item[58]
|
||||
body_accessory = query.item[59]
|
||||
gear = params2list(query.item[60])
|
||||
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
@@ -298,6 +300,7 @@
|
||||
if(!player_alt_titles) player_alt_titles = new()
|
||||
if(!organ_data) src.organ_data = list()
|
||||
if(!rlimb_data) src.rlimb_data = list()
|
||||
if(!gear) gear = list()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -305,12 +308,15 @@
|
||||
var/organlist
|
||||
var/rlimblist
|
||||
var/playertitlelist
|
||||
var/gearlist
|
||||
if(!isemptylist(organ_data))
|
||||
organlist = list2params(organ_data)
|
||||
if(!isemptylist(rlimb_data))
|
||||
rlimblist = list2params(rlimb_data)
|
||||
if(!isemptylist(player_alt_titles))
|
||||
playertitlelist = list2params(player_alt_titles)
|
||||
if(!isemptylist(gear))
|
||||
gearlist = list2params(gear)
|
||||
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
firstquery.Execute()
|
||||
@@ -374,7 +380,8 @@
|
||||
nanotrasen_relation='[nanotrasen_relation]',
|
||||
speciesprefs='[speciesprefs]',
|
||||
socks='[socks]',
|
||||
body_accessory='[body_accessory]'
|
||||
body_accessory='[body_accessory]',
|
||||
gear='[gearlist]'
|
||||
WHERE ckey='[C.ckey]'
|
||||
AND slot='[default_slot]'"}
|
||||
)
|
||||
@@ -405,7 +412,7 @@
|
||||
flavor_text, med_record, sec_record, gen_record,
|
||||
player_alt_titles,
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, speciesprefs,
|
||||
socks, body_accessory)
|
||||
socks, body_accessory, gear)
|
||||
|
||||
VALUES
|
||||
('[C.ckey]', '[default_slot]', '[sql_sanitize_text(metadata)]', '[sql_sanitize_text(real_name)]', '[be_random_name]','[gender]',
|
||||
@@ -426,7 +433,7 @@
|
||||
'[sql_sanitize_text(html_encode(flavor_text))]', '[sql_sanitize_text(html_encode(med_record))]', '[sql_sanitize_text(html_encode(sec_record))]', '[sql_sanitize_text(html_encode(gen_record))]',
|
||||
'[playertitlelist]',
|
||||
'[disabilities]', '[organlist]', '[rlimblist]', '[nanotrasen_relation]', '[speciesprefs]',
|
||||
'[socks]', '[body_accessory]')
|
||||
'[socks]', '[body_accessory]', '[gearlist]')
|
||||
|
||||
"}
|
||||
)
|
||||
+215
-215
@@ -1,216 +1,216 @@
|
||||
//toggles
|
||||
/client/verb/toggle_ghost_ears()
|
||||
set name = "Show/Hide GhostEars"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTEARS
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_sight()
|
||||
set name = "Show/Hide GhostSight"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTSIGHT
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_radio()
|
||||
set name = "Enable/Disable GhostRadio"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle between hearing all radio chatter, or only from nearby speakers"
|
||||
prefs.toggles ^= CHAT_GHOSTRADIO
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGR")
|
||||
|
||||
/client/proc/toggle_hear_radio()
|
||||
set name = "Show/Hide RadioChatter"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle seeing radiochatter from radios and speakers"
|
||||
if(!holder) return
|
||||
prefs.toggles ^= CHAT_RADIO
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers")
|
||||
feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggleadminhelpsound()
|
||||
set name = "Hear/Silence Adminhelps"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing a notification when admin PMs are recieved"
|
||||
if(!holder) return
|
||||
prefs.sound ^= SOUND_ADMINHELP
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")
|
||||
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/deadchat() // Deadchat toggle is usable by anyone.
|
||||
set name = "Show/Hide Deadchat"
|
||||
set category = "Preferences"
|
||||
set desc ="Toggles seeing deadchat"
|
||||
prefs.toggles ^= CHAT_DEAD
|
||||
prefs.save_preferences(src)
|
||||
|
||||
if(src.holder)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
|
||||
else
|
||||
to_chat(src, "As a ghost, you will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
|
||||
|
||||
feedback_add_details("admin_verb","TDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggleprayers()
|
||||
set name = "Show/Hide Prayers"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing prayers"
|
||||
prefs.toggles ^= CHAT_PRAYER
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.")
|
||||
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglescoreboard()
|
||||
set name = "Hide/Display End Round Scoreboard"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying end of round scoreboard"
|
||||
prefs.toggles ^= DISABLE_SCOREBOARD
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.")
|
||||
feedback_add_details("admin_verb","TScoreboard") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglekarmareminder()
|
||||
set name = "Hide/Display End Round Karma Reminder"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying end of round karma reminder"
|
||||
prefs.toggles ^= DISABLE_KARMA_REMINDER
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & DISABLE_KARMA_REMINDER) ? "no longer" : "now"] see the end of round karma reminder.")
|
||||
feedback_add_details("admin_verb","TKarmabugger") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggletitlemusic()
|
||||
set name = "Hear/Silence LobbyMusic"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing the GameLobby music"
|
||||
prefs.sound ^= SOUND_LOBBY
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
to_chat(src, "You will now hear music in the game lobby.")
|
||||
if(istype(mob, /mob/new_player))
|
||||
playtitlemusic()
|
||||
else
|
||||
to_chat(src, "You will no longer hear music in the game lobby.")
|
||||
if(istype(mob, /mob/new_player))
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 85, channel = 1))// stop the jamsz
|
||||
|
||||
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglemidis()
|
||||
set name = "Hear/Silence Midis"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing sounds uploaded by admins"
|
||||
prefs.sound ^= SOUND_MIDI
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_MIDI)
|
||||
to_chat(src, "You will now hear any sounds uploaded by admins.")
|
||||
else
|
||||
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
|
||||
break_sound.priority = 250
|
||||
to_chat(src, break_sound)//breaks the client's sound output on channel 777
|
||||
|
||||
to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
|
||||
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/listen_ooc()
|
||||
set name = "Show/Hide OOC"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing OutOfCharacter chat"
|
||||
prefs.toggles ^= CHAT_OOC
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/listen_looc()
|
||||
set name = "Show/Hide LOOC"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing Local OutOfCharacter chat"
|
||||
prefs.toggles ^= CHAT_LOOC
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel.")
|
||||
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
|
||||
set name = "Hear/Silence Ambience"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient sound effects"
|
||||
prefs.sound ^= SOUND_AMBIENCE
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_AMBIENCE)
|
||||
to_chat(src, "You will now hear ambient sounds.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient sounds.")
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 1))
|
||||
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Buzz() //No more headaches because headphones bump up shipambience.ogg to insanity levels.
|
||||
set name = "Hear/Silence White Noise"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient white noise"
|
||||
prefs.sound ^= SOUND_BUZZ
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_BUZZ)
|
||||
to_chat(src, "You will now hear ambient white noise.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient white noise.")
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 2))
|
||||
feedback_add_details("admin_verb","TBuzz") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/Toggle_Heartbeat() //to toggle off heartbeat sounds, in case they get too annoying
|
||||
set name = "Hear/Silence Heartbeat"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing heart beating sound effects"
|
||||
prefs.sound ^= SOUND_HEARTBEAT
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_HEARTBEAT)
|
||||
to_chat(src, "You will now hear heartbeat sounds.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear heartbeat sounds.")
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 1))
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 2))
|
||||
feedback_add_details("admin_verb","Thb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
// This needs a toggle because you people are awful and spammed terrible music
|
||||
/client/verb/toggle_instruments()
|
||||
set name = "Hear/Silence Instruments"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing musical instruments like the violin and piano"
|
||||
prefs.toggles ^= SOUND_INSTRUMENTS
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.toggles & SOUND_INSTRUMENTS)
|
||||
to_chat(src, "You will now hear people playing musical instruments.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear musical instruments.")
|
||||
feedback_add_details("admin_verb","TInstru") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_media()
|
||||
set name = "Hear/Silence Streaming"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing streaming media (radios, jukeboxes, etc)"
|
||||
|
||||
prefs.sound ^= SOUND_STREAMING
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.sound & SOUND_STREAMING) ? "now" : "no longer"] hear streamed media.")
|
||||
if(!media) return
|
||||
if(prefs.sound & SOUND_STREAMING)
|
||||
media.update_music()
|
||||
else
|
||||
media.stop_music()
|
||||
|
||||
/client/verb/setup_character()
|
||||
set name = "Game Preferences"
|
||||
set category = "Preferences"
|
||||
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
|
||||
prefs.current_tab = 1
|
||||
//toggles
|
||||
/client/verb/toggle_ghost_ears()
|
||||
set name = "Show/Hide GhostEars"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTEARS
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_sight()
|
||||
set name = "Show/Hide GhostSight"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTSIGHT
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_radio()
|
||||
set name = "Enable/Disable GhostRadio"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle between hearing all radio chatter, or only from nearby speakers"
|
||||
prefs.toggles ^= CHAT_GHOSTRADIO
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGR")
|
||||
|
||||
/client/proc/toggle_hear_radio()
|
||||
set name = "Show/Hide RadioChatter"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle seeing radiochatter from radios and speakers"
|
||||
if(!holder) return
|
||||
prefs.toggles ^= CHAT_RADIO
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers")
|
||||
feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggleadminhelpsound()
|
||||
set name = "Hear/Silence Adminhelps"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing a notification when admin PMs are recieved"
|
||||
if(!holder) return
|
||||
prefs.sound ^= SOUND_ADMINHELP
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")
|
||||
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/deadchat() // Deadchat toggle is usable by anyone.
|
||||
set name = "Show/Hide Deadchat"
|
||||
set category = "Preferences"
|
||||
set desc ="Toggles seeing deadchat"
|
||||
prefs.toggles ^= CHAT_DEAD
|
||||
prefs.save_preferences(src)
|
||||
|
||||
if(src.holder)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
|
||||
else
|
||||
to_chat(src, "As a ghost, you will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
|
||||
|
||||
feedback_add_details("admin_verb","TDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggleprayers()
|
||||
set name = "Show/Hide Prayers"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing prayers"
|
||||
prefs.toggles ^= CHAT_PRAYER
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.")
|
||||
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglescoreboard()
|
||||
set name = "Hide/Display End Round Scoreboard"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying end of round scoreboard"
|
||||
prefs.toggles ^= DISABLE_SCOREBOARD
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.")
|
||||
feedback_add_details("admin_verb","TScoreboard") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglekarmareminder()
|
||||
set name = "Hide/Display End Round Karma Reminder"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying end of round karma reminder"
|
||||
prefs.toggles ^= DISABLE_KARMA_REMINDER
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & DISABLE_KARMA_REMINDER) ? "no longer" : "now"] see the end of round karma reminder.")
|
||||
feedback_add_details("admin_verb","TKarmabugger") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggletitlemusic()
|
||||
set name = "Hear/Silence LobbyMusic"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing the GameLobby music"
|
||||
prefs.sound ^= SOUND_LOBBY
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
to_chat(src, "You will now hear music in the game lobby.")
|
||||
if(istype(mob, /mob/new_player))
|
||||
playtitlemusic()
|
||||
else
|
||||
to_chat(src, "You will no longer hear music in the game lobby.")
|
||||
if(istype(mob, /mob/new_player))
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)// stop the jamsz
|
||||
|
||||
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglemidis()
|
||||
set name = "Hear/Silence Midis"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing sounds uploaded by admins"
|
||||
prefs.sound ^= SOUND_MIDI
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_MIDI)
|
||||
to_chat(src, "You will now hear any sounds uploaded by admins.")
|
||||
else
|
||||
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
|
||||
break_sound.priority = 250
|
||||
src << break_sound //breaks the client's sound output on channel 777
|
||||
|
||||
to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
|
||||
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/listen_ooc()
|
||||
set name = "Show/Hide OOC"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing OutOfCharacter chat"
|
||||
prefs.toggles ^= CHAT_OOC
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/listen_looc()
|
||||
set name = "Show/Hide LOOC"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing Local OutOfCharacter chat"
|
||||
prefs.toggles ^= CHAT_LOOC
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel.")
|
||||
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
|
||||
set name = "Hear/Silence Ambience"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient sound effects"
|
||||
prefs.sound ^= SOUND_AMBIENCE
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_AMBIENCE)
|
||||
to_chat(src, "You will now hear ambient sounds.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient sounds.")
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
|
||||
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Buzz() //No more headaches because headphones bump up shipambience.ogg to insanity levels.
|
||||
set name = "Hear/Silence White Noise"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient white noise"
|
||||
prefs.sound ^= SOUND_BUZZ
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_BUZZ)
|
||||
to_chat(src, "You will now hear ambient white noise.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient white noise.")
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
feedback_add_details("admin_verb","TBuzz") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/Toggle_Heartbeat() //to toggle off heartbeat sounds, in case they get too annoying
|
||||
set name = "Hear/Silence Heartbeat"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing heart beating sound effects"
|
||||
prefs.sound ^= SOUND_HEARTBEAT
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_HEARTBEAT)
|
||||
to_chat(src, "You will now hear heartbeat sounds.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear heartbeat sounds.")
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
feedback_add_details("admin_verb","Thb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
// This needs a toggle because you people are awful and spammed terrible music
|
||||
/client/verb/toggle_instruments()
|
||||
set name = "Hear/Silence Instruments"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing musical instruments like the violin and piano"
|
||||
prefs.sound ^= SOUND_INSTRUMENTS
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_INSTRUMENTS)
|
||||
to_chat(src, "You will now hear people playing musical instruments.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear musical instruments.")
|
||||
feedback_add_details("admin_verb","TInstru") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_media()
|
||||
set name = "Hear/Silence Streaming"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing streaming media (radios, jukeboxes, etc)"
|
||||
|
||||
prefs.sound ^= SOUND_STREAMING
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.sound & SOUND_STREAMING) ? "now" : "no longer"] hear streamed media.")
|
||||
if(!media) return
|
||||
if(prefs.sound & SOUND_STREAMING)
|
||||
media.update_music()
|
||||
else
|
||||
media.stop_music()
|
||||
|
||||
/client/verb/setup_character()
|
||||
set name = "Game Preferences"
|
||||
set category = "Preferences"
|
||||
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
|
||||
prefs.current_tab = 1
|
||||
prefs.ShowChoices(usr)
|
||||
+111
-108
@@ -1,5 +1,6 @@
|
||||
/obj/item/clothing
|
||||
name = "clothing"
|
||||
burn_state = FLAMMABLE
|
||||
var/list/species_restricted = null //Only these species can wear this kit.
|
||||
var/rig_restrict_helmet = 0 // Stops the user from equipping a rig helmet without attaching it to the suit first.
|
||||
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
|
||||
@@ -31,7 +32,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 +67,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)
|
||||
@@ -79,14 +80,15 @@
|
||||
//Ears: currently only used for headsets and earmuffs
|
||||
/obj/item/clothing/ears
|
||||
name = "ears"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_EARS
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/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
|
||||
|
||||
@@ -95,7 +97,7 @@
|
||||
..()
|
||||
return
|
||||
|
||||
if(flags & NODROP)
|
||||
if(!usr.canUnEquip(src))
|
||||
return
|
||||
|
||||
var/obj/item/clothing/ears/O
|
||||
@@ -110,7 +112,7 @@
|
||||
|
||||
user.unEquip(src)
|
||||
|
||||
if (O)
|
||||
if(O)
|
||||
user.put_in_hands(O)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
@@ -119,7 +121,7 @@
|
||||
|
||||
/obj/item/clothing/ears/offear
|
||||
name = "Other ear"
|
||||
w_class = 5.0
|
||||
w_class = 5
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "block"
|
||||
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
||||
@@ -139,12 +141,13 @@
|
||||
flags = EARBANGPROTECT
|
||||
strip_delay = 15
|
||||
put_on_delay = 25
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
//Glasses
|
||||
/obj/item/clothing/glasses
|
||||
name = "glasses"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
flags = GLASSESCOVERSEYES
|
||||
slot_flags = SLOT_EYES
|
||||
materials = list(MAT_GLASS = 250)
|
||||
@@ -155,6 +158,7 @@
|
||||
var/color_view = null//overrides client.color while worn
|
||||
strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets
|
||||
put_on_delay = 25
|
||||
burn_state = FIRE_PROOF
|
||||
species_restricted = list("exclude","Kidan")
|
||||
/*
|
||||
SEE_SELF // can see self, no matter what
|
||||
@@ -171,7 +175,7 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/gloves
|
||||
name = "gloves"
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
icon = 'icons/obj/clothing/gloves.dmi'
|
||||
siemens_coefficient = 0.50
|
||||
body_parts_covered = HANDS
|
||||
@@ -182,13 +186,15 @@ BLIND // can't see anything
|
||||
var/clipped = 0
|
||||
strip_delay = 20
|
||||
put_on_delay = 40
|
||||
species_restricted = list("exclude","Unathi","Tajaran","Wryn")
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/gloves.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/gloves.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/gloves/proc/Touch()
|
||||
return
|
||||
|
||||
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!clipped)
|
||||
@@ -197,9 +203,6 @@ BLIND // can't see anything
|
||||
clipped = 1
|
||||
name = "mangled [name]"
|
||||
desc = "[desc] They have had the fingertips cut off of them."
|
||||
if("exclude" in species_restricted)
|
||||
species_restricted -= "Unathi"
|
||||
species_restricted -= "Tajaran"
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] have already been clipped!</span>")
|
||||
@@ -207,13 +210,10 @@ BLIND // can't see anything
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/proc/Touch()
|
||||
return
|
||||
|
||||
/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))
|
||||
@@ -289,7 +289,6 @@ BLIND // can't see anything
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_MASK
|
||||
var/mask_adjusted = 0
|
||||
var/ignore_maskadjust = 1
|
||||
var/adjusted_flags = null
|
||||
strip_delay = 40
|
||||
put_on_delay = 40
|
||||
@@ -297,65 +296,61 @@ BLIND // can't see anything
|
||||
//Proc that moves gas/breath masks out of the way
|
||||
/obj/item/clothing/mask/proc/adjustmask(var/mob/user)
|
||||
var/mob/living/carbon/human/H = usr //Used to check if the mask is on the head, to check if the hands are full, and to turn off internals if they were on when the mask was pushed out of the way.
|
||||
if(!ignore_maskadjust)
|
||||
if(user.incapacitated()) //This check allows you to adjust your masks while you're buckled into chairs or beds.
|
||||
return
|
||||
if(mask_adjusted)
|
||||
icon_state = copytext(icon_state, 1, findtext(icon_state, "_up")) /*Trims the '_up' off the end of the icon state, thus reverting to the most recent previous state.
|
||||
Had to use this instead of initial() because initial reverted to the wrong state.*/
|
||||
gas_transfer_coefficient = initial(gas_transfer_coefficient)
|
||||
permeability_coefficient = initial(permeability_coefficient)
|
||||
to_chat(user, "You push \the [src] back into place.")
|
||||
mask_adjusted = 0
|
||||
slot_flags = initial(slot_flags)
|
||||
if(flags_inv != initial(flags_inv))
|
||||
if(initial(flags_inv) & HIDEFACE) //If the mask is one that hides the face and can be adjusted yet lost that trait when it was adjusted, make it hide the face again.
|
||||
flags_inv |= HIDEFACE
|
||||
if(flags != initial(flags))
|
||||
if(initial(flags) & MASKCOVERSMOUTH) //If the mask covers the mouth when it's down and can be adjusted yet lost that trait when it was adjusted, make it cover the mouth again.
|
||||
flags |= MASKCOVERSMOUTH
|
||||
if(initial(flags) & AIRTIGHT) //If the mask is airtight and thus, one that you'd be able to run internals from yet can't because it was adjusted, make it airtight again.
|
||||
flags |= AIRTIGHT
|
||||
if(H.head == src)
|
||||
if(flags_inv == HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer.
|
||||
if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground.
|
||||
user.unEquip(src)
|
||||
else //Otherwise, put it in an available hand, the active one preferentially.
|
||||
src.loc = user
|
||||
H.head = null
|
||||
user.put_in_hands(src)
|
||||
else
|
||||
icon_state += "_up"
|
||||
to_chat(user, "You push \the [src] out of the way.")
|
||||
gas_transfer_coefficient = null
|
||||
permeability_coefficient = null
|
||||
mask_adjusted = 1
|
||||
if(adjusted_flags)
|
||||
slot_flags = adjusted_flags
|
||||
if(ishuman(user))
|
||||
if(H.internal)
|
||||
if(user.wear_mask == src) /*If the user was wearing the mask providing internals on their face at the time it was adjusted, turn off internals.
|
||||
Otherwise, they adjusted it while it was in their hands or some such so we won't be needing to turn off internals.*/
|
||||
if(H.internals)
|
||||
H.internals.icon_state = "internal0"
|
||||
H.internal = null
|
||||
if(flags_inv & HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer.
|
||||
flags_inv &= ~HIDEFACE /*Done after the above to avoid having to do a check for initial(src.flags_inv == HIDEFACE).
|
||||
This reveals the user's face since the bandana will now be going on their head.*/
|
||||
if(flags & MASKCOVERSMOUTH) //Mask won't cover the mouth any more since it's been pushed out of the way. Allows for CPRing with adjusted masks.
|
||||
flags &= ~MASKCOVERSMOUTH
|
||||
if(flags & AIRTIGHT) //If the mask was airtight, it won't be anymore since you just pushed it off your face.
|
||||
flags &= ~AIRTIGHT
|
||||
if(user.wear_mask == src)
|
||||
if(initial(flags_inv) == HIDEFACE) //Means that you won't have to take off and put back on simple things like breath masks which, realistically, can just be pulled down off your face.
|
||||
if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground.
|
||||
user.unEquip(src)
|
||||
else //Otherwise, put it in an available hand, the active one preferentially.
|
||||
src.loc = user
|
||||
user.wear_mask = null
|
||||
user.put_in_hands(src)
|
||||
usr.update_inv_wear_mask()
|
||||
usr.update_inv_head()
|
||||
if(user.incapacitated()) //This check allows you to adjust your masks while you're buckled into chairs or beds.
|
||||
return
|
||||
if(mask_adjusted)
|
||||
icon_state = initial(icon_state)
|
||||
gas_transfer_coefficient = initial(gas_transfer_coefficient)
|
||||
permeability_coefficient = initial(permeability_coefficient)
|
||||
to_chat(user, "<span class='notice'>You push \the [src] back into place.</span>")
|
||||
mask_adjusted = 0
|
||||
slot_flags = initial(slot_flags)
|
||||
if(flags_inv != initial(flags_inv))
|
||||
if(initial(flags_inv) & HIDEFACE) //If the mask is one that hides the face and can be adjusted yet lost that trait when it was adjusted, make it hide the face again.
|
||||
flags_inv |= HIDEFACE
|
||||
if(flags != initial(flags))
|
||||
if(initial(flags) & MASKCOVERSMOUTH) //If the mask covers the mouth when it's down and can be adjusted yet lost that trait when it was adjusted, make it cover the mouth again.
|
||||
flags |= MASKCOVERSMOUTH
|
||||
if(initial(flags) & AIRTIGHT) //If the mask is airtight and thus, one that you'd be able to run internals from yet can't because it was adjusted, make it airtight again.
|
||||
flags |= AIRTIGHT
|
||||
if(H.head == src && flags_inv == HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer.
|
||||
if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground.
|
||||
user.unEquip(src)
|
||||
else //Otherwise, put it in an available hand, the active one preferentially.
|
||||
src.loc = user
|
||||
H.head = null
|
||||
user.put_in_hands(src)
|
||||
else
|
||||
icon_state += "_up"
|
||||
to_chat(user, "<span class='notice'>You push \the [src] out of the way.</span>")
|
||||
gas_transfer_coefficient = null
|
||||
permeability_coefficient = null
|
||||
mask_adjusted = 1
|
||||
if(adjusted_flags)
|
||||
slot_flags = adjusted_flags
|
||||
if(ishuman(user) && H.internal && user.wear_mask == src) /*If the user was wearing the mask providing internals on their face at the time it was adjusted, turn off internals.
|
||||
Otherwise, they adjusted it while it was in their hands or some such so we won't be needing to turn off internals.*/
|
||||
H.update_internals_hud_icon(0)
|
||||
H.internal = null
|
||||
if(flags_inv & HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer.
|
||||
flags_inv &= ~HIDEFACE /*Done after the above to avoid having to do a check for initial(src.flags_inv == HIDEFACE).
|
||||
This reveals the user's face since the bandana will now be going on their head.*/
|
||||
if(flags & MASKCOVERSMOUTH) //Mask won't cover the mouth any more since it's been pushed out of the way. Allows for CPRing with adjusted masks.
|
||||
flags &= ~MASKCOVERSMOUTH
|
||||
if(flags & AIRTIGHT) //If the mask was airtight, it won't be anymore since you just pushed it off your face.
|
||||
flags &= ~AIRTIGHT
|
||||
if(user.wear_mask == src && initial(flags_inv) == HIDEFACE) //Means that you won't have to take off and put back on simple things like breath masks which, realistically, can just be pulled down off your face.
|
||||
if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground.
|
||||
user.unEquip(src)
|
||||
else //Otherwise, put it in an available hand, the active one preferentially.
|
||||
src.loc = user
|
||||
user.wear_mask = null
|
||||
user.put_in_hands(src)
|
||||
usr.update_inv_wear_mask()
|
||||
usr.update_inv_head()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
//Shoes
|
||||
/obj/item/clothing/shoes
|
||||
@@ -375,7 +370,6 @@ BLIND // can't see anything
|
||||
|
||||
permeability_coefficient = 0.50
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
species_restricted = list("exclude","Unathi","Tajaran","Wryn")
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/shoes.dmi'
|
||||
@@ -408,9 +402,6 @@ BLIND // can't see anything
|
||||
item_state = "[item_state]_opentoe"
|
||||
name = "mangled [name]"
|
||||
desc = "[desc] They have had their toes opened up."
|
||||
if("exclude" in species_restricted)
|
||||
species_restricted -= "Unathi"
|
||||
species_restricted -= "Tajaran"
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] have already had their toes cut open!</span>")
|
||||
@@ -452,6 +443,7 @@ BLIND // can't see anything
|
||||
var/suit_adjusted = 0
|
||||
var/ignore_suitadjust = 1
|
||||
var/adjust_flavour = null
|
||||
var/list/hide_tail_by_species = null
|
||||
|
||||
//Proc that opens and closes jackets.
|
||||
/obj/item/clothing/suit/proc/adjustsuit(var/mob/user)
|
||||
@@ -467,6 +459,9 @@ BLIND // can't see anything
|
||||
flavour = "[copytext(adjust_flavour, 3, lentext(adjust_flavour) + 1)] up" //Trims off the 'un' at the beginning of the word. unzip -> zip, unbutton->button.
|
||||
to_chat(user, "You [flavour] \the [src].")
|
||||
suit_adjusted = 0 //Suit is no longer adjusted.
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
else
|
||||
var/flavour = "open"
|
||||
icon_state += "_open"
|
||||
@@ -475,6 +470,9 @@ BLIND // can't see anything
|
||||
flavour = "[adjust_flavour]"
|
||||
to_chat(user, "You [flavour] \the [src].")
|
||||
suit_adjusted = 1 //Suit's adjusted.
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
else
|
||||
if(user.canUnEquip(src)) //Checks to see if the item can be unequipped. If so, lets shred. Otherwise, struggle and fail.
|
||||
if(contents) //If the suit's got any storage capability...
|
||||
@@ -496,20 +494,21 @@ BLIND // can't see anything
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You attempt to button up the velcro on \the [src], before promptly realising how retarded you are.</span>")
|
||||
|
||||
/obj/item/clothing/suit/verb/openjacket(var/mob/user) //The verb you can use to adjust jackets.
|
||||
set name = "Open/Close Jacket"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(!isliving(usr))
|
||||
return
|
||||
if(usr.stat)
|
||||
return
|
||||
adjustsuit(user)
|
||||
/obj/item/clothing/suit/equipped(var/mob/living/carbon/human/user, var/slot) //Handle tail-hiding on a by-species basis.
|
||||
..()
|
||||
if(ishuman(user) && hide_tail_by_species && slot == slot_wear_suit)
|
||||
if(user.species.name in hide_tail_by_species)
|
||||
if(!(flags_inv & HIDETAIL)) //Hide the tail if the user's species is in the hide_tail_by_species list and the tail isn't already hidden.
|
||||
flags_inv |= HIDETAIL
|
||||
else
|
||||
if(!(initial(flags_inv) & HIDETAIL) && (flags_inv & HIDETAIL)) //Otherwise, remove the HIDETAIL flag if it wasn't already in the flags_inv to start with.
|
||||
flags_inv &= ~HIDETAIL
|
||||
|
||||
/obj/item/clothing/suit/ui_action_click() //This is what happens when you click the HUD action button to adjust your suit.
|
||||
/obj/item/clothing/suit/ui_action_click(mob/user) //This is what happens when you click the HUD action button to adjust your suit.
|
||||
if(!ignore_suitadjust)
|
||||
adjustsuit(usr)
|
||||
else ..() //This is required in order to ensure that the UI buttons for items that have alternate functions tied to UI buttons still work.
|
||||
adjustsuit(user)
|
||||
else
|
||||
..() //This is required in order to ensure that the UI buttons for items that have alternate functions tied to UI buttons still work.
|
||||
|
||||
//Spacesuit
|
||||
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
|
||||
@@ -521,7 +520,7 @@ BLIND // can't see anything
|
||||
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
item_state = "s_helmet"
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
cold_protection = HEAD
|
||||
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
|
||||
@@ -531,6 +530,7 @@ BLIND // can't see anything
|
||||
flash_protect = 2
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/suit/space
|
||||
name = "Space suit"
|
||||
@@ -543,8 +543,8 @@ BLIND // can't see anything
|
||||
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank)
|
||||
slowdown = 2
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
slowdown = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
|
||||
@@ -552,6 +552,7 @@ BLIND // can't see anything
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
|
||||
strip_delay = 80
|
||||
put_on_delay = 80
|
||||
burn_state = FIRE_PROOF
|
||||
species_restricted = list("exclude","Diona","Vox","Wryn")
|
||||
|
||||
//Under clothing
|
||||
@@ -561,7 +562,7 @@ BLIND // can't see anything
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
permeability_coefficient = 0.90
|
||||
slot_flags = SLOT_ICLOTHING
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/uniform.dmi',
|
||||
@@ -586,7 +587,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)
|
||||
@@ -619,18 +620,20 @@ 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 ))
|
||||
if(!usr.canUnEquip(src))
|
||||
to_chat(usr, "[src] appears stuck on you!")
|
||||
return
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
usr.unEquip(src)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/clothing/glasses
|
||||
name = "glasses"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
//w_class = 2.0
|
||||
//w_class = 2
|
||||
//flags = GLASSESCOVERSEYES
|
||||
//slot_flags = SLOT_EYES
|
||||
//var/vision_flags = 0
|
||||
@@ -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)
|
||||
@@ -51,8 +51,8 @@
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
vision_flags = SEE_TURFS
|
||||
prescription_upgradable = 1
|
||||
species_fit = list("Vox")
|
||||
see_darkness = 0 //don't render darkness while wearing mesons
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/eyes.dmi'
|
||||
@@ -97,15 +97,15 @@
|
||||
item_state = "glasses"
|
||||
prescription_upgradable = 0
|
||||
scan_reagents = 1 //You can see reagents while wearing science goggles
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
actions_types = list(/datum/action/item_action/toggle_research_scanner)
|
||||
|
||||
/obj/item/clothing/glasses/science/equipped(mob/user, slot)
|
||||
/obj/item/clothing/glasses/science/item_action_slot_check(slot)
|
||||
if(slot == slot_glasses)
|
||||
user.scanner.Grant(user)
|
||||
..(user, slot)
|
||||
|
||||
/obj/item/clothing/glasses/science/dropped(mob/user)
|
||||
user.scanner.devices -= 1
|
||||
..(user)
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/glasses/science/night
|
||||
name = "Night Vision Science Goggle"
|
||||
@@ -120,6 +120,10 @@
|
||||
desc = "These'll keep the soap out of your eyes."
|
||||
icon_state = "purple"
|
||||
item_state = "glasses"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/night
|
||||
name = "Night Vision Goggles"
|
||||
@@ -140,12 +144,17 @@
|
||||
desc = "Yarr."
|
||||
icon_state = "eyepatch"
|
||||
item_state = "eyepatch"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/monocle
|
||||
name = "monocle"
|
||||
desc = "Such a dapper eyepiece!"
|
||||
icon_state = "monocle"
|
||||
item_state = "headset" // lol
|
||||
prescription_upgradable = 1
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
@@ -178,6 +187,10 @@
|
||||
icon_state = "glasses"
|
||||
item_state = "glasses"
|
||||
prescription = 1
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/regular/hipster
|
||||
name = "prescription glasses"
|
||||
@@ -190,12 +203,21 @@
|
||||
name = "3D glasses"
|
||||
icon_state = "3d"
|
||||
item_state = "3d"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/gglasses
|
||||
name = "Green Glasses"
|
||||
desc = "Forest green glasses, like the kind you'd wear when hatching a nasty scheme."
|
||||
icon_state = "gglasses"
|
||||
item_state = "gglasses"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
prescription_upgradable = 1
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses
|
||||
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes."
|
||||
@@ -216,13 +238,16 @@
|
||||
/obj/item/clothing/glasses/sunglasses/noir
|
||||
name = "noir sunglasses"
|
||||
desc = "Somehow these seem even more out-of-date than normal sunglasses."
|
||||
action_button_name = "Noir Mode"
|
||||
actions_types = list(/datum/action/item_action/noir)
|
||||
var/noir_mode = 0
|
||||
color_view = MATRIX_GREYSCALE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/noir/attack_self()
|
||||
if(is_equipped())
|
||||
toggle_noir()
|
||||
toggle_noir()
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/noir/item_action_slot_check(slot)
|
||||
if(slot == slot_glasses)
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/noir/proc/toggle_noir()
|
||||
if(!noir_mode)
|
||||
@@ -251,16 +276,12 @@
|
||||
name = "agreeable glasses"
|
||||
desc = "H.C Limited edition."
|
||||
var/punused = null
|
||||
action_button_name = "YEAH!"
|
||||
actions_types = list(/datum/action/item_action/YEEEAAAAAHHHHHHHHHHHHH)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/yeah/attack_self()
|
||||
pun()
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/yeah/verb/pun()
|
||||
set category = "Object"
|
||||
set name = "YEAH!"
|
||||
set src in usr
|
||||
/obj/item/clothing/glasses/sunglasses/yeah/proc/pun()
|
||||
if(!punused)//one per round
|
||||
punused = 1
|
||||
playsound(src.loc, 'sound/misc/yeah.ogg', 100, 0)
|
||||
@@ -304,7 +325,7 @@
|
||||
desc = "Protects the eyes from welders, approved by the mad scientist association."
|
||||
icon_state = "welding-g"
|
||||
item_state = "welding-g"
|
||||
action_button_name = "Flip welding goggles"
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
flash_protect = 2
|
||||
tint = 2
|
||||
species_fit = list("Vox")
|
||||
@@ -316,31 +337,28 @@
|
||||
/obj/item/clothing/glasses/welding/attack_self()
|
||||
toggle()
|
||||
|
||||
/obj/item/clothing/glasses/welding/proc/toggle()
|
||||
if(up)
|
||||
up = !up
|
||||
flags |= GLASSESCOVERSEYES
|
||||
flags_inv |= HIDEEYES
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(usr, "You flip the [src] down to protect your eyes.")
|
||||
flash_protect = 2
|
||||
tint = initial(tint) //better than istype
|
||||
else
|
||||
up = !up
|
||||
flags &= ~GLASSESCOVERSEYES
|
||||
flags_inv &= ~HIDEEYES
|
||||
icon_state = "[initial(icon_state)]up"
|
||||
to_chat(usr, "You push the [src] up out of your face.")
|
||||
flash_protect = 0
|
||||
tint = 0
|
||||
usr.update_inv_glasses()
|
||||
|
||||
/obj/item/clothing/glasses/welding/verb/toggle()
|
||||
set category = "Object"
|
||||
set name = "Adjust welding goggles"
|
||||
set src in usr
|
||||
|
||||
if(usr.canmove && !usr.stat && !usr.restrained())
|
||||
if(src.up)
|
||||
src.up = !src.up
|
||||
src.flags |= GLASSESCOVERSEYES
|
||||
flags_inv |= HIDEEYES
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(usr, "You flip the [src] down to protect your eyes.")
|
||||
flash_protect = 2
|
||||
tint = initial(tint) //better than istype
|
||||
else
|
||||
src.up = !src.up
|
||||
src.flags &= ~HEADCOVERSEYES
|
||||
flags_inv &= ~HIDEEYES
|
||||
icon_state = "[initial(icon_state)]up"
|
||||
to_chat(usr, "You push the [src] up out of your face.")
|
||||
flash_protect = 0
|
||||
tint = 0
|
||||
|
||||
usr.update_inv_glasses()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/glasses/welding/superior
|
||||
name = "superior welding goggles"
|
||||
@@ -349,11 +367,6 @@
|
||||
item_state = "rwelding-g"
|
||||
flash_protect = 2
|
||||
tint = 0
|
||||
action_button_name = "Flip welding goggles"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold
|
||||
name = "blindfold"
|
||||
@@ -364,10 +377,6 @@
|
||||
flash_protect = 2
|
||||
tint = 3 //to make them blind
|
||||
prescription_upgradable = 0
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/prescription
|
||||
prescription = 1
|
||||
@@ -376,12 +385,6 @@
|
||||
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks many flashes."
|
||||
icon_state = "bigsunglasses"
|
||||
item_state = "bigsunglasses"
|
||||
flash_protect = 1
|
||||
tint = 1
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/thermal
|
||||
name = "Optical Thermal Scanner"
|
||||
@@ -392,6 +395,10 @@
|
||||
vision_flags = SEE_MOBS
|
||||
invisa_view = 2
|
||||
flash_protect = -1
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
emp_act(severity)
|
||||
if(istype(src.loc, /mob/living/carbon/human))
|
||||
@@ -410,10 +417,7 @@
|
||||
desc = "Used for seeing walls, floors, and stuff through anything."
|
||||
icon_state = "meson"
|
||||
origin_tech = "magnets=3;syndicate=4"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
prescription_upgradable = 1
|
||||
|
||||
/obj/item/clothing/glasses/thermal/monocle
|
||||
name = "Thermoncle"
|
||||
@@ -432,10 +436,6 @@
|
||||
desc = "A set of implantable lenses designed to augment your vision"
|
||||
icon_state = "thermalimplants"
|
||||
item_state = "syringe_kit"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/thermal/cyber
|
||||
name = "Eye Replacement Implant"
|
||||
@@ -493,4 +493,4 @@
|
||||
desc = "Just who the hell do you think I am?!"
|
||||
name = "gar glasses"
|
||||
icon_state = "gar"
|
||||
item_state = "gar"
|
||||
item_state = "gar"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
H.add_hud_to(user)
|
||||
|
||||
/obj/item/clothing/glasses/hud/dropped(mob/living/carbon/human/user)
|
||||
..()
|
||||
if(HUDType && istype(user) && user.glasses == src)
|
||||
var/datum/atom_hud/H = huds[HUDType]
|
||||
H.remove_hud_from(user)
|
||||
@@ -28,13 +29,17 @@
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
|
||||
icon_state = "healthhud"
|
||||
HUDType = DATA_HUD_MEDICAL_ADVANCED
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/health_advanced
|
||||
name = "\improper Advanced Health Scanner HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. Includes anti-flash filter."
|
||||
icon_state = "advmedhud"
|
||||
flash_protect = 1
|
||||
HUDType = DATA_HUD_MEDICAL_ADVANCED
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/night
|
||||
name = "\improper Night Vision Health Scanner HUD"
|
||||
@@ -50,6 +55,10 @@
|
||||
desc = "A heads-up display capable of analyzing the integrity and status of robotics and exosuits."
|
||||
icon_state = "diagnostichud"
|
||||
HUDType = DATA_HUD_DIAGNOSTIC
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/hud/diagnostic/night
|
||||
name = "Night Vision Diagnostic HUD"
|
||||
@@ -65,18 +74,22 @@
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records."
|
||||
icon_state = "securityhud"
|
||||
var/global/list/jobs[0]
|
||||
flash_protect = 1
|
||||
HUDType = DATA_HUD_SECURITY_ADVANCED
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/chameleon
|
||||
name = "Chamleon Security HUD"
|
||||
name = "Chameleon Security HUD"
|
||||
desc = "A stolen security HUD integrated with Syndicate chameleon technology. Toggle to disguise the HUD. Provides flash protection."
|
||||
flash_protect = 1
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/chameleon/attack_self(mob/user)
|
||||
chameleon(user)
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/jensenshades
|
||||
/obj/item/clothing/glasses/hud/security/sunglasses/jensenshades
|
||||
name = "augmented shades"
|
||||
desc = "Polarized bioneural eyewear, designed to augment your vision."
|
||||
icon_state = "jensenshades"
|
||||
@@ -99,13 +112,26 @@
|
||||
darkness_view = 1
|
||||
flash_protect = 1
|
||||
tint = 1
|
||||
HUDType = DATA_HUD_SECURITY_ADVANCED
|
||||
prescription_upgradable = 1
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
"Drask" = 'icons/mob/species/drask/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/sunglasses/prescription
|
||||
prescription = 1
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/hud/hydroponic
|
||||
name = "Hydroponic HUD"
|
||||
desc = "A heads-up display capable of analyzing the health and status of plants growing in hydro trays and soil."
|
||||
icon_state = "hydroponichud"
|
||||
HUDType = DATA_HUD_HYDROPONIC
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/hud/hydroponic/night
|
||||
name = "Night Vision Hydroponic HUD"
|
||||
desc = "A hydroponic HUD fitted with a light amplifier."
|
||||
icon_state = "hydroponichudnight"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
prescription_upgradable = 0
|
||||
@@ -4,7 +4,6 @@
|
||||
icon_state = "boxing"
|
||||
item_state = "boxing"
|
||||
put_on_delay = 60
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/gloves/boxing/green
|
||||
icon_state = "boxinggreen"
|
||||
|
||||
@@ -6,8 +6,33 @@
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
item_color="yellow"
|
||||
power
|
||||
var/next_shock = 0
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/power
|
||||
description_antag = "These are a pair of power gloves, and can be used to fire bolts of electricity while standing over powered power cables."
|
||||
var/old_mclick_override
|
||||
var/datum/middleClickOverride/power_gloves/mclick_override = new /datum/middleClickOverride/power_gloves
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/power/equipped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(slot == slot_gloves)
|
||||
if(H.middleClickOverride)
|
||||
old_mclick_override = H.middleClickOverride
|
||||
H.middleClickOverride = mclick_override
|
||||
to_chat(H, "<span class='notice'>You feel electricity begin to build up in [src].</span>")
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/power/dropped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(slot_gloves) == src && H.middleClickOverride == mclick_override)
|
||||
if(old_mclick_override)
|
||||
H.middleClickOverride = old_mclick_override
|
||||
old_mclick_override = null
|
||||
else
|
||||
H.middleClickOverride = null
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/fake
|
||||
desc = "These gloves will protect the wearer from electric shock. They don't feel like rubber..."
|
||||
@@ -21,6 +46,7 @@
|
||||
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
|
||||
permeability_coefficient = 0.05
|
||||
item_color="yellow"
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
New()
|
||||
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
|
||||
@@ -35,16 +61,30 @@
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
burn_state = FIRE_PROOF
|
||||
var/can_be_cut = 1
|
||||
|
||||
|
||||
hos
|
||||
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
/obj/item/clothing/gloves/color/black/hos
|
||||
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
|
||||
ce
|
||||
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
/obj/item/clothing/gloves/color/black/ce
|
||||
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
|
||||
thief
|
||||
pickpocket = 1
|
||||
/obj/item/clothing/gloves/color/black/thief
|
||||
pickpocket = 1
|
||||
|
||||
/obj/item/clothing/gloves/color/black/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
|
||||
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
|
||||
playsound(user.loc,'sound/items/Wirecutter.ogg', rand(10,50), 1)
|
||||
var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc)
|
||||
if(pickpocket)
|
||||
F.pickpocket = 1
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/color/orange
|
||||
name = "orange gloves"
|
||||
@@ -65,6 +105,7 @@
|
||||
desc = "These gloves will protect the wearer from electric shock."
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/gloves/color/rainbow
|
||||
name = "rainbow gloves"
|
||||
@@ -135,6 +176,7 @@
|
||||
permeability_coefficient = 0.01
|
||||
item_color="white"
|
||||
transfer_prints = TRUE
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/gloves/color/latex/nitrile
|
||||
name = "nitrile gloves"
|
||||
@@ -167,4 +209,4 @@
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
strip_delay = 60
|
||||
strip_delay = 60
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
transfer_prints = TRUE
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
species_restricted = null
|
||||
strip_delay = 40
|
||||
put_on_delay = 20
|
||||
clipped = 1
|
||||
@@ -30,6 +29,7 @@
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/gloves/botanic_leather
|
||||
desc = "These leather gloves protect against thorns, barbs, prickles, spikes and other harmful objects of floral origin."
|
||||
@@ -41,10 +41,18 @@
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/gloves/batmangloves
|
||||
desc = "Used for handling all things bat related."
|
||||
name = "batgloves"
|
||||
icon_state = "bmgloves"
|
||||
item_state = "bmgloves"
|
||||
item_color="bmgloves"
|
||||
item_color="bmgloves"
|
||||
|
||||
/obj/item/clothing/gloves/cursedclown
|
||||
name = "cursed white gloves"
|
||||
desc = "These things smell terrible, and they're all lumpy. Gross."
|
||||
icon_state = "latex"
|
||||
item_state = "lgloves"
|
||||
flags = NODROP
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user