* sdf

* fsda

* fuck

* fuck2

* toolz

* sdaf

* sdfa

* saf

* sdfa

* sdfa

* sdf

* sdfa

* temp rename

* temp rename

* temp rename

* sdaf

* the pain is immensurable in the land of byond

* the curse of rah

* safd

* sadf

* sadf

* gf

* asf

* fssdfa

* sfd

* sadf

* sfda

* brah

* brah

* it's easier for you to fix this

* ffs

* brah

* brah
This commit is contained in:
Fluffy
2024-01-06 17:03:57 +01:00
committed by GitHub
parent 8c76cfa9ea
commit e867030c2e
331 changed files with 2348 additions and 1643 deletions
+1 -1
View File
@@ -808,7 +808,7 @@ var/global/enabled_spooking = 0
set category = "Server"
set desc="Start the round RIGHT NOW"
set name="Start Now"
if(Master.initializing)
if(!MC_RUNNING())
alert("Unable to start the game as it is not set up.")
return
if(SSticker.current_state == GAME_STATE_PREGAME)
+2 -2
View File
@@ -759,12 +759,12 @@ var/list/admin_verbs_cciaa = list(
set name = "Kill Air"
set desc = "Toggle Air Processing"
if(!SSair.can_fire)
SSair.enable()
SSair.can_fire = TRUE
to_chat(usr, "<b>Enabled air processing.</b>")
else
if(alert("Confirm disabling air processing?",,"Yes","No") == "No")
return
SSair.disable()
SSair.can_fire = FALSE
to_chat(usr, "<b>Disabled air processing.</b>")
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] used 'kill air'.",admin_key=key_name(usr))
@@ -56,7 +56,7 @@
return
//Since away sites are procedurally spawned by the map loader, if we don't suspend SSair, they'll get vented.
SSair.suspend()
SSair.can_fire = FALSE
log_and_message_admins("is attempting to place a map template [log_name].")
to_chat(usr, "Attempting to place map template [log_name].")
var/new_z_centre = template.load_new_z(FALSE) // Don't skip changeturf
@@ -66,7 +66,7 @@
else
log_and_message_admins("has failed to place a map template [log_name].")
to_chat(usr, "Failed to place map template [log_name].")
SSair.wake()
SSair.can_fire = TRUE
/datum/admins/proc/map_template_upload()
set category = "Fun"
+2 -2
View File
@@ -8,7 +8,7 @@
log_and_message_admins("has triggered a global ambient occlusion rebuild.")
to_chat(usr, "Beginning global AO rebuild.")
SSao.disable()
SSao.can_fire = FALSE
for (var/turf/T in world) // Yes, in world.
T.ao_neighbors = null // To force a recalc.
@@ -18,6 +18,6 @@
CHECK_TICK
SSao.enable()
SSao.can_fire = TRUE
to_chat(usr, "AO rebuild complete.")
+1 -1
View File
@@ -22,7 +22,7 @@
/**
* Wires that the assembly has installed
*
* Refer to `code\__defines\wires.dm` in the dedicated section for the supported wires, which _must_ be bitflags
* Refer to `code\__DEFINES\wires.dm` in the dedicated section for the supported wires, which _must_ be bitflags
*
* At the time of writing this, it supports:
* * WIRE_RECEIVE_ASSEMBLY
+1 -1
View File
@@ -99,7 +99,7 @@ Pipelines + Other Objects -> Pipe network
return node.pipe_color
/obj/machinery/atmospherics/process()
/obj/machinery/atmospherics/process(seconds_per_tick)
last_flow_rate = 0
last_power_draw = 0
@@ -188,7 +188,7 @@
return 0
return 1
/obj/machinery/atmospherics/unary/vent_pump/process()
/obj/machinery/atmospherics/unary/vent_pump/process(seconds_per_tick)
..()
if (broadcast_status_next_process)
@@ -222,7 +222,7 @@
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air_contents.volume/environment.volume) //group_multiplier gets divided out here
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
power_draw = pump_gas(src, environment, air_contents, transfer_moles * seconds_per_tick, power_rating)
else
//If we're in an area that is fucking ideal, and we don't have to do anything, chances are we won't next tick either so why redo these calculations?
@@ -233,7 +233,7 @@
if (power_draw >= 0)
last_power_draw = power_draw
use_power_oneoff(power_draw)
use_power_oneoff(power_draw * seconds_per_tick)
if(network)
network.update = 1
@@ -139,7 +139,7 @@
sanitize_faction()
/datum/category_item/player_setup_item/occupation/content(mob/user, limit = 16, list/splitJobs = list("Chief Engineer", "Head of Security"))
if (SSjobs.init_state != SS_INITSTATE_DONE || SSrecords.init_state != SS_INITSTATE_DONE)
if (!SSjobs.initialized || !SSrecords.initialized)
return "<center><large>Jobs controller not initialized yet. Please wait a bit and reload this section.</large></center>"
var/list/dat = list(
@@ -94,7 +94,7 @@
pref.economic_status = sanitize_inlist(pref.economic_status, ECONOMIC_POSITIONS, initial(pref.economic_status))
/datum/category_item/player_setup_item/origin/content(var/mob/user)
if(SSrecords.init_state != SS_INITSTATE_DONE)
if(!SSrecords.initialized)
return "<center><large>Records controller not initialized yet. Please wait a bit and reload this section.</large></center>"
var/list/dat = list()
var/singleton/origin_item/culture/CL = GET_SINGLETON(text2path(pref.culture))
+1 -1
View File
@@ -94,7 +94,7 @@
needs_update = level; \
} \
if (_should_update) { \
if (world.tick_usage > CURRENT_TICKLIMIT || SSlighting.force_queued) { \
if (world.tick_usage > Master.current_ticklimit || SSlighting.force_queued) { \
SSlighting.light_queue += src; \
} \
else { \
+21 -16
View File
@@ -53,14 +53,14 @@
var/shuttle_state = pre_init_shuttles()
//Since SSicon_smooth.add_to_queue() manually wakes the subsystem, we have to use enable/disable.
SSicon_smooth.disable()
SSicon_smooth.can_fire = FALSE
for (var/mappath in mappaths)
var/datum/map_load_metadata/M = maploader.load_map(file(mappath), x, y, no_changeturf = no_changeturf)
if (M)
bounds = extend_bounds_if_needed(bounds, M.bounds)
atoms_to_initialise += M.atoms_to_initialise
else
SSicon_smooth.enable()
SSicon_smooth.can_fire = TRUE
return FALSE
for (var/z_index = bounds[MAP_MINZ]; z_index <= bounds[MAP_MAXZ]; z_index++)
@@ -81,7 +81,7 @@
create_lighting_overlays_zlevel(light_z)
log_game("Z-level [name] loaded at [x], [y], [world.maxz]")
message_admins("Z-level [name] loaded at [x], [y], [world.maxz]")
SSicon_smooth.enable()
SSicon_smooth.can_fire = TRUE
loaded++
return locate(world.maxx/2, world.maxy/2, world.maxz)
@@ -106,27 +106,32 @@
var/list/obj/structure/cable/cables = list()
var/list/obj/machinery/power/apc/apcs = list()
for(var/atom/A in atoms)
for(var/atom/A as anything in atoms)
if(isnull(A) || (A.flags_1 & INITIALIZED_1))
atoms -= A
continue
if(istype(A, /turf))
turfs += A
continue
if(istype(A, /obj/structure/cable))
cables += A
continue
if(istype(A,/obj/effect/landmark/map_load_mark))
LAZYADD(subtemplates_to_spawn, A)
continue
//Not mutually exclusive anymore section, no continue here, keep checking
if(istype(A, /obj/machinery/atmospherics))
atmos_machines += A
if(istype(A, /obj/machinery))
machines += A
if(istype(A,/obj/effect/landmark/map_load_mark))
LAZYADD(subtemplates_to_spawn, A)
if(istype(A, /obj/machinery/power/apc))
apcs += A
if(isnull(A))
atoms -= A
if(A.flags_1 & INITIALIZED_1)
atoms -= A
var/notsuspended
if(!SSmachinery.suspended)
SSmachinery.suspend()
if(!SSmachinery.can_fire)
SSmachinery.can_fire = FALSE
notsuspended = TRUE
SSatoms.InitializeAtoms(atoms) // The atoms should have been getting queued there. This flushes the queue.
@@ -134,7 +139,7 @@
SSmachinery.setup_powernets_for_cables(cables)
SSmachinery.setup_atmos_machinery(atmos_machines)
if(notsuspended)
SSmachinery.wake()
SSmachinery.can_fire = TRUE
for (var/i in apcs)
var/obj/machinery/power/apc/apc = i
@@ -167,20 +172,20 @@
var/shuttle_state = pre_init_shuttles()
//Since SSicon_smooth.add_to_queue() manually wakes the subsystem, we have to use enable/disable.
SSicon_smooth.disable()
SSicon_smooth.can_fire = FALSE
for (var/mappath in mappaths)
var/datum/map_load_metadata/M = maploader.load_map(file(mappath), T.x, T.y, T.z, cropMap=TRUE)
if (M)
atoms_to_initialise += M.atoms_to_initialise
else
SSicon_smooth.enable()
SSicon_smooth.can_fire = TRUE
return FALSE
//initialize things that are normally initialized after map load
init_atoms(atoms_to_initialise)
init_shuttles(shuttle_state)
SSicon_smooth.enable()
SSicon_smooth.can_fire = TRUE
message_admins("[name] loaded at [T.x], [T.y], [T.z]")
log_game("[name] loaded at [T.x], [T.y], [T.z]")
return TRUE
+13 -12
View File
@@ -3,8 +3,8 @@
//////////////////////////////////////////////////////////////
//global datum that will preload variables on atoms instanciation
var/global/use_preloader = FALSE
var/global/dmm_suite/preloader/_preloader = new
GLOBAL_VAR_INIT(use_preloader, FALSE)
GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new)
/datum/map_load_metadata
var/bounds
@@ -319,15 +319,15 @@ var/global/dmm_suite/preloader/_preloader = new
var/atom/instance = GLOB.areas_by_type[atype]
var/list/attr = members_attributes[index]
if (LAZYLEN(attr))
_preloader.setup(attr)//preloader for assigning set variables on atom creation
GLOB._preloader.setup(attr)//preloader for assigning set variables on atom creation
if(!instance)
instance = new atype(null)
atoms_to_initialise += instance
if(crds)
instance.contents += crds
if(use_preloader && instance)
_preloader.load(instance)
if(GLOB.use_preloader && instance)
GLOB._preloader.load(instance)
//then instance the /turf
@@ -368,7 +368,7 @@ var/global/dmm_suite/preloader/_preloader = new
//Instance an atom at (x,y,z) and gives it the variables in attributes
/dmm_suite/proc/instance_atom(path,list/attributes, turf/crds, no_changeturf)
if (LAZYLEN(attributes))
_preloader.setup(attributes, path)
GLOB._preloader.setup(attributes, path)
if(crds)
if(!no_changeturf && ispath(path, /turf))
@@ -376,8 +376,8 @@ var/global/dmm_suite/preloader/_preloader = new
else
. = create_atom(path, crds)//first preloader pass
if(use_preloader && .)//second preloader pass, for those atoms that don't ..() in New()
_preloader.load(.)
if(GLOB.use_preloader && .)//second preloader pass, for those atoms that don't ..() in New()
GLOB._preloader.load(.)
//custom CHECK_TICK here because we don't want things created while we're sleeping to not initialize
if(TICK_CHECK)
@@ -485,16 +485,17 @@ var/global/dmm_suite/preloader/_preloader = new
//Preloader datum
//////////////////
GLOBAL_LIST_INIT(_preloader_path, null)
/dmm_suite/preloader
parent_type = /datum
var/list/attributes
var/target_path
/dmm_suite/preloader/proc/setup(list/the_attributes, path)
if(LAZYLEN(the_attributes))
use_preloader = TRUE
GLOB.use_preloader = TRUE
attributes = the_attributes
target_path = path
GLOB._preloader_path = path
/dmm_suite/preloader/proc/load(atom/what)
for(var/attribute in attributes)
@@ -502,7 +503,7 @@ var/global/dmm_suite/preloader/_preloader = new
if(islist(value))
value = deepCopyList(value)
what.vars[attribute] = value
use_preloader = FALSE
GLOB.use_preloader = FALSE
/area/template_noop
name = "Area Passthrough"
+2 -2
View File
@@ -1,7 +1,7 @@
//DVIEW is a hack that uses a mob with darksight in order to find lists of viewable stuff while ignoring darkness
// Defines for dview are elsewhere.
var/mob/abstract/dview/dview_mob = new
GLOBAL_DATUM_INIT(dview_mob, /mob/abstract/dview, new)
/mob/abstract/dview
see_in_dark = 1e6
@@ -23,5 +23,5 @@ var/mob/abstract/dview/dview_mob = new
world.log << "Dview was force-qdeleted, this should never happen!"
dview_mob = new
GLOB.dview_mob = new
return QDEL_HINT_QUEUE
+2 -2
View File
@@ -91,7 +91,7 @@
if(length(current_map.lobby_screens))
if(current_map.lobby_transitions && isnum(current_map.lobby_transitions))
icon_state = current_map.lobby_screens[lobby_index]
if(Master.initializing)
if(!MC_RUNNING())
spawn(current_map.lobby_transitions)
Update()
else
@@ -119,7 +119,7 @@
lobby_index = 1
animate(src, alpha = 0, time = 1 SECOND)
animate(alpha = 255, icon_state = current_map.lobby_screens[lobby_index], time = 1 SECOND)
if(Master.initializing)
if(!MC_RUNNING())
spawn(current_map.lobby_transitions)
Update()
else
@@ -234,7 +234,7 @@
/datum/preferences/proc/return_chosen_high_job(var/title = FALSE)
var/datum/job/chosenJob
if(SSjobs.init_state < SS_INITSTATE_DONE)
if(!SSjobs.initialized)
return
if(job_civilian_low & ASSISTANT)
+2 -2
View File
@@ -195,7 +195,7 @@
*
* Does NOT make it the default language
*
* * language - The language to add, can either be a `/datum/language` or a string, see the LANGUAGE_* defines in `code\__defines\species_languages.dm` for the strings
* * language - The language to add, can either be a `/datum/language` or a string, see the LANGUAGE_* defines in `code\__DEFINES\species_languages.dm` for the strings
*/
/mob/proc/add_language(language)
SHOULD_NOT_SLEEP(TRUE)
@@ -218,7 +218,7 @@
/**
* Set default language for a `/mob/living`, return `TRUE` if set successfully, `FALSE` otherwise
*
* * language - The language to set as default, can either be a `/datum/language`, a string as per `LANGUAGE_*` defines in `code\__defines\species_languages.dm`,
* * language - The language to set as default, can either be a `/datum/language`, a string as per `LANGUAGE_*` defines in `code\__DEFINES\species_languages.dm`,
* or `null` to remove the default language
*/
/mob/living/proc/set_default_language(language)
@@ -13,8 +13,8 @@ var/global/ntnrc_uid = 0
ntnrc_uid++
if(name)
title = name
if(ntnet_global)
ntnet_global.chat_channels.Add(src)
if(GLOB.ntnet_global)
GLOB.ntnet_global.chat_channels.Add(src)
if(no_operator)
operator = "NanoTrasen Information Technology Division" // assign a fake operator
..()
@@ -35,7 +35,7 @@ var/global/ntnrc_uid = 0
var/ntnet_log = message.format_ntnet_log(src)
if(ntnet_log)
ntnet_global.add_log(ntnet_log, message.client.computer.network_card, TRUE)
GLOB.ntnet_global.add_log(ntnet_log, message.client.computer.network_card, TRUE)
var/chat_log = message.format_chat_log(src)
if(chat_log)
@@ -6,16 +6,16 @@
/datum/ntnet_user/New()
. = ..()
ntnet_global.chat_users.Add(src)
GLOB.ntnet_global.chat_users.Add(src)
/datum/ntnet_user/Destroy(force)
. = ..()
//This notifies every client that might have this as a client to deactivate and clear the reference
for(var/datum/computer_file/program/chat_client/client as anything in ntnet_global.chat_clients)
for(var/datum/computer_file/program/chat_client/client as anything in GLOB.ntnet_global.chat_clients)
client.handle_ntnet_user_deletion(src)
ntnet_global.chat_users.Remove(src)
GLOB.ntnet_global.chat_users.Remove(src)
channels = null
dm_channels = null
clients = null
@@ -1,4 +1,4 @@
var/global/datum/ntnet/ntnet_global = new()
GLOBAL_DATUM_INIT(ntnet_global, /datum/ntnet, new)
// This is the NTNet datum. There can be only one NTNet datum in game at once. Modular computers read data from this.
@@ -30,8 +30,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.
for(var/obj/machinery/ntnet_relay/R in SSmachinery.machinery)
relays.Add(R)
R.NTNet = src
@@ -61,12 +61,12 @@
if((dos_overload > dos_capacity) && !dos_failure)
dos_failure = TRUE
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 = FALSE
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/ui_interact(mob/user, datum/tgui/ui)
@@ -92,11 +92,11 @@
dos_overload = FALSE
dos_failure = FALSE
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(action=="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
@@ -110,15 +110,15 @@
update_icon()
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]")
return ..()
/obj/machinery/ntnet_relay/attackby(obj/item/W, mob/user)
@@ -49,7 +49,7 @@
ambience_last_played_time = world.time
/obj/item/modular_computer/proc/get_preset_programs(preset_type)
for(var/datum/modular_computer_app_presets/prs in ntnet_global.available_software_presets)
for(var/datum/modular_computer_app_presets/prs in GLOB.ntnet_global.available_software_presets)
if(prs.type == preset_type)
return prs.return_install_programs(src)
@@ -247,7 +247,7 @@
/obj/item/modular_computer/proc/add_log(var/text)
if(!get_ntnet_status())
return FALSE
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 = TRUE)
SStgui.close_uis(active_program)
@@ -16,9 +16,9 @@
// 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(current_network && (current_network in current_map.station_networks) && prob(0.1))
if(ntnet_global.intrusion_detection_enabled)
ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network [current_network] by device with NID [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 detected to camera network [current_network] by device with NID [computer.network_card.get_network_tag()]")
GLOB.ntnet_global.intrusion_detection_alarm = TRUE
/datum/computer_file/program/camera_monitor/hacked/can_access_network(var/mob/user, var/network_access)
return TRUE
@@ -28,7 +28,7 @@
// whether to only select areas explicitly marked for nightlighting
var/wl_only = context == "all" ? 0 : 1
SSnightlight.suspend()
SSnightlight.can_fire = FALSE
if (lstate == "dark")
log_and_message_admins("enabled night-mode [wl_only ? "in public areas" : "globally"].", lusr.resolve())
@@ -63,7 +63,7 @@
/datum/computer_file/program/newsbrowser/ui_static_data(mob/user)
var/list/data = list()
var/list/all_articles = list()
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(
@@ -84,7 +84,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["PRG_openarticle"]))
loaded_article = N.clone()
downloading = TRUE
@@ -103,8 +103,8 @@
return
if(!(src in my_user.clients))
my_user.clients.Add(src)
if(!(src in ntnet_global.chat_clients))
ntnet_global.chat_clients.Add(src)
if(!(src in GLOB.ntnet_global.chat_clients))
GLOB.ntnet_global.chat_clients.Add(src)
computer.update_static_data_for_all_viewers()
/datum/computer_file/program/chat_client/proc/deactivate_chat_client()
@@ -112,8 +112,8 @@
return
if(src in my_user.clients)
my_user.clients.Remove(src)
if(src in ntnet_global.chat_clients)
ntnet_global.chat_clients.Remove(src)
if(src in GLOB.ntnet_global.chat_clients)
GLOB.ntnet_global.chat_clients.Remove(src)
computer.update_static_data_for_all_viewers()
/datum/computer_file/program/chat_client/proc/handle_ntnet_user_deletion(var/datum/ntnet_user)
@@ -161,7 +161,7 @@
var/list/data = list()
if(istype(my_user) && get_signal(NTNET_COMMUNICATION) && (service_state > PROGRAM_STATE_KILLED))
data["channels"] = list()
for(var/c in ntnet_global.chat_channels)
for(var/c in GLOB.ntnet_global.chat_channels)
var/datum/ntnet_conversation/channel = c
if(istype(channel) && (channel.can_see(src)))
var/ref = text_ref(channel)
@@ -184,7 +184,7 @@
data["channels"] += list(our_channel)
data["users"] = list()
for(var/u in ntnet_global.chat_users)
for(var/u in GLOB.ntnet_global.chat_users)
var/datum/ntnet_user/ntnet_user = u
if(ntnet_user != my_user)
data["users"] += list(list("ref" = text_ref(ntnet_user), "username" = ntnet_user.username))
@@ -298,21 +298,21 @@
. = TRUE
if(action == "new_channel")
ntnet_global.begin_conversation(src, sanitize(params["new_channel"]))
GLOB.ntnet_global.begin_conversation(src, sanitize(params["new_channel"]))
computer.update_static_data_for_all_viewers()
. = TRUE
if(action == "delete")
var/datum/ntnet_conversation/conv = locate(params["delete"])
if(istype(conv) && conv.can_manage(src))
ntnet_global.chat_channels.Remove(conv)
GLOB.ntnet_global.chat_channels.Remove(conv)
qdel(conv)
computer.update_static_data_for_all_viewers()
. = TRUE
if(action == "direct")
var/datum/ntnet_user/tUser = locate(params["direct"])
ntnet_global.begin_direct(src, tUser)
GLOB.ntnet_global.begin_direct(src, tUser)
computer.update_static_data_for_all_viewers()
. = TRUE
@@ -15,23 +15,23 @@
tgui_id = "NTMonitor"
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
if(!ntnet_global)
if(!GLOB.ntnet_global)
return
var/list/data = initial_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"] = ntnet_global.logs
data["ntnetmessages"] = ntnet_global.messages
data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount
data["ntnetlogs"] = GLOB.ntnet_global.logs
data["ntnetmessages"] = GLOB.ntnet_global.messages
data["ntnetmaxlogs"] = GLOB.ntnet_global.setting_maxlogcount
return data
@@ -42,24 +42,24 @@
switch(action)
if("resetIDS")
. = TRUE
if(ntnet_global)
ntnet_global.resetIDS()
if(GLOB.ntnet_global)
GLOB.ntnet_global.resetIDS()
if("toggleIDS")
. = TRUE
if(ntnet_global)
ntnet_global.toggleIDS()
if(GLOB.ntnet_global)
GLOB.ntnet_global.toggleIDS()
if("purgelogs")
. = TRUE
if(ntnet_global)
ntnet_global.purge_logs()
if(GLOB.ntnet_global)
GLOB.ntnet_global.purge_logs()
if("updatemaxlogs")
. = TRUE
var/mob/user = usr
var/logcount = text2num(input(user,"Enter amount of logs to keep in memory ([MIN_NTNET_LOGS]-[MAX_NTNET_LOGS]):"))
if(ntnet_global)
ntnet_global.update_max_log_count(logcount)
if(GLOB.ntnet_global)
GLOB.ntnet_global.update_max_log_count(logcount)
if("toggle_function")
. = TRUE
if(!ntnet_global)
if(!GLOB.ntnet_global)
return FALSE
ntnet_global.toggle_function(params["toggle_function"])
GLOB.ntnet_global.toggle_function(params["toggle_function"])
@@ -19,14 +19,14 @@
var/list/data = list()
data["enrollment"] = computer.enrolled
data["available_presets"] = list()
for(var/datum/modular_computer_app_presets/p in ntnet_global.available_software_presets)
for(var/datum/modular_computer_app_presets/p in GLOB.ntnet_global.available_software_presets)
if(p.available)
data["available_presets"][p.display_name] = p.description
return data
/datum/computer_file/program/clientmanager/ui_data(mob/user)
var/list/data = list()
data["ntnet_status"] = ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD)
data["ntnet_status"] = GLOB.ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD)
return data
/datum/computer_file/program/clientmanager/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
@@ -35,7 +35,7 @@
if(action == "enroll")
. = TRUE
if(!ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD))
if(!GLOB.ntnet_global.check_function(NTNET_SOFTWAREDOWNLOAD))
to_chat(ui.user, SPAN_WARNING("Cannot connect to NTNet download servers. Please try again later."))
return
if(params["enroll_type"] & DEVICE_COMPANY)
@@ -58,7 +58,7 @@
if(!computer)
return
for (var/datum/modular_computer_app_presets/prs in ntnet_global.available_software_presets)
for (var/datum/modular_computer_app_presets/prs in GLOB.ntnet_global.available_software_presets)
if(prs.display_name == preset && prs.available == 1)
var/list/prs_programs = prs.return_install_programs(computer)
for (var/datum/computer_file/program/prog in prs_programs)
@@ -32,7 +32,7 @@
/datum/computer_file/program/ntnetdownload/ui_static_data(mob/user)
var/list/data = list()
for(var/datum/computer_file/program/P in ntnet_global.available_software)
for(var/datum/computer_file/program/P in GLOB.ntnet_global.available_software)
if(hard_drive.find_file_by_name(P.filename))
continue
@@ -81,7 +81,7 @@
return TRUE
if(action == "download")
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(params["filename"])
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(params["filename"])
if(istype(PRG))
add_to_queue(PRG, usr)
. = TRUE
@@ -81,7 +81,7 @@ var/global/ntnet_card_uid = 1
return 0
if(!check_functionality())
return 0
if(!ntnet_global || !ntnet_global.check_function(specific_action))
if(!GLOB.ntnet_global || !GLOB.ntnet_global.check_function(specific_action))
return 0
if(parent_computer)
@@ -25,7 +25,7 @@
if(_program == null)
qdel(src) //Delete itself if no program is set
return
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(_program)
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(_program)
if(!PRG)
qdel(src) //Delete itself it no matching program is found
return
+1 -1
View File
@@ -54,7 +54,7 @@
///The amount of `pain` at which a limb becomes unusable
var/pain_disability_threshold
///Organ behaviour flags, see `ORGAN_CAN_*` and `ORGAN_HAS_*` in `code\__defines\damage_organs.dm`
///Organ behaviour flags, see `ORGAN_CAN_*` and `ORGAN_HAS_*` in `code\__DEFINES\damage_organs.dm`
var/limb_flags = ORGAN_CAN_AMPUTATE | ORGAN_CAN_BREAK | ORGAN_CAN_MAIM
var/max_size = 0
@@ -36,7 +36,7 @@
/obj/machinery/ship_weapon/LateInitialize()
SSshuttle.weapons_to_initialize += src
if(SSshuttle.init_state == SS_INITSTATE_DONE)
if(SSshuttle.initialized)
SSshuttle.initialize_ship_weapons()
for(var/obj/structure/ship_weapon_dummy/SD in orange(1, src))
SD.connect(src)
@@ -114,7 +114,7 @@
controller = new(src)
update_nearby_tiles(need_rebuild=1)
if(length(SSshuttle.shuttle_areas) && !length(SSshuttle.shuttles_to_initialize) && SSshuttle.init_state == SS_INITSTATE_DONE)
if(length(SSshuttle.shuttle_areas) && !length(SSshuttle.shuttles_to_initialize) && SSshuttle.initialized)
for(var/obj/effect/overmap/visitable/ship/S as anything in SSshuttle.ships)
if(S.check_ownership(src))
S.engines |= controller
+2 -2
View File
@@ -321,9 +321,9 @@
next_spark = world.time + 1 MINUTE + (rand(-15, 15) SECONDS)
// ehh
/obj/machinery/light/process()
/obj/machinery/light/process(seconds_per_tick)
if (cell && has_power())
cell.give(0.2)
cell.give(0.2 * seconds_per_tick)
if(cell.fully_charged())
return PROCESS_KILL
if (emergency_mode && !use_emergency_power(LIGHT_EMERGENCY_POWER_USE))
@@ -29,7 +29,7 @@
///Boolean, if `TRUE` aiming is performed instead of shooting
var/active = FALSE
///A list of permissions granted to the target, see `code\__defines\targeting.dm`
///A list of permissions granted to the target, see `code\__DEFINES\targeting.dm`
var/target_permissions = TARGET_CAN_MOVE | TARGET_CAN_CLICK | TARGET_CAN_RADIO
///The time, relative to `world.time`, after which we can re-aim
+1 -1
View File
@@ -74,7 +74,7 @@
trailing_newline = TRUE,
confidential = FALSE
)
if(isnull(Master) || !SSchat?.init_state != SS_INITSTATE_DONE)
if(isnull(Master) || !SSchat?.initialized)
to_chat_immediate(target, html, type, text, avoid_highlighting)
return