mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
More globals (#19247)
* More globals * planets * . * . * Update jukebox.dm * Fix timer callback syntax in jukebox.dm * .
This commit is contained in:
@@ -1,61 +1,61 @@
|
||||
var/CMinutes = null
|
||||
var/savefile/Banlist
|
||||
GLOBAL_VAR_INIT(c_minutes, 0)
|
||||
GLOBAL_DATUM(banlist, /savefile)
|
||||
|
||||
|
||||
/proc/CheckBan(var/ckey, var/id, var/address)
|
||||
if(!Banlist) // if Banlist cannot be located for some reason
|
||||
if(!GLOB.banlist) // if Banlist cannot be located for some reason
|
||||
LoadBans() // try to load the bans
|
||||
if(!Banlist) // uh oh, can't find bans!
|
||||
if(!GLOB.banlist) // uh oh, can't find bans!
|
||||
return 0 // ABORT ABORT ABORT
|
||||
|
||||
. = list()
|
||||
var/appeal
|
||||
if(config && CONFIG_GET(string/banappeals))
|
||||
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[CONFIG_GET(string/banappeals)]'>[CONFIG_GET(string/banappeals)]</a>"
|
||||
Banlist.cd = "/base"
|
||||
if( "[ckey][id]" in Banlist.dir )
|
||||
Banlist.cd = "[ckey][id]"
|
||||
if (Banlist["temp"])
|
||||
if (!GetExp(Banlist["minutes"]))
|
||||
GLOB.banlist.cd = "/base"
|
||||
if( "[ckey][id]" in GLOB.banlist.dir )
|
||||
GLOB.banlist.cd = "[ckey][id]"
|
||||
if (GLOB.banlist["temp"])
|
||||
if (!GetExp(GLOB.banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: [GetExp(GLOB.banlist["minutes"])]\nBy: [GLOB.banlist["bannedby"]][appeal]"
|
||||
else
|
||||
Banlist.cd = "/base/[ckey][id]"
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMANENT</B>\nBy: [Banlist["bannedby"]][appeal]"
|
||||
GLOB.banlist.cd = "/base/[ckey][id]"
|
||||
.["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: <B>PERMANENT</B>\nBy: [GLOB.banlist["bannedby"]][appeal]"
|
||||
.["reason"] = "ckey/id"
|
||||
return .
|
||||
else
|
||||
for (var/A in Banlist.dir)
|
||||
Banlist.cd = "/base/[A]"
|
||||
for (var/A in GLOB.banlist.dir)
|
||||
GLOB.banlist.cd = "/base/[A]"
|
||||
var/matches
|
||||
if( ckey == Banlist["key"] )
|
||||
if( ckey == GLOB.banlist["key"] )
|
||||
matches += "ckey"
|
||||
if( id == Banlist["id"] )
|
||||
if( id == GLOB.banlist["id"] )
|
||||
if(matches)
|
||||
matches += "/"
|
||||
matches += "id"
|
||||
if( address == Banlist["ip"] )
|
||||
if( address == GLOB.banlist["ip"] )
|
||||
if(matches)
|
||||
matches += "/"
|
||||
matches += "ip"
|
||||
|
||||
if(matches)
|
||||
if(Banlist["temp"])
|
||||
if (!GetExp(Banlist["minutes"]))
|
||||
if(GLOB.banlist["temp"])
|
||||
if (!GetExp(GLOB.banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: [GetExp(GLOB.banlist["minutes"])]\nBy: [GLOB.banlist["bannedby"]][appeal]"
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMANENT</B>\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [GLOB.banlist["reason"]]\nExpires: <B>PERMANENT</B>\nBy: [GLOB.banlist["bannedby"]][appeal]"
|
||||
.["reason"] = matches
|
||||
return .
|
||||
return 0
|
||||
|
||||
/proc/UpdateTime() //No idea why i made this a proc.
|
||||
CMinutes = (world.realtime / 10) / 60
|
||||
GLOB.c_minutes = (world.realtime / 10) / 60
|
||||
return 1
|
||||
|
||||
/hook/startup/proc/loadBans()
|
||||
@@ -63,17 +63,17 @@ var/savefile/Banlist
|
||||
|
||||
/proc/LoadBans()
|
||||
|
||||
Banlist = new("data/banlist.bdb")
|
||||
GLOB.banlist = new("data/banlist.bdb")
|
||||
log_admin("Loading Banlist")
|
||||
|
||||
if (!length(Banlist.dir)) log_admin("Banlist is empty.")
|
||||
if (!length(GLOB.banlist.dir)) log_admin("Banlist is empty.")
|
||||
|
||||
if (!Banlist.dir.Find("base"))
|
||||
if (!GLOB.banlist.dir.Find("base"))
|
||||
log_admin("Banlist missing base dir.")
|
||||
Banlist.dir.Add("base")
|
||||
Banlist.cd = "/base"
|
||||
else if (Banlist.dir.Find("base"))
|
||||
Banlist.cd = "/base"
|
||||
GLOB.banlist.dir.Add("base")
|
||||
GLOB.banlist.cd = "/base"
|
||||
else if (GLOB.banlist.dir.Find("base"))
|
||||
GLOB.banlist.cd = "/base"
|
||||
|
||||
ClearTempbans()
|
||||
return 1
|
||||
@@ -81,17 +81,19 @@ var/savefile/Banlist
|
||||
/proc/ClearTempbans()
|
||||
UpdateTime()
|
||||
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
Banlist.cd = "/base/[A]"
|
||||
if (!Banlist["key"] || !Banlist["id"])
|
||||
GLOB.banlist.cd = "/base"
|
||||
for (var/A in GLOB.banlist.dir)
|
||||
GLOB.banlist.cd = "/base/[A]"
|
||||
if (!GLOB.banlist["key"] || !GLOB.banlist["id"])
|
||||
RemoveBan(A)
|
||||
log_admin("Invalid Ban.")
|
||||
message_admins("Invalid Ban.")
|
||||
continue
|
||||
|
||||
if (!Banlist["temp"]) continue
|
||||
if (CMinutes >= Banlist["minutes"]) RemoveBan(A)
|
||||
if (!GLOB.banlist["temp"])
|
||||
continue
|
||||
if (GLOB.c_minutes >= GLOB.banlist["minutes"])
|
||||
RemoveBan(A)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -102,23 +104,23 @@ var/savefile/Banlist
|
||||
|
||||
if (temp)
|
||||
UpdateTime()
|
||||
bantimestamp = CMinutes + minutes
|
||||
bantimestamp = GLOB.c_minutes + minutes
|
||||
|
||||
Banlist.cd = "/base"
|
||||
if ( Banlist.dir.Find("[ckey][computerid]") )
|
||||
GLOB.banlist.cd = "/base"
|
||||
if ( GLOB.banlist.dir.Find("[ckey][computerid]") )
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Ban already exists.")))
|
||||
return 0
|
||||
else
|
||||
Banlist.dir.Add("[ckey][computerid]")
|
||||
Banlist.cd = "/base/[ckey][computerid]"
|
||||
Banlist["key"] << ckey
|
||||
Banlist["id"] << computerid
|
||||
Banlist["ip"] << address
|
||||
Banlist["reason"] << reason
|
||||
Banlist["bannedby"] << bannedby
|
||||
Banlist["temp"] << temp
|
||||
GLOB.banlist.dir.Add("[ckey][computerid]")
|
||||
GLOB.banlist.cd = "/base/[ckey][computerid]"
|
||||
GLOB.banlist["key"] << ckey
|
||||
GLOB.banlist["id"] << computerid
|
||||
GLOB.banlist["ip"] << address
|
||||
GLOB.banlist["reason"] << reason
|
||||
GLOB.banlist["bannedby"] << bannedby
|
||||
GLOB.banlist["temp"] << temp
|
||||
if (temp)
|
||||
Banlist["minutes"] << bantimestamp
|
||||
GLOB.banlist["minutes"] << bantimestamp
|
||||
admin_action_message(bannedby, ckey, "banned", reason, temp ? minutes : -1) //VOREStation Add
|
||||
return 1
|
||||
|
||||
@@ -126,12 +128,12 @@ var/savefile/Banlist
|
||||
var/key
|
||||
var/id
|
||||
|
||||
Banlist.cd = "/base/[foldername]"
|
||||
Banlist["key"] >> key
|
||||
Banlist["id"] >> id
|
||||
Banlist.cd = "/base"
|
||||
GLOB.banlist.cd = "/base/[foldername]"
|
||||
GLOB.banlist["key"] >> key
|
||||
GLOB.banlist["id"] >> id
|
||||
GLOB.banlist.cd = "/base"
|
||||
|
||||
if (!Banlist.dir.Remove(foldername)) return 0
|
||||
if (!GLOB.banlist.dir.Remove(foldername)) return 0
|
||||
|
||||
if(!usr)
|
||||
log_admin("Ban Expired: [key]")
|
||||
@@ -142,18 +144,18 @@ 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)
|
||||
Banlist.cd = "/base/[A]"
|
||||
if (key == Banlist["key"] /*|| id == Banlist["id"]*/)
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Remove(A)
|
||||
for (var/A in GLOB.banlist.dir)
|
||||
GLOB.banlist.cd = "/base/[A]"
|
||||
if (key == GLOB.banlist["key"] /*|| id == GLOB.banlist["id"]*/)
|
||||
GLOB.banlist.cd = "/base"
|
||||
GLOB.banlist.dir.Remove(A)
|
||||
continue
|
||||
admin_action_message(usr.key, key, "unbanned", "\[Unban\]", 0) //VOREStation Add
|
||||
return 1
|
||||
|
||||
/proc/GetExp(minutes as num)
|
||||
UpdateTime()
|
||||
var/exp = minutes - CMinutes
|
||||
var/exp = minutes - GLOB.c_minutes
|
||||
if (exp <= 0)
|
||||
return 0
|
||||
else
|
||||
@@ -170,19 +172,19 @@ var/savefile/Banlist
|
||||
var/count = 0
|
||||
var/dat
|
||||
//var/dat = "<HR>" + span_bold("Unban Player:") + " " + span_blue("(U) = Unban") + " , (E) = Edit Ban " + span_green("(Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >")
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
GLOB.banlist.cd = "/base"
|
||||
for (var/A in GLOB.banlist.dir)
|
||||
count++
|
||||
Banlist.cd = "/base/[A]"
|
||||
GLOB.banlist.cd = "/base/[A]"
|
||||
var/ref = "\ref[src]"
|
||||
var/key = Banlist["key"]
|
||||
var/id = Banlist["id"]
|
||||
var/ip = Banlist["ip"]
|
||||
var/reason = Banlist["reason"]
|
||||
var/by = Banlist["bannedby"]
|
||||
var/key = GLOB.banlist["key"]
|
||||
var/id = GLOB.banlist["id"]
|
||||
var/ip = GLOB.banlist["ip"]
|
||||
var/reason = GLOB.banlist["reason"]
|
||||
var/by = GLOB.banlist["bannedby"]
|
||||
var/expiry
|
||||
if(Banlist["temp"])
|
||||
expiry = GetExp(Banlist["minutes"])
|
||||
if(GLOB.banlist["temp"])
|
||||
expiry = GetExp(GLOB.banlist["minutes"])
|
||||
if(!expiry) expiry = "Removal Pending"
|
||||
else expiry = "Permaban"
|
||||
|
||||
@@ -208,25 +210,25 @@ var/savefile/Banlist
|
||||
var/a = pick(1,0)
|
||||
var/b = pick(1,0)
|
||||
if(b)
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Add("trash[i]trashid[i]")
|
||||
Banlist.cd = "/base/trash[i]trashid[i]"
|
||||
to_chat(Banlist["key"], "trash[i]")
|
||||
GLOB.banlist.cd = "/base"
|
||||
GLOB.banlist.dir.Add("trash[i]trashid[i]")
|
||||
GLOB.banlist.cd = "/base/trash[i]trashid[i]"
|
||||
to_chat(GLOB.banlist["key"], "trash[i]")
|
||||
else
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Add("[last]trashid[i]")
|
||||
Banlist.cd = "/base/[last]trashid[i]"
|
||||
Banlist["key"] << last
|
||||
to_chat(Banlist["id"], "trashid[i]")
|
||||
to_chat(Banlist["reason"], "Trashban[i].")
|
||||
Banlist["temp"] << a
|
||||
Banlist["minutes"] << CMinutes + rand(1,2000)
|
||||
to_chat(Banlist["bannedby"], "trashmin")
|
||||
GLOB.banlist.cd = "/base"
|
||||
GLOB.banlist.dir.Add("[last]trashid[i]")
|
||||
GLOB.banlist.cd = "/base/[last]trashid[i]"
|
||||
GLOB.banlist["key"] << last
|
||||
to_chat(GLOB.banlist["id"], "trashid[i]")
|
||||
to_chat(GLOB.banlist["reason"], "Trashban[i].")
|
||||
GLOB.banlist["temp"] << a
|
||||
GLOB.banlist["minutes"] << GLOB.c_minutes + rand(1,2000)
|
||||
to_chat(GLOB.banlist["bannedby"], "trashmin")
|
||||
last = "trash[i]"
|
||||
|
||||
Banlist.cd = "/base"
|
||||
GLOB.banlist.cd = "/base"
|
||||
|
||||
/proc/ClearAllBans()
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
GLOB.banlist.cd = "/base"
|
||||
for (var/A in GLOB.banlist.dir)
|
||||
RemoveBan(A)
|
||||
|
||||
+10
-10
@@ -554,7 +554,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
var/dat = span_bold("Job Bans!") + "<HR><table>"
|
||||
for(var/t in jobban_keylist)
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
var/r = t
|
||||
if( findtext(r,"##") )
|
||||
r = copytext( r, 1, findtext(r,"##") )//removes the description
|
||||
@@ -647,8 +647,8 @@ ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.",
|
||||
return
|
||||
|
||||
feedback_add_details("admin_verb","R")
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
if(GLOB.blackbox)
|
||||
GLOB.blackbox.save_all_data_to_sql()
|
||||
|
||||
var/init_by = "Initiated by [user.holder.fakekey ? "Admin" : user.key]."
|
||||
switch(result)
|
||||
@@ -1109,11 +1109,11 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", custom_items)
|
||||
if(!owner|| !custom_items[owner])
|
||||
var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", GLOB.custom_items)
|
||||
if(!owner|| !GLOB.custom_items[owner])
|
||||
return
|
||||
|
||||
var/list/possible_items = custom_items[owner]
|
||||
var/list/possible_items = GLOB.custom_items[owner]
|
||||
var/datum/custom_item/item_to_spawn = tgui_input_list(usr, "Select an item to spawn.", "Spawn Custom Item", possible_items)
|
||||
if(!item_to_spawn)
|
||||
return
|
||||
@@ -1127,17 +1127,17 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(!custom_items)
|
||||
if(!GLOB.custom_items)
|
||||
to_chat(usr, "Custom item list is null.")
|
||||
return
|
||||
|
||||
if(!custom_items.len)
|
||||
if(!length(GLOB.custom_items))
|
||||
to_chat(usr, "Custom item list not populated.")
|
||||
return
|
||||
|
||||
for(var/assoc_key in custom_items)
|
||||
for(var/assoc_key in GLOB.custom_items)
|
||||
to_chat(usr, "[assoc_key] has:")
|
||||
var/list/current_items = custom_items[assoc_key]
|
||||
var/list/current_items = GLOB.custom_items[assoc_key]
|
||||
for(var/datum/custom_item/item in current_items)
|
||||
to_chat(usr, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]")
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
//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
|
||||
GLOBAL_VAR(jobban_runonce) // Updates legacy bans with new info
|
||||
GLOBAL_LIST_EMPTY(jobban_keylist) //to store the keys & ranks
|
||||
|
||||
/proc/jobban_fullban(mob/M, rank, reason)
|
||||
if (!M || !M.key) return
|
||||
jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]"))
|
||||
GLOB.jobban_keylist += "[M.ckey] - [rank] ## [reason]"
|
||||
jobban_savebanfile()
|
||||
|
||||
/proc/jobban_client_fullban(ckey, rank)
|
||||
if (!ckey || !rank) return
|
||||
jobban_keylist.Add(text("[ckey] - [rank]"))
|
||||
GLOB.jobban_keylist += "[ckey] - [rank]"
|
||||
jobban_savebanfile()
|
||||
|
||||
//returns a reason if M is banned from rank, returns 0 otherwise
|
||||
@@ -30,7 +30,7 @@ var/jobban_keylist[0] //to store the keys & ranks
|
||||
return 0
|
||||
|
||||
/proc/ckey_is_jobbanned(var/check_key, var/rank)
|
||||
for(var/s in jobban_keylist)
|
||||
for(var/s in GLOB.jobban_keylist)
|
||||
if(findtext(s,"[check_key] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
if(startpos && startpos<length(s))
|
||||
@@ -45,7 +45,7 @@ DEBUG
|
||||
/mob/verb/list_all_jobbans()
|
||||
set name = "list all jobbans"
|
||||
|
||||
for(var/s in jobban_keylist)
|
||||
for(var/s in GLOB.jobban_keylist)
|
||||
to_world(s)
|
||||
|
||||
/mob/verb/reload_jobbans()
|
||||
@@ -61,12 +61,12 @@ DEBUG
|
||||
/proc/jobban_loadbanfile()
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] >> jobban_keylist
|
||||
S["keys[0]"] >> GLOB.jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
S["runonce"] >> jobban_runonce
|
||||
S["runonce"] >> GLOB.jobban_runonce
|
||||
|
||||
if (!length(jobban_keylist))
|
||||
jobban_keylist=list()
|
||||
if (!length(GLOB.jobban_keylist))
|
||||
GLOB.jobban_keylist=list()
|
||||
log_admin("jobban_keylist was empty")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
@@ -83,7 +83,7 @@ DEBUG
|
||||
var/ckey = query.item[1]
|
||||
var/job = query.item[2]
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
GLOB.jobban_keylist += "[ckey] - [job]"
|
||||
qdel(query)
|
||||
|
||||
//Job tempbans
|
||||
@@ -94,12 +94,12 @@ DEBUG
|
||||
var/ckey = query1.item[1]
|
||||
var/job = query1.item[2]
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
GLOB.jobban_keylist += "[ckey] - [job]"
|
||||
qdel(query1)
|
||||
|
||||
/proc/jobban_savebanfile()
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] << jobban_keylist
|
||||
S["keys[0]"] << GLOB.jobban_keylist
|
||||
|
||||
/proc/jobban_unban(mob/M, rank)
|
||||
jobban_remove("[M.ckey] - [rank]")
|
||||
@@ -111,9 +111,9 @@ DEBUG
|
||||
|
||||
|
||||
/proc/jobban_remove(X)
|
||||
for (var/i = 1; i <= length(jobban_keylist); i++)
|
||||
if( findtext(jobban_keylist[i], "[X]") )
|
||||
jobban_keylist.Remove(jobban_keylist[i])
|
||||
for (var/i = 1; i <= length(GLOB.jobban_keylist); i++)
|
||||
if( findtext(GLOB.jobban_keylist[i], "[X]") )
|
||||
GLOB.jobban_keylist.Remove(GLOB.jobban_keylist[i])
|
||||
jobban_savebanfile()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define RANK_DETECTIVE_HOS "Detective_HoS"
|
||||
#define RANK_VIROLOGIST_RD_CMO "Virologist_RD_CMO"
|
||||
|
||||
var/savefile/Banlistjob
|
||||
GLOBAL_DATUM(banlistjob, /savefile)
|
||||
|
||||
|
||||
/proc/_jobban_isbanned(var/client/clientvar, var/rank)
|
||||
@@ -26,30 +26,31 @@ var/savefile/Banlistjob
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(key))
|
||||
return 1
|
||||
Banlistjob.cd = "/base"
|
||||
if (Banlistjob.dir.Find("[key][id][rank]"))
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
if (GLOB.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"])
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
for (var/A in GLOB.banlistjob.dir)
|
||||
GLOB.banlistjob.cd = "/base/[A]"
|
||||
if ((id == GLOB.banlistjob["id"] || key == GLOB.banlistjob["key"]) && rank == GLOB.banlistjob["rank"])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/LoadBansjob()
|
||||
|
||||
Banlistjob = new("data/job_fullnew.bdb")
|
||||
GLOB.banlistjob = new("data/job_fullnew.bdb")
|
||||
log_admin("Loading Banlistjob")
|
||||
|
||||
if (!length(Banlistjob.dir)) log_admin("Banlistjob is empty.")
|
||||
if (!length(GLOB.banlistjob.dir))
|
||||
log_admin("Banlistjob is empty.")
|
||||
|
||||
if (!Banlistjob.dir.Find("base"))
|
||||
if (!GLOB.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"
|
||||
GLOB.banlistjob.dir.Add("base")
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
else if (GLOB.banlistjob.dir.Find("base"))
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
|
||||
ClearTempbansjob()
|
||||
return 1
|
||||
@@ -57,17 +58,17 @@ var/savefile/Banlistjob
|
||||
/proc/ClearTempbansjob()
|
||||
UpdateTime()
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
for (var/A in Banlistjob.dir)
|
||||
Banlistjob.cd = "/base/[A]"
|
||||
//if (!Banlistjob["key"] || !Banlistjob["id"])
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
for (var/A in GLOB.banlistjob.dir)
|
||||
GLOB.banlistjob.cd = "/base/[A]"
|
||||
//if (!GLOB.banlistjob["key"] || !GLOB.banlistjob["id"])
|
||||
// RemoveBanjob(A, "full")
|
||||
// log_admin("Invalid Ban.")
|
||||
// message_admins("Invalid Ban.")
|
||||
// continue
|
||||
|
||||
if (!Banlistjob["temp"]) continue
|
||||
if (CMinutes >= Banlistjob["minutes"]) RemoveBanjob(A)
|
||||
if (!GLOB.banlistjob["temp"]) continue
|
||||
if (CMinutes >= GLOB.banlistjob["minutes"]) RemoveBanjob(A)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -156,21 +157,21 @@ var/savefile/Banlistjob
|
||||
AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, JOB_ALT_VIROLOGIST)
|
||||
return 1
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
if ( Banlistjob.dir.Find("[ckey][computerid][rank]") )
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
if ( GLOB.banlistjob.dir.Find("[ckey][computerid][rank]") )
|
||||
to_chat(usr, span_red("Banjob already exists."))
|
||||
return 0
|
||||
else
|
||||
Banlistjob.dir.Add("[ckey][computerid][rank]")
|
||||
Banlistjob.cd = "/base/[ckey][computerid][rank]"
|
||||
Banlistjob["key"] << ckey
|
||||
Banlistjob["id"] << computerid
|
||||
Banlistjob["rank"] << rank
|
||||
Banlistjob["reason"] << reason
|
||||
Banlistjob["bannedby"] << bannedby
|
||||
Banlistjob["temp"] << temp
|
||||
GLOB.banlistjob.dir.Add("[ckey][computerid][rank]")
|
||||
GLOB.banlistjob.cd = "/base/[ckey][computerid][rank]"
|
||||
GLOB.banlistjob["key"] << ckey
|
||||
GLOB.banlistjob["id"] << computerid
|
||||
GLOB.banlistjob["rank"] << rank
|
||||
GLOB.banlistjob["reason"] << reason
|
||||
GLOB.banlistjob["bannedby"] << bannedby
|
||||
GLOB.banlistjob["temp"] << temp
|
||||
if (temp)
|
||||
Banlistjob["minutes"] << bantimestamp
|
||||
GLOB.banlistjob["minutes"] << bantimestamp
|
||||
admin_action_message(bannedby, ckey, "jobbanned-"+rank, reason, temp ? minutes : -1) //VOREStation Add
|
||||
return 1
|
||||
|
||||
@@ -178,13 +179,14 @@ var/savefile/Banlistjob
|
||||
var/key
|
||||
var/id
|
||||
var/rank
|
||||
Banlistjob.cd = "/base/[foldername]"
|
||||
Banlistjob["key"] >> key
|
||||
Banlistjob["id"] >> id
|
||||
Banlistjob["rank"] >> rank
|
||||
Banlistjob.cd = "/base"
|
||||
GLOB.banlistjob.cd = "/base/[foldername]"
|
||||
GLOB.banlistjob["key"] >> key
|
||||
GLOB.banlistjob["id"] >> id
|
||||
GLOB.banlistjob["rank"] >> rank
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
|
||||
if (!Banlistjob.dir.Remove(foldername)) return 0
|
||||
if (!GLOB.banlistjob.dir.Remove(foldername))
|
||||
return 0
|
||||
|
||||
if(!usr)
|
||||
log_admin("Banjob Expired: [key]")
|
||||
@@ -196,11 +198,11 @@ var/savefile/Banlistjob
|
||||
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)
|
||||
for (var/A in GLOB.banlistjob.dir)
|
||||
GLOB.banlistjob.cd = "/base/[A]"
|
||||
if ((key == GLOB.banlistjob["key"] || id == GLOB.banlistjob["id"]) && (rank == GLOB.banlistjob["rank"]))
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
GLOB.banlistjob.dir.Remove(A)
|
||||
continue
|
||||
admin_action_message(usr.key, key, "unjobbanned-"+rank, "\[Unban\]", 0) //VOREStation Add
|
||||
return 1
|
||||
@@ -224,11 +226,11 @@ var/savefile/Banlistjob
|
||||
var/count = 0
|
||||
var/dat
|
||||
//var/dat = "<HR>" + span_bold("Unban Player: ") + span_blue("(U) = Unban , (E) = Edit Ban") + span_green("(Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >")
|
||||
Banlistjob.cd = "/base"
|
||||
for (var/A in Banlistjob.dir)
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
for (var/A in GLOB.banlistjob.dir)
|
||||
count++
|
||||
Banlistjob.cd = "/base/[A]"
|
||||
dat += text("<tr><td><A href='byond://?src=\ref[src];[HrefToken()];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>")
|
||||
GLOB.banlistjob.cd = "/base/[A]"
|
||||
dat += text("<tr><td><A href='byond://?src=\ref[src];[HrefToken()];unjobbanf=[GLOB.banlistjob["key"]][GLOB.banlistjob["id"]][GLOB.banlistjob["rank"]]'>(U)</A> Key: <B>[GLOB.banlistjob["key"]] </B>Rank: <B>[GLOB.banlistjob["rank"]]</B></td><td> ([GLOB.banlistjob["temp"] ? "[GetBanExpjob(GLOB.banlistjob["minutes"]) ? GetBanExpjob(GLOB.banlistjob["minutes"]) : "Removal pending" ]" : "Permaban"])</td><td>(By: [GLOB.banlistjob["bannedby"]])</td><td>(Reason: [GLOB.banlistjob["reason"]])</td></tr>")
|
||||
|
||||
dat += "</table>"
|
||||
dat = "<HR>" + span_bold("Bans:") + " " span_blue("(U) = Unban , ") + " - " + span_green("([count] Bans)") + "<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >[dat]"
|
||||
@@ -270,27 +272,27 @@ var/savefile/Banlistjob
|
||||
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]")
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
GLOB.banlistjob.dir.Add("trash[i]trashid[i]")
|
||||
GLOB.banlistjob.cd = "/base/trash[i]trashid[i]"
|
||||
to_chat(GLOB.banlistjob["key"], "trash[i]")
|
||||
else
|
||||
Banlistjob.cd = "/base"
|
||||
Banlistjob.dir.Add("[last]trashid[i]")
|
||||
Banlistjob.cd = "/base/[last]trashid[i]"
|
||||
Banlistjob["key"] << last
|
||||
to_chat(Banlistjob["id"], "trashid[i]")
|
||||
to_chat(Banlistjob["reason"], "Trashban[i].")
|
||||
Banlistjob["temp"] << a
|
||||
Banlistjob["minutes"] << CMinutes + rand(1,2000)
|
||||
to_chat(Banlistjob["bannedby"], "trashmin")
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
GLOB.banlistjob.dir.Add("[last]trashid[i]")
|
||||
GLOB.banlistjob.cd = "/base/[last]trashid[i]"
|
||||
GLOB.banlistjob["key"] << last
|
||||
to_chat(GLOB.banlistjob["id"], "trashid[i]")
|
||||
to_chat(GLOB.banlistjob["reason"], "Trashban[i].")
|
||||
GLOB.banlistjob["temp"] << a
|
||||
GLOB.banlistjob["minutes"] << CMinutes + rand(1,2000)
|
||||
to_chat(GLOB.banlistjob["bannedby"], "trashmin")
|
||||
last = "trash[i]"
|
||||
|
||||
Banlistjob.cd = "/base"
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
|
||||
/proc/ClearAllBansjob()
|
||||
Banlistjob.cd = "/base"
|
||||
for (var/A in Banlistjob.dir)
|
||||
GLOB.banlistjob.cd = "/base"
|
||||
for (var/A in GLOB.banlistjob.dir)
|
||||
RemoveBanjob(A, "full")
|
||||
|
||||
#undef RANK_HEADS
|
||||
|
||||
+21
-19
@@ -176,11 +176,12 @@
|
||||
|
||||
/////////////////////////////////////new ban stuff
|
||||
else if(href_list["unbanf"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
var/banfolder = href_list["unbanf"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
var/key = Banlist["key"]
|
||||
GLOB.banlist.cd = "/base/[banfolder]"
|
||||
var/key = GLOB.banlist["key"]
|
||||
if(tgui_alert(usr, "Are you sure you want to unban [key]?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
if(RemoveBan(banfolder))
|
||||
unbanpanel()
|
||||
@@ -192,20 +193,21 @@
|
||||
usr.client.warn(href_list["warn"])
|
||||
|
||||
else if(href_list["unbane"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
UpdateTime()
|
||||
var/reason
|
||||
|
||||
var/banfolder = href_list["unbane"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
var/reason2 = Banlist["reason"]
|
||||
var/temp = Banlist["temp"]
|
||||
GLOB.banlist.cd = "/base/[banfolder]"
|
||||
var/reason2 = GLOB.banlist["reason"]
|
||||
var/temp = GLOB.banlist["temp"]
|
||||
|
||||
var/minutes = Banlist["minutes"]
|
||||
var/minutes = GLOB.banlist["minutes"]
|
||||
|
||||
var/banned_key = Banlist["key"]
|
||||
Banlist.cd = "/base"
|
||||
var/banned_key = GLOB.banlist["key"]
|
||||
GLOB.banlist.cd = "/base"
|
||||
|
||||
var/duration
|
||||
|
||||
@@ -215,12 +217,12 @@
|
||||
if("Yes")
|
||||
temp = 1
|
||||
var/mins = 0
|
||||
if(minutes > CMinutes)
|
||||
mins = minutes - CMinutes
|
||||
if(minutes > GLOB.c_minutes)
|
||||
mins = minutes - GLOB.c_minutes
|
||||
mins = tgui_input_number(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440)
|
||||
if(!mins) return
|
||||
mins = min(525599,mins)
|
||||
minutes = CMinutes + mins
|
||||
minutes = GLOB.c_minutes + mins
|
||||
duration = GetExp(minutes)
|
||||
reason = tgui_input_text(usr,"Reason?","reason",reason2, MAX_MESSAGE_LEN)
|
||||
if(!reason) return
|
||||
@@ -233,12 +235,12 @@
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
message_admins(span_blue("[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]"), 1)
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
Banlist["reason"] << reason
|
||||
Banlist["temp"] << temp
|
||||
Banlist["minutes"] << minutes
|
||||
Banlist["bannedby"] << usr.ckey
|
||||
Banlist.cd = "/base"
|
||||
GLOB.banlist.cd = "/base/[banfolder]"
|
||||
GLOB.banlist["reason"] << reason
|
||||
GLOB.banlist["temp"] << temp
|
||||
GLOB.banlist["minutes"] << minutes
|
||||
GLOB.banlist["bannedby"] << usr.ckey
|
||||
GLOB.banlist.cd = "/base"
|
||||
feedback_inc("ban_edit",1)
|
||||
unbanpanel()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var/checked_for_inactives = 0
|
||||
var/inactive_keys = "None<br>"
|
||||
GLOBAL_VAR_INIT(checked_for_inactives, FALSE)
|
||||
GLOBAL_VAR_INIT(inactive_keys, "None<br>")
|
||||
|
||||
/client/proc/check_customitem_activity()
|
||||
set category = "Admin.Investigate"
|
||||
@@ -14,8 +14,8 @@ var/inactive_keys = "None<br>"
|
||||
dat += "Populating this list is done automatically, but must be manually triggered on a per\
|
||||
round basis. Populating the list may cause a lag spike, so use it sparingly.<br>"
|
||||
dat += "<hr>"
|
||||
if(checked_for_inactives)
|
||||
dat += inactive_keys
|
||||
if(GLOB.checked_for_inactives)
|
||||
dat += GLOB.inactive_keys
|
||||
dat += "<hr>"
|
||||
dat += "This system was implemented on March 1 2013, and the database a few days before that. Root server access is required to add or disable access to specific custom items.<br>"
|
||||
else
|
||||
@@ -28,7 +28,7 @@ var/inactive_keys = "None<br>"
|
||||
/proc/populate_inactive_customitems_list(var/client/C)
|
||||
set background = 1
|
||||
|
||||
if(checked_for_inactives)
|
||||
if(GLOB.checked_for_inactives)
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
@@ -77,13 +77,13 @@ var/inactive_keys = "None<br>"
|
||||
qdel(query_inactive)
|
||||
|
||||
if(inactive_ckeys.len)
|
||||
inactive_keys = ""
|
||||
GLOB.inactive_keys = ""
|
||||
for(var/cur_key in inactive_ckeys)
|
||||
if(inactive_ckeys[cur_key])
|
||||
inactive_keys += span_bold("[cur_key]") + " - [inactive_ckeys[cur_key]]<br>"
|
||||
GLOB.inactive_keys += span_bold("[cur_key]") + " - [inactive_ckeys[cur_key]]<br>"
|
||||
else
|
||||
inactive_keys += "[cur_key] - no database entry<br>"
|
||||
GLOB.inactive_keys += "[cur_key] - no database entry<br>"
|
||||
|
||||
checked_for_inactives = 1
|
||||
GLOB.checked_for_inactives = TRUE
|
||||
if(C)
|
||||
C.check_customitem_activity()
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
set category = "Debug.Investigate"
|
||||
|
||||
to_chat(usr, span_bold("Jobbans active in this round."))
|
||||
for(var/t in jobban_keylist)
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
to_chat(usr, "[t]")
|
||||
|
||||
/client/proc/print_jobban_old_filter()
|
||||
@@ -186,6 +186,6 @@
|
||||
return
|
||||
|
||||
to_chat(usr, span_bold("Jobbans active in this round."))
|
||||
for(var/t in jobban_keylist)
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
if(findtext(t, job_filter))
|
||||
to_chat(usr, "[t]")
|
||||
|
||||
@@ -241,7 +241,7 @@ ADMIN_VERB(cmd_admin_add_random_ai_law, R_ADMIN|R_FUN, "Add Random AI Law", "Add
|
||||
if(!show_log)
|
||||
return
|
||||
if(show_log == "Yes")
|
||||
command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
GLOB.command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
|
||||
IonStorm(0)
|
||||
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -623,7 +623,7 @@ ADMIN_VERB(cmd_admin_add_freeform_ai_law, R_FUN, "Add Custom AI law", "Adds a cu
|
||||
|
||||
var/show_log = tgui_alert(user, "Show ion message?", "Message", list("Yes", "No"))
|
||||
if(show_log == "Yes")
|
||||
command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
GLOB.command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_rejuvenate, R_ADMIN|R_FUN|R_MOD, "Rejuvenate", "Fully restores the target mob.", ADMIN_CATEGORY_GAME, mob/living/target_mob as mob in GLOB.mob_list)
|
||||
@@ -658,7 +658,7 @@ ADMIN_VERB(cmd_admin_create_centcom_report, R_ADMIN|R_SERVER|R_FUN, "Create Comm
|
||||
if(!confirm)
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
GLOB.command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
else
|
||||
to_chat(world, span_boldannounce("New [using_map.company_name] Update available at all communication consoles."))
|
||||
SEND_SOUND(world, sound('sound/AI/commandreport.ogg'))
|
||||
|
||||
@@ -319,11 +319,11 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before
|
||||
if(GLOB.gravity_is_on)
|
||||
log_admin("[key_name(holder)] toggled gravity on.", 1)
|
||||
message_admins(span_notice("[key_name_admin(holder)] toggled gravity on."), 1)
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
|
||||
GLOB.command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
|
||||
else
|
||||
log_admin("[key_name(holder)] toggled gravity off.", 1)
|
||||
message_admins(span_notice("[key_name_admin(holder)] toggled gravity off."), 1)
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
|
||||
GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
|
||||
if("tripleAI")
|
||||
if(!is_funmin)
|
||||
return
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
target.Weaken(20)
|
||||
target.stuttering = 20
|
||||
|
||||
var/redspace_abduction_z
|
||||
GLOBAL_VAR(redspace_abduction_z)
|
||||
|
||||
/area/redspace_abduction
|
||||
name = "Another Time And Place"
|
||||
@@ -210,11 +210,11 @@ var/redspace_abduction_z
|
||||
dynamic_lighting = FALSE
|
||||
|
||||
/proc/redspace_abduction(mob/living/target, user)
|
||||
if(redspace_abduction_z < 0)
|
||||
if(GLOB.redspace_abduction_z < 0)
|
||||
to_chat(user,span_warning("The abduction z-level is already being created. Please wait."))
|
||||
return
|
||||
if(!redspace_abduction_z)
|
||||
redspace_abduction_z = -1
|
||||
if(!GLOB.redspace_abduction_z)
|
||||
GLOB.redspace_abduction_z = -1
|
||||
to_chat(user,span_warning("This is the first use of the verb this shift, it will take a minute to configure the abduction z-level. It will be z[world.maxz+1]."))
|
||||
var/z = ++world.maxz
|
||||
world.max_z_changed()
|
||||
@@ -225,7 +225,7 @@ var/redspace_abduction_z
|
||||
T.ChangeTurf(/turf/unsimulated/fake_space)
|
||||
T.plane = -100
|
||||
CHECK_TICK
|
||||
redspace_abduction_z = z
|
||||
GLOB.redspace_abduction_z = z
|
||||
|
||||
if(!target || !user)
|
||||
return
|
||||
@@ -244,7 +244,7 @@ var/redspace_abduction_z
|
||||
for(var/x = llc_x to llc_x+size_of_square)
|
||||
for(var/y = llc_y to llc_y+size_of_square)
|
||||
var/turf/T_src = locate(x,y,target.z)
|
||||
var/turf/T_dest = locate(x,y,redspace_abduction_z)
|
||||
var/turf/T_dest = locate(x,y,GLOB.redspace_abduction_z)
|
||||
T_dest.vis_contents.Cut()
|
||||
T_dest.vis_contents += T_src
|
||||
T_dest.density = T_src.density
|
||||
@@ -255,7 +255,7 @@ var/redspace_abduction_z
|
||||
for(var/x = llc_x to llc_x+1) //Left
|
||||
for(var/y = llc_y to llc_y+size_of_square)
|
||||
if(prob(50))
|
||||
var/turf/T = locate(x,y,redspace_abduction_z)
|
||||
var/turf/T = locate(x,y,GLOB.redspace_abduction_z)
|
||||
T.density = FALSE
|
||||
T.opacity = FALSE
|
||||
T.vis_contents.Cut()
|
||||
@@ -263,7 +263,7 @@ var/redspace_abduction_z
|
||||
for(var/x = llc_x+size_of_square-1 to llc_x+size_of_square) //Right
|
||||
for(var/y = llc_y to llc_y+size_of_square)
|
||||
if(prob(50))
|
||||
var/turf/T = locate(x,y,redspace_abduction_z)
|
||||
var/turf/T = locate(x,y,GLOB.redspace_abduction_z)
|
||||
T.density = FALSE
|
||||
T.opacity = FALSE
|
||||
T.vis_contents.Cut()
|
||||
@@ -271,7 +271,7 @@ var/redspace_abduction_z
|
||||
for(var/x = llc_x to llc_x+size_of_square) //Top
|
||||
for(var/y = llc_y+size_of_square-1 to llc_y+size_of_square)
|
||||
if(prob(50))
|
||||
var/turf/T = locate(x,y,redspace_abduction_z)
|
||||
var/turf/T = locate(x,y,GLOB.redspace_abduction_z)
|
||||
T.density = FALSE
|
||||
T.opacity = FALSE
|
||||
T.vis_contents.Cut()
|
||||
@@ -279,12 +279,12 @@ var/redspace_abduction_z
|
||||
for(var/x = llc_x to llc_x+size_of_square) //Bottom
|
||||
for(var/y = llc_y to llc_y+1)
|
||||
if(prob(50))
|
||||
var/turf/T = locate(x,y,redspace_abduction_z)
|
||||
var/turf/T = locate(x,y,GLOB.redspace_abduction_z)
|
||||
T.density = FALSE
|
||||
T.opacity = FALSE
|
||||
T.vis_contents.Cut()
|
||||
|
||||
target.forceMove(locate(target.x,target.y,redspace_abduction_z))
|
||||
target.forceMove(locate(target.x,target.y,GLOB.redspace_abduction_z))
|
||||
to_chat(target,span_danger("The tug relaxes, but everything around you looks... slightly off."))
|
||||
to_chat(user, span_notice("The mob has been moved. ([admin_jump_link(target, check_rights_for(usr.client, R_HOLDER))])"))
|
||||
|
||||
|
||||
@@ -178,11 +178,11 @@ GLOBAL_VAR_INIT(silent_ert, 0)
|
||||
|
||||
// there's only a certain chance a team will be sent
|
||||
if(!prob(send_team_chance))
|
||||
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "[using_map.boss_name]")
|
||||
GLOB.command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "[using_map.boss_name]")
|
||||
GLOB.can_call_ert = 0 // Only one call per round, ladies.
|
||||
return
|
||||
if(GLOB.silent_ert == 0)
|
||||
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "[using_map.boss_name]")
|
||||
GLOB.command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "[using_map.boss_name]")
|
||||
|
||||
GLOB.can_call_ert = 0 // Only one call per round, gentleman.
|
||||
GLOB.send_emergency_team = 1
|
||||
|
||||
@@ -59,7 +59,7 @@ GLOBAL_VAR_INIT(can_call_traders, 1)
|
||||
if(GLOB.send_beruang)
|
||||
return
|
||||
|
||||
command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control")
|
||||
GLOB.command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control")
|
||||
|
||||
GLOB.can_call_traders = 0 // Only one call per round.
|
||||
GLOB.send_beruang = 1
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if (usr.stat || usr.restrained()) return
|
||||
if(src.reload < 180) return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
GLOB.command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
|
||||
@@ -304,10 +304,10 @@
|
||||
|
||||
if("spawnpoint")
|
||||
var/list/spawnkeys = list()
|
||||
for(var/spawntype in spawntypes)
|
||||
for(var/spawntype in GLOB.spawntypes)
|
||||
spawnkeys += spawntype
|
||||
var/choice = tgui_input_list(user, "Where would you like to spawn when late-joining?", "Late-Join Choice", spawnkeys)
|
||||
if(!choice || !spawntypes[choice])
|
||||
if(!choice || !GLOB.spawntypes[choice])
|
||||
return TOPIC_NOACTION
|
||||
pref.update_preference_by_type(/datum/preference/choiced/living/spawnpoint, choice)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var/list/loadout_categories = list()
|
||||
var/list/gear_datums = list()
|
||||
GLOBAL_LIST_EMPTY_TYPED(gear_datums, /datum/gear)
|
||||
|
||||
/datum/loadout_category
|
||||
var/category = ""
|
||||
@@ -31,8 +31,8 @@ var/list/gear_datums = list()
|
||||
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 G
|
||||
LC.gear[use_name] = gear_datums[use_name]
|
||||
GLOB.gear_datums[use_name] = new G
|
||||
LC.gear[use_name] = GLOB.gear_datums[use_name]
|
||||
|
||||
loadout_categories = sortAssoc(loadout_categories)
|
||||
for(var/loadout_category in loadout_categories)
|
||||
@@ -97,12 +97,12 @@ var/list/gear_datums = list()
|
||||
|
||||
var/total_cost = 0
|
||||
for(var/gear_name in active_gear_list)
|
||||
if(!gear_datums[gear_name])
|
||||
if(!GLOB.gear_datums[gear_name])
|
||||
to_chat(preference_mob, span_warning("You cannot have the \the [gear_name]."))
|
||||
active_gear_list -= gear_name
|
||||
continue
|
||||
|
||||
var/datum/gear/G = gear_datums[gear_name]
|
||||
var/datum/gear/G = GLOB.gear_datums[gear_name]
|
||||
if(!is_valid_gear(G))
|
||||
to_chat(preference_mob, span_warning("You cannot take \the [gear_name] as you are not whitelisted for the species or item."))
|
||||
active_gear_list -= gear_name
|
||||
@@ -124,7 +124,7 @@ var/list/gear_datums = list()
|
||||
|
||||
var/list/gear_tweaks = list()
|
||||
for(var/item in active_gear_list)
|
||||
var/datum/gear/G = gear_datums[item]
|
||||
var/datum/gear/G = GLOB.gear_datums[item]
|
||||
var/list/tweaks = list()
|
||||
for(var/datum/gear_tweak/tweak in G.gear_tweaks)
|
||||
UNTYPED_LIST_ADD(tweaks, list(
|
||||
@@ -185,7 +185,7 @@ var/list/gear_datums = list()
|
||||
var/list/active_gear_list = LAZYACCESS(pref.gear_list, "[pref.gear_slot]")
|
||||
. = 0
|
||||
for(var/gear_name in active_gear_list)
|
||||
var/datum/gear/G = gear_datums[gear_name]
|
||||
var/datum/gear/G = GLOB.gear_datums[gear_name]
|
||||
if(G)
|
||||
. += G.cost
|
||||
|
||||
@@ -232,7 +232,7 @@ var/list/gear_datums = list()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("toggle_gear")
|
||||
var/datum/gear/TG = gear_datums[params["gear"]]
|
||||
var/datum/gear/TG = GLOB.gear_datums[params["gear"]]
|
||||
if(TG)
|
||||
if(TG.display_name in active_gear_list)
|
||||
active_gear_list -= TG.display_name
|
||||
@@ -241,7 +241,7 @@ var/list/gear_datums = list()
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
if("gear_tweak")
|
||||
var/datum/gear/gear = gear_datums[params["gear"]]
|
||||
var/datum/gear/gear = GLOB.gear_datums[params["gear"]]
|
||||
var/datum/gear_tweak/tweak = locate(params["tweak"])
|
||||
if(!tweak || !gear || !(tweak in gear.gear_tweaks))
|
||||
return TOPIC_HANDLED
|
||||
|
||||
@@ -632,7 +632,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.species.deform = character.species.get_icobase(get_deform = TRUE)
|
||||
character.species.vanity_base_fit = bodytype_selected
|
||||
if(istype(character.species, /datum/species/shapeshifter))
|
||||
wrapped_species_by_ref["\ref[character]"] = bodytype_selected
|
||||
GLOB.wrapped_species_by_ref["\ref[character]"] = bodytype_selected
|
||||
|
||||
character.custom_species = custom_species
|
||||
character.custom_say = lowertext(trim(custom_say))
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
var/list/spawntypes = list()
|
||||
GLOBAL_LIST_INIT(spawntypes, populate_spawn_points())
|
||||
|
||||
/proc/populate_spawn_points()
|
||||
spawntypes = list()
|
||||
var/list/spawns = list()
|
||||
for(var/type in subtypesof(/datum/spawnpoint))
|
||||
var/datum/spawnpoint/S = new type()
|
||||
spawntypes[S.display_name] = S
|
||||
var/datum/spawnpoint/spawn_point = new type()
|
||||
spawns[spawn_point.display_name] = spawn_point
|
||||
return spawns
|
||||
|
||||
/proc/get_spawn_points()
|
||||
if(!LAZYLEN(spawntypes))
|
||||
populate_spawn_points()
|
||||
return spawntypes
|
||||
return GLOB.spawntypes
|
||||
|
||||
/datum/spawnpoint
|
||||
var/msg //Message to display on the arrivals computer.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/client_record_update_lock = FALSE
|
||||
GLOBAL_VAR_INIT(client_record_update_lock, FALSE)
|
||||
|
||||
// Manually updating records from medical console to a player's save.
|
||||
/proc/get_current_mob_from_record(var/datum/data/record/active)
|
||||
@@ -43,15 +43,15 @@ var/global/client_record_update_lock = FALSE
|
||||
record_string = "security"
|
||||
console_path = /obj/machinery/computer/secure_data
|
||||
|
||||
if(client_record_update_lock)
|
||||
if(GLOB.client_record_update_lock)
|
||||
to_chat(user,"Update already in progress! Please wait a moment...")
|
||||
if(COM && !QDELETED(COM))
|
||||
COM.visible_message(span_notice("\The [COM] buzzes!"))
|
||||
playsound(COM, 'sound/machines/deniedbeep.ogg', 50, 0)
|
||||
return "Update already in progress! Please wait a moment..."
|
||||
client_record_update_lock = TRUE
|
||||
GLOB.client_record_update_lock = TRUE
|
||||
spawn(60 SECONDS)
|
||||
client_record_update_lock = FALSE
|
||||
GLOB.client_record_update_lock = FALSE
|
||||
|
||||
if(!active || !console_path)
|
||||
if(COM && !QDELETED(COM))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// If hooded, have [kit_icon]_suit_t in both files for the hood-up version.
|
||||
// If not using the default overlay, have [kit_icon]_light in both files for custom light overlays.
|
||||
|
||||
/var/list/custom_items = list()
|
||||
GLOBAL_LIST_INIT(custom_items, load_custom_items())
|
||||
|
||||
/datum/custom_item
|
||||
var/assoc_key
|
||||
@@ -118,8 +118,8 @@
|
||||
return t_icon
|
||||
|
||||
// Parses the config file into the custom_items list.
|
||||
/hook/startup/proc/load_custom_items()
|
||||
|
||||
/proc/load_custom_items()
|
||||
var/list/all_custom_items = list()
|
||||
var/datum/custom_item/current_data
|
||||
for(var/line in splittext(file2text("config/custom_items.txt"), "\n"))
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
|
||||
if(findtext(line, "{", 1, 2) || findtext(line, "}", 1, 2)) // New block!
|
||||
if(current_data && current_data.assoc_key)
|
||||
if(!custom_items[current_data.assoc_key])
|
||||
custom_items[current_data.assoc_key] = list()
|
||||
var/list/L = custom_items[current_data.assoc_key]
|
||||
if(!all_custom_items[current_data.assoc_key])
|
||||
all_custom_items[current_data.assoc_key] = list()
|
||||
var/list/L = all_custom_items[current_data.assoc_key]
|
||||
L |= current_data
|
||||
current_data = null
|
||||
|
||||
@@ -173,11 +173,11 @@
|
||||
current_data.kit_icon = field_data
|
||||
if("additional_data")
|
||||
current_data.additional_data = field_data
|
||||
return 1
|
||||
return all_custom_items
|
||||
|
||||
//gets the relevant list for the key from the listlist if it exists, check to make sure they are meant to have it and then calls the giving function
|
||||
/proc/equip_custom_items(mob/living/carbon/human/M)
|
||||
var/list/key_list = custom_items[M.ckey]
|
||||
var/list/key_list = GLOB.custom_items[M.ckey]
|
||||
if(!key_list || key_list.len < 1)
|
||||
return
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
return
|
||||
|
||||
/datum/event/atmos_leak/announce()
|
||||
command_announcement.Announce("Warning, hazardous [GLOB.gas_data.name[gas_type]] gas leak detected in \the [target_area], evacuate the area and contain the damage!", "Hazard Alert")
|
||||
GLOB.command_announcement.Announce("Warning, hazardous [GLOB.gas_data.name[gas_type]] gas leak detected in \the [target_area], evacuate the area and contain the damage!", "Hazard Alert")
|
||||
|
||||
/datum/event/atmos_leak/start()
|
||||
// Okay, time to actually put the gas in the room!
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
endWhen = 126
|
||||
|
||||
/datum/event/aurora_caelus/announce()
|
||||
command_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your [using_map.facility_type], and will exhaust their energy battering the hull. \
|
||||
GLOB.command_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your [using_map.facility_type], and will exhaust their energy battering the hull. \
|
||||
Nanotrasen has approved a short break for all employees to relax and observe this very rare event. \
|
||||
During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \
|
||||
Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \
|
||||
@@ -26,7 +26,7 @@
|
||||
return res
|
||||
|
||||
/datum/event/aurora_caelus/end()
|
||||
command_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions have returned to normal, and the cloud has dissipated. \
|
||||
GLOB.command_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions have returned to normal, and the cloud has dissipated. \
|
||||
Please return to your workplace and continue work as normal. \
|
||||
Have a pleasant shift, [station_name()], and thank you for watching with us.",
|
||||
"Nanotrasen Meteorology Division", new_sound = 'sound/AI/aurora_end.ogg') //VOREStation Edit
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"you don't want to buy anything? Yeah, well I didn't want to buy your mom either.")
|
||||
|
||||
/datum/event/brand_intelligence/announce()
|
||||
command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard [station_name()], which appears to transmit \
|
||||
GLOB.command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard [station_name()], which appears to transmit \
|
||||
to other nearby vendors. The original infected machine is believed to be \a [originMachine.name].", "Vendor Service Alert")
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_carp.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/carp_migration/tick()
|
||||
if(activeFor % 5 != 0)
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
/proc/communications_blackout(var/silent = 1)
|
||||
|
||||
if(!silent)
|
||||
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
|
||||
GLOB.command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
|
||||
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list)
|
||||
to_chat(A, span_boldwarning("<br>"))
|
||||
to_chat(A, span_boldwarning("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT"))
|
||||
to_chat(A, span_boldwarning("<br>"))
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
to_chat(A, span_boldwarning("<br>"))
|
||||
|
||||
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
|
||||
command_announcement.Announce(alert, new_sound = sound('sound/misc/interference.ogg', volume=25))
|
||||
GLOB.command_announcement.Announce(alert, new_sound = sound('sound/misc/interference.ogg', volume=25))
|
||||
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
for(var/obj/machinery/exonet_node/N in GLOB.machines)
|
||||
N.emp_act(1)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
qdel(target_spot)
|
||||
|
||||
/datum/event/drone_pod_drop/announce()
|
||||
command_announcement.Announce("An unidentified drone pod has been detected on a collision course towards the [location_name()]. Open and examine at your own risk.", "[location_name()] Sensor Network")
|
||||
GLOB.command_announcement.Announce("An unidentified drone pod has been detected on a collision course towards the [location_name()]. Open and examine at your own risk.", "[location_name()] Sensor Network")
|
||||
|
||||
/datum/event/drone_pod_drop/start()
|
||||
if(!land_target)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/datum/event/dust/announce()
|
||||
if(!victim)
|
||||
command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching \the [location_name()]", "Dust Alert")
|
||||
GLOB.command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching \the [location_name()]", "Dust Alert")
|
||||
|
||||
/datum/event/dust/tick()
|
||||
if(prob(10))
|
||||
@@ -17,7 +17,7 @@
|
||||
/datum/event/dust/end()
|
||||
..()
|
||||
if(!victim)
|
||||
command_announcement.Announce("\The [location_name()] is no longer in danger of impact from space debris.", "Dust Notice")
|
||||
GLOB.command_announcement.Announce("\The [location_name()] is no longer in danger of impact from space debris.", "Dust Notice")
|
||||
|
||||
/datum/event/dust/proc/get_severity()
|
||||
switch(severity)
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
..()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MUNDANE)
|
||||
command_announcement.Announce("A minor electrical storm has been detected near the [location_name()]. Please watch out for possible electrical discharges.", "[location_name()] Sensor Array")
|
||||
GLOB.command_announcement.Announce("A minor electrical storm has been detected near the [location_name()]. Please watch out for possible electrical discharges.", "[location_name()] Sensor Array")
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
command_announcement.Announce("The [location_name()] is about to pass through an electrical storm. Please secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array")
|
||||
GLOB.command_announcement.Announce("The [location_name()] is about to pass through an electrical storm. Please secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array")
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("Alert. A strong electrical storm has been detected in proximity of the [location_name()]. It is recommended to immediately secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array")
|
||||
GLOB.command_announcement.Announce("Alert. A strong electrical storm has been detected in proximity of the [location_name()]. It is recommended to immediately secure sensitive electrical equipment until the storm passes.", "[location_name()] Sensor Array")
|
||||
|
||||
/datum/event/electrical_storm/start()
|
||||
..()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_gnat.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/gnat_migration/tick()
|
||||
if(activeFor % 5 != 0)
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
if((GG.z in zLevels) && GG.on)
|
||||
generators += GG
|
||||
|
||||
if(generators.len)
|
||||
if(length(generators))
|
||||
endWhen = rand(5 MINUTES, 20 MINUTES)
|
||||
else
|
||||
endWhen = rand(15, 60)
|
||||
|
||||
/datum/event/gravity/announce()
|
||||
if(generators.len)
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. \
|
||||
if(length(generators))
|
||||
GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. \
|
||||
Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure")
|
||||
else
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system \
|
||||
GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system \
|
||||
reinitializes. Please stand by while the gravity system reinitializes.", "Gravity Failure")
|
||||
|
||||
/datum/event/gravity/start()
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
var/did_anything = FALSE
|
||||
if(generators.len)
|
||||
if(length(generators))
|
||||
for(var/obj/machinery/gravity_generator/main/GG in generators)
|
||||
if(!GG.on)
|
||||
GG.breaker = TRUE
|
||||
@@ -63,4 +63,4 @@
|
||||
did_anything = TRUE
|
||||
|
||||
if(did_anything)
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
GLOB.command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
vents += temp_vent
|
||||
|
||||
/datum/event/grub_infestation/announce()
|
||||
command_announcement.Announce("Solargrubs detected coming aboard [station_name()]. Please clear them out before this starts to affect productivity. All crew efforts are appreciated and encouraged.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
GLOB.command_announcement.Announce("Solargrubs detected coming aboard [station_name()]. Please clear them out before this starts to affect productivity. All crew efforts are appreciated and encouraged.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
|
||||
/datum/event/grub_infestation/start()
|
||||
while((spawncount >= 1) && vents.len)
|
||||
@@ -51,4 +51,4 @@
|
||||
area_names |= grub_area.name
|
||||
if(area_names.len)
|
||||
var/english_list = english_list(area_names)
|
||||
command_announcement.Announce("Sensors have narrowed down remaining active solargrubs to the following areas: [english_list]", "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce("Sensors have narrowed down remaining active solargrubs to the following areas: [english_list]", "Lifesign Alert")
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
endWhen = 3
|
||||
|
||||
/datum/event/ianstorm/announce()
|
||||
command_announcement.Announce("It has come to our attention that the [using_map.facility_type] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert", 'sound/AI/ian_storm.ogg')
|
||||
GLOB.command_announcement.Announce("It has come to our attention that the [using_map.facility_type] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert", 'sound/AI/ian_storm.ogg')
|
||||
spawn(7 SECONDS)
|
||||
command_announcement.Announce("Wait. No, that's wrong. The [using_map.facility_type] passed through an IAN storm!.", "Ian Alert")
|
||||
GLOB.command_announcement.Announce("Wait. No, that's wrong. The [using_map.facility_type] passed through an IAN storm!.", "Ian Alert")
|
||||
|
||||
/datum/event/ianstorm/start()
|
||||
spawn()
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
|
||||
/datum/event/infestation/announce()
|
||||
command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding all over the facility. Clear them out, before this starts to affect productivity.", "Vermin infestation")
|
||||
GLOB.command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding all over the facility. Clear them out, before this starts to affect productivity.", "Vermin infestation")
|
||||
|
||||
#undef VERM_MICE
|
||||
#undef VERM_LIZARDS
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
announceWhen = endWhen + rand(250, 400)
|
||||
|
||||
/datum/event/ionstorm/announce()
|
||||
command_announcement.Announce("It has come to our attention that \the [location_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
|
||||
GLOB.command_announcement.Announce("It has come to our attention that \the [location_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
|
||||
|
||||
/datum/event/ionstorm/start()
|
||||
for (var/mob/living/carbon/human/player in GLOB.player_list)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_jellyfish.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/jellyfish_migration/tick()
|
||||
if(activeFor % 5 != 0)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
kill()
|
||||
|
||||
/datum/event/meteor_strike/announce()
|
||||
command_announcement.Announce("A meteoroid has been detected entering the atmosphere on a trajectory that will terminate near the surface facilty. Brace for impact.", "NanoTrasen Orbital Monitoring")
|
||||
GLOB.command_announcement.Announce("A meteoroid has been detected entering the atmosphere on a trajectory that will terminate near the surface facilty. Brace for impact.", "NanoTrasen Orbital Monitoring")
|
||||
|
||||
/datum/event/meteor_strike/start()
|
||||
new /obj/effect/meteor_falling(strike_target)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
if(!victim)
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("Meteors have been detected on collision course with \the [location_name()].", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
GLOB.command_announcement.Announce("Meteors have been detected on collision course with \the [location_name()].", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
else
|
||||
command_announcement.Announce("\The [location_name()] is now in a meteor shower.", "Meteor Alert")
|
||||
GLOB.command_announcement.Announce("\The [location_name()] is now in a meteor shower.", "Meteor Alert")
|
||||
|
||||
/datum/event/meteor_wave/tick()
|
||||
// Begin sending the alarm signals to shield diffusers so the field is already regenerated (if it exists) by the time actual meteors start flying around.
|
||||
@@ -63,9 +63,9 @@
|
||||
if(!victim)
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("\The [location_name()] has cleared the meteor storm.", "Meteor Alert")
|
||||
GLOB.command_announcement.Announce("\The [location_name()] has cleared the meteor storm.", "Meteor Alert")
|
||||
else
|
||||
command_announcement.Announce("\The [location_name()] has cleared the meteor shower", "Meteor Alert")
|
||||
GLOB.command_announcement.Announce("\The [location_name()] has cleared the meteor shower", "Meteor Alert")
|
||||
|
||||
/datum/event/meteor_wave/proc/get_meteors()
|
||||
switch(severity)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(areas && areas.len > 0)
|
||||
command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Involvement of [using_map.facility_type] AI is recommended.", "[eventDept] Alert")
|
||||
GLOB.command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Involvement of [using_map.facility_type] AI is recommended.", "[eventDept] Alert")
|
||||
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
var/postStartTicks = 0
|
||||
|
||||
/datum/event/radiation_storm/announce()
|
||||
command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please evacuate into one of the shielded maintenance tunnels or dorms.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') //VOREStation Edit - Dorms ref
|
||||
GLOB.command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please evacuate into one of the shielded maintenance tunnels or dorms.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') //VOREStation Edit - Dorms ref
|
||||
|
||||
/datum/event/radiation_storm/start()
|
||||
make_maint_all_access()
|
||||
|
||||
/datum/event/radiation_storm/tick()
|
||||
if(activeFor == enterBelt)
|
||||
command_announcement.Announce("The [using_map.facility_type] has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
|
||||
GLOB.command_announcement.Announce("The [using_map.facility_type] has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
|
||||
radiate()
|
||||
|
||||
if(activeFor >= enterBelt && activeFor <= leaveBelt)
|
||||
@@ -27,7 +27,7 @@
|
||||
radiate()
|
||||
|
||||
else if(activeFor == leaveBelt)
|
||||
command_announcement.Announce("The [using_map.facility_type] has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
|
||||
GLOB.command_announcement.Announce("The [using_map.facility_type] has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
|
||||
/datum/event/radiation_storm/proc/radiate()
|
||||
var/radiation_level = rand(15, 35)
|
||||
for(var/z in using_map.station_levels)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_ray.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/ray_migration/tick()
|
||||
if(activeFor % 5 != 0)
|
||||
|
||||
@@ -95,4 +95,4 @@
|
||||
var/message = "Movements of [gamount_message] group[location_amount == 1 ? "" : "s"] of wildlife have been detected in regions surrounding [using_map.full_name]. The wildlife group[location_amount == 1 ? "" : "s"] [location_amount == 1 ? "is" : "are"] [threat_message] and \
|
||||
[location_amount == 1 ? "is" : "are"] comprised of [amount_message].[threat_level > 2 ? " Take caution." : ""]"
|
||||
|
||||
command_announcement.Announce(message, "Wildlife Monitoring")
|
||||
GLOB.command_announcement.Announce(message, "Wildlife Monitoring")
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
/datum/event/rogue_drone/announce()
|
||||
var/msg
|
||||
var/rng = rand(1,5)
|
||||
//VOREStation Edit Start
|
||||
switch(rng)
|
||||
if(1)
|
||||
msg = "A combat drone wing operating in close orbit above Virgo 3b has failed to return from a anti-piracy sweep. If any are sighted, \
|
||||
@@ -36,8 +35,7 @@
|
||||
msg = "A passing derelict ship's drone defense systems have just activated. If any are sighted in the area, use caution."
|
||||
if(5)
|
||||
msg = "We're detecting a swarm of small objects approaching your [using_map.facility_type]. Most likely a bunch of drones. Please exercise caution if you see any."
|
||||
//VOREStation Edit End
|
||||
command_announcement.Announce(msg, "Rogue drone alert")
|
||||
GLOB.command_announcement.Announce(msg, "Rogue drone alert")
|
||||
|
||||
/datum/event/rogue_drone/end()
|
||||
var/num_recovered = 0
|
||||
@@ -52,6 +50,6 @@
|
||||
num_recovered++
|
||||
|
||||
if(num_recovered > drones_list.len * 0.75)
|
||||
command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert")
|
||||
GLOB.command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert")
|
||||
else
|
||||
command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
GLOB.command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_shark.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/shark_migration/tick()
|
||||
if(activeFor % 5 != 0)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
endWhen = startWhen + rand(30,90) + rand(30,90) //2-6 minute duration
|
||||
|
||||
/datum/event/solar_storm/announce()
|
||||
command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. Please halt all EVA activites immediately and return to the interior of the [using_map.facility_type].", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
||||
GLOB.command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. Please halt all EVA activites immediately and return to the interior of the [using_map.facility_type].", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
||||
adjust_solar_output(1.5)
|
||||
|
||||
/datum/event/solar_storm/proc/adjust_solar_output(var/mult = 1)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
/datum/event/solar_storm/start()
|
||||
command_announcement.Announce("The solar storm has reached the [using_map.facility_type]. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert")
|
||||
GLOB.command_announcement.Announce("The solar storm has reached the [using_map.facility_type]. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert")
|
||||
adjust_solar_output(5)
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
L.rad_act(rand(15, 30))
|
||||
|
||||
/datum/event/solar_storm/end()
|
||||
command_announcement.Announce("The solar storm has passed the [using_map.facility_type]. It is now safe to resume EVA activities. Please report to medbay if you experience any unusual symptoms. ", "Anomaly Alert")
|
||||
GLOB.command_announcement.Announce("The solar storm has passed the [using_map.facility_type]. It is now safe to resume EVA activities. Please report to medbay if you experience any unusual symptoms. ", "Anomaly Alert")
|
||||
adjust_solar_output()
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [location_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_fish.len == 1 ? "entity has" : "entities have"] been detected near [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/spacefish_migration/tick()
|
||||
if(activeFor % 5 != 0)
|
||||
|
||||
@@ -11,7 +11,7 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
GLOB.sent_spiders_to_station = 0
|
||||
|
||||
/datum/event/spider_infestation/announce()
|
||||
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
GLOB.command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
|
||||
|
||||
/datum/event/spider_infestation/start()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/var/global/running_demand_events = list()
|
||||
GLOBAL_LIST_EMPTY_TYPED(running_demand_events, /datum/event/supply_demand)
|
||||
|
||||
//
|
||||
// The Supply Demand Event - CentCom asks for us to put some stuff on the shuttle
|
||||
@@ -14,7 +14,7 @@
|
||||
/datum/event/supply_demand/setup()
|
||||
my_department = "[using_map.company_name] Supply Division" // Can't have company name in initial value (not const)
|
||||
end_time = world.time + 1 HOUR + (severity * 30 MINUTES)
|
||||
running_demand_events += src
|
||||
GLOB.running_demand_events += src
|
||||
// Decide what items are requried!
|
||||
// We base this on what departmets are most active, excluding departments we don't have
|
||||
var/list/notHaveDeptList = GLOB.metric.departments.Copy()
|
||||
@@ -57,7 +57,7 @@
|
||||
send_console_message(message, dpt);
|
||||
|
||||
// Also announce over main comms so people know to look
|
||||
command_announcement.Announce("An order for the [using_map.facility_type] to deliver supplies to [command_name()] has been delivered to all supply Request Consoles", my_department)
|
||||
GLOB.command_announcement.Announce("An order for the [using_map.facility_type] to deliver supplies to [command_name()] has been delivered to all supply Request Consoles", my_department)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART, PROC_REF(handle_supply_demand_sell_shuttle))
|
||||
|
||||
/datum/event/supply_demand/tick()
|
||||
@@ -65,7 +65,7 @@
|
||||
endWhen = activeFor // End early becuase we're done already!
|
||||
|
||||
/datum/event/supply_demand/end()
|
||||
running_demand_events -= src
|
||||
GLOB.running_demand_events -= src
|
||||
UnregisterSignal(SSdcs, COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART)
|
||||
// Check if the crew succeeded or failed!
|
||||
if(required_items.len == 0)
|
||||
@@ -74,11 +74,11 @@
|
||||
var/msg = "Great work! With those items you delivered our inventory levels all match up. "
|
||||
msg += "[capitalize(pick(GLOB.first_names_female))] from accounting will have nothing to complain about. "
|
||||
msg += "I think you'll find a little something in your supply account."
|
||||
command_announcement.Announce(msg, my_department)
|
||||
GLOB.command_announcement.Announce(msg, my_department)
|
||||
else
|
||||
// Fail!
|
||||
var/datum/supply_demand_order/random = pick(required_items)
|
||||
command_announcement.Announce("What happened? Accounting is here right now and they're already asking where that [random.name] is. Damn, I gotta go", my_department)
|
||||
GLOB.command_announcement.Announce("What happened? Accounting is here right now and they're already asking where that [random.name] is. Damn, I gotta go", my_department)
|
||||
var/message = "The delivery deadline was reached with the following needs outstanding:<hr>"
|
||||
for(var/datum/supply_demand_order/req in required_items)
|
||||
message += req.describe() + "<br>"
|
||||
@@ -89,7 +89,7 @@
|
||||
*/
|
||||
/datum/event/supply_demand/proc/handle_supply_demand_sell_shuttle(datum/source, list/area/supply_shuttle_areas)
|
||||
SIGNAL_HANDLER
|
||||
for(var/datum/event/supply_demand/E in running_demand_events)
|
||||
for(var/datum/event/supply_demand/E in GLOB.running_demand_events)
|
||||
// I don't think multiple supply shuttles have ever been used, but retaining support regardless...
|
||||
for(var/area/sub_area in supply_shuttle_areas)
|
||||
E.handle_sold_shuttle(sub_area)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/datum/event/wallrot/announce()
|
||||
if(center)
|
||||
command_announcement.Announce("Harmful fungi detected on \the [station_name()] and [using_map.facility_type] structures nearby [center.loc.name] may be contaminated.", "Biohazard Alert")
|
||||
GLOB.command_announcement.Announce("Harmful fungi detected on \the [station_name()] and [using_map.facility_type] structures nearby [center.loc.name] may be contaminated.", "Biohazard Alert")
|
||||
|
||||
/datum/event/wallrot/start()
|
||||
spawn()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
var/list/dreams = list(
|
||||
GLOBAL_LIST_INIT(dreams, list(
|
||||
"an ID card","a bottle","a familiar face","a crewmember","a toolbox","a " + JOB_SECURITY_OFFICER,"the " + JOB_SITE_MANAGER,
|
||||
"voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness",
|
||||
"light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun",
|
||||
@@ -15,19 +15,17 @@ var/list/dreams = list(
|
||||
"a Teshari", "a Diona nymph","the supermatter","Major Bill","a Morpheus ship with a ridiculous name","the Exodus","a star",
|
||||
"a Dionaea gestalt","the chapel","a distant scream","endless chittering noises","glowing eyes in the shadows","an empty glass",
|
||||
"a disoriented Promethean","towers of plastic","a Gygax","a synthetic","a Man-Machine Interface","maintenance drones",
|
||||
"unintelligible writings","a Fleet ship",
|
||||
//VOREStation Additions after this
|
||||
"slimey surroundings","a sexy squirrel","licking their lips","a gaping maw","an unlikely predator","sinking inside",
|
||||
"unintelligible writings","a Fleet ship", "slimey surroundings","a sexy squirrel","licking their lips","a gaping maw","an unlikely predator","sinking inside",
|
||||
"vulpine assets","more dakka","churning guts","pools of fluid","an exceptional grip","mawing in faces","gaping throat",
|
||||
"swallowed whole","a fox","a wolf","a cat","a tiger","a dog","a taur","a xenochimera"
|
||||
)
|
||||
))
|
||||
|
||||
/mob/living/carbon/proc/dream()
|
||||
dreaming = 1
|
||||
|
||||
spawn(0)
|
||||
for(var/i = rand(1,4),i > 0, i--)
|
||||
to_chat(src, span_infoplain(span_blue(span_italics("... [pick(dreams)] ..."))))
|
||||
to_chat(src, span_infoplain(span_blue(span_italics("... [pick(GLOB.dreams)] ..."))))
|
||||
sleep(rand(40,70))
|
||||
if(paralysis <= 0)
|
||||
dreaming = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/lunchables_lunches_ = list(/obj/item/reagent_containers/food/snacks/sandwich,
|
||||
GLOBAL_LIST_INIT(lunchables_lunches, list(/obj/item/reagent_containers/food/snacks/sandwich,
|
||||
/obj/item/reagent_containers/food/snacks/slice/meatbread/filled,
|
||||
/obj/item/reagent_containers/food/snacks/slice/tofubread/filled,
|
||||
/obj/item/reagent_containers/food/snacks/slice/creamcheesebread/filled,
|
||||
@@ -29,9 +29,10 @@ var/list/lunchables_lunches_ = list(/obj/item/reagent_containers/food/snacks/san
|
||||
/obj/item/reagent_containers/food/snacks/packaged/sausageroll,
|
||||
/obj/item/reagent_containers/food/snacks/packaged/pasty,
|
||||
/obj/item/reagent_containers/food/snacks/packaged/scotchegg,
|
||||
/obj/item/reagent_containers/food/snacks/packaged/porkpie)
|
||||
/obj/item/reagent_containers/food/snacks/packaged/porkpie
|
||||
))
|
||||
|
||||
var/list/lunchables_snacks_ = list(/obj/item/reagent_containers/food/snacks/donut/plain/jelly,
|
||||
GLOBAL_LIST_INIT(lunchables_snacks, list(/obj/item/reagent_containers/food/snacks/donut/plain/jelly,
|
||||
/obj/item/reagent_containers/food/snacks/donut/plain/jelly/cherryjelly,
|
||||
/obj/item/reagent_containers/food/snacks/muffin,
|
||||
/obj/item/reagent_containers/food/snacks/popcorn,
|
||||
@@ -83,9 +84,9 @@ var/list/lunchables_snacks_ = list(/obj/item/reagent_containers/food/snacks/donu
|
||||
/obj/item/storage/box/winegum,
|
||||
/obj/item/storage/box/custardcream,
|
||||
/obj/item/storage/box/bourbon
|
||||
)
|
||||
))
|
||||
|
||||
var/list/lunchables_drinks_ = list(/obj/item/reagent_containers/food/drinks/cans/cola,
|
||||
GLOBAL_LIST_INIT(lunchables_drinks, list(/obj/item/reagent_containers/food/drinks/cans/cola,
|
||||
/obj/item/reagent_containers/food/drinks/cans/waterbottle,
|
||||
/obj/item/reagent_containers/food/drinks/cans/decaf_cola,
|
||||
/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind,
|
||||
@@ -113,10 +114,10 @@ var/list/lunchables_drinks_ = list(/obj/item/reagent_containers/food/drinks/cans
|
||||
/obj/item/reagent_containers/food/drinks/cans/nukie_rose,
|
||||
/obj/item/reagent_containers/food/drinks/cans/nukie_lemon,
|
||||
/obj/item/reagent_containers/food/drinks/cans/nukie_fruit
|
||||
)
|
||||
))
|
||||
|
||||
// This default list is a bit different, it contains items we don't want
|
||||
var/list/lunchables_drink_reagents_ = list(/datum/reagent/drink/nothing,
|
||||
GLOBAL_LIST_INIT(lunchables_drink_reagents, list(/datum/reagent/drink/nothing,
|
||||
/datum/reagent/drink/doctor_delight,
|
||||
/datum/reagent/drink/dry_ramen,
|
||||
/datum/reagent/drink/hell_ramen,
|
||||
@@ -130,11 +131,12 @@ var/list/lunchables_drink_reagents_ = list(/datum/reagent/drink/nothing,
|
||||
/datum/reagent/drink/coffee/nukie/mega/fast,
|
||||
/datum/reagent/drink/coffee/nukie/mega/high,
|
||||
/datum/reagent/drink/coffee/nukie/mega/shrink,
|
||||
/datum/reagent/drink/coffee/nukie/mega/grow)
|
||||
/datum/reagent/drink/coffee/nukie/mega/grow
|
||||
))
|
||||
|
||||
|
||||
// This default list is a bit different, it contains items we don't want
|
||||
var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit,
|
||||
GLOBAL_LIST_INIT(lunchables_ethanol_reagents, list(/datum/reagent/ethanol/acid_spit,
|
||||
/datum/reagent/ethanol/atomicbomb,
|
||||
/datum/reagent/ethanol/beepsky_smash,
|
||||
/datum/reagent/ethanol/coffee,
|
||||
@@ -148,32 +150,33 @@ var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit,
|
||||
/datum/reagent/ethanol/toxins_special,
|
||||
/datum/reagent/ethanol/voxdelight,
|
||||
/datum/reagent/ethanol/soemmerfire,
|
||||
/datum/reagent/ethanol/slimeshot)
|
||||
/datum/reagent/ethanol/slimeshot
|
||||
))
|
||||
|
||||
/proc/lunchables_lunches()
|
||||
if(!(lunchables_lunches_[lunchables_lunches_[1]]))
|
||||
lunchables_lunches_ = init_lunchable_list(lunchables_lunches_)
|
||||
return lunchables_lunches_
|
||||
if(!(GLOB.lunchables_lunches[GLOB.lunchables_lunches[1]]))
|
||||
GLOB.lunchables_lunches = init_lunchable_list(GLOB.lunchables_lunches)
|
||||
return GLOB.lunchables_lunches
|
||||
|
||||
/proc/lunchables_snacks()
|
||||
if(!(lunchables_snacks_[lunchables_snacks_[1]]))
|
||||
lunchables_snacks_ = init_lunchable_list(lunchables_snacks_)
|
||||
return lunchables_snacks_
|
||||
if(!(GLOB.lunchables_snacks[GLOB.lunchables_snacks[1]]))
|
||||
GLOB.lunchables_snacks = init_lunchable_list(GLOB.lunchables_snacks)
|
||||
return GLOB.lunchables_snacks
|
||||
|
||||
/proc/lunchables_drinks()
|
||||
if(!(lunchables_drinks_[lunchables_drinks_[1]]))
|
||||
lunchables_drinks_ = init_lunchable_list(lunchables_drinks_)
|
||||
return lunchables_drinks_
|
||||
if(!(GLOB.lunchables_drinks[GLOB.lunchables_drinks[1]]))
|
||||
GLOB.lunchables_drinks = init_lunchable_list(GLOB.lunchables_drinks)
|
||||
return GLOB.lunchables_drinks
|
||||
|
||||
/proc/lunchables_drink_reagents()
|
||||
if(!(lunchables_drink_reagents_[lunchables_drink_reagents_[1]]))
|
||||
lunchables_drink_reagents_ = init_lunchable_reagent_list(lunchables_drink_reagents_, /datum/reagent/drink)
|
||||
return lunchables_drink_reagents_
|
||||
if(!(GLOB.lunchables_drink_reagents[GLOB.lunchables_drink_reagents[1]]))
|
||||
GLOB.lunchables_drink_reagents = init_lunchable_reagent_list(GLOB.lunchables_drink_reagents, /datum/reagent/drink)
|
||||
return GLOB.lunchables_drink_reagents
|
||||
|
||||
/proc/lunchables_ethanol_reagents()
|
||||
if(!(lunchables_ethanol_reagents_[lunchables_ethanol_reagents_[1]]))
|
||||
lunchables_ethanol_reagents_ = init_lunchable_reagent_list(lunchables_ethanol_reagents_, /datum/reagent/ethanol)
|
||||
return lunchables_ethanol_reagents_
|
||||
if(!(GLOB.lunchables_ethanol_reagents[GLOB.lunchables_ethanol_reagents[1]]))
|
||||
GLOB.lunchables_ethanol_reagents = init_lunchable_reagent_list(GLOB.lunchables_ethanol_reagents, /datum/reagent/ethanol)
|
||||
return GLOB.lunchables_ethanol_reagents
|
||||
|
||||
/proc/init_lunchable_list(var/list/lunches)
|
||||
. = list()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
message = "The [record_class_to_delete] record database server has suffered a hardware failure, and is no longer functional. \
|
||||
A temporary replacement server has been activated, containing recovered data from the main server. \
|
||||
A few records became corrupted, and could not be transferred."
|
||||
command_announcement.Announce(message, author)
|
||||
GLOB.command_announcement.Announce(message, author)
|
||||
|
||||
/datum/event2/event/manifest_malfunction/start()
|
||||
for(var/i = 1 to records_to_delete)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/datum/event2/event/airlock_failure/announce()
|
||||
if(prob(announce_odds))
|
||||
command_announcement.Announce("An electrical issue has been detected in the airlock grid at [english_list(affected_areas)]. \
|
||||
GLOB.command_announcement.Announce("An electrical issue has been detected in the airlock grid at [english_list(affected_areas)]. \
|
||||
Some airlocks may require servicing by a qualified technician.", "Electrical Alert")
|
||||
|
||||
|
||||
|
||||
@@ -157,4 +157,4 @@
|
||||
if(danger_level >= BLOB_DIFFICULTY_SUPERHARD)
|
||||
lines += "Extreme caution is advised."
|
||||
|
||||
command_announcement.Announce(lines.Join("\n"), "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
GLOB.command_announcement.Announce(lines.Join("\n"), "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/datum/event2/event/brand_intelligence/announce()
|
||||
if(prob(90))
|
||||
command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard \the [location_name()], \
|
||||
GLOB.command_announcement.Announce("An ongoing mass upload of malware for vendors has been detected onboard \the [location_name()], \
|
||||
which appears to transmit to nearby vendors. The original infected machine is believed to be \a [vender_zero].", "Vendor Service Alert")
|
||||
|
||||
/datum/event2/event/brand_intelligence/start()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/datum/event2/event/dust/announce()
|
||||
if(prob(33))
|
||||
command_announcement.Announce("Dust has been detected on a collision course with \the [location_name()].")
|
||||
GLOB.command_announcement.Announce("Dust has been detected on a collision course with \the [location_name()].")
|
||||
|
||||
/datum/event2/event/dust/start()
|
||||
dust_swarm("norm")
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/datum/event2/event/gas_leak/announce()
|
||||
if(chosen_turf)
|
||||
command_announcement.Announce("Warning, hazardous [lowertext(GLOB.gas_data.name[chosen_gas])] gas leak detected in \the [chosen_turf.loc], evacuate the area.", "Hazard Alert")
|
||||
GLOB.command_announcement.Announce("Warning, hazardous [lowertext(GLOB.gas_data.name[chosen_gas])] gas leak detected in \the [chosen_turf.loc], evacuate the area.", "Hazard Alert")
|
||||
|
||||
/datum/event2/event/gas_leak/start()
|
||||
// Okay, time to actually put the gas in the room!
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/datum/event2/event/meteor_defense/announce()
|
||||
var/announcement = "Meteors are expected to approach from the [dir_text] side, in approximately [DisplayTimeText(time_to_start - world.time, 60)]."
|
||||
command_announcement.Announce(announcement, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
GLOB.command_announcement.Announce(announcement, "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
|
||||
/datum/event2/event/meteor_defense/wait_tick()
|
||||
if(!soon_announced)
|
||||
@@ -63,10 +63,10 @@
|
||||
soon_announced = TRUE
|
||||
var/announcement = "The incoming meteors are expected to approach from the [dir_text] side. \
|
||||
ETA to arrival is approximately [DisplayTimeText(time_to_start - world.time, 60)]."
|
||||
command_announcement.Announce(announcement, "Meteor Alert - Update")
|
||||
GLOB.command_announcement.Announce(announcement, "Meteor Alert - Update")
|
||||
|
||||
/datum/event2/event/meteor_defense/start()
|
||||
command_announcement.Announce("Incoming meteors approach from \the [dir_text] side!", "Meteor Alert - Update")
|
||||
GLOB.command_announcement.Announce("Incoming meteors approach from \the [dir_text] side!", "Meteor Alert - Update")
|
||||
|
||||
/datum/event2/event/meteor_defense/event_tick()
|
||||
if(world.time > last_wave_time + wave_delay)
|
||||
@@ -80,4 +80,4 @@
|
||||
return waves <= 0
|
||||
|
||||
/datum/event2/event/meteor_defense/end()
|
||||
command_announcement.Announce("\The [location_name()] will clear the incoming meteors in a moment.", "Meteor Alert - Update")
|
||||
GLOB.command_announcement.Announce("\The [location_name()] will clear the incoming meteors in a moment.", "Meteor Alert - Update")
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/datum/event2/event/wallrot/announce()
|
||||
if(origin && prob(80))
|
||||
command_announcement.Announce("Harmful fungi detected on \the [location_name()], near \the [origin.loc]. \
|
||||
GLOB.command_announcement.Announce("Harmful fungi detected on \the [location_name()], near \the [origin.loc]. \
|
||||
Station structural integrity may be compromised.", "Biohazard Alert")
|
||||
|
||||
/datum/event2/event/wallrot/start()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/datum/event2/event/window_break/announce()
|
||||
if(chosen_window)
|
||||
command_announcement.Announce("Structural integrity of space-facing windows at \the [get_area(chosen_turf_with_windows)] are failing. \
|
||||
GLOB.command_announcement.Announce("Structural integrity of space-facing windows at \the [get_area(chosen_turf_with_windows)] are failing. \
|
||||
Repair of the damaged window is advised. Personnel without EVA suits in the area should leave until repairs are complete.", "Structural Alert")
|
||||
|
||||
/datum/event2/event/window_break/start()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \
|
||||
"#4nd%;f4y6,>£%-BZZZZZZZT")
|
||||
if(prob(33))
|
||||
command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg')
|
||||
GLOB.command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg')
|
||||
// AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list)
|
||||
to_chat(A, span_boldwarning("<br>"))
|
||||
@@ -30,12 +30,12 @@
|
||||
if(prob(50))
|
||||
// One in two chance for the radios to turn i%t# t&_)#%, which can be more alarming than radio silence.
|
||||
log_game("Doing partial outage of telecomms.")
|
||||
for(var/obj/machinery/telecomms/processor/P in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/processor/P in GLOB.telecomms_list)
|
||||
P.emp_act(1)
|
||||
else
|
||||
// Otherwise just shut everything down, madagascar style.
|
||||
log_game("Doing complete outage of telecomms.")
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
// Communicators go down no matter what.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/datum/event2/event/electrical_fault/announce()
|
||||
// Trying to be vague to avoid 'space lightning storms'.
|
||||
// This could be re-flavored to be a solar flare or something and have robots outside be sad.
|
||||
command_announcement.Announce("External conditions near \the [location_name()] are likely \
|
||||
GLOB.command_announcement.Announce("External conditions near \the [location_name()] are likely \
|
||||
to cause voltage spikes and other electrical issues very soon. Please secure sensitive electrical equipment until the situation passes.", "[location_name()] Sensor Array")
|
||||
|
||||
/datum/event2/event/electrical_fault/set_up()
|
||||
@@ -43,7 +43,7 @@
|
||||
valid_apcs += A
|
||||
|
||||
/datum/event2/event/electrical_fault/start()
|
||||
command_announcement.Announce("Irregularities detected in \the [location_name()] power grid.", "[location_name()] Power Grid Monitoring")
|
||||
GLOB.command_announcement.Announce("Irregularities detected in \the [location_name()] power grid.", "[location_name()] Power Grid Monitoring")
|
||||
|
||||
/datum/event2/event/electrical_fault/event_tick()
|
||||
if(!valid_apcs.len)
|
||||
@@ -59,7 +59,7 @@
|
||||
affect_apc(A)
|
||||
|
||||
/datum/event2/event/electrical_fault/end()
|
||||
command_announcement.Announce("The irregular electrical conditions inside \the [location_name()] power grid has ceased.", "[location_name()] Power Grid Monitoring")
|
||||
GLOB.command_announcement.Announce("The irregular electrical conditions inside \the [location_name()] power grid has ceased.", "[location_name()] Power Grid Monitoring")
|
||||
log_game("Electrical Fault event caused [apcs_disabled] APC\s to shut off, \
|
||||
[apcs_overloaded] APC\s to overload lighting, and [apcs_emagged] APC\s to be emagged.")
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/list/generators = list()
|
||||
|
||||
/datum/event2/event/gravity/announce()
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure")
|
||||
GLOB.command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled. Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure")
|
||||
|
||||
/datum/event2/event/gravity/start()
|
||||
GLOB.gravity_is_on = FALSE
|
||||
@@ -42,4 +42,4 @@
|
||||
did_anything = TRUE
|
||||
|
||||
if(did_anything)
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
GLOB.command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/datum/event2/event/infestation/announce()
|
||||
var/turf/T = turfs[1]
|
||||
command_announcement.Announce("Bioscans indicate that [vermin_string] have been breeding \
|
||||
GLOB.command_announcement.Announce("Bioscans indicate that [vermin_string] have been breeding \
|
||||
in \the [T.loc]. Clear them out, before this starts to affect productivity.", "Vermin infestation")
|
||||
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
length_lower_bound = 1 MINUTE
|
||||
|
||||
/datum/event2/event/radiation_storm/announce()
|
||||
command_announcement.Announce("High levels of radiation detected near \the [location_name()]. \
|
||||
GLOB.command_announcement.Announce("High levels of radiation detected near \the [location_name()]. \
|
||||
Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
||||
make_maint_all_access()
|
||||
|
||||
/datum/event2/event/radiation_storm/start()
|
||||
command_announcement.Announce("The station has entered the radiation belt. \
|
||||
GLOB.command_announcement.Announce("The station has entered the radiation belt. \
|
||||
Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
|
||||
|
||||
/datum/event2/event/radiation_storm/event_tick()
|
||||
@@ -34,7 +34,7 @@
|
||||
SSradiation.z_radiate(locate(1, 1, z), radiation_level, 1)
|
||||
|
||||
/datum/event2/event/radiation_storm/end()
|
||||
command_announcement.Announce("The station has passed the radiation belt. \
|
||||
GLOB.command_announcement.Announce("The station has passed the radiation belt. \
|
||||
Please allow for up to one minute while radiation levels dissipate, and report to \
|
||||
medbay if you experience any unusual symptoms. Maintenance will lose all \
|
||||
access again shortly.", "Anomaly Alert")
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
var/base_solar_gen_rate = null
|
||||
|
||||
/datum/event2/event/solar_storm/announce()
|
||||
command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. \
|
||||
GLOB.command_announcement.Announce("A solar storm has been detected approaching \the [station_name()]. \
|
||||
Please halt all EVA activites immediately and return to the interior of the station.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
||||
adjust_solar_output(1.5)
|
||||
|
||||
/datum/event2/event/solar_storm/start()
|
||||
command_announcement.Announce("The solar storm has reached the station. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert")
|
||||
GLOB.command_announcement.Announce("The solar storm has reached the station. Please refrain from EVA and remain inside the station until it has passed.", "Anomaly Alert")
|
||||
adjust_solar_output(5)
|
||||
|
||||
/datum/event2/event/solar_storm/event_tick()
|
||||
radiate()
|
||||
|
||||
/datum/event2/event/solar_storm/end()
|
||||
command_announcement.Announce("The solar storm has passed the station. It is now safe to resume EVA activities. \
|
||||
GLOB.command_announcement.Announce("The solar storm has passed the station. It is now safe to resume EVA activities. \
|
||||
Please report to medbay if you experience any unusual symptoms.", "Anomaly Alert")
|
||||
adjust_solar_output(1)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/datum/event2/event/sudden_weather_shift/announce()
|
||||
if(!chosen_planet)
|
||||
return
|
||||
command_announcement.Announce("Local weather patterns on [chosen_planet.name] suggest that a \
|
||||
GLOB.command_announcement.Announce("Local weather patterns on [chosen_planet.name] suggest that a \
|
||||
sudden atmospheric fluctuation has occurred. All groundside personnel should be wary of \
|
||||
rapidly deteriorating conditions.", "Weather Alert")
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/event2/event/mob_spawning/carp_migration/announce()
|
||||
var/announcement = "Unknown biological entities been detected near \the [location_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event2/event/mob_spawning/carp_migration/event_tick()
|
||||
if(last_carp_wave_time + carp_wave_cooldown > world.time)
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
return (sec * 5) + ((everyone - sec) * 1.5)
|
||||
|
||||
/datum/event2/event/security_drill/announce()
|
||||
command_announcement.Announce("[pick("A NanoTrasen security director", "A Vir-Gov correspondant", "Local Sif authoritiy")] \
|
||||
GLOB.command_announcement.Announce("[pick("A NanoTrasen security director", "A Vir-Gov correspondant", "Local Sif authoritiy")] \
|
||||
has advised the enactment of [pick("a rampant wildlife", "a fire", "a hostile boarding", \
|
||||
"a bomb", "an emergent intelligence")] drill with the personnel onboard \the [location_name()].", "Security Advisement")
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
// There's between 40 seconds and one minute before the whole station knows.
|
||||
// If there's a baddie engineer, they can choose to keep their early announcement to themselves and get a minute to exploit it.
|
||||
/datum/event2/event/prison_break/end()
|
||||
command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] was detected \
|
||||
GLOB.command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] was detected \
|
||||
in \the [location_name()] [area_display_name] [containment_display_desc] subroutines. Secure any compromised \
|
||||
areas immediately. AI involvement is recommended.", "[capitalize(containment_display_desc)] Alert")
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
msg = "We're detecting a swarm of small objects approaching your station. \
|
||||
Most likely a bunch of drones. Please exercise caution if you see any."
|
||||
|
||||
command_announcement.Announce(msg, "Rogue drone alert")
|
||||
GLOB.command_announcement.Announce(msg, "Rogue drone alert")
|
||||
|
||||
/datum/event2/event/mob_spawning/rogue_drones/start()
|
||||
for(var/i = 1 to drones_to_spawn)
|
||||
@@ -65,6 +65,6 @@
|
||||
number_recovered++
|
||||
|
||||
if(number_recovered > spawned_mobs.len * 0.75)
|
||||
command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert")
|
||||
GLOB.command_announcement.Announce("The drones that were malfunctioning have been recovered safely.", "Rogue drone alert")
|
||||
else
|
||||
command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
GLOB.command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
|
||||
@@ -88,6 +88,6 @@
|
||||
return
|
||||
|
||||
/datum/event2/event/security_screening/announce()
|
||||
command_announcement.Announce("[pick("A nearby Navy vessel", "A Solar official", "A Vir-Gov official", "A NanoTrasen board director")] has \
|
||||
GLOB.command_announcement.Announce("[pick("A nearby Navy vessel", "A Solar official", "A Vir-Gov official", "A NanoTrasen board director")] has \
|
||||
requested the screening of [pick("every other", "every", "suspicious", "willing")] [victim] \
|
||||
personnel onboard \the [location_name()].", "Security Advisement")
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
/datum/event2/event/spider_infestation/announce()
|
||||
command_announcement.Announce("Unidentified lifesigns detected coming aboard \the [location_name()]. \
|
||||
GLOB.command_announcement.Announce("Unidentified lifesigns detected coming aboard \the [location_name()]. \
|
||||
Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
|
||||
/datum/event2/event/spider_infestation/start()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/datum/event2/event/ion_storm/announce()
|
||||
if(prob(announce_odds))
|
||||
command_announcement.Announce("An ion storm was detected within proximity to \the [location_name()] recently. \
|
||||
GLOB.command_announcement.Announce("An ion storm was detected within proximity to \the [location_name()] recently. \
|
||||
Check all AI controlled equipment for corruption.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
|
||||
// Fake variant used by traitors.
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
|
||||
/obj/item/stack/material/wax/Initialize(mapload)
|
||||
. = ..()
|
||||
recipes = wax_recipes
|
||||
recipes = GLOB.wax_recipes
|
||||
|
||||
/datum/material/wax
|
||||
name = MAT_WAX
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
icon = 'icons/obj/hydroponics_misc.dmi'
|
||||
icon_state = ""
|
||||
|
||||
var/list/fruit_icon_cache = list()
|
||||
GLOBAL_LIST_EMPTY(fruit_icon_cache)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, var/datum/seed/S)
|
||||
. = ..()
|
||||
@@ -391,13 +391,13 @@ var/list/fruit_icon_cache = list()
|
||||
var/rind_colour = S.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
var/flesh_colour = S.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = rind_colour
|
||||
if(!fruit_icon_cache["rind-[rind_colour]"])
|
||||
if(!GLOB.fruit_icon_cache["rind-[rind_colour]"])
|
||||
var/image/I = image(icon,"fruit_rind")
|
||||
I.color = rind_colour
|
||||
fruit_icon_cache["rind-[rind_colour]"] = I
|
||||
add_overlay(fruit_icon_cache["rind-[rind_colour]"])
|
||||
if(!fruit_icon_cache["slice-[rind_colour]"])
|
||||
GLOB.fruit_icon_cache["rind-[rind_colour]"] = I
|
||||
add_overlay(GLOB.fruit_icon_cache["rind-[rind_colour]"])
|
||||
if(!GLOB.fruit_icon_cache["slice-[rind_colour]"])
|
||||
var/image/I = image(icon,"fruit_slice")
|
||||
I.color = flesh_colour
|
||||
fruit_icon_cache["slice-[rind_colour]"] = I
|
||||
add_overlay(fruit_icon_cache["slice-[rind_colour]"])
|
||||
GLOB.fruit_icon_cache["slice-[rind_colour]"] = I
|
||||
add_overlay(GLOB.fruit_icon_cache["slice-[rind_colour]"])
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
//----------------------------------------
|
||||
|
||||
|
||||
/proc/animate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000", rune_color2 = "#00000000", border_color2 = "#d8380000", alpha = 255, alpha2 = 255, frames = rune_animation)
|
||||
/proc/animate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000", rune_color2 = "#00000000", border_color2 = "#d8380000", alpha = 255, alpha2 = 255, frames = GLOB.rune_animation)
|
||||
var/rr1 = hex2num(copytext(rune_color, 2, 4))
|
||||
var/rg1 = hex2num(copytext(rune_color, 4, 6))
|
||||
var/rb1 = hex2num(copytext(rune_color, 6, 8))
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
return base
|
||||
|
||||
var/list/rune_animation = list(
|
||||
GLOBAL_LIST_INIT(rune_animation, list(
|
||||
list(0.000, 5),
|
||||
list(0.020, 1),
|
||||
list(0.050, 1),
|
||||
@@ -166,15 +166,15 @@ var/list/rune_animation = list(
|
||||
list(0.375, 1),
|
||||
list(0.250, 1),
|
||||
list(0.125, 1),
|
||||
)
|
||||
))
|
||||
|
||||
/var/list/rune_cache = list()
|
||||
GLOBAL_LIST_EMPTY(rune_cache)
|
||||
|
||||
/proc/get_rune(rune_bits, animated = 0)
|
||||
var/lookup = "[rune_bits]-[animated]"
|
||||
|
||||
if(lookup in rune_cache)
|
||||
return rune_cache[lookup]
|
||||
if(lookup in GLOB.rune_cache)
|
||||
return GLOB.rune_cache[lookup]
|
||||
|
||||
var/icon/base = icon('icons/effects/uristrunes.dmi', "")
|
||||
|
||||
@@ -190,7 +190,7 @@ var/list/rune_animation = list(
|
||||
else
|
||||
result = inanimate_rune(base)
|
||||
|
||||
rune_cache[lookup] = result
|
||||
GLOB.rune_cache[lookup] = result
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/static/list/fake_sunlight_zs = list()
|
||||
GLOBAL_LIST_EMPTY(fake_sunlight_zs)
|
||||
|
||||
/obj/effect/fake_sun
|
||||
name = "fake sun"
|
||||
@@ -165,7 +165,7 @@ var/static/list/fake_sunlight_zs = list()
|
||||
sun.set_alpha(round(CLAMP01(choice["brightness"])*255,1))
|
||||
|
||||
if(do_sun)
|
||||
fake_sunlight_zs |= z
|
||||
GLOB.fake_sunlight_zs |= z
|
||||
for(var/turf/T as anything in turfs_to_use)
|
||||
sun.apply_to_turf(T)
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@
|
||||
|
||||
///Setter for the byond luminosity var
|
||||
/turf/proc/set_luminosity(new_luminosity, force)
|
||||
if(((is_outdoors() && !force) || outdoors_adjacent) && (z in fake_sunlight_zs)) //Special exception for fakesun lit tiles
|
||||
if(((is_outdoors() && !force) || outdoors_adjacent) && (z in GLOB.fake_sunlight_zs)) //Special exception for fakesun lit tiles
|
||||
return
|
||||
|
||||
luminosity = new_luminosity
|
||||
|
||||
///Checks planets and fake_suns to see if our turf should be handled by either
|
||||
/turf/proc/check_for_sun()
|
||||
if((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || (z in fake_sunlight_zs))
|
||||
if((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || (z in GLOB.fake_sunlight_zs))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/obj/item/stack/rods/Initialize(mapload)
|
||||
. = ..()
|
||||
recipes = rods_recipes
|
||||
recipes = GLOB.rods_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Open up VLC and play musique.
|
||||
// Converted to VLC for cross-platform and ogg support. - N3X
|
||||
var/const/PLAYER_VLC_HTML={"
|
||||
<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab" id="player"></object>
|
||||
<script>
|
||||
function noErrorMessages () { return true; }
|
||||
window.onerror = noErrorMessages;
|
||||
function SetMusic(url, time, volume) {
|
||||
var vlc = document.getElementById('player');
|
||||
|
||||
// Stop playing
|
||||
vlc.playlist.stop();
|
||||
|
||||
// Clear playlist
|
||||
vlc.playlist.items.clear();
|
||||
|
||||
// Add new playlist item.
|
||||
var id = vlc.playlist.add(url);
|
||||
|
||||
// Play playlist item
|
||||
vlc.playlist.playItem(id);
|
||||
|
||||
vlc.input.time = time*1000; // VLC takes milliseconds.
|
||||
vlc.audio.volume = volume*100; // \[0-200]
|
||||
}
|
||||
</script>
|
||||
"}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Legacy player using Windows Media Player OLE object.
|
||||
// I guess it will work in IE on windows, and BYOND uses IE on windows, so alright!
|
||||
var/const/PLAYER_WMP_HTML={"
|
||||
<OBJECT id='player' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-oleobject'></OBJECT>
|
||||
<script>
|
||||
function noErrorMessages () { return true; }
|
||||
window.onerror = noErrorMessages;
|
||||
function SetMusic(url, time, volume) {
|
||||
var player = document.getElementById('player');
|
||||
player.URL = url;
|
||||
player.Controls.currentPosition = +time;
|
||||
player.Settings.volume = +volume;
|
||||
}
|
||||
</script>"}
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/mining_overlay_cache = list()
|
||||
GLOBAL_LIST_EMPTY(mining_overlay_cache)
|
||||
|
||||
/**********************Mineral deposits**************************/
|
||||
/turf/unsimulated/mineral
|
||||
@@ -185,7 +185,7 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
/turf/simulated/mineral/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32)
|
||||
//Cache miss
|
||||
if(!mining_overlay_cache["[cache_id]_[direction]"])
|
||||
if(!GLOB.mining_overlay_cache["[cache_id]_[direction]"])
|
||||
var/image/new_cached_image = image(icon_state, dir = direction, layer = ABOVE_TURF_LAYER)
|
||||
switch(direction)
|
||||
if(NORTH)
|
||||
@@ -196,11 +196,11 @@ var/list/mining_overlay_cache = list()
|
||||
new_cached_image.pixel_x = offset
|
||||
if(WEST)
|
||||
new_cached_image.pixel_x = -offset
|
||||
mining_overlay_cache["[cache_id]_[direction]"] = new_cached_image
|
||||
GLOB.mining_overlay_cache["[cache_id]_[direction]"] = new_cached_image
|
||||
return new_cached_image
|
||||
|
||||
//Cache hit
|
||||
return mining_overlay_cache["[cache_id]_[direction]"]
|
||||
return GLOB.mining_overlay_cache["[cache_id]_[direction]"]
|
||||
|
||||
/turf/simulated/mineral/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
// This list needs expansion... Currently, we have very few proper redspace areas.
|
||||
// Tossing /area/redgate in here as well. Entering one of these areas (unless coded to do such) doesn't apply
|
||||
// the modifier, but if you're in one of these areas, you'll keep the modifier until you leave.
|
||||
var/static/list/redspace_areas = list (
|
||||
GLOBAL_LIST_INIT(redspace_areas, list(
|
||||
/area/redspace_abduction,
|
||||
/area/redgate,
|
||||
/area/survivalpod/redspace // Redspace shelters effectively pull a bit of redspace into realspace, so
|
||||
)
|
||||
))
|
||||
|
||||
/datum/modifier/redspace_drain
|
||||
name = "redspace warp"
|
||||
@@ -29,7 +29,7 @@ var/static/list/redspace_areas = list (
|
||||
var/mob/living/carbon/human/unfortunate_soul //The human target of our modifier.
|
||||
|
||||
/datum/modifier/redspace_drain/can_apply(mob/living/L, suppress_output = TRUE)
|
||||
if(ishuman(L) && !L.isSynthetic() && L.lastarea && is_type_in_list(L.lastarea, redspace_areas))
|
||||
if(ishuman(L) && !L.isSynthetic() && L.lastarea && is_type_in_list(L.lastarea, GLOB.redspace_areas))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -62,7 +62,7 @@ var/static/list/redspace_areas = list (
|
||||
/datum/modifier/redspace_drain/check_if_valid() //We don't call parent. This doesn't wear off without set conditions.
|
||||
if(holder.stat == DEAD)
|
||||
expire(silent = TRUE)
|
||||
else if(holder.lastarea && !is_type_in_list(holder.lastarea, redspace_areas))
|
||||
else if(holder.lastarea && !is_type_in_list(holder.lastarea, GLOB.redspace_areas))
|
||||
expire(silent = TRUE)
|
||||
|
||||
/datum/modifier/redspace_drain/tick()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
var/list/holder_mob_icon_cache = list()
|
||||
|
||||
//Helper object for picking dionaea (and other creatures) up.
|
||||
/obj/item/holder
|
||||
name = "holder"
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
|
||||
var/list/slot_equipment_priority = list( \
|
||||
slot_back,\
|
||||
slot_wear_id,\
|
||||
slot_w_uniform,\
|
||||
slot_wear_suit,\
|
||||
slot_wear_mask,\
|
||||
slot_head,\
|
||||
slot_shoes,\
|
||||
slot_gloves,\
|
||||
slot_l_ear,\
|
||||
slot_r_ear,\
|
||||
slot_glasses,\
|
||||
slot_belt,\
|
||||
slot_s_store,\
|
||||
slot_tie,\
|
||||
slot_l_store,\
|
||||
slot_r_store\
|
||||
)
|
||||
GLOBAL_LIST_INIT(slot_equipment_priority, list(
|
||||
slot_back,
|
||||
slot_wear_id,
|
||||
slot_w_uniform,
|
||||
slot_wear_suit,
|
||||
slot_wear_mask,
|
||||
slot_head,
|
||||
slot_shoes,
|
||||
slot_gloves,
|
||||
slot_l_ear,
|
||||
slot_r_ear,
|
||||
slot_glasses,
|
||||
slot_belt,
|
||||
slot_s_store,
|
||||
slot_tie,
|
||||
slot_l_store,
|
||||
slot_r_store
|
||||
))
|
||||
|
||||
/mob
|
||||
var/obj/item/storage/s_active = null // Even ghosts can/should be able to peek into boxes on the ground
|
||||
@@ -87,7 +87,7 @@ var/list/slot_equipment_priority = list( \
|
||||
//puts the item "W" into an appropriate slot in a human's inventory
|
||||
//returns 0 if it cannot, 1 if successful
|
||||
/mob/proc/equip_to_appropriate_slot(obj/item/W)
|
||||
for(var/slot in slot_equipment_priority)
|
||||
for(var/slot in GLOB.slot_equipment_priority)
|
||||
if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1))
|
||||
return 1
|
||||
|
||||
|
||||
@@ -388,10 +388,10 @@
|
||||
def_zone = pick(BP_L_HAND, BP_R_HAND)
|
||||
|
||||
if(species.siemens_coefficient == -1)
|
||||
if(stored_shock_by_ref["\ref[src]"])
|
||||
stored_shock_by_ref["\ref[src]"] += shock_damage
|
||||
if(GLOB.stored_shock_by_ref["\ref[src]"])
|
||||
GLOB.stored_shock_by_ref["\ref[src]"] += shock_damage
|
||||
else
|
||||
stored_shock_by_ref["\ref[src]"] = shock_damage
|
||||
GLOB.stored_shock_by_ref["\ref[src]"] = shock_damage
|
||||
return
|
||||
|
||||
var/obj/item/organ/external/affected_organ = get_organ(check_zone(def_zone))
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
var/datum/unarmed_attack/default_attack
|
||||
|
||||
/mob/living/carbon/human/proc/get_unarmed_attack(var/mob/living/carbon/human/target, var/hit_zone)
|
||||
if(nif && nif.flag_check(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT)){return unarmed_hardclaws}
|
||||
if(nif && nif.flag_check(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT))
|
||||
return GLOB.unarmed_hardclaws
|
||||
if(src.default_attack && src.default_attack.is_usable(src, target, hit_zone))
|
||||
if(HAS_TRAIT(src, TRAIT_NONLETHAL_BLOWS))
|
||||
var/datum/unarmed_attack/soft_type = src.default_attack.get_sparring_variant()
|
||||
|
||||
@@ -103,10 +103,10 @@ emp_act
|
||||
|
||||
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
|
||||
for(var/organ_name in organs_by_name)
|
||||
if (organ_name in organ_rel_size)
|
||||
if (organ_name in GLOB.organ_rel_size)
|
||||
var/obj/item/organ/external/organ = organs_by_name[organ_name]
|
||||
if(organ)
|
||||
var/weight = organ_rel_size[organ_name]
|
||||
var/weight = GLOB.organ_rel_size[organ_name]
|
||||
armorval += (getarmor_organ(organ, type) * weight)
|
||||
total += weight
|
||||
return (armorval/max(total, 1))
|
||||
@@ -135,10 +135,10 @@ emp_act
|
||||
var/siemens_value = 0
|
||||
var/total = 0
|
||||
for(var/organ_name in organs_by_name)
|
||||
if(organ_name in organ_rel_size)
|
||||
if(organ_name in GLOB.organ_rel_size)
|
||||
var/obj/item/organ/external/organ = organs_by_name[organ_name]
|
||||
if(organ)
|
||||
var/weight = organ_rel_size[organ_name]
|
||||
var/weight = GLOB.organ_rel_size[organ_name]
|
||||
siemens_value += get_siemens_coefficient_organ(organ) * weight
|
||||
total += weight
|
||||
|
||||
|
||||
@@ -162,10 +162,10 @@
|
||||
hud_list[IMPTRACK_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK)
|
||||
hud_list[SPECIALROLE_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL)
|
||||
hud_list[STATUS_HUD_OOC] = gen_hud_image(GLOB.ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC)
|
||||
hud_list[HEALTH_VR_HUD] = gen_hud_image(ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR)
|
||||
hud_list[STATUS_R_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R)
|
||||
hud_list[BACKUP_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP)
|
||||
hud_list[VANTAG_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG)
|
||||
hud_list[HEALTH_VR_HUD] = gen_hud_image(GLOB.ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR)
|
||||
hud_list[STATUS_R_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R)
|
||||
hud_list[BACKUP_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP)
|
||||
hud_list[VANTAG_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG)
|
||||
add_overlay(hud_list)
|
||||
|
||||
/mob/living/carbon/human/recalculate_vis()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var/static/icon/ingame_hud_vr = icon('icons/mob/hud_vr.dmi')
|
||||
var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
GLOBAL_DATUM_INIT(ingame_hud_vr, /icon, icon('icons/mob/hud_vr.dmi'))
|
||||
GLOBAL_DATUM_INIT(ingame_hud_med_vr, /icon, icon('icons/mob/hud_med_vr.dmi'))
|
||||
|
||||
/mob/living/carbon/human/proc/remove_marking(var/datum/sprite_accessory/marking/mark_datum)
|
||||
if (!mark_datum)
|
||||
@@ -263,7 +263,7 @@ var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
species?.base_species = bodytype
|
||||
species?.vanity_base_fit = bodytype
|
||||
if (istype(species, /datum/species/shapeshifter))
|
||||
wrapped_species_by_ref["\ref[src]"] = bodytype
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = bodytype
|
||||
|
||||
custom_species = character.custom_species
|
||||
custom_say = character.custom_say
|
||||
|
||||
@@ -140,57 +140,57 @@
|
||||
|
||||
/datum/species/lleill/get_icobase(var/mob/living/carbon/human/H, var/get_deform)
|
||||
if(!H) return ..(null, get_deform)
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.type == src.type) return ..(H, get_deform)
|
||||
return S.get_icobase(H,get_deform)
|
||||
|
||||
/datum/species/lleill/get_race_key(var/mob/living/carbon/human/H)
|
||||
return "[..()]-[wrapped_species_by_ref["\ref[H]"]]"
|
||||
return "[..()]-[GLOB.wrapped_species_by_ref["\ref[H]"]]"
|
||||
|
||||
/datum/species/lleill/get_bodytype(var/mob/living/carbon/human/H)
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!H || !S) return ..()
|
||||
if(S.type == src.type) return ..(H)
|
||||
return S.get_bodytype(H)
|
||||
|
||||
/datum/species/lleill/get_blood_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_blood_mask(H)
|
||||
|
||||
/datum/species/lleill/get_damage_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_damage_mask(H)
|
||||
|
||||
/datum/species/lleill/get_damage_overlays(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_damage_overlays(H)
|
||||
|
||||
/datum/species/lleill/get_tail(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_tail(H)
|
||||
|
||||
/datum/species/lleill/get_tail_animation(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_tail_animation(H)
|
||||
|
||||
/datum/species/lleill/get_tail_hair(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_tail_hair(H)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
var/new_species = null
|
||||
new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src))
|
||||
|
||||
if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
if(!new_species || !GLOB.all_species[new_species] || GLOB.wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
return
|
||||
lleill_change_shape(new_species)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!new_species)
|
||||
return
|
||||
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
dna.base_species = new_species
|
||||
species.base_species = new_species
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var/list/stored_shock_by_ref = list()
|
||||
GLOBAL_LIST_EMPTY(stored_shock_by_ref)
|
||||
|
||||
/mob/living/proc/apply_stored_shock_to(var/mob/living/target)
|
||||
if(stored_shock_by_ref["\ref[src]"])
|
||||
target.electrocute_act(stored_shock_by_ref["\ref[src]"]*0.9, src)
|
||||
stored_shock_by_ref["\ref[src]"] = 0
|
||||
if(GLOB.stored_shock_by_ref["\ref[src]"])
|
||||
target.electrocute_act(GLOB.stored_shock_by_ref["\ref[src]"]*0.9, src)
|
||||
GLOB.stored_shock_by_ref["\ref[src]"] = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// This is something of an intermediary species used for species that
|
||||
// need to emulate the appearance of another race. Currently it is only
|
||||
// used for slimes but it may be useful for changelings later.
|
||||
var/list/wrapped_species_by_ref = list()
|
||||
GLOBAL_LIST_EMPTY(wrapped_species_by_ref)
|
||||
|
||||
/datum/species/shapeshifter
|
||||
|
||||
@@ -22,50 +22,50 @@ var/list/wrapped_species_by_ref = list()
|
||||
|
||||
/datum/species/shapeshifter/get_icobase(var/mob/living/carbon/human/H, var/get_deform)
|
||||
if(!H) return ..(null, get_deform)
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_icobase(H, get_deform)
|
||||
|
||||
/datum/species/shapeshifter/get_race_key(var/mob/living/carbon/human/H)
|
||||
return "[..()]-[wrapped_species_by_ref["\ref[H]"]]"
|
||||
return "[..()]-[GLOB.wrapped_species_by_ref["\ref[H]"]]"
|
||||
|
||||
/datum/species/shapeshifter/get_bodytype(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_bodytype(H)
|
||||
|
||||
/datum/species/shapeshifter/get_blood_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_blood_mask(H)
|
||||
|
||||
/datum/species/shapeshifter/get_damage_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_damage_mask(H)
|
||||
|
||||
/datum/species/shapeshifter/get_damage_overlays(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_damage_overlays(H)
|
||||
|
||||
/datum/species/shapeshifter/get_tail(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_tail(H)
|
||||
|
||||
/datum/species/shapeshifter/get_tail_animation(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_tail_animation(H)
|
||||
|
||||
/datum/species/shapeshifter/get_tail_hair(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_tail_hair(H)
|
||||
|
||||
/datum/species/shapeshifter/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
wrapped_species_by_ref["\ref[H]"] = base_species //VOREStation edit
|
||||
GLOB.wrapped_species_by_ref["\ref[H]"] = base_species //VOREStation edit
|
||||
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
E.sync_colour_to_human(H)
|
||||
@@ -158,7 +158,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
var/new_species = null
|
||||
new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src))
|
||||
|
||||
if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
if(!new_species || !GLOB.all_species[new_species] || GLOB.wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
return
|
||||
shapeshifter_change_shape(new_species)
|
||||
|
||||
@@ -167,7 +167,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
if(!new_species)
|
||||
return
|
||||
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!"))
|
||||
regenerate_icons()
|
||||
*/
|
||||
@@ -565,7 +565,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
|
||||
dna.base_species = new_species
|
||||
species.base_species = new_species
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
if (visible)
|
||||
visible_message(span_filter_notice(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!"))
|
||||
regenerate_icons()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
var/datum/species/shapeshifter/promethean/prometheans
|
||||
|
||||
// Species definition follows.
|
||||
/datum/species/shapeshifter/promethean
|
||||
name = SPECIES_PROMETHEAN
|
||||
@@ -139,10 +137,6 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
|
||||
footstep = FOOTSTEP_MOB_SLIME
|
||||
|
||||
/datum/species/shapeshifter/promethean/New()
|
||||
..()
|
||||
prometheans = src
|
||||
|
||||
/datum/species/shapeshifter/promethean/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
var/boxtype = pick(list(/obj/item/storage/toolbox/lunchbox,
|
||||
/obj/item/storage/toolbox/lunchbox/heart,
|
||||
@@ -358,7 +352,7 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
|
||||
/datum/species/shapeshifter/promethean/get_additional_examine_text(var/mob/living/carbon/human/H)
|
||||
|
||||
if(!stored_shock_by_ref["\ref[H]"])
|
||||
if(!GLOB.stored_shock_by_ref["\ref[H]"])
|
||||
return
|
||||
|
||||
var/t_she = "She is"
|
||||
@@ -371,7 +365,7 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
else if(H.identifying_gender == HERM) //VOREStation Edit
|
||||
t_she = "Shi is"
|
||||
|
||||
switch(stored_shock_by_ref["\ref[H]"])
|
||||
switch(GLOB.stored_shock_by_ref["\ref[H]"])
|
||||
if(1 to 10)
|
||||
return "[t_she] flickering gently with a little electrical activity."
|
||||
if(11 to 20)
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_mob/slime/promethean/get_available_emotes()
|
||||
var/list/fulllist = global._slime_default_emotes.Copy()
|
||||
var/list/fulllist = GLOB.slime_default_emotes.Copy()
|
||||
fulllist += default_emotes
|
||||
return fulllist
|
||||
/mob/living/carbon/human
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/department_radio_keys = list(
|
||||
GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
":r" = "right ear", ".r" = "right ear",
|
||||
":l" = "left ear", ".l" = "left ear",
|
||||
":i" = "intercom", ".i" = "intercom",
|
||||
@@ -16,8 +16,8 @@ var/list/department_radio_keys = list(
|
||||
":u" = CHANNEL_SUPPLY, ".u" = CHANNEL_SUPPLY,
|
||||
":v" = CHANNEL_SERVICE, ".v" = CHANNEL_SERVICE,
|
||||
":p" = CHANNEL_AI_PRIVATE, ".p" = CHANNEL_AI_PRIVATE,
|
||||
":a" = CHANNEL_EXPLORATION, ".a" = CHANNEL_EXPLORATION, //VOREStation Edit
|
||||
":y" = CHANNEL_TALON, ".y" = CHANNEL_TALON, //VOREStation Add,
|
||||
":a" = CHANNEL_EXPLORATION, ".a" = CHANNEL_EXPLORATION,
|
||||
":y" = CHANNEL_TALON, ".y" = CHANNEL_TALON,
|
||||
":g" = CHANNEL_CASINO, ".g" = CHANNEL_CASINO,
|
||||
|
||||
":R" = "right ear", ".R" = "right ear",
|
||||
@@ -37,7 +37,7 @@ var/list/department_radio_keys = list(
|
||||
":V" = CHANNEL_SERVICE, ".V" = CHANNEL_SERVICE,
|
||||
":P" = CHANNEL_AI_PRIVATE, ".P" = CHANNEL_AI_PRIVATE,
|
||||
":A" = CHANNEL_EXPLORATION, ".A" = CHANNEL_EXPLORATION,
|
||||
":Y" = CHANNEL_TALON, ".Y" = CHANNEL_TALON, //VOREStation Add,
|
||||
":Y" = CHANNEL_TALON, ".Y" = CHANNEL_TALON,
|
||||
":G" = CHANNEL_CASINO, ".G" = CHANNEL_CASINO,
|
||||
|
||||
// Cyrillic characters on the same keys on the Russian QWERTY (phonetic) layout
|
||||
@@ -59,22 +59,21 @@ var/list/department_radio_keys = list(
|
||||
":м" = CHANNEL_SERVICE, ".м" = CHANNEL_SERVICE,
|
||||
":з" = CHANNEL_AI_PRIVATE, ".з" = CHANNEL_AI_PRIVATE,
|
||||
":ф" = CHANNEL_EXPLORATION, ".ф" = CHANNEL_EXPLORATION,
|
||||
":н" = CHANNEL_TALON, ".н" = CHANNEL_TALON, //VOREStation Add
|
||||
":н" = CHANNEL_TALON, ".н" = CHANNEL_TALON,
|
||||
":п" = CHANNEL_CASINO, ".п" = CHANNEL_CASINO,
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
var/list/channel_to_radio_key = list()
|
||||
GLOBAL_LIST_EMPTY(channel_to_radio_key)
|
||||
/proc/get_radio_key_from_channel(var/channel)
|
||||
var/key = channel_to_radio_key[channel]
|
||||
var/key = GLOB.channel_to_radio_key[channel]
|
||||
if(!key)
|
||||
for(var/radio_key in department_radio_keys)
|
||||
if(department_radio_keys[radio_key] == channel)
|
||||
for(var/radio_key in GLOB.department_radio_keys)
|
||||
if(GLOB.department_radio_keys[radio_key] == channel)
|
||||
key = radio_key
|
||||
break
|
||||
if(!key)
|
||||
key = ""
|
||||
channel_to_radio_key[channel] = key
|
||||
GLOB.channel_to_radio_key[channel] = key
|
||||
|
||||
return key
|
||||
|
||||
|
||||
@@ -79,6 +79,6 @@
|
||||
|
||||
if("image")
|
||||
var/img = text2num(params["image"])
|
||||
if(1 <= img && img <= (GLOB.pai_emotions.len))
|
||||
if(1 <= img && img <= length(GLOB.pai_emotions))
|
||||
card.setEmotion(img)
|
||||
return TRUE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var/list/mob_hat_cache = list()
|
||||
GLOBAL_LIST_EMPTY(mob_hat_cache)
|
||||
|
||||
/proc/get_hat_icon(var/obj/item/hat, var/offset_x = 0, var/offset_y = 0)
|
||||
var/t_state = hat.icon_state
|
||||
if(LAZYACCESS(hat.item_state_slots, slot_head_str))
|
||||
@@ -6,7 +7,7 @@ var/list/mob_hat_cache = list()
|
||||
else if(hat.item_state)
|
||||
t_state = hat.item_state
|
||||
var/key = "[t_state]_[offset_x]_[offset_y]"
|
||||
if(!mob_hat_cache[key]) // Not ideal as there's no guarantee all hat icon_states
|
||||
if(!GLOB.mob_hat_cache[key]) // Not ideal as there's no guarantee all hat icon_states
|
||||
var/t_icon = INV_HEAD_DEF_ICON // are unique across multiple dmis, but whatever.
|
||||
if(hat.icon_override)
|
||||
t_icon = hat.icon_override
|
||||
@@ -15,8 +16,8 @@ var/list/mob_hat_cache = list()
|
||||
var/image/I = image(icon = t_icon, icon_state = t_state)
|
||||
I.pixel_x = offset_x
|
||||
I.pixel_y = offset_y
|
||||
mob_hat_cache[key] = I
|
||||
return mob_hat_cache[key]
|
||||
GLOB.mob_hat_cache[key] = I
|
||||
return GLOB.mob_hat_cache[key]
|
||||
|
||||
/mob/living/silicon/robot/drone
|
||||
name = "maintenance drone"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/_slime_default_emotes = list(
|
||||
GLOBAL_LIST_INIT(slime_default_emotes, list(
|
||||
/datum/decl/emote/audible/moan,
|
||||
/datum/decl/emote/visible/twitch,
|
||||
/datum/decl/emote/visible/sway,
|
||||
@@ -13,7 +13,7 @@ var/list/_slime_default_emotes = list(
|
||||
/datum/decl/emote/slime/angry,
|
||||
/datum/decl/emote/slime/frown,
|
||||
/datum/decl/emote/slime/smile
|
||||
)
|
||||
))
|
||||
|
||||
// The top-level slime defines. Xenobio slimes and feral slimes will inherit from this.
|
||||
/mob/living/simple_mob/slime
|
||||
@@ -87,7 +87,7 @@ var/list/_slime_default_emotes = list(
|
||||
pain_emote_3p = list("squishes", "squelches")
|
||||
|
||||
/mob/living/simple_mob/slime/get_available_emotes()
|
||||
return global._slime_default_emotes.Copy()
|
||||
return GLOB.slime_default_emotes.Copy()
|
||||
|
||||
/datum/say_list/slime
|
||||
speak = list("Blorp...", "Blop...")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user