mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #4684 from VOREStation/upstream-merge-5814
[MIRROR] [READY]Makes a bunch of processes subsystems instead
This commit is contained in:
@@ -200,7 +200,7 @@
|
||||
"moles" = round(air2.gas[output_gas], 0.01))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "algae_farm_vr.tmpl", "Algae Farm Control Panel", 500, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -140,7 +140,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
|
||||
@@ -181,7 +181,7 @@
|
||||
switch_filter(dir_flag(href_list["dir"]), mode_return_switch(new_filter))
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
|
||||
@@ -200,7 +200,7 @@
|
||||
con_lock(dir_flag(href_list["dir"]))
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
data["gasTemperatureClass"] = temp_class
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
data["gasTemperatureClass"] = temp_class
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -52,7 +52,8 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
// Subsystem init_order, from highest priority to lowest priority
|
||||
// Subsystems shutdown in the reverse of the order they initialize in
|
||||
// The numbers just define the ordering, they are meaningless otherwise.
|
||||
#define INIT_ORDER_MAPPING 20 // VOREStation Edit
|
||||
#define INIT_ORDER_CHEMISTRY 18
|
||||
#define INIT_ORDER_MAPPING 17
|
||||
#define INIT_ORDER_DECALS 16
|
||||
#define INIT_ORDER_ATOMS 15
|
||||
#define INIT_ORDER_MACHINES 10
|
||||
|
||||
@@ -13,8 +13,6 @@ var/global/list/dead_mob_list = list() //List of all dead mobs, including cli
|
||||
var/global/list/listening_objects = list() //List of all objects which care about receiving messages (communicators, radios, etc)
|
||||
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
var/global/list/landmarks_list = list() //list of all landmarks created
|
||||
var/global/list/surgery_steps = list() //list of all surgery steps |BS12
|
||||
var/global/list/side_effects = list() //list of all medical sideeffects types by thier names |BS12
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/datum/controller/process/air/setup()
|
||||
name = "air"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
start_delay = 4
|
||||
|
||||
if(!air_master)
|
||||
air_master = new
|
||||
air_master.Setup()
|
||||
|
||||
/datum/controller/process/air/doWork()
|
||||
if(!air_processing_killed)
|
||||
if(!air_master.Tick()) //Runtimed.
|
||||
air_master.failed_ticks++
|
||||
|
||||
if(air_master.failed_ticks > 5)
|
||||
world << "<SPAN CLASS='danger'>RUNTIMES IN ATMOS TICKER. Killing air simulation!</SPAN>"
|
||||
world.log << "### ZAS SHUTDOWN"
|
||||
|
||||
message_admins("ZASALERT: Shutting down! status: [air_master.tick_progress]")
|
||||
log_admin("ZASALERT: Shutting down! status: [air_master.tick_progress]")
|
||||
|
||||
air_processing_killed = TRUE
|
||||
air_master.failed_ticks = 0
|
||||
@@ -1,33 +0,0 @@
|
||||
var/datum/controller/process/chemistry/chemistryProcess
|
||||
|
||||
/datum/controller/process/chemistry
|
||||
var/list/active_holders
|
||||
var/list/chemical_reactions
|
||||
var/list/chemical_reagents
|
||||
|
||||
/datum/controller/process/chemistry/setup()
|
||||
name = "chemistry"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
chemistryProcess = src
|
||||
active_holders = list()
|
||||
chemical_reactions = chemical_reactions_list
|
||||
chemical_reagents = chemical_reagents_list
|
||||
|
||||
/datum/controller/process/chemistry/statProcess()
|
||||
..()
|
||||
stat(null, "[active_holders.len] reagent holder\s")
|
||||
|
||||
/datum/controller/process/chemistry/doWork()
|
||||
for(last_object in active_holders)
|
||||
var/datum/reagents/holder = last_object
|
||||
if(!holder.process_reactions())
|
||||
active_holders -= holder
|
||||
SCHECK
|
||||
|
||||
/datum/controller/process/chemistry/proc/mark_for_update(var/datum/reagents/holder)
|
||||
if(holder in active_holders)
|
||||
return
|
||||
|
||||
//Process once, right away. If we still need to continue then add to the active_holders list and continue later
|
||||
if(holder.process_reactions())
|
||||
active_holders += holder
|
||||
@@ -1,6 +0,0 @@
|
||||
/datum/controller/process/event/setup()
|
||||
name = "event controller"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
/datum/controller/process/event/doWork()
|
||||
event_manager.process()
|
||||
@@ -1,19 +0,0 @@
|
||||
/datum/controller/process/nanoui/setup()
|
||||
name = "nanoui"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
/datum/controller/process/nanoui/statProcess()
|
||||
..()
|
||||
stat(null, "[GLOB.nanomanager.processing_uis.len] UIs")
|
||||
|
||||
/datum/controller/process/nanoui/doWork()
|
||||
for(last_object in GLOB.nanomanager.processing_uis)
|
||||
var/datum/nanoui/NUI = last_object
|
||||
if(istype(NUI) && !QDELETED(NUI))
|
||||
try
|
||||
NUI.process()
|
||||
catch(var/exception/e)
|
||||
catchException(e, NUI)
|
||||
else
|
||||
catchBadType(NUI)
|
||||
GLOB.nanomanager.processing_uis -= NUI
|
||||
@@ -1,16 +0,0 @@
|
||||
var/global/list/turf/processing_turfs = list()
|
||||
|
||||
/datum/controller/process/turf/setup()
|
||||
name = "turf"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
/datum/controller/process/turf/doWork()
|
||||
for(last_object in processing_turfs)
|
||||
var/turf/T = last_object
|
||||
if(T.process() == PROCESS_KILL)
|
||||
processing_turfs.Remove(T)
|
||||
SCHECK
|
||||
|
||||
/datum/controller/process/turf/statProcess()
|
||||
..()
|
||||
stat(null, "[processing_turfs.len] turf\s")
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// Creation subsystem, which is responsible for initializing newly created objects.
|
||||
//
|
||||
SUBSYSTEM_DEF(creation)
|
||||
name = "Creation"
|
||||
priority = 14
|
||||
wait = 5
|
||||
// flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
|
||||
flags = SS_NO_FIRE|SS_NO_INIT
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
|
||||
var/list/atoms_needing_initialize = list()
|
||||
|
||||
var/map_loading = FALSE
|
||||
|
||||
/datum/controller/subsystem/creation/StartLoadingMap(var/quiet)
|
||||
map_loading = TRUE
|
||||
|
||||
/datum/controller/subsystem/creation/StopLoadingMap(var/quiet)
|
||||
map_loading = FALSE
|
||||
|
||||
/datum/controller/subsystem/creation/proc/initialize_late_atoms()
|
||||
admin_notice("<span class='danger'>Initializing atoms in submap.</span>", R_DEBUG)
|
||||
var/total_atoms = atoms_needing_initialize.len
|
||||
for(var/atom/movable/A in atoms_needing_initialize)
|
||||
if(!QDELETED(A))
|
||||
A.Initialize()
|
||||
atoms_needing_initialize -= A
|
||||
admin_notice("<span class='danger'>Initalized [total_atoms] atoms in submap.</span>", R_DEBUG)
|
||||
72
code/controllers/subsystems/events.dm
Normal file
72
code/controllers/subsystems/events.dm
Normal file
@@ -0,0 +1,72 @@
|
||||
SUBSYSTEM_DEF(events)
|
||||
name = "Events"
|
||||
wait = 20
|
||||
|
||||
var/list/datum/event/active_events = list()
|
||||
var/list/datum/event/finished_events = list()
|
||||
|
||||
var/list/datum/event/allEvents
|
||||
var/list/datum/event_container/event_containers
|
||||
|
||||
var/datum/event_meta/new_event = new
|
||||
|
||||
/datum/controller/subsystem/events/Initialize()
|
||||
event_containers = list(
|
||||
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
|
||||
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
|
||||
EVENT_LEVEL_MAJOR = new/datum/event_container/major
|
||||
)
|
||||
allEvents = typesof(/datum/event) - /datum/event
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/events/fire(resumed)
|
||||
for(var/datum/event/E in active_events)
|
||||
E.process()
|
||||
|
||||
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/list/datum/event_container/EC = event_containers[i]
|
||||
EC.process()
|
||||
|
||||
/datum/controller/subsystem/events/Recover()
|
||||
if(SSevents.active_events)
|
||||
active_events |= SSevents.active_events
|
||||
if(SSevents.finished_events)
|
||||
finished_events |= SSevents.finished_events
|
||||
|
||||
/datum/controller/subsystem/events/proc/event_complete(var/datum/event/E)
|
||||
if(!E.event_meta || !E.severity) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
|
||||
log_debug("Event of '[E.type]' with missing meta-data has completed.")
|
||||
return
|
||||
|
||||
finished_events += E
|
||||
|
||||
// Add the event back to the list of available events
|
||||
var/datum/event_container/EC = event_containers[E.severity]
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.add_to_queue)
|
||||
EC.available_events += EM
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2stationtime(world.time)].")
|
||||
|
||||
/datum/controller/subsystem/events/proc/delay_events(var/severity, var/delay)
|
||||
var/list/datum/event_container/EC = event_containers[severity]
|
||||
EC.next_event_time += delay
|
||||
|
||||
/datum/controller/subsystem/events/proc/RoundEnd()
|
||||
if(!report_at_round_end)
|
||||
return
|
||||
|
||||
to_chat(world, "<br><br><br><font size=3><b>Random Events This Round:</b></font>")
|
||||
for(var/datum/event/E in active_events|finished_events)
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.name == "Nothing")
|
||||
continue
|
||||
var/message = "'[EM.name]' began at [worldtime2stationtime(E.startedAt)] "
|
||||
if(E.isRunning)
|
||||
message += "and is still running."
|
||||
else
|
||||
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
|
||||
message += "and ended at [worldtime2stationtime(E.endedAt)]."
|
||||
else
|
||||
message += "and ran to completion."
|
||||
to_chat(world, message)
|
||||
42
code/controllers/subsystems/nanoui.dm
Normal file
42
code/controllers/subsystems/nanoui.dm
Normal file
@@ -0,0 +1,42 @@
|
||||
SUBSYSTEM_DEF(nanoui)
|
||||
name = "NanoUI"
|
||||
wait = 20
|
||||
// a list of current open /nanoui UIs, grouped by src_object and ui_key
|
||||
var/list/open_uis = list()
|
||||
// a list of current open /nanoui UIs, not grouped, for use in processing
|
||||
var/list/processing_uis = list()
|
||||
// a list of asset filenames which are to be sent to the client on user logon
|
||||
var/list/asset_files = list()
|
||||
|
||||
/datum/controller/subsystem/nanoui/Initialize()
|
||||
var/list/nano_asset_dirs = list(\
|
||||
"nano/css/",\
|
||||
"nano/images/",\
|
||||
"nano/js/",\
|
||||
"nano/templates/"\
|
||||
)
|
||||
|
||||
var/list/filenames = null
|
||||
for (var/path in nano_asset_dirs)
|
||||
filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore
|
||||
if(fexists(path + filename))
|
||||
asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/nanoui/Recover()
|
||||
if(SSnanoui.open_uis)
|
||||
open_uis |= SSnanoui.open_uis
|
||||
if(SSnanoui.processing_uis)
|
||||
processing_uis |= SSnanoui.processing_uis
|
||||
if(SSnanoui.asset_files)
|
||||
asset_files |= SSnanoui.asset_files
|
||||
|
||||
/datum/controller/subsystem/nanoui/stat_entry()
|
||||
return ..("[processing_uis.len] UIs")
|
||||
|
||||
/datum/controller/subsystem/nanoui/fire(resumed)
|
||||
for(var/thing in processing_uis)
|
||||
var/datum/nanoui/UI = thing
|
||||
UI.process()
|
||||
43
code/controllers/subsystems/processing/chemistry.dm
Normal file
43
code/controllers/subsystems/processing/chemistry.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(chemistry)
|
||||
name = "Chemistry"
|
||||
wait = 20
|
||||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING
|
||||
init_order = INIT_ORDER_CHEMISTRY
|
||||
var/list/chemical_reactions = list()
|
||||
var/list/chemical_reagents = list()
|
||||
|
||||
/datum/controller/subsystem/processing/chemistry/Recover()
|
||||
chemical_reactions = SSchemistry.chemical_reactions
|
||||
chemical_reagents = SSchemistry.chemical_reagents
|
||||
|
||||
/datum/controller/subsystem/processing/chemistry/Initialize()
|
||||
initialize_chemical_reactions()
|
||||
initialize_chemical_reagents()
|
||||
|
||||
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
|
||||
// It is filtered into multiple lists within a list.
|
||||
// For example:
|
||||
// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron
|
||||
// Note that entries in the list are NOT duplicated. So if a reaction pertains to
|
||||
// more than one chemical it will still only appear in only one of the sublists.
|
||||
/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reactions()
|
||||
var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction
|
||||
SSchemistry.chemical_reactions = list()
|
||||
|
||||
for(var/path in paths)
|
||||
var/datum/chemical_reaction/D = new path()
|
||||
if(D.required_reagents && D.required_reagents.len)
|
||||
var/reagent_id = D.required_reagents[1]
|
||||
if(!chemical_reactions[reagent_id])
|
||||
chemical_reactions[reagent_id] = list()
|
||||
chemical_reactions[reagent_id] += D
|
||||
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reagents()
|
||||
var/paths = typesof(/datum/reagent) - /datum/reagent
|
||||
chemical_reagents = list()
|
||||
for(var/path in paths)
|
||||
var/datum/reagent/D = new path()
|
||||
if(!D.name)
|
||||
continue
|
||||
chemical_reagents[D.id] = D
|
||||
3
code/controllers/subsystems/processing/turfs.dm
Normal file
3
code/controllers/subsystems/processing/turfs.dm
Normal file
@@ -0,0 +1,3 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(turfs)
|
||||
name = "Turf Processing"
|
||||
wait = 20
|
||||
@@ -63,7 +63,7 @@
|
||||
usr.client.debug_variables(antag)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry","Vote","Xenobio","Planets"))
|
||||
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Radio","Supply","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Plants","Alarm","Xenobio"))
|
||||
set category = "Debug"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -91,9 +91,6 @@
|
||||
if("Supply")
|
||||
debug_variables(supply_controller)
|
||||
feedback_add_details("admin_verb","DSupply")
|
||||
if("Shuttles")
|
||||
debug_variables(shuttle_controller)
|
||||
feedback_add_details("admin_verb","DShuttles")
|
||||
if("Emergency Shuttle")
|
||||
debug_variables(emergency_shuttle)
|
||||
feedback_add_details("admin_verb","DEmergency")
|
||||
@@ -112,21 +109,12 @@
|
||||
if("Gas Data")
|
||||
debug_variables(gas_data)
|
||||
feedback_add_details("admin_verb","DGasdata")
|
||||
if("Event")
|
||||
debug_variables(event_manager)
|
||||
feedback_add_details("admin_verb", "DEvent")
|
||||
if("Plants")
|
||||
debug_variables(plant_controller)
|
||||
feedback_add_details("admin_verb", "DPlants")
|
||||
if("Alarm")
|
||||
debug_variables(alarm_manager)
|
||||
feedback_add_details("admin_verb", "DAlarm")
|
||||
if("Nano")
|
||||
debug_variables(GLOB.nanomanager)
|
||||
feedback_add_details("admin_verb", "DNano")
|
||||
if("Chemistry")
|
||||
debug_variables(chemistryProcess)
|
||||
feedback_add_details("admin_verb", "DChem")
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
||||
return
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@
|
||||
|
||||
weakref = null // Clear this reference to ensure it's kept for as brief duration as possible.
|
||||
tag = null
|
||||
GLOB.nanomanager.close_uis(src)
|
||||
SSnanoui.close_uis(src)
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
current.mind = null
|
||||
|
||||
GLOB.nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
|
||||
SSnanoui.user_transferred(current, new_character) // transfer active NanoUI instances to new user
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ var/const/WIRE_TRANSMIT = 4
|
||||
|
||||
if(WIRE_TRANSMIT)
|
||||
R.broadcasting = !R.broadcasting && !IsIndexCut(WIRE_SIGNAL)
|
||||
GLOB.nanomanager.update_uis(holder)
|
||||
SSnanoui.update_uis(holder)
|
||||
|
||||
/datum/wires/radio/UpdateCut(var/index, var/mended)
|
||||
var/obj/item/device/radio/R = holder
|
||||
@@ -38,4 +38,4 @@ var/const/WIRE_TRANSMIT = 4
|
||||
|
||||
if(WIRE_TRANSMIT)
|
||||
R.broadcasting = mended && !IsIndexCut(WIRE_SIGNAL)
|
||||
GLOB.nanomanager.update_uis(holder)
|
||||
SSnanoui.update_uis(holder)
|
||||
|
||||
@@ -521,7 +521,7 @@
|
||||
var/atom/L = loc
|
||||
if(!L)
|
||||
return null
|
||||
return L.AllowDrop() ? L : get_turf(L)
|
||||
return L.AllowDrop() ? L : L.drop_location()
|
||||
|
||||
/atom/proc/AllowDrop()
|
||||
return FALSE
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
I.loc = src
|
||||
src.disk = I
|
||||
user << "You insert [I]."
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -428,7 +428,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -465,7 +465,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -624,7 +624,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1 //lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
irradiating = 2
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*2) // sleep for 2 seconds
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
/turf/unsimulated/wall/supermatter/New()
|
||||
..()
|
||||
processing_turfs.Add(src)
|
||||
START_PROCESSING(SSturfs, src)
|
||||
next_check = world.time+5 SECONDS
|
||||
|
||||
/turf/unsimulated/wall/supermatter/Destroy()
|
||||
processing_turfs.Remove(src)
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
..()
|
||||
|
||||
/turf/unsimulated/wall/supermatter/process()
|
||||
@@ -57,7 +57,7 @@
|
||||
T.ChangeTurf(type)
|
||||
|
||||
if((spawned & (NORTH|SOUTH|EAST|WEST)) == (NORTH|SOUTH|EAST|WEST))
|
||||
processing_turfs -= src
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
return
|
||||
|
||||
/turf/unsimulated/wall/supermatter/attack_generic(mob/user as mob)
|
||||
|
||||
@@ -176,12 +176,12 @@ var/global/list/additional_antag_types = list()
|
||||
|
||||
/datum/game_mode/proc/refresh_event_modifiers()
|
||||
if(event_delay_mod_moderate || event_delay_mod_major)
|
||||
event_manager.report_at_round_end = 1
|
||||
SSevents.report_at_round_end = TRUE
|
||||
if(event_delay_mod_moderate)
|
||||
var/datum/event_container/EModerate = event_manager.event_containers[EVENT_LEVEL_MODERATE]
|
||||
var/datum/event_container/EModerate = SSevents.event_containers[EVENT_LEVEL_MODERATE]
|
||||
EModerate.delay_modifier = event_delay_mod_moderate
|
||||
if(event_delay_mod_moderate)
|
||||
var/datum/event_container/EMajor = event_manager.event_containers[EVENT_LEVEL_MAJOR]
|
||||
var/datum/event_container/EMajor = SSevents.event_containers[EVENT_LEVEL_MAJOR]
|
||||
EMajor.delay_modifier = event_delay_mod_major
|
||||
|
||||
/datum/game_mode/proc/pre_setup()
|
||||
|
||||
@@ -439,7 +439,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
mode.declare_completion()//To declare normal completion.
|
||||
|
||||
//Ask the event manager to print round end information
|
||||
event_manager.RoundEnd()
|
||||
SSevents.RoundEnd()
|
||||
|
||||
//Print a list of antagonists to the server log
|
||||
var/list/total_antagonists = list()
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
break
|
||||
data["stasis"] = stasis_level_name
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper UI", 600, 600, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
occupantData = attempt_vr(scanner,"get_occupant_data_vr",list(occupantData,H)) //VOREStation Insert
|
||||
data["occupant"] = occupantData
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 800)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
if(!(locked && !remote_connection) || remote_access || issilicon(user))
|
||||
populate_controls(data)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "air_alarm.tmpl", name, 325, 625, master_ui = master_ui, state = state)
|
||||
ui.set_initial_data(data)
|
||||
@@ -965,7 +965,7 @@ FIRE ALARM
|
||||
else if(href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
last_process = world.timeofday
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
|
||||
@@ -117,7 +117,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
|
||||
data["sensors"] = sensors_ui
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 525, 600)
|
||||
ui.set_initial_data(data)
|
||||
@@ -174,7 +174,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 660, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -416,7 +416,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
else
|
||||
data["device_info"] = null
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -261,7 +261,7 @@ update_flag
|
||||
|
||||
..()
|
||||
|
||||
GLOB.nanomanager.update_uis(src) // Update all NanoUIs attached to src
|
||||
SSnanoui.update_uis(src) // Update all NanoUIs attached to src
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -289,7 +289,7 @@ update_flag
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 410, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
data["table"] = table
|
||||
data["victim"] = victim_ui
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "operating.tmpl", src.name, 380, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -69,4 +69,4 @@
|
||||
usr.set_machine(src)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
@@ -139,7 +139,7 @@
|
||||
data["enemyHP"] = enemy_hp
|
||||
data["gameOver"] = gameover
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "arcade_battle.tmpl", src.name, 400, 300)
|
||||
ui.set_initial_data(data)
|
||||
@@ -201,7 +201,7 @@
|
||||
emagged = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/battle/proc/arcade_action()
|
||||
|
||||
@@ -37,7 +37,7 @@ var/global/list/minor_air_alarms = list()
|
||||
data["priority_alarms"] = major_alarms
|
||||
data["minor_alarms"] = minor_alarms
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
switch_to_camera(user, current_camera)
|
||||
data["map_levels"] = using_map.get_map_levels(src.z)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
/obj/machinery/computer/security/process()
|
||||
if(cache_id != camera_repository.camera_cache_id)
|
||||
cache_id = camera_repository.camera_cache_id
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
id_card.forceMove(src)
|
||||
modify = id_card
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
data["regions"] = regions
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700)
|
||||
ui.set_initial_data(data)
|
||||
@@ -235,7 +235,7 @@
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if ("account")
|
||||
if (is_authenticated())
|
||||
@@ -243,7 +243,7 @@
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
modify.associated_account_number = account_num
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if ("mode")
|
||||
mode = text2num(href_list["mode_target"])
|
||||
@@ -253,7 +253,7 @@
|
||||
printing = 1
|
||||
spawn(50)
|
||||
printing = null
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
if (mode)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
data["diskette"] = diskette
|
||||
data["temp"] = temp
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "cloning.tmpl", src.name, 400, 450)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@
|
||||
temp = ""
|
||||
scantemp = ""
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
|
||||
@@ -501,8 +501,8 @@
|
||||
|
||||
//delay events in case of an autotransfer
|
||||
if (isnull(user))
|
||||
event_manager.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes
|
||||
event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000)
|
||||
SSevents.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes
|
||||
SSevents.delay_events(EVENT_LEVEL_MAJOR, 9000)
|
||||
|
||||
log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.")
|
||||
message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
if(!giver && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
giver = I
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
else if(giver)
|
||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||
return
|
||||
@@ -150,7 +150,7 @@
|
||||
data["log"] = internal_log
|
||||
data["uid"] = uid
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "guest_pass.tmpl", src.name, 400, 520)
|
||||
ui.set_initial_data(data)
|
||||
@@ -242,4 +242,4 @@
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
@@ -19,7 +19,7 @@
|
||||
data["is_ai"] = issilicon(user)
|
||||
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
data["contraband"] = can_order_contraband || (authorization & SUP_CONTRABAND)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(!card && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
card = I
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
update_icon()
|
||||
else if(card)
|
||||
to_chat(user, "<span class='warning'>There is already ID card inside.</span>")
|
||||
@@ -87,7 +87,7 @@
|
||||
// if(job && job.timeoff_factor < 0) // Currently are Off Duty, so gotta lookup what on-duty jobs are open
|
||||
// data["job_choices"] = getOpenOnDutyJobs(user, job.department)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "timeclock_vr.tmpl", capitalize(src.name), 500, 520)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
if(vendmode == 1 && I)
|
||||
scan_id(I, W)
|
||||
vendmode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
if(vendmode == 2 && I)
|
||||
if(reimburse_id(I, W))
|
||||
vendmode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
if(vendmode == 0)
|
||||
if(istype(W, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = W
|
||||
@@ -48,7 +48,7 @@
|
||||
L.loc = src
|
||||
vendmode = 2
|
||||
to_chat(user, "<span class='notice'>You slot your [L.name] into \The [src.name]</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
data["power"] = power
|
||||
data["total"] = total()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "laptop_vendor.tmpl", src.name, 480, 425)
|
||||
ui.set_initial_data(data)
|
||||
@@ -136,7 +136,7 @@
|
||||
vendmode = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/lapvend/proc/vend()
|
||||
if(cardreader > 0)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -727,7 +727,7 @@ About the new airlock wires panel:
|
||||
|
||||
data["commands"] = commands
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls", 450, 350, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"secure" = program.memory["secure"]
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -89,7 +89,7 @@
|
||||
"processing" = program.memory["processing"],
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -153,7 +153,7 @@
|
||||
"processing" = program.memory["processing"]
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"override_enabled" = docking_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"airlocks" = airlocks,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290)
|
||||
@@ -73,7 +73,7 @@
|
||||
"override_enabled" = airlock_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"door_lock" = docking_program.memory["door_status"]["lock"],
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -167,7 +167,7 @@
|
||||
log_game(msg)
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
// Proc: get_exonet_node()
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
data["tracks"] = nano_tracks
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "jukebox.tmpl", title, 450, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
recipies_ui[++recipies_ui.len] = list("name" = R.name, "type" = "[T]")
|
||||
data["recipies"] = recipies_ui
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "partslathe.tmpl", "Parts Lathe UI", 500, 450)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -271,7 +271,7 @@ var/list/turret_icons
|
||||
settings[++settings.len] = list("category" = "Neutralize All Entities", "setting" = "check_all", "value" = check_all)
|
||||
data["settings"] = settings
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -127,7 +127,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
data["msgVerified"] = msgVerified
|
||||
data["announceAuth"] = announceAuth
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
data["settings"] = settings
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
var/has_logs = 0 //defaults to 0, set to anything else for vendor to have logs
|
||||
|
||||
|
||||
/obj/machinery/vending/New()
|
||||
..()
|
||||
/obj/machinery/vending/Initialize()
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
spawn(4)
|
||||
if(product_slogans)
|
||||
@@ -86,10 +86,6 @@
|
||||
build_inventory()
|
||||
power_change()
|
||||
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/**
|
||||
* Build produdct_records from the products lists
|
||||
*
|
||||
@@ -173,7 +169,7 @@
|
||||
vend(currently_vending, usr)
|
||||
return
|
||||
else if(handled)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return // don't smack that machine with your 2 thalers
|
||||
|
||||
if(I || istype(W, /obj/item/weapon/spacecash))
|
||||
@@ -187,7 +183,7 @@
|
||||
if(panel_open)
|
||||
overlays += image(icon, "[initial(icon_state)]-panel")
|
||||
|
||||
GLOB.nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
|
||||
if(panel_open)
|
||||
@@ -199,7 +195,7 @@
|
||||
coin = W
|
||||
categories |= CAT_COIN
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
@@ -403,7 +399,7 @@
|
||||
else
|
||||
data["panel"] = 0
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "vending_machine.tmpl", name, 440, 600)
|
||||
ui.set_initial_data(data)
|
||||
@@ -463,7 +459,7 @@
|
||||
shut_up = !shut_up
|
||||
|
||||
add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/proc/vend(datum/stored_item/vending_product/R, mob/user)
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
@@ -474,7 +470,7 @@
|
||||
vend_ready = 0 //One thing at a time!!
|
||||
status_message = "Vending..."
|
||||
status_error = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if(R.category & CAT_COIN)
|
||||
if(!coin)
|
||||
@@ -516,7 +512,7 @@
|
||||
status_error = 0
|
||||
vend_ready = 1
|
||||
currently_vending = null
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -572,7 +568,7 @@
|
||||
if(has_logs)
|
||||
do_logging(R, user)
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -177,12 +177,11 @@
|
||||
var/spray_amount = 5 //units of liquid per particle. 5 is enough to wet the floor - it's a big fire extinguisher, so should be fine
|
||||
var/max_water = 1000
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/New()
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/Initialize()
|
||||
. = ..()
|
||||
reagents = new/datum/reagents(max_water)
|
||||
reagents.my_atom = src
|
||||
reagents.add_reagent("water", max_water)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3) return
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
if(current)
|
||||
data["builtperc"] = round((progress / current.time) * 100)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mechfab.tmpl", "Exosuit Fabricator UI", 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
if(current)
|
||||
data["builtperc"] = round((progress / current.time) * 100)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mechfab.tmpl", "Prosthetics Fab UI", 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
list("impedrezene" = 15) = 2,
|
||||
list("zombiepowder" = 10) = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/Initialize()
|
||||
. = ..()
|
||||
if(is_open_container())
|
||||
flags ^= OPENCONTAINER
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
if(mode in no_auto_update)
|
||||
auto_update = 0
|
||||
@@ -647,7 +647,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
@@ -685,7 +685,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
..()
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
@@ -1130,7 +1130,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
P.new_message_from_pda(src, t)
|
||||
GLOB.nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
else
|
||||
to_chat(U, "<span class='notice'>ERROR: Messaging server is not responding.</span>")
|
||||
|
||||
@@ -1150,7 +1150,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(L)
|
||||
if(reception_message)
|
||||
L << reception_message
|
||||
GLOB.nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
/obj/item/device/pda/proc/new_news(var/message)
|
||||
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
|
||||
@@ -1196,7 +1196,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(can_use(usr))
|
||||
mode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
@@ -1297,7 +1297,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
@@ -1325,7 +1325,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
C.loc = src
|
||||
pai = C
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
else if(istype(C, /obj/item/weapon/pen))
|
||||
var/obj/item/weapon/pen/O = locate() in src
|
||||
if(O)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
data["laws"] = laws
|
||||
data["has_laws"] = laws.len
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
// The value element is the actual data, and can take any form necessary for the template
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -261,7 +261,7 @@
|
||||
notehtml = note
|
||||
|
||||
if(href_list["switch_template"])
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
|
||||
if(ui)
|
||||
ui.add_template("Body", href_list["switch_template"])
|
||||
|
||||
@@ -276,5 +276,5 @@
|
||||
if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions
|
||||
cartridge.Topic(href, href_list)
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -234,7 +234,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
cartridge.forceMove(src)
|
||||
to_chat(usr, "<span class='notice'>You slot \the [cartridge] into \the [src].</span>")
|
||||
modules[++modules.len] = list("module" = "External Device", "icon" = "external64", "number" = EXTRTAB)
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
// Proc: attack_self()
|
||||
|
||||
@@ -122,7 +122,7 @@ var/global/list/default_medbay_channels = list(
|
||||
if(syndie)
|
||||
data["useSyndMode"] = 1
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430)
|
||||
ui.set_initial_data(data)
|
||||
@@ -233,7 +233,7 @@ var/global/list/default_medbay_channels = list(
|
||||
return 1
|
||||
|
||||
if(.)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
@@ -725,7 +725,7 @@ var/global/list/default_medbay_channels = list(
|
||||
. = 1
|
||||
|
||||
if(.)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/borg/interact(mob/user as mob)
|
||||
if(!on)
|
||||
@@ -754,7 +754,7 @@ var/global/list/default_medbay_channels = list(
|
||||
data["has_subspace"] = 1
|
||||
data["subspace"] = subspace_transmission
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
//TODO: Have this take an assemblyholder
|
||||
else if(isassembly(item))
|
||||
var/obj/item/device/assembly/A = item
|
||||
@@ -58,7 +58,7 @@
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
data["valveOpen"] = valve_open ? 1 : 0
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
|
||||
next_offer_time = world.time + offer_time
|
||||
update_nano_data()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
@@ -110,7 +110,7 @@
|
||||
data += nanoui_data
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui) // No auto-refresh
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
|
||||
data["menu"] = 0
|
||||
@@ -138,7 +138,7 @@
|
||||
UI.buy(src, usr)
|
||||
else if(href_list["lock"])
|
||||
toggle()
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
else if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
|
||||
@@ -91,8 +91,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/brand
|
||||
blood_sprite_state = null //Can't bloody these
|
||||
|
||||
/obj/item/clothing/mask/smokable/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/smokable/Initialize()
|
||||
. = ..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
if(smoketime && !max_smoketime)
|
||||
@@ -177,7 +177,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
T.visible_message(flavor_text)
|
||||
update_icon()
|
||||
set_light(2, 0.25, "#E38F46")
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -280,8 +280,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
weldermes = "<span class='notice'>USER casually lights the NAME with FLAME.</span>"
|
||||
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME.</span>"
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/smokable/cigarette/Initialize()
|
||||
. = ..()
|
||||
if(nicotine_amt)
|
||||
reagents.add_reagent("nicotine", nicotine_amt)
|
||||
|
||||
@@ -363,8 +363,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
slot_flags = SLOT_EARS
|
||||
throwforce = 1
|
||||
|
||||
/obj/item/weapon/cigbutt/New()
|
||||
..()
|
||||
/obj/item/weapon/cigbutt/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
transform = turn(transform,rand(0,360))
|
||||
@@ -541,7 +541,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||
|
||||
set_light(2)
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
lit = 0
|
||||
icon_state = "[base_state]"
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
/obj/item/weapon/soap/New()
|
||||
..()
|
||||
/obj/item/weapon/soap/Initialize()
|
||||
. = ..()
|
||||
create_reagents(5)
|
||||
wet()
|
||||
|
||||
|
||||
/obj/item/weapon/soap/proc/wet()
|
||||
reagents.add_reagent("cleaner", 5)
|
||||
|
||||
|
||||
@@ -34,22 +34,20 @@
|
||||
spray_particles = 3
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
/obj/item/weapon/extinguisher/Initialize()
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
user << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
|
||||
return
|
||||
to_chat(user, text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume))
|
||||
|
||||
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
|
||||
safety = !safety
|
||||
src.icon_state = "[sprite_name][!safety]"
|
||||
src.desc = "The safety is [safety ? "on" : "off"]."
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
return
|
||||
icon_state = "[sprite_name][!safety]"
|
||||
desc = "The safety is [safety ? "on" : "off"]."
|
||||
to_chat(user, "The safety is [safety ? "on" : "off"].")
|
||||
|
||||
/obj/item/weapon/extinguisher/proc/propel_object(var/obj/O, mob/user, movementdirection)
|
||||
if(O.anchored) return
|
||||
|
||||
@@ -16,177 +16,177 @@
|
||||
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
var/affected_area = 3
|
||||
|
||||
New()
|
||||
create_reagents(1000)
|
||||
/obj/item/weapon/grenade/chem_grenade/Initialize()
|
||||
. = ..()
|
||||
create_reagents(1000)
|
||||
|
||||
Destroy()
|
||||
QDEL_NULL(detonator)
|
||||
QDEL_LIST_NULL(beakers)
|
||||
return ..()
|
||||
/obj/item/weapon/grenade/chem_grenade/Destroy()
|
||||
QDEL_NULL(detonator)
|
||||
QDEL_LIST_NULL(beakers)
|
||||
return ..()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!stage || stage==1)
|
||||
if(detonator)
|
||||
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user as mob)
|
||||
if(!stage || stage==1)
|
||||
if(detonator)
|
||||
// detonator.loc=src.loc
|
||||
detonator.detached()
|
||||
usr.put_in_hands(detonator)
|
||||
detonator=null
|
||||
det_time = null
|
||||
stage=0
|
||||
icon_state = initial(icon_state)
|
||||
else if(beakers.len)
|
||||
for(var/obj/B in beakers)
|
||||
if(istype(B))
|
||||
beakers -= B
|
||||
user.put_in_hands(B)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
if(stage > 1 && !active && clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You prime \the [name]!</span>")
|
||||
detonator.detached()
|
||||
usr.put_in_hands(detonator)
|
||||
detonator=null
|
||||
det_time = null
|
||||
stage=0
|
||||
icon_state = initial(icon_state)
|
||||
else if(beakers.len)
|
||||
for(var/obj/B in beakers)
|
||||
if(istype(B))
|
||||
beakers -= B
|
||||
user.put_in_hands(B)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
if(stage > 1 && !active && clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You prime \the [name]!</span>")
|
||||
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
|
||||
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
|
||||
var/obj/item/device/assembly_holder/det = W
|
||||
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
|
||||
to_chat(user, "<span class='warning'>Assembly must contain one igniter.</span>")
|
||||
return
|
||||
if(!det.secured)
|
||||
to_chat(user, "<span class='warning'>Assembly must be secured with screwdriver.</span>")
|
||||
return
|
||||
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
|
||||
var/obj/item/device/assembly_holder/det = W
|
||||
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
|
||||
to_chat(user, "<span class='warning'>Assembly must contain one igniter.</span>")
|
||||
return
|
||||
if(!det.secured)
|
||||
to_chat(user, "<span class='warning'>Assembly must be secured with screwdriver.</span>")
|
||||
return
|
||||
path = 1
|
||||
to_chat(user, "<span class='notice'>You add [W] to the metal casing.</span>")
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
if(istimer(detonator.a_left))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
else if(W.is_screwdriver() && path != 2)
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
to_chat(user, "<span class='notice'>You add [W] to the metal casing.</span>")
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
if(istimer(detonator.a_left))
|
||||
if(beakers.len)
|
||||
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
|
||||
name = "grenade"
|
||||
else
|
||||
// to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>")
|
||||
to_chat(user, "<span class='notice'>You lock the empty assembly.</span>")
|
||||
name = "fake grenade"
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else if(stage == 2)
|
||||
if(active && prob(95))
|
||||
to_chat(user, "<span class='warning'>You trigger the assembly!</span>")
|
||||
detonate()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
|
||||
playsound(src.loc, W.usesound, 50, -3)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
icon_state = initial(icon_state) + (detonator?"_ass":"")
|
||||
stage = 1
|
||||
active = 0
|
||||
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
|
||||
path = 1
|
||||
if(beakers.len == 2)
|
||||
to_chat(user, "<span class='warning'>The grenade can not hold more containers.</span>")
|
||||
return
|
||||
else
|
||||
if(W.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You add \the [W] to the assembly.</span>")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
beakers += W
|
||||
stage = 1
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
|
||||
..(user)
|
||||
if(detonator)
|
||||
to_chat(user, "With attached [detonator.name]")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob)
|
||||
if(active) return
|
||||
|
||||
if(detonator)
|
||||
if(!isigniter(detonator.a_left))
|
||||
detonator.a_left.activate()
|
||||
active = 1
|
||||
if(!isigniter(detonator.a_right))
|
||||
detonator.a_right.activate()
|
||||
active = 1
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
|
||||
if(user)
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src.name]")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/proc/primed(var/primed = 1)
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + (primed?"_primed":"_active")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/detonate()
|
||||
if(!stage || stage<2) return
|
||||
|
||||
var/has_reagents = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
if(G.reagents.total_volume) has_reagents = 1
|
||||
|
||||
active = 0
|
||||
if(!has_reagents)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
spawn(0) //Otherwise det_time is erroneously set to 0 after this
|
||||
if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
else if(W.is_screwdriver() && path != 2)
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
if(beakers.len)
|
||||
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
|
||||
name = "grenade"
|
||||
else
|
||||
// to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>")
|
||||
to_chat(user, "<span class='notice'>You lock the empty assembly.</span>")
|
||||
name = "fake grenade"
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else if(stage == 2)
|
||||
if(active && prob(95))
|
||||
to_chat(user, "<span class='warning'>You trigger the assembly!</span>")
|
||||
detonate()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
|
||||
playsound(src.loc, W.usesound, 50, -3)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
icon_state = initial(icon_state) + (detonator?"_ass":"")
|
||||
stage = 1
|
||||
active = 0
|
||||
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
|
||||
path = 1
|
||||
if(beakers.len == 2)
|
||||
to_chat(user, "<span class='warning'>The grenade can not hold more containers.</span>")
|
||||
return
|
||||
else
|
||||
if(W.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You add \the [W] to the assembly.</span>")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
beakers += W
|
||||
stage = 1
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
|
||||
examine(mob/user)
|
||||
..(user)
|
||||
if(detonator)
|
||||
to_chat(user, "With attached [detonator.name]")
|
||||
|
||||
activate(mob/user as mob)
|
||||
if(active) return
|
||||
|
||||
if(detonator)
|
||||
if(!isigniter(detonator.a_left))
|
||||
detonator.a_left.activate()
|
||||
active = 1
|
||||
if(!isigniter(detonator.a_right))
|
||||
detonator.a_right.activate()
|
||||
active = 1
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
|
||||
if(user)
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src.name]")
|
||||
|
||||
return
|
||||
|
||||
proc/primed(var/primed = 1)
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + (primed?"_primed":"_active")
|
||||
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
|
||||
|
||||
detonate()
|
||||
if(!stage || stage<2) return
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
|
||||
var/has_reagents = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
if(G.reagents.total_volume) has_reagents = 1
|
||||
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, get_turf(src))
|
||||
steam.attach(src)
|
||||
steam.start()
|
||||
|
||||
active = 0
|
||||
if(!has_reagents)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
spawn(0) //Otherwise det_time is erroneously set to 0 after this
|
||||
if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
return
|
||||
for(var/atom/A in view(affected_area, src.loc))
|
||||
if( A == src ) continue
|
||||
src.reagents.touch(A)
|
||||
|
||||
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
C.drop_from_inventory(src)
|
||||
C.throw_mode_off()
|
||||
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
|
||||
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, get_turf(src))
|
||||
steam.attach(src)
|
||||
steam.start()
|
||||
|
||||
for(var/atom/A in view(affected_area, src.loc))
|
||||
if( A == src ) continue
|
||||
src.reagents.touch(A)
|
||||
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
C.drop_from_inventory(src)
|
||||
C.throw_mode_off()
|
||||
|
||||
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
|
||||
spawn(50) //To make sure all reagents can work
|
||||
qdel(src) //correctly before deleting the grenade.
|
||||
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
|
||||
spawn(50) //To make sure all reagents can work
|
||||
qdel(src) //correctly before deleting the grenade.
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/large
|
||||
@@ -203,20 +203,20 @@
|
||||
path = 1
|
||||
stage = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/metalfoam/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("aluminum", 30)
|
||||
B2.reagents.add_reagent("foaming_agent", 10)
|
||||
B2.reagents.add_reagent("pacid", 10)
|
||||
B1.reagents.add_reagent("aluminum", 30)
|
||||
B2.reagents.add_reagent("foaming_agent", 10)
|
||||
B2.reagents.add_reagent("pacid", 10)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/incendiary
|
||||
name = "incendiary grenade"
|
||||
@@ -224,22 +224,22 @@
|
||||
path = 1
|
||||
stage = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/incendiary/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("aluminum", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B2.reagents.add_reagent("phoron", 15)
|
||||
B2.reagents.add_reagent("sacid", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B1.reagents.add_reagent("aluminum", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B2.reagents.add_reagent("phoron", 15)
|
||||
B2.reagents.add_reagent("sacid", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/antiweed
|
||||
name = "weedkiller grenade"
|
||||
@@ -247,21 +247,21 @@
|
||||
path = 1
|
||||
stage = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/antiweed/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("plantbgone", 25)
|
||||
B1.reagents.add_reagent("potassium", 25)
|
||||
B2.reagents.add_reagent("phosphorus", 25)
|
||||
B2.reagents.add_reagent("sugar", 25)
|
||||
B1.reagents.add_reagent("plantbgone", 25)
|
||||
B1.reagents.add_reagent("potassium", 25)
|
||||
B2.reagents.add_reagent("phosphorus", 25)
|
||||
B2.reagents.add_reagent("sugar", 25)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = "grenade"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = "grenade"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner
|
||||
name = "cleaner grenade"
|
||||
@@ -269,20 +269,20 @@
|
||||
stage = 2
|
||||
path = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("fluorosurfactant", 40)
|
||||
B2.reagents.add_reagent("water", 40)
|
||||
B2.reagents.add_reagent("cleaner", 10)
|
||||
B1.reagents.add_reagent("fluorosurfactant", 40)
|
||||
B2.reagents.add_reagent("water", 40)
|
||||
B2.reagents.add_reagent("cleaner", 10)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/teargas
|
||||
name = "tear gas grenade"
|
||||
@@ -290,19 +290,19 @@
|
||||
stage = 2
|
||||
path = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/teargas/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("phosphorus", 40)
|
||||
B1.reagents.add_reagent("potassium", 40)
|
||||
B1.reagents.add_reagent("condensedcapsaicin", 40)
|
||||
B2.reagents.add_reagent("sugar", 40)
|
||||
B2.reagents.add_reagent("condensedcapsaicin", 80)
|
||||
B1.reagents.add_reagent("phosphorus", 40)
|
||||
B1.reagents.add_reagent("potassium", 40)
|
||||
B1.reagents.add_reagent("condensedcapsaicin", 40)
|
||||
B2.reagents.add_reagent("sugar", 40)
|
||||
B2.reagents.add_reagent("condensedcapsaicin", 80)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
@@ -26,7 +26,6 @@
|
||||
new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
|
||||
to_chat(M, "<span class='danger'>BANG</span>") // Called during the loop that bangs people in lockers/containers and when banging
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
data["electronic_warfare"] = electronic_warfare
|
||||
data["entries"] = entries
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "agent_id_card.tmpl", "Fake ID", 600, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -185,7 +185,7 @@
|
||||
. = 1
|
||||
|
||||
// Always update the UI, or buttons will spin indefinitely
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/var/global/list/id_card_states
|
||||
/proc/id_card_states()
|
||||
|
||||
@@ -264,7 +264,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
data["maskConnected"] = 1
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel.
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/weapon/weldingtool/New()
|
||||
/obj/item/weapon/weldingtool/Initialize()
|
||||
. = ..()
|
||||
// var/random_fuel = min(rand(10,20),max_fuel)
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel)
|
||||
reagents = R
|
||||
@@ -158,12 +159,8 @@
|
||||
L.IgniteMob()
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/attack_self(mob/user as mob)
|
||||
setWelding(!welding, usr)
|
||||
return
|
||||
/obj/item/weapon/weldingtool/attack_self(mob/user)
|
||||
setWelding(!welding, user)
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
/obj/item/weapon/weldingtool/proc/get_fuel()
|
||||
@@ -603,7 +600,4 @@
|
||||
/obj/item/weapon/weldingtool/electric/mounted/cyborg
|
||||
toolspeed = 0.5
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
|
||||
/obj/item/weapon/weldingtool/attack_self(mob/user)
|
||||
setWelding(!welding, user)
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
@@ -9,7 +9,8 @@
|
||||
var/obj/item/weapon/nozzle = null //Attached welder, or other spray device.
|
||||
var/nozzle_attached = 0
|
||||
|
||||
/obj/item/weapon/weldpack/New()
|
||||
/obj/item/weapon/weldpack/Initialize()
|
||||
. = ..()
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel) //Lotsa refills
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
@@ -4,27 +4,27 @@
|
||||
icon = 'icons/misc/mark.dmi'
|
||||
icon_state = "rup"
|
||||
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
|
||||
var/drop_get_turf = TRUE
|
||||
|
||||
// creates a new object and deletes itself
|
||||
/obj/random/New()
|
||||
..()
|
||||
spawn()
|
||||
if(istype(src.loc, /obj/structure/loot_pile)) //Spawning from a lootpile is weird, need to wait until we're out of it to do our work.
|
||||
while(istype(src.loc, /obj/structure/loot_pile))
|
||||
sleep(1)
|
||||
if (!prob(spawn_nothing_percentage))
|
||||
spawn_item()
|
||||
qdel(src)
|
||||
/obj/random/Initialize()
|
||||
. = ..()
|
||||
if (!prob(spawn_nothing_percentage))
|
||||
spawn_item()
|
||||
qdel(src)
|
||||
|
||||
// this function should return a specific item to spawn
|
||||
/obj/random/proc/item_to_spawn()
|
||||
return 0
|
||||
|
||||
/obj/random/drop_location()
|
||||
return drop_get_turf? get_turf(src) : ..()
|
||||
|
||||
// creates the random item
|
||||
/obj/random/proc/spawn_item()
|
||||
var/build_path = item_to_spawn()
|
||||
|
||||
var/atom/A = new build_path(src.loc)
|
||||
var/atom/A = new build_path(drop_location())
|
||||
if(pixel_x || pixel_y)
|
||||
A.pixel_x = pixel_x
|
||||
A.pixel_y = pixel_y
|
||||
|
||||
@@ -102,7 +102,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
|
||||
data["signs"] = signs ? "[signs] sign\s" : null
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -39,11 +39,10 @@
|
||||
if(!isnull(rmaterialtype))
|
||||
reinf_material = get_material_by_name(rmaterialtype)
|
||||
update_material()
|
||||
|
||||
processing_turfs |= src
|
||||
START_PROCESSING(SSturfs, src)
|
||||
|
||||
/turf/simulated/wall/Destroy()
|
||||
processing_turfs -= src
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
dismantle_wall(null,null,1)
|
||||
..()
|
||||
|
||||
|
||||
@@ -107,7 +107,6 @@ var/gravity_is_on = 1
|
||||
|
||||
var/join_motd = null
|
||||
|
||||
var/datum/event_manager/event_manager = new() // Event Manager, the manager for events.
|
||||
var/datum/game_master/game_master = new() // Game Master, an AI for choosing events.
|
||||
var/datum/metric/metric = new() // Metric datum, used to keep track of the round.
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
usr << "This can only be done on mobs with clients"
|
||||
return
|
||||
|
||||
GLOB.nanomanager.send_resources(H.client)
|
||||
SSnanoui.send_resources(H.client)
|
||||
|
||||
usr << "Resource files sent"
|
||||
H << "Your NanoUI Resource files have been refreshed"
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
log_client_to_db()
|
||||
|
||||
send_resources()
|
||||
GLOB.nanomanager.send_resources(src)
|
||||
SSnanoui.send_resources(src)
|
||||
|
||||
if(!void)
|
||||
void = new()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/dropped()
|
||||
if(arscreen)
|
||||
GLOB.nanomanager.close_uis(src)
|
||||
SSnanoui.close_uis(src)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/emp_act(var/severity)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
@@ -610,7 +610,7 @@
|
||||
if(module_list.len)
|
||||
data["modules"] = module_list
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
data["bloodsamp_desc"] = (bloodsamp ? (bloodsamp.desc ? bloodsamp.desc : "No information on record.") : "")
|
||||
data["lidstate"] = closed
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "dnaforensics.tmpl", "QuikScan DNA Analyzer", 540, 326)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
possible_transfer_amounts = list(5,10)
|
||||
volume = 250
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/luminol/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/spray/luminol/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("luminol", 250)
|
||||
@@ -29,8 +29,8 @@
|
||||
var/on_fire = 0
|
||||
var/burn_time = 20 //if the rag burns for too long it turns to ashes
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/rag/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/glass/rag/Initialize()
|
||||
. = ..()
|
||||
update_name()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/rag/Destroy()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
O.loc = src
|
||||
held_card = O
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
attack_hand(user)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if (accounts.len > 0)
|
||||
data["accounts"] = accounts
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
|
||||
ui.set_initial_data(data)
|
||||
@@ -117,7 +117,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
|
||||
@@ -123,12 +123,12 @@
|
||||
end()
|
||||
|
||||
endedAt = world.time
|
||||
event_manager.active_events -= src
|
||||
event_manager.event_complete(src)
|
||||
SSevents.active_events -= src
|
||||
SSevents.event_complete(src)
|
||||
|
||||
/datum/event/New(var/datum/event_meta/EM)
|
||||
// event needs to be responsible for this, as stuff like APLUs currently make their own events for curious reasons
|
||||
event_manager.active_events += src
|
||||
SSevents.active_events += src
|
||||
|
||||
event_meta = EM
|
||||
severity = event_meta.severity
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/datum/event_manager
|
||||
//The UI portion. Should probably be made its own thing/made into a NanoUI thing later.
|
||||
/datum/controller/subsystem/events
|
||||
var/window_x = 700
|
||||
var/window_y = 600
|
||||
var/report_at_round_end = 0
|
||||
@@ -8,49 +9,7 @@
|
||||
var/row_options3 = " width='150px'"
|
||||
var/datum/event_container/selected_event_container = null
|
||||
|
||||
var/list/datum/event/active_events = list()
|
||||
var/list/datum/event/finished_events = list()
|
||||
|
||||
var/list/datum/event/allEvents
|
||||
var/list/datum/event_container/event_containers = list(
|
||||
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
|
||||
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
|
||||
EVENT_LEVEL_MAJOR = new/datum/event_container/major
|
||||
)
|
||||
|
||||
var/datum/event_meta/new_event = new
|
||||
|
||||
/datum/event_manager/New()
|
||||
allEvents = typesof(/datum/event) - /datum/event
|
||||
|
||||
/datum/event_manager/process()
|
||||
for(var/datum/event/E in event_manager.active_events)
|
||||
E.process()
|
||||
|
||||
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/list/datum/event_container/EC = event_containers[i]
|
||||
EC.process()
|
||||
|
||||
/datum/event_manager/proc/event_complete(var/datum/event/E)
|
||||
if(!E.event_meta || !E.severity) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
|
||||
log_debug("Event of '[E.type]' with missing meta-data has completed.")
|
||||
return
|
||||
|
||||
finished_events += E
|
||||
|
||||
// Add the event back to the list of available events
|
||||
var/datum/event_container/EC = event_containers[E.severity]
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.add_to_queue)
|
||||
EC.available_events += EM
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2stationtime(world.time)].")
|
||||
|
||||
/datum/event_manager/proc/delay_events(var/severity, var/delay)
|
||||
var/list/datum/event_container/EC = event_containers[severity]
|
||||
EC.next_event_time += delay
|
||||
|
||||
/datum/event_manager/proc/Interact(var/mob/living/user)
|
||||
/datum/controller/subsystem/events/proc/Interact(var/mob/living/user)
|
||||
|
||||
var/html = GetInteractWindow()
|
||||
|
||||
@@ -58,27 +17,7 @@
|
||||
popup.set_content(html)
|
||||
popup.open()
|
||||
|
||||
/datum/event_manager/proc/RoundEnd()
|
||||
if(!report_at_round_end)
|
||||
return
|
||||
|
||||
world << "<br><br><br><font size=3><b>Random Events This Round:</b></font>"
|
||||
for(var/datum/event/E in active_events|finished_events)
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.name == "Nothing")
|
||||
continue
|
||||
var/message = "'[EM.name]' began at [worldtime2stationtime(E.startedAt)] "
|
||||
if(E.isRunning)
|
||||
message += "and is still running."
|
||||
else
|
||||
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
|
||||
message += "and ended at [worldtime2stationtime(E.endedAt)]."
|
||||
else
|
||||
message += "and ran to completion."
|
||||
|
||||
world << message
|
||||
|
||||
/datum/event_manager/proc/GetInteractWindow()
|
||||
/datum/controller/subsystem/events/proc/GetInteractWindow()
|
||||
var/html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];pause_all=[!config.allow_random_events]'>Pause All - [config.allow_random_events ? "Pause" : "Resume"]</A>"
|
||||
|
||||
@@ -187,11 +126,10 @@
|
||||
|
||||
return html
|
||||
|
||||
/datum/event_manager/Topic(href, href_list)
|
||||
/datum/controller/subsystem/events/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["toggle_report"])
|
||||
report_at_round_end = !report_at_round_end
|
||||
log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.")
|
||||
@@ -284,7 +222,7 @@
|
||||
|
||||
Interact(usr)
|
||||
|
||||
/client/proc/forceEvent(var/type in event_manager.allEvents)
|
||||
/client/proc/forceEvent(var/type in SSevents.allEvents)
|
||||
set name = "Trigger Event (Debug Only)"
|
||||
set category = "Debug"
|
||||
|
||||
@@ -298,7 +236,5 @@
|
||||
/client/proc/event_manager_panel()
|
||||
set name = "Event Manager Panel"
|
||||
set category = "Admin"
|
||||
if(event_manager)
|
||||
event_manager.Interact(usr)
|
||||
SSevents.Interact(usr)
|
||||
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
var/list/medicineReagents = list()
|
||||
for(var/path in typesof(/datum/chemical_reaction) - /datum/chemical_reaction)
|
||||
var/datum/chemical_reaction/CR = path // Stupid casting required for reading
|
||||
var/datum/reagent/R = chemical_reagents_list[initial(CR.result)]
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[initial(CR.result)]
|
||||
if(R && R.scannable)
|
||||
medicineReagents += R
|
||||
for(var/i in 1 to differentTypes)
|
||||
@@ -298,7 +298,7 @@
|
||||
var/list/drinkReagents = list()
|
||||
for(var/path in typesof(/datum/chemical_reaction) - /datum/chemical_reaction)
|
||||
var/datum/chemical_reaction/CR = path // Stupid casting required for reading
|
||||
var/datum/reagent/R = chemical_reagents_list[initial(CR.result)]
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[initial(CR.result)]
|
||||
if(istype(R, /datum/reagent/drink) || istype(R, /datum/reagent/ethanol))
|
||||
drinkReagents += R
|
||||
for(var/i in 1 to differentTypes)
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
var/list/center_of_mass = list() // Used for table placement
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/Initialize()
|
||||
. = ..()
|
||||
if (center_of_mass.len && !pixel_x && !pixel_y)
|
||||
src.pixel_x = rand(-6.0, 6) //Randomizes postion
|
||||
src.pixel_y = rand(-6.0, 6)
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
icon_state = "cola"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/cola/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/cola/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("cola", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle
|
||||
@@ -21,8 +21,8 @@
|
||||
icon_state = "waterbottle"
|
||||
center_of_mass = list("x"=15, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("water", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind
|
||||
@@ -41,8 +41,8 @@
|
||||
icon_state = "thirteen_loko"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("thirteenloko", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb
|
||||
@@ -61,8 +61,8 @@
|
||||
icon_state = "starkist"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/starkist/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/starkist/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("brownstar", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_up
|
||||
@@ -111,8 +111,8 @@
|
||||
icon_state = "tonic"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/tonic/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/tonic/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("tonic", 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/sodawater
|
||||
@@ -121,8 +121,8 @@
|
||||
icon_state = "sodawater"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/sodawater/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/sodawater/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("sodawater", 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/gingerale
|
||||
@@ -131,6 +131,6 @@
|
||||
icon_state = "gingerale"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/gingerale/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/gingerale/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("gingerale", 30)
|
||||
@@ -118,12 +118,12 @@
|
||||
desc = "Used in cooking various dishes."
|
||||
icon_state = "enzyme"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/enzyme/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/condiment/enzyme/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("enzyme", 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/sugar/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/condiment/sugar/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("sugar", 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small
|
||||
@@ -140,8 +140,8 @@
|
||||
desc = "Salt. From space oceans, presumably."
|
||||
icon_state = "saltshakersmall"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("sodiumchloride", 20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/peppermill
|
||||
@@ -149,8 +149,8 @@
|
||||
desc = "Often used to flavor food or make people sneeze."
|
||||
icon_state = "peppermillsmall"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/peppermill/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/peppermill/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("blackpepper", 20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/sugar
|
||||
@@ -158,8 +158,8 @@
|
||||
desc = "Sweetness in a bottle"
|
||||
icon_state = "sugarsmall"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/sugar/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/sugar/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("sugar", 20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour
|
||||
@@ -171,8 +171,8 @@
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour/on_reagent_change()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("flour", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
@@ -117,8 +117,8 @@
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/milk/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/milk/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("milk", 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soymilk
|
||||
@@ -127,8 +127,8 @@
|
||||
icon_state = "soymilk"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soymilk/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soymilk/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("soymilk", 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/smallmilk
|
||||
@@ -138,8 +138,8 @@
|
||||
icon_state = "mini-milk"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/smallmilk/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/smallmilk/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("milk", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk
|
||||
@@ -149,8 +149,8 @@
|
||||
icon_state = "mini-milk_choco"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("chocolate_milk", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/coffee
|
||||
@@ -158,8 +158,8 @@
|
||||
desc = "Careful, the beverage you're about to enjoy is extremely hot."
|
||||
icon_state = "coffee"
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/coffee/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/coffee/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("coffee", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/tea
|
||||
@@ -169,8 +169,8 @@
|
||||
item_state = "coffee"
|
||||
center_of_mass = list("x"=16, "y"=14)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/tea/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/tea/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("tea", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ice
|
||||
@@ -178,8 +178,8 @@
|
||||
desc = "Careful, cold ice, do not chew."
|
||||
icon_state = "coffee"
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ice/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ice/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("ice", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/h_chocolate
|
||||
@@ -210,8 +210,8 @@
|
||||
volume = 10
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/sillycup/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/sillycup/Initialize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/sillycup/on_reagent_change()
|
||||
..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user