mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Convert some more globals (#19231)
* move ref lists from world new to ref list creation * tg styl * . * next globals * ugh * some more * pain * . * horror * . * . * . * shoe me * ye * . * eh * . * . --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
ecca95d008
commit
1fcbb216e7
+16
-16
@@ -319,7 +319,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
<BR>Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units.
|
||||
<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!
|
||||
"}
|
||||
if(news_network.wanted_issue)
|
||||
if(GLOB.news_network.wanted_issue)
|
||||
dat+= "<HR><A href='byond://?src=\ref[src];[HrefToken()];ac_view_wanted=1'>Read Wanted Issue</A>"
|
||||
|
||||
dat+= {"<HR><BR><A href='byond://?src=\ref[src];[HrefToken()];ac_create_channel=1'>Create Feed Channel</A>
|
||||
@@ -329,7 +329,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
"}
|
||||
|
||||
var/wanted_already = 0
|
||||
if(news_network.wanted_issue)
|
||||
if(GLOB.news_network.wanted_issue)
|
||||
wanted_already = 1
|
||||
|
||||
dat+={"<HR>"} + span_bold("Feed Security functions:") + {"<BR>
|
||||
@@ -340,10 +340,10 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
"}
|
||||
if(1)
|
||||
dat+= "Station Feed Channels<HR>"
|
||||
if( isemptylist(news_network.network_channels) )
|
||||
if( isemptylist(GLOB.news_network.network_channels) )
|
||||
dat+=span_italics("No active channels found...")
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels)
|
||||
if(CHANNEL.is_admin_channel)
|
||||
dat+=span_bold("<FONT style='BACKGROUND-COLOR: LightGreen'><A href='byond://?src=\ref[src];[HrefToken()];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A></FONT>") + "<BR>"
|
||||
else
|
||||
@@ -390,7 +390,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]")
|
||||
dat+=span_maroon("Invalid channel name.") + "<BR>"
|
||||
var/check = 0
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
check = 1
|
||||
break
|
||||
@@ -430,10 +430,10 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
"} + span_small("Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.") + {"
|
||||
<HR>Select Feed channel to get Stories from:<BR>
|
||||
"}
|
||||
if(isemptylist(news_network.network_channels))
|
||||
if(isemptylist(GLOB.news_network.network_channels))
|
||||
dat+=span_italics("No feed channels found active...") + "<BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels)
|
||||
dat+="<A href='byond://?src=\ref[src];[HrefToken()];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? (span_red("***")) : null]<BR>"
|
||||
dat+="<BR><A href='byond://?src=\ref[src];[HrefToken()];ac_setScreen=[0]'>Cancel</A>"
|
||||
if(11)
|
||||
@@ -443,10 +443,10 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
"} + span_small("morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed") + {"
|
||||
"} + span_small("stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.") + {"<HR>
|
||||
"}
|
||||
if(isemptylist(news_network.network_channels))
|
||||
if(isemptylist(GLOB.news_network.network_channels))
|
||||
dat+=span_italics("No feed channels found active...") + "<BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels)
|
||||
dat+="<A href='byond://?src=\ref[src];[HrefToken()];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? (span_red("***")) : null]<BR>"
|
||||
|
||||
dat+="<BR><A href='byond://?src=\ref[src];[HrefToken()];ac_setScreen=[0]'>Back</A>"
|
||||
@@ -486,7 +486,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
dat+=span_bold("Wanted Issue Handler:")
|
||||
var/wanted_already = 0
|
||||
var/end_param = 1
|
||||
if(news_network.wanted_issue)
|
||||
if(GLOB.news_network.wanted_issue)
|
||||
wanted_already = 1
|
||||
end_param = 2
|
||||
if(wanted_already)
|
||||
@@ -497,7 +497,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
<A href='byond://?src=\ref[src];[HrefToken()];ac_set_wanted_desc=1'>Description</A>: [src.admincaster_feed_message.body] <BR>
|
||||
"}
|
||||
if(wanted_already)
|
||||
dat+=span_bold("Wanted Issue created by:") + span_green(" [news_network.wanted_issue.backup_author]") + "<BR>"
|
||||
dat+=span_bold("Wanted Issue created by:") + span_green(" [GLOB.news_network.wanted_issue.backup_author]") + "<BR>"
|
||||
else
|
||||
dat+=span_bold("Wanted Issue will be created under prosecutor:") + span_green(" [src.admincaster_signature]") + "<BR>"
|
||||
dat+="<BR><A href='byond://?src=\ref[src];[HrefToken()];ac_submit_wanted=[end_param]'>[(wanted_already) ? ("Edit Issue") : ("Submit")]</A>"
|
||||
@@ -523,13 +523,13 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
"}
|
||||
if(18)
|
||||
dat+={"
|
||||
"} + span_bold(span_maroon("-- STATIONWIDE WANTED ISSUE --")) + {"<BR>"} + span_normal("\[Submitted by: [span_green("[news_network.wanted_issue.backup_author]")]\]") + {"<HR>
|
||||
"} + span_bold("Criminal") + {": [news_network.wanted_issue.author]<BR>
|
||||
"} + span_bold("Description") + {": [news_network.wanted_issue.body]<BR>
|
||||
"} + span_bold(span_maroon("-- STATIONWIDE WANTED ISSUE --")) + {"<BR>"} + span_normal("\[Submitted by: [span_green("[GLOB.news_network.wanted_issue.backup_author]")]\]") + {"<HR>
|
||||
"} + span_bold("Criminal") + {": [GLOB.news_network.wanted_issue.author]<BR>
|
||||
"} + span_bold("Description") + {": [GLOB.news_network.wanted_issue.body]<BR>
|
||||
"} + span_bold("Photo:") + {":
|
||||
"}
|
||||
if(news_network.wanted_issue.img)
|
||||
usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
|
||||
if(GLOB.news_network.wanted_issue.img)
|
||||
usr << browse_rsc(GLOB.news_network.wanted_issue.img, "tmp_photow.png")
|
||||
dat+="<BR><img src='tmp_photow.png' width = '180'>"
|
||||
else
|
||||
dat+="None"
|
||||
|
||||
@@ -330,15 +330,13 @@ ADMIN_VERB(make_sound, R_FUN, "Make Sound", "Display a message to everyone who c
|
||||
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg)
|
||||
ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg as text)
|
||||
var/mob/user_mob = user.mob
|
||||
if(!user_mob.control_object)
|
||||
return
|
||||
|
||||
if(!msg)
|
||||
msg = tgui_input_text(user, "oSay", "Object text to say.", "")
|
||||
if(!msg)
|
||||
return
|
||||
return
|
||||
for(var/mob/V in hearers(user_mob.control_object))
|
||||
V.show_message(span_filter_say(span_bold("[user_mob.control_object.name]") + " says: \"[msg]\""), 2)
|
||||
feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -573,7 +571,7 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
|
||||
if(!A)
|
||||
return
|
||||
A.flags |= AREA_BLOCK_GHOST_SIGHT
|
||||
ghostnet.addArea(A)
|
||||
GLOB.ghostnet.addArea(A)
|
||||
|
||||
/client/proc/remove_hidden_area()
|
||||
set name = "Remove Ghostsight Block Area"
|
||||
@@ -589,7 +587,7 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
|
||||
if(!A)
|
||||
return
|
||||
A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
|
||||
ghostnet.removeArea(A)
|
||||
GLOB.ghostnet.removeArea(A)
|
||||
|
||||
/client/proc/hide_motion_tracker_feedback()
|
||||
set name = "Toggle Motion Echos"
|
||||
|
||||
+12
-12
@@ -1687,7 +1687,7 @@
|
||||
|
||||
else if(href_list["ac_submit_new_channel"])
|
||||
var/check = 0
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
check = 1
|
||||
break
|
||||
@@ -1696,7 +1696,7 @@
|
||||
else
|
||||
var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel"))
|
||||
if(choice=="Confirm")
|
||||
news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1)
|
||||
GLOB.news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1)
|
||||
feedback_inc("newscaster_channels",1) //Adding channel to the global network
|
||||
log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
src.admincaster_screen=5
|
||||
@@ -1704,7 +1704,7 @@
|
||||
|
||||
else if(href_list["ac_set_channel_receiving"])
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/feed_channel/F in news_network.network_channels)
|
||||
for(var/datum/feed_channel/F in GLOB.news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
src.admincaster_feed_channel.channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels)
|
||||
src.access_news_network()
|
||||
@@ -1722,7 +1722,7 @@
|
||||
src.admincaster_screen = 6
|
||||
else
|
||||
feedback_inc("newscaster_stories",1)
|
||||
news_network.SubmitArticle(admincaster_feed_message.body, admincaster_signature, admincaster_feed_channel.channel_name, null, 1, "", admincaster_feed_message.title)
|
||||
GLOB.news_network.SubmitArticle(admincaster_feed_message.body, admincaster_signature, admincaster_feed_channel.channel_name, null, 1, "", admincaster_feed_message.title)
|
||||
src.admincaster_screen=4
|
||||
|
||||
log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
@@ -1746,12 +1746,12 @@
|
||||
|
||||
else if(href_list["ac_menu_wanted"])
|
||||
var/already_wanted = 0
|
||||
if(news_network.wanted_issue)
|
||||
if(GLOB.news_network.wanted_issue)
|
||||
already_wanted = 1
|
||||
|
||||
if(already_wanted)
|
||||
src.admincaster_feed_message.author = news_network.wanted_issue.author
|
||||
src.admincaster_feed_message.body = news_network.wanted_issue.body
|
||||
src.admincaster_feed_message.author = GLOB.news_network.wanted_issue.author
|
||||
src.admincaster_feed_message.body = GLOB.news_network.wanted_issue.body
|
||||
src.admincaster_screen = 14
|
||||
src.access_news_network()
|
||||
|
||||
@@ -1776,15 +1776,15 @@
|
||||
WANTED.body = src.admincaster_feed_message.body //Wanted desc
|
||||
WANTED.backup_author = src.admincaster_signature //Submitted by
|
||||
WANTED.is_admin_message = 1
|
||||
news_network.wanted_issue = WANTED
|
||||
GLOB.news_network.wanted_issue = WANTED
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.newsAlert()
|
||||
NEWSCASTER.update_icon()
|
||||
src.admincaster_screen = 15
|
||||
else
|
||||
news_network.wanted_issue.author = src.admincaster_feed_message.author
|
||||
news_network.wanted_issue.body = src.admincaster_feed_message.body
|
||||
news_network.wanted_issue.backup_author = src.admincaster_feed_message.backup_author
|
||||
GLOB.news_network.wanted_issue.author = src.admincaster_feed_message.author
|
||||
GLOB.news_network.wanted_issue.body = src.admincaster_feed_message.body
|
||||
GLOB.news_network.wanted_issue.backup_author = src.admincaster_feed_message.backup_author
|
||||
src.admincaster_screen = 19
|
||||
log_admin("[key_name_admin(usr)] issued a Station-wide Wanted Notification for [src.admincaster_feed_message.author]!")
|
||||
src.access_news_network()
|
||||
@@ -1792,7 +1792,7 @@
|
||||
else if(href_list["ac_cancel_wanted"])
|
||||
var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel"))
|
||||
if(choice=="Confirm")
|
||||
news_network.wanted_issue = null
|
||||
GLOB.news_network.wanted_issue = null
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.update_icon()
|
||||
src.admincaster_screen=17
|
||||
|
||||
@@ -59,7 +59,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
qdel(C)
|
||||
|
||||
if(GLOB.camera_range_display_status)
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
new/obj/effect/debugging/camera_range(C.loc)
|
||||
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -75,7 +75,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
CL += C
|
||||
|
||||
var/output = span_bold("CAMERA ANNOMALITIES REPORT") + {"<HR>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define SHELLEO_STDOUT 2
|
||||
#define SHELLEO_STDERR 3
|
||||
|
||||
var/list/sounds_cache = list()
|
||||
GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
|
||||
ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all players.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/freq = 1
|
||||
@@ -22,7 +22,7 @@ ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all play
|
||||
admin_sound.status = SOUND_STREAM
|
||||
admin_sound.volume = vol
|
||||
|
||||
sounds_cache += S
|
||||
GLOB.sounds_cache += S
|
||||
|
||||
var/res = tgui_alert(user, "Show the title of this song ([S]) to the players?\nOptions 'Yes' and 'No' will play the sound.",, list("Yes", "No", "Cancel"))
|
||||
if(!res)
|
||||
@@ -64,7 +64,7 @@ ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z-
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
sounds_cache += S
|
||||
GLOB.sounds_cache += S
|
||||
|
||||
if(tgui_alert(user, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) != "Play")
|
||||
return
|
||||
@@ -80,7 +80,7 @@ ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z-
|
||||
ADMIN_VERB(play_server_sound, R_SOUNDS, "Play Server Sound", "Plays a sound from the server to play.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/list/sounds = world.file2list("sound/serversound_list.txt");
|
||||
sounds += "--CANCEL--"
|
||||
sounds += sounds_cache
|
||||
sounds += GLOB.sounds_cache
|
||||
|
||||
var/melody = tgui_input_list(user, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--")
|
||||
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", "Resizes any living mob without any restrictions on size.", "Fun.Event Kit", mob/living/L in GLOB.mob_list)
|
||||
user.do_resize(L)
|
||||
ADMIN_VERB_ONLY_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", mob/living/living_target)
|
||||
user.do_resize(living_target)
|
||||
|
||||
/client/proc/do_resize(var/mob/living/L)
|
||||
var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1, round_value=FALSE)
|
||||
ADMIN_VERB(mob_resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize Mob", "Resizes any living mob without any restrictions on size.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/mob/target_mob = tgui_input_list(user, "Select target to resize.", "Resize Target", GLOB.mob_list)
|
||||
if(!target_mob)
|
||||
return
|
||||
user.do_resize(target_mob)
|
||||
|
||||
/client/proc/do_resize(mob/living/living_target)
|
||||
var/size_multiplier = tgui_input_number(src, "Input size multiplier.", "Resize", 1, round_value=FALSE)
|
||||
if(!size_multiplier)
|
||||
return //cancelled
|
||||
|
||||
size_multiplier = clamp(size_multiplier, -50, 50) //being able to make people upside down is fun. Also 1000 is way, WAY too big. Honestly 50 is too big but at least you can see 50 and it doesn't break the rendering.
|
||||
var/can_be_big = L.has_large_resize_bounds()
|
||||
var/can_be_big = living_target.has_large_resize_bounds()
|
||||
var/very_big = is_extreme_size(size_multiplier)
|
||||
|
||||
if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse
|
||||
to_chat(src, span_warning("[L] will lose this size upon moving into an area where this size is not allowed."))
|
||||
to_chat(src, span_warning("[living_target] will lose this size upon moving into an area where this size is not allowed."))
|
||||
else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse
|
||||
to_chat(src, span_warning("[L] will retain this normally unallowed size outside this area."))
|
||||
to_chat(src, span_warning("[living_target] will retain this normally unallowed size outside this area."))
|
||||
|
||||
L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
|
||||
living_target.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
|
||||
|
||||
log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].", src)
|
||||
log_and_message_admins("has changed [key_name(living_target)]'s size multiplier to [size_multiplier].", src)
|
||||
feedback_add_details("admin_verb","RESIZE")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
//Allows some list search inputs
|
||||
/client/proc/tgui_admin_lists()
|
||||
set name = "TGUI Admin Lists"
|
||||
set desc = "Allows to have some procs with searchable lists."
|
||||
set category = "Admin.Game"
|
||||
if(!check_rights(R_ADMIN|R_EVENT))
|
||||
return
|
||||
|
||||
var/list/modification_options = list(TGUI_VIEW_ATTACK_LOGS, TGUI_VIEW_DIALOG_LOGS, TGUI_RESIZE)
|
||||
|
||||
|
||||
var/tgui_list_choice = tgui_input_list(src, "Select the verb you would like to use with a tgui input","Choice", modification_options)
|
||||
if(!tgui_list_choice || tgui_list_choice == "Cancel")
|
||||
return
|
||||
|
||||
log_and_message_admins("[key_name(src)] has used TGUI Admin Lists with ([tgui_list_choice])].")
|
||||
feedback_add_details("admin_verb","TGUIADL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
switch(tgui_list_choice)
|
||||
if(TGUI_VIEW_ATTACK_LOGS)
|
||||
var/mob/living/L = tgui_input_list(src, "Check a player's attack logs.", "Check Player Attack Logs", GLOB.mob_list)
|
||||
show_cmd_admin_check_player_logs(L)
|
||||
if(TGUI_VIEW_DIALOG_LOGS)
|
||||
var/mob/living/L = tgui_input_list(src, "Check a player's dialogue logs.", "Check Player Dialogue Logs", GLOB.mob_list)
|
||||
show_cmd_admin_check_dialogue_logs(L)
|
||||
if(TGUI_RESIZE)
|
||||
var/mob/living/L = tgui_input_list(src, "Resizes any living mob without any restrictions on size.", "Resize", GLOB.mob_list)
|
||||
if(L)
|
||||
do_resize(L)
|
||||
@@ -1,7 +1,5 @@
|
||||
//I AM THE LOREMASTER, ARE YOU THE GATEKEEPER?
|
||||
|
||||
var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster
|
||||
|
||||
/datum/lore/loremaster
|
||||
var/list/organizations = list()
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if(FESTIVAL)
|
||||
body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter","child")]","coming of age of their [pick("son","daughter","child")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
GLOB.news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
/datum/event/economic_event/end()
|
||||
for(var/good_type in dearer_goods)
|
||||
|
||||
@@ -92,4 +92,4 @@
|
||||
"Broccoli discovered to be colonies of tiny aliens with murder on their minds"\
|
||||
)
|
||||
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
GLOB.news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
@@ -30,9 +30,9 @@ GLOBAL_VAR_INIT(economy_init, 0)
|
||||
if(GLOB.economy_init)
|
||||
return 2
|
||||
|
||||
//news_network.CreateFeedChannel("The [using_map.starsys_name] Times", "[using_map.starsys_name] Times ExoNode - [using_map.station_short]", 1, 1)
|
||||
news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1)
|
||||
news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1)
|
||||
//GLOB.news_network.CreateFeedChannel("The [using_map.starsys_name] Times", "[using_map.starsys_name] Times ExoNode - [using_map.station_short]", 1, 1)
|
||||
GLOB.news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1)
|
||||
GLOB.news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1)
|
||||
|
||||
for(var/loc_type in subtypesof(/datum/trade_destination))
|
||||
var/datum/trade_destination/D = new loc_type
|
||||
|
||||
@@ -107,4 +107,4 @@
|
||||
"Unusual stellar phenomena was detected on [pick(allloc)], sparking concerns about the colonies in the system.",
|
||||
)
|
||||
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
GLOB.news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
cam.wires.cut(WIRE_CAM_ALARM)
|
||||
|
||||
/datum/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5)
|
||||
if(!cameranet.cameras.len)
|
||||
if(!GLOB.cameranet.cameras.len)
|
||||
return
|
||||
if(!remaining_attempts)
|
||||
return
|
||||
|
||||
var/obj/machinery/camera/C = pick(cameranet.cameras)
|
||||
var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras)
|
||||
if(is_valid_camera(C))
|
||||
return C
|
||||
return acquire_random_camera(remaining_attempts--)
|
||||
|
||||
@@ -54,14 +54,13 @@
|
||||
target.add_ion_law(law)
|
||||
target.show_laws()
|
||||
/* //VOREstation edit. Was fucking up all PDA messagess.
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
MS.spamfilter.Cut()
|
||||
var/i
|
||||
for (i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[using_map.station_short]", \
|
||||
"admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")
|
||||
for (var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
MS.spamfilter.Cut()
|
||||
var/i
|
||||
for (i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[using_map.station_short]", \
|
||||
"admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")
|
||||
*/
|
||||
/datum/event/ionstorm/tick()
|
||||
if(botEmagChance)
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
if(!deposit_success)
|
||||
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 Thalers to ND 'Stellar Slam' office on the The [using_map.starsys_name] Times gateway containing updated details, and your winnings'll be re-sent within the month."
|
||||
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
GLOB.news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
pick_message_server()
|
||||
|
||||
/datum/event/pda_spam/proc/pick_message_server()
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
for(var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
|
||||
/datum/event/pda_spam/tick()
|
||||
if(world.time > last_spam_time + 3000)
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
cam.wires.cut(WIRE_CAM_ALARM)
|
||||
|
||||
/datum/event2/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5)
|
||||
if(!cameranet.cameras.len)
|
||||
if(!GLOB.cameranet.cameras.len)
|
||||
return
|
||||
if(!remaining_attempts)
|
||||
return
|
||||
|
||||
var/obj/machinery/camera/C = pick(cameranet.cameras)
|
||||
var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras)
|
||||
if(is_valid_camera(C))
|
||||
return C
|
||||
// It is very important to use --var and not var-- for recursive calls, as var-- will cause an infinite loop.
|
||||
|
||||
@@ -138,5 +138,5 @@
|
||||
|
||||
|
||||
/datum/event2/event/pda_spam/proc/pick_message_server()
|
||||
if(LAZYLEN(message_servers))
|
||||
return pick(message_servers)
|
||||
if(LAZYLEN(GLOB.message_servers))
|
||||
return pick(GLOB.message_servers)
|
||||
|
||||
@@ -49,14 +49,13 @@
|
||||
|
||||
// Messaging server spam filters.
|
||||
// This might be better served as a seperate event since it seems more like a hacker attack than a natural occurance.
|
||||
if(message_servers)
|
||||
for(var/obj/machinery/message_server/MS in message_servers)
|
||||
if(MS.z in get_location_z_levels())
|
||||
MS.spamfilter.Cut()
|
||||
for (var/i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("warble","help","almach","ai","liberty","freedom","drugs", "[using_map.station_short]", \
|
||||
"admin","sol","security","meow","_","monkey","-","moron","pizza","message","spam",\
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","taj","xeno")
|
||||
for(var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
if(MS.z in get_location_z_levels())
|
||||
MS.spamfilter.Cut()
|
||||
for (var/i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("warble","help","almach","ai","liberty","freedom","drugs", "[using_map.station_short]", \
|
||||
"admin","sol","security","meow","_","monkey","-","moron","pizza","message","spam",\
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","taj","xeno")
|
||||
|
||||
/datum/event2/event/ion_storm/announce()
|
||||
if(prob(announce_odds))
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
/datum/lore/codex/category/auto_org/New(var/new_holder, var/new_parent)
|
||||
..(new_holder, new_parent)
|
||||
for(var/path in loremaster.organizations)
|
||||
var/datum/lore/organization/O = loremaster.organizations[path]
|
||||
for(var/path in GLOB.loremaster.organizations)
|
||||
var/datum/lore/organization/O = GLOB.loremaster.organizations[path]
|
||||
if(!(istype(O, desired_type)))
|
||||
continue
|
||||
var/datum/lore/codex/page/P = new(holder, src)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
/datum/lore/codex/category/auto_org/New(var/new_holder, var/new_parent)
|
||||
..(new_holder, new_parent)
|
||||
keywords += auto_keywords
|
||||
for(var/path in loremaster.organizations)
|
||||
var/datum/lore/organization/O = loremaster.organizations[path]
|
||||
for(var/path in GLOB.loremaster.organizations)
|
||||
var/datum/lore/organization/O = GLOB.loremaster.organizations[path]
|
||||
if(!(istype(O, desired_type)))
|
||||
continue
|
||||
var/datum/lore/codex/page/P = new(holder, src)
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
var/deleted_atoms = 0
|
||||
admin_notice(span_danger("Annihilating objects in submap loading locatation."), R_DEBUG)
|
||||
var/list/turfs_to_clean = get_affected_turfs(origin, centered)
|
||||
if(turfs_to_clean.len)
|
||||
if(length(turfs_to_clean))
|
||||
for(var/turf/T in turfs_to_clean)
|
||||
for(var/atom/movable/AM in T)
|
||||
++deleted_atoms
|
||||
@@ -215,7 +215,7 @@
|
||||
/proc/seed_submaps(var/list/z_levels, var/budget = 0, var/whitelist = /area/space, var/desired_map_template_type = null)
|
||||
set background = TRUE
|
||||
|
||||
if(!z_levels || !z_levels.len)
|
||||
if(!z_levels || !length(z_levels))
|
||||
admin_notice("seed_submaps() was not given any Z-levels.", R_DEBUG)
|
||||
return
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
overall_sanity--
|
||||
var/datum/map_template/chosen_template = null
|
||||
|
||||
if(potential_submaps.len)
|
||||
if(priority_submaps.len) // Do these first.
|
||||
if(length(potential_submaps))
|
||||
if(length(priority_submaps)) // Do these first.
|
||||
chosen_template = pick(priority_submaps)
|
||||
else
|
||||
chosen_template = pick(potential_submaps)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
animate(pixel_y = default_pixel_y, time = 10, loop = -1)
|
||||
GLOB.observer_mob_list += src
|
||||
. = ..()
|
||||
visualnet = ghostnet
|
||||
visualnet = GLOB.ghostnet
|
||||
|
||||
/mob/observer/dead/proc/checkStatic()
|
||||
return !(check_rights_for(src.client, R_ADMIN|R_FUN|R_EVENT|R_SERVER) || (client && client.buildmode) || isbelly(loc))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/mob/observer/eye/aiEye/Initialize(mapload)
|
||||
. = ..()
|
||||
visualnet = cameranet
|
||||
visualnet = GLOB.cameranet
|
||||
|
||||
/mob/observer/eye/aiEye/Destroy()
|
||||
if(owner)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
updating = 1
|
||||
spawn(BORG_CAMERA_BUFFER)
|
||||
if(old_loc != src.loc)
|
||||
cameranet.updatePortableCamera(src.camera)
|
||||
GLOB.cameranet.updatePortableCamera(src.camera)
|
||||
updating = 0
|
||||
|
||||
/mob/living/silicon/ai/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
@@ -25,8 +25,8 @@
|
||||
updating = 1
|
||||
spawn(BORG_CAMERA_BUFFER)
|
||||
if(old_loc != src.loc)
|
||||
cameranet.updateVisibility(old_loc, 0)
|
||||
cameranet.updateVisibility(loc, 0)
|
||||
GLOB.cameranet.updateVisibility(old_loc, 0)
|
||||
GLOB.cameranet.updateVisibility(loc, 0)
|
||||
updating = 0
|
||||
|
||||
#undef BORG_CAMERA_BUFFER
|
||||
@@ -38,24 +38,24 @@
|
||||
/obj/machinery/camera/deactivate(user as mob, var/choice = 1)
|
||||
..(user, choice)
|
||||
if(src.can_use())
|
||||
cameranet.addCamera(src)
|
||||
GLOB.cameranet.addCamera(src)
|
||||
else
|
||||
src.set_light(0)
|
||||
cameranet.removeCamera(src)
|
||||
GLOB.cameranet.removeCamera(src)
|
||||
|
||||
/obj/machinery/camera/Initialize(mapload)
|
||||
. = ..()
|
||||
//Camera must be added to global list of all cameras no matter what...
|
||||
if(cameranet.cameras_unsorted || !SSticker)
|
||||
cameranet.cameras += src
|
||||
cameranet.cameras_unsorted = 1
|
||||
if(GLOB.cameranet.cameras_unsorted || !SSticker)
|
||||
GLOB.cameranet.cameras += src
|
||||
GLOB.cameranet.cameras_unsorted = 1
|
||||
else
|
||||
dd_insertObjectList(cameranet.cameras, src)
|
||||
dd_insertObjectList(GLOB.cameranet.cameras, src)
|
||||
update_coverage(1)
|
||||
|
||||
/obj/machinery/camera/Destroy()
|
||||
clear_all_networks()
|
||||
cameranet.cameras -= src
|
||||
GLOB.cameranet.cameras -= src
|
||||
return ..()
|
||||
|
||||
// Mobs
|
||||
@@ -64,9 +64,9 @@
|
||||
..()
|
||||
if(was_dead && stat != DEAD)
|
||||
// Arise!
|
||||
cameranet.updateVisibility(src, 0)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/silicon/ai/death(gibbed)
|
||||
if(..())
|
||||
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
|
||||
cameranet.updateVisibility(src, 0)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
/mob/observer/eye/maskEye/Initialize(mapload)
|
||||
. = ..()
|
||||
visualnet = cultnet
|
||||
visualnet = GLOB.cultnet
|
||||
|
||||
@@ -6,40 +6,40 @@
|
||||
|
||||
/mob/living/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(!cultnet.provides_vision(src))
|
||||
if(!GLOB.cultnet.provides_vision(src))
|
||||
return
|
||||
if(!updating_cult_vision)
|
||||
updating_cult_vision = 1
|
||||
spawn(CULT_UPDATE_BUFFER)
|
||||
if(old_loc != src.loc)
|
||||
cultnet.updateVisibility(old_loc, 0)
|
||||
cultnet.updateVisibility(loc, 0)
|
||||
GLOB.cultnet.updateVisibility(old_loc, 0)
|
||||
GLOB.cultnet.updateVisibility(loc, 0)
|
||||
updating_cult_vision = 0
|
||||
|
||||
#undef CULT_UPDATE_BUFFER
|
||||
|
||||
/mob/living/Initialize(mapload)
|
||||
. = ..()
|
||||
cultnet.updateVisibility(src, 0)
|
||||
GLOB.cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/rejuvenate()
|
||||
var/was_dead = stat == DEAD
|
||||
..()
|
||||
if(was_dead && stat != DEAD)
|
||||
// Arise!
|
||||
cultnet.updateVisibility(src, 0)
|
||||
GLOB.cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/death(gibbed, deathmessage="seizes up and falls limp...")
|
||||
if(..(gibbed, deathmessage))
|
||||
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
|
||||
cultnet.updateVisibility(src)
|
||||
GLOB.cultnet.updateVisibility(src)
|
||||
|
||||
/datum/antagonist/add_antagonist(var/datum/mind/player)
|
||||
. = ..()
|
||||
if(src == GLOB.cult)
|
||||
cultnet.updateVisibility(player.current, 0)
|
||||
GLOB.cultnet.updateVisibility(player.current, 0)
|
||||
|
||||
/datum/antagonist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted)
|
||||
..()
|
||||
if(src == GLOB.cult)
|
||||
cultnet.updateVisibility(player.current, 0)
|
||||
GLOB.cultnet.updateVisibility(player.current, 0)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* WHERE * IS * EVERYTHING?
|
||||
*
|
||||
* cameranet.dm = Everything * about * the * cameranet * datum.
|
||||
* cameranet.dm = Everything * about * the * GLOB.cameranet * datum.
|
||||
* chunk.dm = Everything * about * the * chunk * datum.
|
||||
* eye.dm = Everything * about * the * AI * and * the * AIEye.
|
||||
* updating.dm = Everything * about * triggers * that * will * update * chunks.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/proc/updateVisibility(atom/A, var/opacity_check = 1)
|
||||
if(SSticker)
|
||||
for(var/datum/visualnet/VN in visual_nets)
|
||||
for(var/datum/visualnet/VN in GLOB.visual_nets)
|
||||
VN.updateVisibility(A, opacity_check)
|
||||
|
||||
/turf
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
/datum/visualnet/New()
|
||||
..()
|
||||
visual_nets += src
|
||||
GLOB.visual_nets += src
|
||||
|
||||
/datum/visualnet/Destroy()
|
||||
visual_nets -= src
|
||||
GLOB.visual_nets -= src
|
||||
return ..()
|
||||
|
||||
// Checks if a chunk has been Generated in x, y, z.
|
||||
@@ -153,8 +153,8 @@
|
||||
/turf/verb/view_chunk()
|
||||
set src in world
|
||||
|
||||
if(cameranet.chunkGenerated(x, y, z))
|
||||
var/datum/chunk/chunk = cameranet.getCameraChunk(x, y, z)
|
||||
if(GLOB.cameranet.chunkGenerated(x, y, z))
|
||||
var/datum/chunk/chunk = GLOB.cameranet.getCameraChunk(x, y, z)
|
||||
usr.client.debug_variables(chunk)
|
||||
*/
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if(isobj(OR))
|
||||
qdel(OR)
|
||||
|
||||
cultnet.updateVisibility(src, 0)
|
||||
GLOB.cultnet.updateVisibility(src, 0)
|
||||
|
||||
if(aiming)
|
||||
qdel(aiming)
|
||||
|
||||
@@ -467,7 +467,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
if (href_list["switchcamera"])
|
||||
switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras
|
||||
switchCamera(locate(href_list["switchcamera"])) in GLOB.cameranet.cameras
|
||||
if (href_list["showalerts"])
|
||||
subsystem_alarm_monitor()
|
||||
//Carn: holopad requests
|
||||
@@ -504,7 +504,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/proc/camera_visibility(mob/observer/eye/aiEye/moved_eye)
|
||||
cameranet.visibility(moved_eye, client, all_eyes)
|
||||
GLOB.cameranet.visibility(moved_eye, client, all_eyes)
|
||||
|
||||
/mob/living/silicon/ai/forceMove(atom/destination, direction, movetime)
|
||||
. = ..()
|
||||
@@ -556,7 +556,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
return
|
||||
|
||||
var/list/cameralist = new()
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
var/list/tempnetwork = difflist(C.network, GLOB.restricted_camera_networks, 1)
|
||||
@@ -580,7 +580,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
|
||||
src.network = network
|
||||
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(network in C.network)
|
||||
|
||||
@@ -155,7 +155,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
|
||||
if(screen && screen.ai)
|
||||
screen.ai.camera_visibility(src)
|
||||
else
|
||||
cameranet.visibility(src)
|
||||
GLOB.cameranet.visibility(src)
|
||||
update_camera_telegraphing()
|
||||
|
||||
/mob/observer/eye/aiEye/pic_in_pic/proc/update_camera_telegraphing()
|
||||
|
||||
@@ -11,8 +11,8 @@ var/global/ntnrc_uid = 0
|
||||
/datum/ntnet_conversation/New()
|
||||
id = ntnrc_uid
|
||||
ntnrc_uid++
|
||||
if(ntnet_global)
|
||||
ntnet_global.chat_channels.Add(src)
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.chat_channels.Add(src)
|
||||
..()
|
||||
|
||||
/datum/ntnet_conversation/proc/add_message(var/message, var/username)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var/global/datum/ntnet/ntnet_global = new()
|
||||
|
||||
|
||||
|
||||
// This is the NTNet datum. There can be only one NTNet datum in game at once. Modular computers read data from this.
|
||||
/datum/ntnet/
|
||||
/datum/ntnet
|
||||
var/list/relays = list()
|
||||
var/list/logs = list()
|
||||
var/list/available_station_software = list()
|
||||
@@ -38,8 +38,8 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
|
||||
// If new NTNet datum is spawned, it replaces the old one.
|
||||
/datum/ntnet/New()
|
||||
if(ntnet_global && (ntnet_global != src))
|
||||
ntnet_global = src // There can be only one.
|
||||
if(GLOB.ntnet_global && (GLOB.ntnet_global != src))
|
||||
GLOB.ntnet_global = src // There can be only one.
|
||||
if (SSatoms && SSatoms.initialized > INITIALIZATION_INSSATOMS)
|
||||
for(var/obj/machinery/ntnet_relay/R in GLOB.machines)
|
||||
relays.Add(R)
|
||||
@@ -139,7 +139,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
// Generates service email list. Currently only used by broadcaster service
|
||||
/datum/ntnet/proc/build_emails_list()
|
||||
for(var/F in subtypesof(/datum/computer_file/data/email_account/service))
|
||||
new F()
|
||||
email_accounts += new F(TRUE)
|
||||
|
||||
// Attempts to find a downloadable file according to filename var
|
||||
/datum/ntnet/proc/find_ntnet_file_by_name(var/filename)
|
||||
@@ -193,7 +193,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
add_log("Configuration Updated. Wireless network firewall now [setting_systemcontrol ? "allows" : "disallows"] remote control of station's systems.")
|
||||
|
||||
/datum/ntnet/proc/does_email_exist(var/login)
|
||||
for(var/datum/computer_file/data/email_account/A in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/A in GLOB.ntnet_global.email_accounts)
|
||||
if(A.login == login)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -49,12 +49,12 @@
|
||||
if((dos_overload > dos_capacity) && !dos_failure)
|
||||
dos_failure = 1
|
||||
update_icon()
|
||||
ntnet_global.add_log("Quantum relay switched from normal operation mode to overload recovery mode.")
|
||||
GLOB.ntnet_global.add_log("Quantum relay switched from normal operation mode to overload recovery mode.")
|
||||
// If the DoS buffer reaches 0 again, restart.
|
||||
if((dos_overload == 0) && dos_failure)
|
||||
dos_failure = 0
|
||||
update_icon()
|
||||
ntnet_global.add_log("Quantum relay switched from overload recovery mode to normal operation mode.")
|
||||
GLOB.ntnet_global.add_log("Quantum relay switched from overload recovery mode to normal operation mode.")
|
||||
..()
|
||||
|
||||
/obj/machinery/ntnet_relay/tgui_interact(mob/user, datum/tgui/ui)
|
||||
@@ -83,16 +83,16 @@
|
||||
dos_overload = 0
|
||||
dos_failure = 0
|
||||
update_icon()
|
||||
ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
|
||||
GLOB.ntnet_global.add_log("Quantum relay manually restarted from overload recovery mode to normal operation mode.")
|
||||
. = TRUE
|
||||
if("toggle")
|
||||
enabled = !enabled
|
||||
ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].")
|
||||
GLOB.ntnet_global.add_log("Quantum relay manually [enabled ? "enabled" : "disabled"].")
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("purge")
|
||||
ntnet_global.banned_nids.Cut()
|
||||
ntnet_global.add_log("Manual override: Network blacklist cleared.")
|
||||
GLOB.ntnet_global.banned_nids.Cut()
|
||||
GLOB.ntnet_global.add_log("Manual override: Network blacklist cleared.")
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/ntnet_relay/Initialize(mapload)
|
||||
@@ -102,15 +102,15 @@
|
||||
|
||||
/obj/machinery/ntnet_relay/Initialize(mapload)
|
||||
. = ..()
|
||||
if(ntnet_global)
|
||||
ntnet_global.relays.Add(src)
|
||||
NTNet = ntnet_global
|
||||
ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]")
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.relays.Add(src)
|
||||
NTNet = GLOB.ntnet_global
|
||||
GLOB.ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]")
|
||||
|
||||
/obj/machinery/ntnet_relay/Destroy()
|
||||
if(ntnet_global)
|
||||
ntnet_global.relays.Remove(src)
|
||||
ntnet_global.add_log("Quantum relay connection severed. Current amount of linked relays: [NTNet.relays.len]")
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.relays.Remove(src)
|
||||
GLOB.ntnet_global.add_log("Quantum relay connection severed. Current amount of linked relays: [NTNet.relays.len]")
|
||||
NTNet = null
|
||||
for(var/datum/computer_file/program/ntnet_dos/D in dos_sources)
|
||||
D.target = null
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/datum/computer_file/data/email_account/
|
||||
/datum/computer_file/data/email_account
|
||||
var/list/inbox = list()
|
||||
var/list/outbox = list()
|
||||
var/list/spam = list()
|
||||
@@ -24,12 +24,13 @@
|
||||
stored_message.calculate_size()
|
||||
size += stored_message.size
|
||||
|
||||
/datum/computer_file/data/email_account/New()
|
||||
ntnet_global.email_accounts.Add(src)
|
||||
/datum/computer_file/data/email_account/New(glob_load)
|
||||
if(!glob_load)
|
||||
GLOB.ntnet_global.email_accounts += src
|
||||
..()
|
||||
|
||||
/datum/computer_file/data/email_account/Destroy()
|
||||
ntnet_global.email_accounts.Remove(src)
|
||||
GLOB.ntnet_global.email_accounts -= src
|
||||
. = ..()
|
||||
|
||||
/datum/computer_file/data/email_account/proc/all_emails()
|
||||
@@ -37,7 +38,7 @@
|
||||
|
||||
/datum/computer_file/data/email_account/proc/send_mail(var/recipient_address, var/datum/computer_file/data/email_message/message, var/relayed = 0)
|
||||
var/datum/computer_file/data/email_account/recipient
|
||||
for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts)
|
||||
if(account.login == recipient_address)
|
||||
recipient = account
|
||||
break
|
||||
@@ -48,12 +49,12 @@
|
||||
if(!recipient.receive_mail(message, relayed))
|
||||
return
|
||||
|
||||
ntnet_global.add_log_with_ids_check("EMAIL LOG: [login] -> [recipient.login] title: [message.title].")
|
||||
GLOB.ntnet_global.add_log_with_ids_check("EMAIL LOG: [login] -> [recipient.login] title: [message.title].")
|
||||
return 1
|
||||
|
||||
/datum/computer_file/data/email_account/proc/receive_mail(var/datum/computer_file/data/email_message/received_message, var/relayed)
|
||||
received_message.set_timestamp()
|
||||
if(!ntnet_global.intrusion_detection_enabled)
|
||||
if(!GLOB.ntnet_global.intrusion_detection_enabled)
|
||||
inbox.Add(received_message)
|
||||
return 1
|
||||
// Spam filters may occassionally let something through, or mark something as spam that isn't spam.
|
||||
@@ -70,10 +71,10 @@
|
||||
return 1
|
||||
|
||||
// Address namespace (@internal-services.nt) for email addresses with special purpose only!.
|
||||
/datum/computer_file/data/email_account/service/
|
||||
/datum/computer_file/data/email_account/service
|
||||
can_login = FALSE
|
||||
|
||||
/datum/computer_file/data/email_account/service/broadcaster/
|
||||
/datum/computer_file/data/email_account/service/broadcaster
|
||||
login = EMAIL_BROADCAST
|
||||
|
||||
/datum/computer_file/data/email_account/service/broadcaster/receive_mail(var/datum/computer_file/data/email_message/received_message, var/relayed)
|
||||
@@ -84,7 +85,7 @@
|
||||
log_and_message_admins("Broadcast email address used by [usr]. Message title: [received_message.title].")
|
||||
|
||||
spawn(0)
|
||||
for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/email_account in GLOB.ntnet_global.email_accounts)
|
||||
var/datum/computer_file/data/email_message/new_message = received_message.clone()
|
||||
send_mail(email_account.login, new_message, 1)
|
||||
sleep(2)
|
||||
@@ -105,7 +106,7 @@
|
||||
log_and_message_admins("Broadcast email address used by [usr]. Message title: [received_message.title].")
|
||||
|
||||
spawn(0)
|
||||
for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/email_account in GLOB.ntnet_global.email_accounts)
|
||||
var/datum/computer_file/data/email_message/new_message = received_message.clone()
|
||||
send_mail(email_account.login, new_message, 1)
|
||||
sleep(2)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
/obj/item/modular_computer/proc/add_log(var/text)
|
||||
if(!get_ntnet_status())
|
||||
return 0
|
||||
return ntnet_global.add_log(text, network_card)
|
||||
return GLOB.ntnet_global.add_log(text, network_card)
|
||||
|
||||
/obj/item/modular_computer/proc/shutdown_computer(var/loud = 1)
|
||||
kill_program(1)
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
if(progress >= target_progress)
|
||||
reset()
|
||||
RFID.stored_card.access |= target_access.id
|
||||
if(ntnet_global.intrusion_detection_enabled)
|
||||
ntnet_global.add_log("IDS WARNING - Unauthorised access to primary keycode database from device: [computer.network_card.get_network_tag()] - downloaded access codes for: [target_access.desc].")
|
||||
ntnet_global.intrusion_detection_alarm = 1
|
||||
if(GLOB.ntnet_global.intrusion_detection_enabled)
|
||||
GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access to primary keycode database from device: [computer.network_card.get_network_tag()] - downloaded access codes for: [target_access.desc].")
|
||||
GLOB.ntnet_global.intrusion_detection_alarm = 1
|
||||
message = "Successfully decrypted and saved operational key codes. Downloaded access codes for: [target_access.desc]"
|
||||
target_access = null
|
||||
|
||||
@@ -72,13 +72,13 @@
|
||||
return
|
||||
running = TRUE
|
||||
target_access = get_access_by_id("[params["access_target"]]")
|
||||
if(ntnet_global.intrusion_detection_enabled)
|
||||
ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]")
|
||||
ntnet_global.intrusion_detection_alarm = TRUE
|
||||
if(GLOB.ntnet_global.intrusion_detection_enabled)
|
||||
GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]")
|
||||
GLOB.ntnet_global.intrusion_detection_alarm = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/access_decrypter/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
var/list/data = get_header_data()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
..(forced)
|
||||
|
||||
/datum/computer_file/program/ntnet_dos/tgui_data(mob/user)
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
|
||||
var/list/data = get_header_data()
|
||||
@@ -56,7 +56,7 @@
|
||||
else
|
||||
data["target"] = FALSE
|
||||
data["relays"] = list()
|
||||
for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays)
|
||||
for(var/obj/machinery/ntnet_relay/R in GLOB.ntnet_global.relays)
|
||||
data["relays"] += list(list("id" = R.uid))
|
||||
data["focus"] = target ? target.uid : null
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("PRG_target_relay")
|
||||
for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays)
|
||||
for(var/obj/machinery/ntnet_relay/R in GLOB.ntnet_global.relays)
|
||||
if(R.uid == text2num(params["targid"]))
|
||||
target = R
|
||||
break
|
||||
@@ -83,8 +83,8 @@
|
||||
if(target)
|
||||
executed = TRUE
|
||||
target.dos_sources.Add(src)
|
||||
if(ntnet_global.intrusion_detection_enabled)
|
||||
if(GLOB.ntnet_global.intrusion_detection_enabled)
|
||||
var/obj/item/computer_hardware/network_card/network_card = computer.network_card
|
||||
ntnet_global.add_log("IDS WARNING - Excess traffic flood targeting relay [target.uid] detected from device: [network_card.get_network_tag()]")
|
||||
ntnet_global.intrusion_detection_alarm = TRUE
|
||||
GLOB.ntnet_global.add_log("IDS WARNING - Excess traffic flood targeting relay [target.uid] detected from device: [network_card.get_network_tag()]")
|
||||
GLOB.ntnet_global.intrusion_detection_alarm = TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
|
||||
// The program is active and connected to one of the station's networks. Has a very small chance to trigger IDS alarm every tick.
|
||||
if(prob(0.1))
|
||||
if(ntnet_global.intrusion_detection_enabled)
|
||||
ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network by device with NID [computer.network_card.get_network_tag()]")
|
||||
ntnet_global.intrusion_detection_alarm = 1
|
||||
if(GLOB.ntnet_global.intrusion_detection_enabled)
|
||||
GLOB.ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network by device with NID [computer.network_card.get_network_tag()]")
|
||||
GLOB.ntnet_global.intrusion_detection_alarm = 1
|
||||
|
||||
@@ -27,13 +27,10 @@
|
||||
/*
|
||||
General message handling stuff
|
||||
*/
|
||||
var/list/comm_message_listeners = list() //We first have to initialize list then we can use it.
|
||||
var/datum/comm_message_listener/global_message_listener = new //May be used by admins
|
||||
var/last_message_id = 0
|
||||
|
||||
/proc/get_comm_message_id()
|
||||
last_message_id = last_message_id + 1
|
||||
return last_message_id
|
||||
GLOB.last_message_id = GLOB.last_message_id + 1
|
||||
return GLOB.last_message_id
|
||||
|
||||
/proc/post_comm_message(var/message_title, var/message_text)
|
||||
var/list/message = list()
|
||||
@@ -41,7 +38,7 @@ var/last_message_id = 0
|
||||
message["title"] = message_title
|
||||
message["contents"] = message_text
|
||||
|
||||
for(var/datum/comm_message_listener/l in comm_message_listeners)
|
||||
for(var/datum/comm_message_listener/l in GLOB.comm_message_listeners)
|
||||
l.Add(message)
|
||||
|
||||
/datum/comm_message_listener
|
||||
@@ -50,7 +47,7 @@ var/last_message_id = 0
|
||||
/datum/comm_message_listener/New()
|
||||
..()
|
||||
messages = list()
|
||||
comm_message_listeners.Add(src)
|
||||
GLOB.comm_message_listeners.Add(src)
|
||||
|
||||
/datum/comm_message_listener/proc/Add(var/list/message)
|
||||
messages[++messages.len] = message
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"download_rate" = download_netspeed
|
||||
)
|
||||
else // Viewing list of articles
|
||||
for(var/datum/computer_file/data/news_article/F in ntnet_global.available_news)
|
||||
for(var/datum/computer_file/data/news_article/F in GLOB.ntnet_global.available_news)
|
||||
if(!show_archived && F.archived)
|
||||
continue
|
||||
all_articles.Add(list(list(
|
||||
@@ -87,7 +87,7 @@
|
||||
if(downloading || loaded_article)
|
||||
return TRUE
|
||||
|
||||
for(var/datum/computer_file/data/news_article/N in ntnet_global.available_news)
|
||||
for(var/datum/computer_file/data/news_article/N in GLOB.ntnet_global.available_news)
|
||||
if(N.uid == text2num(params["uid"]))
|
||||
loaded_article = N.clone()
|
||||
downloading = 1
|
||||
|
||||
@@ -37,17 +37,17 @@
|
||||
if(downloaded_file)
|
||||
return 0
|
||||
|
||||
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(filename)
|
||||
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(filename)
|
||||
|
||||
if(!check_file_download(filename))
|
||||
return 0
|
||||
|
||||
ui_header = "downloader_running.gif"
|
||||
|
||||
if(PRG in ntnet_global.available_station_software)
|
||||
if(PRG in GLOB.ntnet_global.available_station_software)
|
||||
generate_network_log("Began downloading file [PRG.filename].[PRG.filetype] from NTNet Software Repository.")
|
||||
hacked_download = 0
|
||||
else if(PRG in ntnet_global.available_antag_software)
|
||||
else if(PRG in GLOB.ntnet_global.available_antag_software)
|
||||
generate_network_log("Began downloading file **ENCRYPTED**.[PRG.filetype] from unspecified server.")
|
||||
hacked_download = 1
|
||||
else
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/proc/check_file_download(var/filename)
|
||||
//returns 1 if file can be downloaded, returns 0 if download prohibited
|
||||
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(filename)
|
||||
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(filename)
|
||||
|
||||
if(!PRG || !istype(PRG))
|
||||
return 0
|
||||
@@ -154,7 +154,7 @@
|
||||
data["disk_size"] = my_computer.hard_drive.max_capacity
|
||||
data["disk_used"] = my_computer.hard_drive.used_capacity
|
||||
var/list/all_entries[0]
|
||||
for(var/datum/computer_file/program/P in ntnet_global.available_station_software)
|
||||
for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_station_software)
|
||||
// Only those programs our user can run will show in the list
|
||||
if(!P.can_run(user) && P.requires_access_to_download || my_computer.hard_drive.find_file_by_name(P.filename))
|
||||
continue
|
||||
@@ -169,7 +169,7 @@
|
||||
data["hackedavailable"] = FALSE
|
||||
if(computer_emagged) // If we are running on emagged computer we have access to some "bonus" software
|
||||
var/list/hacked_programs[0]
|
||||
for(var/datum/computer_file/program/P in ntnet_global.available_antag_software)
|
||||
for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_antag_software)
|
||||
if(my_computer.hard_drive.find_file_by_name(P.filename))
|
||||
continue
|
||||
data["hackedavailable"] = TRUE
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel)
|
||||
var/datum/ntnet_conversation/channel = GLOB.ntnet_global.get_chat_channel_by_id(active_channel)
|
||||
var/authed = FALSE
|
||||
if(channel && ((channel.operator == src) || netadmin_mode))
|
||||
authed = TRUE
|
||||
@@ -59,7 +59,7 @@
|
||||
return TRUE
|
||||
|
||||
active_channel = new_target
|
||||
channel = ntnet_global.get_chat_channel_by_id(new_target)
|
||||
channel = GLOB.ntnet_global.get_chat_channel_by_id(new_target)
|
||||
if(!(src in channel.clients) && !channel.password)
|
||||
channel.add_client(src)
|
||||
return TRUE
|
||||
@@ -85,7 +85,7 @@
|
||||
channel.remove_client(src) // We shouldn't be in channel's user list, but just in case...
|
||||
return TRUE
|
||||
if(isliving(ui.user) && can_run(ui.user, TRUE, ACCESS_NETWORK))
|
||||
for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels)
|
||||
for(var/datum/ntnet_conversation/chan as anything in GLOB.ntnet_global.chat_channels)
|
||||
chan.remove_client(src)
|
||||
netadmin_mode = TRUE
|
||||
return TRUE
|
||||
@@ -93,7 +93,7 @@
|
||||
var/newname = sanitize(params["new_name"])
|
||||
if(!newname)
|
||||
return
|
||||
for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels)
|
||||
for(var/datum/ntnet_conversation/chan as anything in GLOB.ntnet_global.chat_channels)
|
||||
if(src in chan.clients)
|
||||
chan.add_status_message("[username] is now known as [newname].")
|
||||
username = newname
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/datum/computer_file/program/chatclient/process_tick()
|
||||
..()
|
||||
var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel)
|
||||
var/datum/ntnet_conversation/channel = GLOB.ntnet_global.get_chat_channel_by_id(active_channel)
|
||||
if(program_state != PROGRAM_STATE_KILLED)
|
||||
ui_header = "ntnrc_idle.gif"
|
||||
if(channel)
|
||||
@@ -163,7 +163,7 @@
|
||||
ui_header = "ntnrc_idle.gif"
|
||||
|
||||
/datum/computer_file/program/chatclient/kill_program(forced = FALSE)
|
||||
for(var/datum/ntnet_conversation/channel as anything in ntnet_global.chat_channels)
|
||||
for(var/datum/ntnet_conversation/channel as anything in GLOB.ntnet_global.chat_channels)
|
||||
channel.remove_client(src)
|
||||
..()
|
||||
|
||||
@@ -173,13 +173,13 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/chatclient/tgui_data(mob/user)
|
||||
if(!ntnet_global || !ntnet_global.chat_channels)
|
||||
if(!GLOB.ntnet_global || !GLOB.ntnet_global.chat_channels)
|
||||
return list()
|
||||
|
||||
var/list/data = get_header_data()
|
||||
|
||||
var/list/all_channels = list()
|
||||
for(var/datum/ntnet_conversation/conv as anything in ntnet_global.chat_channels)
|
||||
for(var/datum/ntnet_conversation/conv as anything in GLOB.ntnet_global.chat_channels)
|
||||
if(conv && conv.title)
|
||||
all_channels.Add(list(list(
|
||||
"chan" = conv.title,
|
||||
@@ -190,7 +190,7 @@
|
||||
data["active_channel"] = active_channel
|
||||
data["username"] = username
|
||||
data["adminmode"] = netadmin_mode
|
||||
var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel)
|
||||
var/datum/ntnet_conversation/channel = GLOB.ntnet_global.get_chat_channel_by_id(active_channel)
|
||||
if(channel)
|
||||
data["title"] = channel.title
|
||||
var/authed = FALSE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/nttransfer_uid = 0
|
||||
GLOBAL_VAR_INIT(nttransfer_uid, 0)
|
||||
|
||||
/datum/computer_file/program/nttransfer
|
||||
filename = "nttransfer"
|
||||
@@ -27,8 +27,8 @@ var/global/nttransfer_uid = 0
|
||||
var/upload_menu = FALSE // Whether we show the program list and upload menu
|
||||
|
||||
/datum/computer_file/program/nttransfer/New()
|
||||
unique_token = nttransfer_uid
|
||||
nttransfer_uid++
|
||||
unique_token = GLOB.nttransfer_uid
|
||||
GLOB.nttransfer_uid++
|
||||
..()
|
||||
|
||||
/datum/computer_file/program/nttransfer/process_tick()
|
||||
@@ -109,7 +109,7 @@ var/global/nttransfer_uid = 0
|
||||
data["servers"] = list()
|
||||
if(!(downloaded_file || provided_file || upload_menu))
|
||||
var/list/all_servers = list()
|
||||
for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers)
|
||||
for(var/datum/computer_file/program/nttransfer/P in GLOB.ntnet_global.fileservers)
|
||||
if(!P.provided_file)
|
||||
continue
|
||||
all_servers.Add(list(list(
|
||||
@@ -127,7 +127,7 @@ var/global/nttransfer_uid = 0
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("PRG_downloadfile")
|
||||
for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers)
|
||||
for(var/datum/computer_file/program/nttransfer/P in GLOB.ntnet_global.fileservers)
|
||||
if(P.unique_token == text2num(params["uid"]))
|
||||
remote = P
|
||||
break
|
||||
@@ -145,8 +145,8 @@ var/global/nttransfer_uid = 0
|
||||
error = ""
|
||||
upload_menu = 0
|
||||
finalize_download()
|
||||
if(src in ntnet_global.fileservers)
|
||||
ntnet_global.fileservers.Remove(src)
|
||||
if(src in GLOB.ntnet_global.fileservers)
|
||||
GLOB.ntnet_global.fileservers.Remove(src)
|
||||
for(var/datum/computer_file/program/nttransfer/T in connected_clients)
|
||||
T.crash_download("Remote server has forcibly closed the connection")
|
||||
provided_file = null
|
||||
@@ -167,7 +167,7 @@ var/global/nttransfer_uid = 0
|
||||
error = "I/O Error: File locked."
|
||||
return
|
||||
provided_file = F
|
||||
ntnet_global.fileservers |= src
|
||||
GLOB.ntnet_global.fileservers |= src
|
||||
return
|
||||
error = "I/O Error: Unable to locate file on hard drive."
|
||||
return TRUE
|
||||
|
||||
+5
-5
@@ -50,7 +50,7 @@
|
||||
data["messages"] = all_messages
|
||||
|
||||
var/list/all_accounts = list()
|
||||
for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts)
|
||||
if(!account.can_login)
|
||||
continue
|
||||
all_accounts.Add(list(list(
|
||||
@@ -85,7 +85,7 @@
|
||||
return TRUE
|
||||
|
||||
current_account.suspended = !current_account.suspended
|
||||
ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended by SA [I.registered_name] ([I.assignment]).")
|
||||
GLOB.ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended by SA [I.registered_name] ([I.assignment]).")
|
||||
error = "Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended."
|
||||
return TRUE
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
if(!newpass)
|
||||
return TRUE
|
||||
current_account.password = newpass
|
||||
ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Password for account [current_account.login] has been changed by SA [I.registered_name] ([I.assignment]).")
|
||||
GLOB.ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Password for account [current_account.login] has been changed by SA [I.registered_name] ([I.assignment]).")
|
||||
return TRUE
|
||||
|
||||
if("viewmail")
|
||||
@@ -111,7 +111,7 @@
|
||||
return TRUE
|
||||
|
||||
if("viewaccount")
|
||||
for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/email_account in GLOB.ntnet_global.email_accounts)
|
||||
if(email_account.uid == text2num(params["viewaccount"]))
|
||||
current_account = email_account
|
||||
break
|
||||
@@ -126,7 +126,7 @@
|
||||
return TRUE
|
||||
|
||||
var/complete_login = "[newlogin]@[newdomain]"
|
||||
if(ntnet_global.does_email_exist(complete_login))
|
||||
if(GLOB.ntnet_global.does_email_exist(complete_login))
|
||||
error = "Error creating account: An account with same address already exists."
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -13,29 +13,29 @@
|
||||
category = PROG_ADMIN
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/tgui_data(mob/user)
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
var/list/data = get_header_data()
|
||||
|
||||
data["ntnetstatus"] = ntnet_global.check_function()
|
||||
data["ntnetrelays"] = ntnet_global.relays.len
|
||||
data["idsstatus"] = ntnet_global.intrusion_detection_enabled
|
||||
data["idsalarm"] = ntnet_global.intrusion_detection_alarm
|
||||
data["ntnetstatus"] = GLOB.ntnet_global.check_function()
|
||||
data["ntnetrelays"] = GLOB.ntnet_global.relays.len
|
||||
data["idsstatus"] = GLOB.ntnet_global.intrusion_detection_enabled
|
||||
data["idsalarm"] = GLOB.ntnet_global.intrusion_detection_alarm
|
||||
|
||||
data["config_softwaredownload"] = ntnet_global.setting_softwaredownload
|
||||
data["config_peertopeer"] = ntnet_global.setting_peertopeer
|
||||
data["config_communication"] = ntnet_global.setting_communication
|
||||
data["config_systemcontrol"] = ntnet_global.setting_systemcontrol
|
||||
data["config_softwaredownload"] = GLOB.ntnet_global.setting_softwaredownload
|
||||
data["config_peertopeer"] = GLOB.ntnet_global.setting_peertopeer
|
||||
data["config_communication"] = GLOB.ntnet_global.setting_communication
|
||||
data["config_systemcontrol"] = GLOB.ntnet_global.setting_systemcontrol
|
||||
|
||||
data["ntnetlogs"] = list()
|
||||
data["minlogs"] = MIN_NTNET_LOGS
|
||||
data["maxlogs"] = MAX_NTNET_LOGS
|
||||
|
||||
data["banned_nids"] = list(ntnet_global.banned_nids)
|
||||
data["banned_nids"] = list(GLOB.ntnet_global.banned_nids)
|
||||
|
||||
for(var/i in ntnet_global.logs)
|
||||
for(var/i in GLOB.ntnet_global.logs)
|
||||
data["ntnetlogs"] += list(list("entry" = i))
|
||||
data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount
|
||||
data["ntnetmaxlogs"] = GLOB.ntnet_global.setting_maxlogcount
|
||||
|
||||
return data
|
||||
|
||||
@@ -44,51 +44,51 @@
|
||||
return
|
||||
switch(action)
|
||||
if("resetIDS")
|
||||
if(ntnet_global)
|
||||
ntnet_global.resetIDS()
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.resetIDS()
|
||||
return TRUE
|
||||
if("toggleIDS")
|
||||
if(ntnet_global)
|
||||
ntnet_global.toggleIDS()
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.toggleIDS()
|
||||
return TRUE
|
||||
if("toggleWireless")
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
|
||||
// NTNet is disabled. Enabling can be done without user prompt
|
||||
if(ntnet_global.setting_disabled)
|
||||
ntnet_global.setting_disabled = FALSE
|
||||
if(GLOB.ntnet_global.setting_disabled)
|
||||
GLOB.ntnet_global.setting_disabled = FALSE
|
||||
return TRUE
|
||||
|
||||
var/response = tgui_alert(ui.user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No"))
|
||||
if(response == "Yes" && tgui_status(ui.user, state) == STATUS_INTERACTIVE)
|
||||
ntnet_global.setting_disabled = TRUE
|
||||
GLOB.ntnet_global.setting_disabled = TRUE
|
||||
return TRUE
|
||||
if("purgelogs")
|
||||
if(ntnet_global)
|
||||
ntnet_global.purge_logs()
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.purge_logs()
|
||||
return TRUE
|
||||
if("updatemaxlogs")
|
||||
var/logcount = params["new_number"]
|
||||
if(ntnet_global)
|
||||
ntnet_global.update_max_log_count(logcount)
|
||||
if(GLOB.ntnet_global)
|
||||
GLOB.ntnet_global.update_max_log_count(logcount)
|
||||
return TRUE
|
||||
if("toggle_function")
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
ntnet_global.toggle_function(text2num(params["id"]))
|
||||
GLOB.ntnet_global.toggle_function(text2num(params["id"]))
|
||||
return TRUE
|
||||
if("ban_nid")
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to block from the network:", "Enter NID")
|
||||
if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE)
|
||||
ntnet_global.banned_nids |= nid
|
||||
GLOB.ntnet_global.banned_nids |= nid
|
||||
return TRUE
|
||||
if("unban_nid")
|
||||
if(!ntnet_global)
|
||||
if(!GLOB.ntnet_global)
|
||||
return
|
||||
var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to unblock from the network:", "Enter NID")
|
||||
if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE)
|
||||
ntnet_global.banned_nids -= nid
|
||||
GLOB.ntnet_global.banned_nids -= nid
|
||||
return TRUE
|
||||
|
||||
@@ -63,7 +63,7 @@ var/global/ntnet_card_uid = 1
|
||||
if(!enabled)
|
||||
return 0
|
||||
|
||||
if(!check_functionality() || !ntnet_global || is_banned())
|
||||
if(!check_functionality() || !GLOB.ntnet_global || is_banned())
|
||||
return 0
|
||||
|
||||
return 2
|
||||
@@ -88,7 +88,7 @@ var/global/ntnet_card_uid = 1
|
||||
return "[identification_string] (NID [identification_id])"
|
||||
|
||||
/obj/item/computer_hardware/network_card/proc/is_banned()
|
||||
return ntnet_global.check_banned(identification_id)
|
||||
return GLOB.ntnet_global.check_banned(identification_id)
|
||||
|
||||
// 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection
|
||||
/obj/item/computer_hardware/network_card/proc/get_signal(var/specific_action = 0)
|
||||
@@ -98,13 +98,13 @@ var/global/ntnet_card_uid = 1
|
||||
if(!enabled)
|
||||
return 0
|
||||
|
||||
if(!check_functionality() || !ntnet_global || is_banned())
|
||||
if(!check_functionality() || !GLOB.ntnet_global || is_banned())
|
||||
return 0
|
||||
|
||||
if(ethernet) // Computer is connected via wired connection.
|
||||
return 3
|
||||
|
||||
if(!ntnet_global.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal.
|
||||
if(!GLOB.ntnet_global.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal.
|
||||
return 0
|
||||
|
||||
if(holder2)
|
||||
@@ -114,7 +114,7 @@ var/global/ntnet_card_uid = 1
|
||||
var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)// VOREStation Edit - , om_range = DEFAULT_OVERMAP_RANGE)
|
||||
var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
|
||||
var/best = 0
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays)
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in GLOB.ntnet_global.relays)
|
||||
//Relay is down
|
||||
if(!R.operable())
|
||||
continue
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/var/global/datum/topic_state/default/default_state = new()
|
||||
|
||||
/datum/topic_state/default/href_list(var/mob/user)
|
||||
return list()
|
||||
|
||||
/datum/topic_state/default/can_use_topic(var/src_object, var/mob/user)
|
||||
return user.default_can_use_topic(src_object)
|
||||
|
||||
/mob/proc/default_can_use_topic(var/src_object)
|
||||
return STATUS_CLOSE // By default no mob can do anything with NanoUI
|
||||
|
||||
/mob/observer/dead/default_can_use_topic(var/src_object)
|
||||
if(can_admin_interact())
|
||||
return STATUS_INTERACTIVE // Admins are more equal
|
||||
if(!client || get_dist(src_object, src) > client.view) // Preventing ghosts from having a million windows open by limiting to objects in range
|
||||
return STATUS_CLOSE
|
||||
return STATUS_UPDATE // Ghosts can view updates
|
||||
|
||||
/mob/living/silicon/pai/default_can_use_topic(var/src_object)
|
||||
if((src_object == src || src_object == radio || src_object == communicator) && !stat)
|
||||
return STATUS_INTERACTIVE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction()
|
||||
if(. <= STATUS_DISABLED)
|
||||
return
|
||||
|
||||
// robots can interact with things they can see within their view range
|
||||
if((src_object in view(src)) && get_dist(src_object, src) <= src.client.view)
|
||||
return STATUS_INTERACTIVE // interactive (green visibility)
|
||||
return STATUS_DISABLED // no updates, completely disabled (red visibility)
|
||||
|
||||
/mob/living/silicon/ai/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction()
|
||||
if(. != STATUS_INTERACTIVE)
|
||||
return
|
||||
|
||||
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
|
||||
// unless it's on the same level as the object it's interacting with.
|
||||
var/turf/T = get_turf(src_object)
|
||||
if(!T || !(z == T.z || (T.z in using_map.player_levels)))
|
||||
return STATUS_CLOSE
|
||||
|
||||
// If an object is in view then we can interact with it
|
||||
if(src_object in view(client.view, src))
|
||||
return STATUS_INTERACTIVE
|
||||
|
||||
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
|
||||
if(is_in_chassis())
|
||||
//stop AIs from leaving windows open and using then after they lose vision
|
||||
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
|
||||
return STATUS_CLOSE
|
||||
return STATUS_INTERACTIVE
|
||||
else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard
|
||||
return STATUS_INTERACTIVE
|
||||
|
||||
return STATUS_CLOSE
|
||||
|
||||
//Some atoms such as vehicles might have special rules for how mobs inside them interact with NanoUI.
|
||||
/atom/proc/contents_nano_distance(var/src_object, var/mob/living/user)
|
||||
return user.shared_living_nano_distance(src_object)
|
||||
|
||||
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
|
||||
if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates
|
||||
return STATUS_CLOSE
|
||||
|
||||
var/dist = get_dist(src_object, src)
|
||||
if (dist <= 1)
|
||||
return STATUS_INTERACTIVE // interactive (green visibility)
|
||||
else if (dist <= 2)
|
||||
return STATUS_UPDATE // update only (orange visibility)
|
||||
else if (dist <= 4)
|
||||
return STATUS_DISABLED // no updates, completely disabled (red visibility)
|
||||
return STATUS_CLOSE
|
||||
|
||||
/mob/living/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction(src_object)
|
||||
if(. != STATUS_CLOSE)
|
||||
if(loc)
|
||||
. = min(., loc.contents_nano_distance(src_object, src))
|
||||
if(. == STATUS_INTERACTIVE)
|
||||
return STATUS_UPDATE
|
||||
|
||||
/mob/living/carbon/human/default_can_use_topic(var/src_object)
|
||||
. = shared_nano_interaction(src_object)
|
||||
if(. != STATUS_CLOSE)
|
||||
. = min(., shared_living_nano_distance(src_object))
|
||||
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
|
||||
return STATUS_INTERACTIVE
|
||||
@@ -1,44 +0,0 @@
|
||||
// This file contains all Nano procs/definitions for external classes/objects
|
||||
|
||||
/**
|
||||
* Called when a Nano UI window is closed
|
||||
* This is how Nano handles closed windows
|
||||
* It must be a verb so that it can be called using winset
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/client/verb/nanoclose(var/uiref as text)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = "nanoclose"
|
||||
|
||||
var/datum/nanoui/ui = locate(uiref)
|
||||
|
||||
if (istype(ui))
|
||||
ui.close()
|
||||
|
||||
if(ui.ref)
|
||||
var/href = "close=1"
|
||||
src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's Topic() proc via client.Topic()
|
||||
else if (ui.on_close_logic)
|
||||
// no atomref specified (or not found)
|
||||
// so just reset the user mob's machine var
|
||||
if(src && src.mob)
|
||||
src.mob.unset_machine()
|
||||
|
||||
/**
|
||||
* The ui_interact proc is used to open and update Nano UIs
|
||||
* If ui_interact is not used then the UI will not update correctly
|
||||
* ui_interact is currently defined for /atom/movable
|
||||
*
|
||||
* @param user /mob The mob who is interacting with this ui
|
||||
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
|
||||
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
|
||||
* @param force_open boolean Force the UI to (re)open, even if it's already open
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, master_ui = null, var/datum/topic_state/state = default_state)
|
||||
return
|
||||
|
||||
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
|
||||
/mob/var/list/open_uis = list()
|
||||
@@ -12,7 +12,7 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new)
|
||||
/datum/lore/news/New()
|
||||
..()
|
||||
spawn(50) //Give it a second or it gets fucky.
|
||||
for(var/datum/feed_channel/F in news_network.network_channels)
|
||||
for(var/datum/feed_channel/F in GLOB.news_network.network_channels)
|
||||
if(F.channel_name == "Vir News Network")
|
||||
station_newspaper = F
|
||||
break
|
||||
@@ -24,7 +24,7 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new)
|
||||
newsindex = news_codex.newsindex
|
||||
|
||||
/datum/lore/news/proc/fill_codex_news()
|
||||
if(!news_network)
|
||||
if(!GLOB.news_network)
|
||||
log_runtime("Load: Could not find newscaster network.")
|
||||
return
|
||||
|
||||
@@ -34,6 +34,6 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new)
|
||||
|
||||
//Feed the Lore Codex into the News Machine
|
||||
for(var/datum/lore/codex/child in news_codex.children)
|
||||
news_network.SubmitArticle("[child.data]", "Oculum", "Vir News Network", null, 1, "", "[child.name]")
|
||||
GLOB.news_network.SubmitArticle("[child.data]", "Oculum", "Vir News Network", null, 1, "", "[child.name]")
|
||||
|
||||
return 1
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
/datum/data/pda/app/news/proc/compile_news()
|
||||
var/list/feeds = list()
|
||||
for(var/datum/feed_channel/channel in news_network.network_channels)
|
||||
for(var/datum/feed_channel/channel in GLOB.news_network.network_channels)
|
||||
var/list/messages = list()
|
||||
if(!channel.censored)
|
||||
var/index = 0
|
||||
@@ -280,7 +280,7 @@
|
||||
var/list/news = list()
|
||||
|
||||
// Compile all the newscasts
|
||||
for(var/datum/feed_channel/channel in news_network.network_channels)
|
||||
for(var/datum/feed_channel/channel in GLOB.news_network.network_channels)
|
||||
if(!channel.censored)
|
||||
var/index = 0
|
||||
for(var/datum/feed_message/FM in channel.messages)
|
||||
|
||||
@@ -148,12 +148,11 @@
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for(var/obj/machinery/message_server/MS as anything in message_servers)
|
||||
//PDAs are now dependent on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
for(var/obj/machinery/message_server/MS as anything in GLOB.message_servers)
|
||||
//PDAs are now dependent on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
|
||||
var/datum/signal/signal = pda.telecomms_process()
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
if(A.flag_check(AREA_BLOCK_GHOST_SIGHT))
|
||||
A.flags ^= AREA_BLOCK_GHOST_SIGHT
|
||||
icon_state = "privacy0"
|
||||
ghostnet.removeArea(A)
|
||||
GLOB.ghostnet.removeArea(A)
|
||||
to_chat(user, span_notice("The area is no longer protected from ghost vison."))
|
||||
log_and_message_admins("toggled ghost vision in [A] on.", user)
|
||||
else
|
||||
A.flags ^= AREA_BLOCK_GHOST_SIGHT
|
||||
icon_state = "privacy1"
|
||||
ghostnet.addArea(A)
|
||||
GLOB.ghostnet.addArea(A)
|
||||
to_chat(user, span_notice("The area is now protected from ghost vison."))
|
||||
log_and_message_admins("toggled ghost vision in [A] off.", user)
|
||||
nextUse = world.time + 5 MINUTES
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
/proc/supply_drop_random_loot_types()
|
||||
if(!supply_drop)
|
||||
supply_drop = init_subtypes(/datum/supply_drop_loot)
|
||||
supply_drop = dd_sortedObjectList(supply_drop)
|
||||
return supply_drop
|
||||
|
||||
/datum/supply_drop_loot
|
||||
var/name = ""
|
||||
var/container = null
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// supplied_drop_types is a list of types to spawn in the pod.
|
||||
/datum/random_map/droppod/supply/get_spawned_drop(var/turf/T)
|
||||
|
||||
if(!drop_type) drop_type = pick(supply_drop_random_loot_types())
|
||||
if(!drop_type) drop_type = pick(GLOB.supply_drop)
|
||||
|
||||
if(drop_type == "custom")
|
||||
if(supplied_drop_types.len)
|
||||
@@ -23,7 +23,7 @@
|
||||
C.contents |= A
|
||||
return
|
||||
else
|
||||
drop_type = pick(supply_drop_random_loot_types())
|
||||
drop_type = pick(GLOB.supply_drop)
|
||||
|
||||
if(istype(drop_type, /datum/supply_drop_loot))
|
||||
var/datum/supply_drop_loot/SDL = drop_type
|
||||
@@ -81,7 +81,7 @@ ADMIN_VERB(call_supply_drop, R_FUN, "Call Supply Drop", "Call an immediate suppl
|
||||
if(!choice)
|
||||
return
|
||||
if(choice == "Yes")
|
||||
chosen_loot_type = tgui_input_list(user, "Select a loot type.", "Loot Selection", supply_drop_random_loot_types())
|
||||
chosen_loot_type = tgui_input_list(usr, "Select a loot type.", "Loot Selection", GLOB.supply_drop)
|
||||
|
||||
choice = tgui_alert(user, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes"))
|
||||
if(choice != "Yes")
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
|
||||
/obj/machinery/message_server/Initialize(mapload)
|
||||
. = ..()
|
||||
message_servers += src
|
||||
GLOB.message_servers += src
|
||||
decryptkey = GenerateKey()
|
||||
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
|
||||
|
||||
/obj/machinery/message_server/Destroy()
|
||||
message_servers -= src
|
||||
GLOB.message_servers -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/message_server/examine(mob/user, distance, infix, suffix)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
switch(action)
|
||||
if("switchTo")
|
||||
var/obj/machinery/camera/C = locate(params["camera"]) in cameranet.cameras
|
||||
var/obj/machinery/camera/C = locate(params["camera"]) in GLOB.cameranet.cameras
|
||||
if(!C)
|
||||
return
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
all_networks += additional_networks
|
||||
|
||||
var/list/D = list()
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.network)
|
||||
stack_trace("Camera in a cameranet has no camera network")
|
||||
continue
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
var/datum/comm_message_listener/l = obtain_message_listener()
|
||||
data["messages"] = l.messages
|
||||
data["message_deletion_allowed"] = l != global_message_listener
|
||||
data["message_deletion_allowed"] = l != GLOB.global_message_listener
|
||||
data["message_current_id"] = current_viewing_message_id
|
||||
data["message_current"] = current_viewing_message
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
if(istype(host, /datum/computer_file/program/comm))
|
||||
var/datum/computer_file/program/comm/P = host
|
||||
return P.message_core
|
||||
return global_message_listener
|
||||
return GLOB.global_message_listener
|
||||
|
||||
/proc/post_status(atom/source, command, data1, data2, mob/user = null)
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||
@@ -302,7 +302,7 @@
|
||||
var/response = tgui_alert(ui.user, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No"))
|
||||
if(response == "Yes")
|
||||
if(current_viewing_message)
|
||||
if(l != global_message_listener)
|
||||
if(l != GLOB.global_message_listener)
|
||||
l.Remove(current_viewing_message)
|
||||
current_viewing_message = null
|
||||
setMenuState(ui.user, COMM_SCREEN_MESSAGES)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/datum/computer_file/data/email_message/current_message = null
|
||||
|
||||
/datum/tgui_module/email_client/proc/log_in()
|
||||
for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts)
|
||||
if(!account.can_login)
|
||||
continue
|
||||
if(account.login == stored_login)
|
||||
@@ -128,7 +128,7 @@
|
||||
data["current_account"] = current_account.login
|
||||
if(addressbook)
|
||||
var/list/all_accounts = list()
|
||||
for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts)
|
||||
if(!account.can_login)
|
||||
continue
|
||||
all_accounts.Add(list(list(
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
|
||||
var/their_signal = 0
|
||||
// Measure z-distance between the AM passed in and the nearest relay
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays)
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in GLOB.ntnet_global.relays)
|
||||
if(!R.operable())
|
||||
continue
|
||||
if(R.z == their_z)
|
||||
|
||||
@@ -58,7 +58,7 @@ GLOBAL_DATUM_INIT(tgui_default_state, /datum/tgui_state/default, new)
|
||||
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
|
||||
if(is_in_chassis())
|
||||
//stop AIs from leaving windows open and using then after they lose vision
|
||||
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
|
||||
if(GLOB.cameranet && !GLOB.cameranet.checkTurfVis(get_turf(src_object)))
|
||||
return STATUS_CLOSE
|
||||
return STATUS_INTERACTIVE
|
||||
else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard
|
||||
|
||||
Reference in New Issue
Block a user