[READY]Makes a bunch of processes subsystems instead

This commit is contained in:
kevinz000
2019-01-15 22:58:06 -08:00
committed by Novacat
parent b717399d21
commit 6415e4193f
173 changed files with 5478 additions and 1053 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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")

View File

@@ -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)

View 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)

View 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()

View 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

View File

@@ -0,0 +1,3 @@
PROCESSING_SUBSYSTEM_DEF(turfs)
name = "Turf Processing"
wait = 20

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -524,7 +524,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

View File

@@ -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

View File

@@ -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)

View File

@@ -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()

View File

@@ -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()

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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))

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)
@@ -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))

View File

@@ -15,8 +15,8 @@
/*
* Soap
*/
/obj/item/weapon/soap/New()
..()
/obj/item/weapon/soap/Initialize()
. = ..()
create_reagents(5)
wet()

View File

@@ -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

View File

@@ -16,15 +16,23 @@
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
var/affected_area = 3
New()
/obj/item/weapon/grenade/chem_grenade/Initialize()
. = ..()
create_reagents(1000)
<<<<<<< HEAD
Destroy()
QDEL_NULL(detonator)
QDEL_LIST_NULL(beakers)
return ..()
=======
/obj/item/weapon/grenade/chem_grenade/Destroy()
QDEL_NULL(detonator)
QDEL_LIST_NULL(beakers)
return ..()
>>>>>>> 46c79c7... [READY]Makes a bunch of processes subsystems instead (#5814
attack_self(mob/user as mob)
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user as mob)
if(!stage || stage==1)
if(detonator)
// detonator.loc=src.loc
@@ -51,8 +59,7 @@
var/mob/living/carbon/C = user
C.throw_mode_on()
attackby(obj/item/weapon/W as obj, mob/user as mob)
/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)))
@@ -117,12 +124,12 @@
else
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
examine(mob/user)
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
..(user)
if(detonator)
to_chat(user, "With attached [detonator.name]")
activate(mob/user as mob)
/obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob)
if(active) return
if(detonator)
@@ -140,11 +147,11 @@
return
proc/primed(var/primed = 1)
/obj/item/weapon/grenade/chem_grenade/proc/primed(var/primed = 1)
if(active)
icon_state = initial(icon_state) + (primed?"_primed":"_active")
detonate()
/obj/item/weapon/grenade/chem_grenade/detonate()
if(!stage || stage<2) return
var/has_reagents = 0
@@ -203,8 +210,8 @@
path = 1
stage = 2
New()
..()
/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)
@@ -224,8 +231,8 @@
path = 1
stage = 2
New()
..()
/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)
@@ -247,8 +254,8 @@
path = 1
stage = 2
New()
..()
/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)
@@ -269,8 +276,8 @@
stage = 2
path = 1
New()
..()
/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)
@@ -290,8 +297,8 @@
stage = 2
path = 1
New()
..()
/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)

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
#define WELDER_FUEL_BURN_INTERVAL 13
/*
* Welding Tool
@@ -47,12 +48,12 @@
R.add_reagent("fuel", max_fuel)
update_icon()
if(always_process)
START_PROCESSING(SSobj, src)
processing_objects |= src
..()
/obj/item/weapon/weldingtool/Destroy()
if(welding || always_process)
STOP_PROCESSING(SSobj, src)
processing_objects -= src
return ..()
/obj/item/weapon/weldingtool/examine(mob/user)
@@ -60,7 +61,7 @@
if(max_fuel)
to_chat(user, text("\icon[] The [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel ))
/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone)
/obj/item/weapon/weldingtool/attack(var/atom/A, var/mob/living/user, var/def_zone)
if(ishuman(A) && user.a_intent == I_HELP)
var/mob/living/carbon/human/H = A
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
@@ -115,13 +116,18 @@
..()
return
/obj/item/weapon/weldingtool/process()
if(welding)
++burned_fuel_for
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
remove_fuel(1)
if(get_fuel() < 1)
setWelding(0)
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
var/turf/location = src.loc
@@ -132,6 +138,7 @@
if (istype(location, /turf))
location.hotspot_expose(700, 5)
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1)
@@ -192,7 +199,7 @@
//Returns whether or not the welding tool is currently on.
/obj/item/weapon/weldingtool/proc/isOn()
return welding
return src.welding
/obj/item/weapon/weldingtool/update_icon()
..()
@@ -208,7 +215,7 @@
// Fuel counter overlay.
if(change_icons && get_max_fuel())
var/ratio = get_fuel() / get_max_fuel()
ratio = CEILING(ratio * 4, 1) * 25
ratio = Ceiling(ratio*4) * 25
var/image/I = image(icon, src, "[icon_state][ratio]")
overlays.Add(I)
@@ -277,7 +284,7 @@
welding = 1
update_icon()
if(!always_process)
START_PROCESSING(SSobj, src)
processing_objects |= src
else
if(M)
var/msg = max_fuel ? "welding fuel" : "charge"
@@ -286,7 +293,7 @@
//Otherwise
else if(!set_welding && welding)
if(!always_process)
STOP_PROCESSING(SSobj, src)
processing_objects -= src
if(M)
to_chat(M, "<span class='notice'>You switch \the [src] off.</span>")
else if(T)
@@ -604,6 +611,611 @@
toolspeed = 0.5
#undef WELDER_FUEL_BURN_INTERVAL
=======
#define WELDER_FUEL_BURN_INTERVAL 13
/*
* Welding Tool
*/
/obj/item/weapon/weldingtool
name = "\improper welding tool"
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
//Amount of OUCH when it's thrown
force = 3.0
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = ITEMSIZE_SMALL
//Cost to make in the autolathe
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30)
//R&D tech level
origin_tech = list(TECH_ENGINEERING = 1)
//Welding tool specific stuff
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
usesound = 'sound/items/Welder2.ogg'
var/change_icons = TRUE
var/flame_intensity = 2 //how powerful the emitted light is when used.
var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color.
var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect.
var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG.
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/Initialize()
. = ..()
// var/random_fuel = min(rand(10,20),max_fuel)
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
R.add_reagent("fuel", max_fuel)
update_icon()
if(always_process)
processing_objects |= src
..()
/obj/item/weapon/weldingtool/Destroy()
if(welding || always_process)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/weldingtool/examine(mob/user)
if(..(user, 0))
if(max_fuel)
to_chat(user, text("\icon[] The [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel ))
/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone)
if(ishuman(A) && user.a_intent == I_HELP)
var/mob/living/carbon/human/H = A
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
return ..()
if(!welding)
to_chat(user, "<span class='warning'>You'll need to turn [src] on to patch the damage on [H]'s [S.name]!</span>")
return 1
if(S.robo_repair(15, BRUTE, "some dents", src, user))
remove_fuel(1, user)
return 1
return ..()
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W,/obj/item/weapon/tool/screwdriver))
if(welding)
to_chat(user, "<span class='danger'>Stop welding first!</span>")
return
status = !status
if(status)
to_chat(user, "<span class='notice'>You secure the welder.</span>")
else
to_chat(user, "<span class='notice'>The welder can now be attached and modified.</span>")
src.add_fingerprint(user)
return
if((!status) && (istype(W,/obj/item/stack/rods)))
var/obj/item/stack/rods/R = W
R.use(1)
var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc)
src.loc = F
F.weldtool = src
if (user.client)
user.client.screen -= src
if (user.r_hand == src)
user.remove_from_mob(src)
else
user.remove_from_mob(src)
src.master = F
src.layer = initial(src.layer)
user.remove_from_mob(src)
if (user.client)
user.client.screen -= src
src.loc = F
src.add_fingerprint(user)
return
..()
return
/obj/item/weapon/weldingtool/process()
if(welding)
++burned_fuel_for
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
remove_fuel(1)
if(get_fuel() < 1)
setWelding(0)
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
var/turf/location = src.loc
if(istype(location, /mob/living))
var/mob/living/M = location
if(M.item_is_in_hands(src))
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1)
if(!welding && max_fuel)
O.reagents.trans_to_obj(src, max_fuel)
to_chat(user, "<span class='notice'>Welder refueled</span>")
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
return
else if(!welding)
to_chat(user, "<span class='notice'>[src] doesn't use fuel.</span>")
return
else
message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.")
log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.")
to_chat(user, "<span class='danger'>You begin welding on the fueltank and with a moment of lucidity you realize, this might not have been the smartest thing you've ever done.</span>")
var/obj/structure/reagent_dispensers/fueltank/tank = O
tank.explode()
return
if (src.welding)
remove_fuel(1)
var/turf/location = get_turf(user)
if(isliving(O))
var/mob/living/L = O
L.IgniteMob()
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
/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()
return reagents.get_reagent_amount("fuel")
/obj/item/weapon/weldingtool/proc/get_max_fuel()
return max_fuel
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(amount)
burned_fuel_for = 0 // Reset the counter since we're removing fuel.
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
if(M)
eyecheck(M)
update_icon()
return 1
else
if(M)
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
update_icon()
return 0
//Returns whether or not the welding tool is currently on.
/obj/item/weapon/weldingtool/proc/isOn()
return welding
/obj/item/weapon/weldingtool/update_icon()
..()
overlays.Cut()
// Welding overlay.
if(welding)
var/image/I = image(icon, src, "[icon_state]-on")
overlays.Add(I)
item_state = "[initial(item_state)]1"
else
item_state = initial(item_state)
// Fuel counter overlay.
if(change_icons && get_max_fuel())
var/ratio = get_fuel() / get_max_fuel()
ratio = CEILING(ratio * 4, 1) * 25
var/image/I = image(icon, src, "[icon_state][ratio]")
overlays.Add(I)
// Lights
if(welding && flame_intensity)
set_light(flame_intensity, flame_intensity, flame_color)
else
set_light(0)
// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]"
var/mob/M = loc
if(istype(M))
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/weapon/weldingtool/MouseDrop(obj/over_object as obj)
if(!canremove)
return
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
return
if (!( istype(over_object, /obj/screen) ))
return ..()
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this.
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
if (( usr.restrained() ) || ( usr.stat ))
return
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.u_equip(src)
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1)
//so that the welding tool updates accordingly
/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M)
if(!status) return
var/turf/T = get_turf(src)
//If we're turning it on
if(set_welding && !welding)
if (get_fuel() > 0)
if(M)
to_chat(M, "<span class='notice'>You switch the [src] on.</span>")
else if(T)
T.visible_message("<span class='danger'>\The [src] turns on.</span>")
playsound(loc, acti_sound, 50, 1)
src.force = 15
src.damtype = "fire"
src.w_class = ITEMSIZE_LARGE
src.hitsound = 'sound/items/welder.ogg'
welding = 1
update_icon()
if(!always_process)
START_PROCESSING(SSobj, src)
else
if(M)
var/msg = max_fuel ? "welding fuel" : "charge"
to_chat(M, "<span class='notice'>You need more [msg] to complete this task.</span>")
return
//Otherwise
else if(!set_welding && welding)
if(!always_process)
STOP_PROCESSING(SSobj, src)
if(M)
to_chat(M, "<span class='notice'>You switch \the [src] off.</span>")
else if(T)
T.visible_message("<span class='warning'>\The [src] turns off.</span>")
playsound(loc, deac_sound, 50, 1)
src.force = 3
src.damtype = "brute"
src.w_class = initial(src.w_class)
src.welding = 0
src.hitsound = initial(src.hitsound)
update_icon()
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
//Note: This should probably be moved to mob
/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user)
if(!istype(user))
return 1
var/safety = user.eyecheck()
safety = between(-1, safety + eye_safety_modifier, 2)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if(!E)
return
switch(safety)
if(1)
to_chat(usr, "<span class='warning'>Your eyes sting a little.</span>")
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
to_chat(usr, "<span class='warning'>Your eyes burn.</span>")
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
to_chat(usr, "<span class='danger'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>")
user.eye_blurry += rand(12,20)
E.damage += rand(12, 16)
if(safety<2)
if(E.damage > 10)
to_chat(user, "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>")
if (E.damage >= E.min_broken_damage)
to_chat(user, "<span class='danger'>You go blind!</span>")
user.sdisabilities |= BLIND
else if (E.damage >= E.min_bruised_damage)
to_chat(user, "<span class='danger'>You go blind!</span>")
user.Blind(5)
user.eye_blurry = 5
user.disabilities |= NEARSIGHTED
spawn(100)
user.disabilities &= ~NEARSIGHTED
return
/obj/item/weapon/weldingtool/is_hot()
return isOn()
/obj/item/weapon/weldingtool/largetank
name = "industrial welding tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60)
/obj/item/weapon/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weapon/weldingtool/hugetank
name = "upgraded welding tool"
desc = "A much larger welder with a huge tank."
icon_state = "indwelder"
max_fuel = 80
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
/obj/item/weapon/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = ITEMSIZE_SMALL
matter = list(MAT_METAL = 30, MAT_GLASS = 10)
change_icons = 0
toolspeed = 2
eye_safety_modifier = 1 // Safer on eyes.
/obj/item/weapon/weldingtool/alien
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
toolspeed = 0.1
flame_color = "#6699FF" // Light bluish.
eye_safety_modifier = 2
change_icons = 0
origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5)
always_process = TRUE
/obj/item/weapon/weldingtool/alien/process()
if(get_fuel() <= get_max_fuel())
reagents.add_reagent("fuel", 1)
..()
/obj/item/weapon/weldingtool/experimental
name = "experimental welding tool"
desc = "An experimental welder capable of synthesizing its own fuel from waste compounds. It can output a flame hotter than regular welders."
icon_state = "exwelder"
max_fuel = 40
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
toolspeed = 0.5
change_icons = 0
flame_intensity = 3
always_process = TRUE
var/nextrefueltick = 0
/obj/item/weapon/weldingtool/experimental/process()
..()
if(get_fuel() < get_max_fuel() && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
/*
* Backpack Welder.
*/
/obj/item/weapon/weldingtool/tubefed
name = "tube-fed welding tool"
desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank."
icon_state = "tubewelder"
max_fuel = 10
w_class = ITEMSIZE_NO_CONTAINER
matter = null
toolspeed = 1.25
change_icons = 0
flame_intensity = 1
eye_safety_modifier = 1
always_process = TRUE
var/obj/item/weapon/weldpack/mounted_pack = null
/obj/item/weapon/weldingtool/tubefed/New(location)
..()
if(istype(location, /obj/item/weapon/weldpack))
var/obj/item/weapon/weldpack/holder = location
mounted_pack = holder
else
qdel(src)
/obj/item/weapon/weldingtool/tubefed/Destroy()
mounted_pack.nozzle = null
mounted_pack = null
return ..()
/obj/item/weapon/weldingtool/tubefed/process()
if(mounted_pack)
if(!istype(mounted_pack.loc,/mob/living/carbon/human))
mounted_pack.return_nozzle()
else
var/mob/living/carbon/human/H = mounted_pack.loc
if(H.back != mounted_pack)
mounted_pack.return_nozzle()
if(mounted_pack.loc != src.loc && src.loc != mounted_pack)
mounted_pack.return_nozzle()
visible_message("<span class='notice'>\The [src] retracts to its fueltank.</span>")
if(get_fuel() <= get_max_fuel())
mounted_pack.reagents.trans_to_obj(src, 1)
..()
/obj/item/weapon/weldingtool/tubefed/dropped(mob/user)
..()
if(src.loc != user)
mounted_pack.return_nozzle()
to_chat(user, "<span class='notice'>\The [src] retracts to its fueltank.</span>")
/*
* Electric/Arc Welder
*/
/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC
name = "electric welding tool"
desc = "A welder which runs off of electricity."
icon_state = "arcwelder"
max_fuel = 0 //We'll handle the consumption later.
item_state = "ewelder"
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery
var/cell_type = /obj/item/weapon/cell/device
var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1
flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames.
acti_sound = 'sound/effects/sparks4.ogg'
deac_sound = 'sound/effects/sparks4.ogg'
/obj/item/weapon/weldingtool/electric/unloaded/New()
cell_type = null
/obj/item/weapon/weldingtool/electric/New()
..()
if(cell_type == null)
update_icon()
else if(cell_type)
power_supply = new cell_type(src)
else
power_supply = new /obj/item/weapon/cell/device(src)
update_icon()
/obj/item/weapon/weldingtool/electric/get_cell()
return power_supply
/obj/item/weapon/weldingtool/electric/examine(mob/user)
if(get_dist(src, user) > 1)
to_chat(user, desc)
else // The << need to stay, for some reason
if(power_supply)
user << text("\icon[] The [] has [] charge left.", src, src.name, get_fuel())
else
user << text("\icon[] The [] has no power cell!", src, src.name)
/obj/item/weapon/weldingtool/electric/get_fuel()
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(external)
return external.charge
else if(power_supply)
return power_supply.charge
else
return 0
/obj/item/weapon/weldingtool/electric/get_max_fuel()
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(external)
return external.maxcharge
else if(power_supply)
return power_supply.maxcharge
return 0
/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(get_fuel() >= amount)
power_supply.checked_use(charge_cost)
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(!external || !external.use(charge_cost)) //Take power from the borg...
power_supply.give(charge_cost) //Give it back to the cell.
if(M)
eyecheck(M)
update_icon()
return 1
else
if(M)
to_chat(M, "<span class='notice'>You need more energy to complete this task.</span>")
update_icon()
return 0
/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
if(power_supply)
power_supply.update_icon()
user.put_in_hands(power_supply)
power_supply = null
to_chat(user, "<span class='notice'>You remove the cell from the [src].</span>")
setWelding(0)
update_icon()
return
..()
else
return ..()
/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/cell))
if(istype(W, /obj/item/weapon/cell/device))
if(!power_supply)
user.drop_item()
W.loc = src
power_supply = W
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else
to_chat(user, "<span class='notice'>\The [src] already has a cell.</span>")
else
to_chat(user, "<span class='notice'>\The [src] cannot use that type of cell.</span>")
else
..()
/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply()
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return R.cell
if(istype(src.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit))
return suit.cell
return null
/obj/item/weapon/weldingtool/electric/mounted
use_external_power = 1
/obj/item/weapon/weldingtool/electric/mounted/cyborg
toolspeed = 0.5
#undef WELDER_FUEL_BURN_INTERVAL
>>>>>>> 46c79c7... [READY]Makes a bunch of processes subsystems instead (#5814
/obj/item/weapon/weldingtool/attack_self(mob/user)
setWelding(!welding, user)
START_PROCESSING(SSobj, src)

View File

@@ -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

View File

@@ -4,14 +4,11 @@
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)
/obj/random/Initialize()
. = ..()
if (!prob(spawn_nothing_percentage))
spawn_item()
qdel(src)
@@ -20,11 +17,14 @@
/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

View File

@@ -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)

View File

@@ -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)
..()

View File

@@ -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.

View File

@@ -474,7 +474,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"

View File

@@ -152,7 +152,7 @@
log_client_to_db()
send_resources()
GLOB.nanomanager.send_resources(src)
SSnanoui.send_resources(src)
if(!void)
void = new()

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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"])

View File

@@ -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

View File

@@ -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,6 +9,7 @@
var/row_options3 = " width='150px'"
var/datum/event_container/selected_event_container = null
<<<<<<< HEAD
var/list/datum/event/active_events = list()
var/list/datum/event/finished_events = list()
@@ -51,6 +53,9 @@
EC.next_event_time += delay
/datum/event_manager/proc/Interact(var/mob/living/user)
=======
/datum/controller/subsystem/events/proc/Interact(var/mob/living/user)
>>>>>>> 46c79c7... [READY]Makes a bunch of processes subsystems instead (#5814
var/html = GetInteractWindow()
@@ -58,27 +63,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 +172,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 +268,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 +282,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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()
..()

View File

@@ -14,8 +14,8 @@
var/rag_underlay = "rag"
on_reagent_change() return // To suppress price updating. Bottles have their own price tags.
/obj/item/weapon/reagent_containers/food/drinks/bottle/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/Initialize()
. = ..()
if(isGlass) unacidable = 1
/obj/item/weapon/reagent_containers/food/drinks/bottle/Destroy()
@@ -193,8 +193,8 @@
icon_state = "ginbottle"
center_of_mass = list("x"=16, "y"=4)
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin/Initialize()
. = ..()
reagents.add_reagent("gin", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey
@@ -203,8 +203,8 @@
icon_state = "whiskeybottle"
center_of_mass = list("x"=16, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey/Initialize()
. = ..()
reagents.add_reagent("whiskey", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey
@@ -213,8 +213,8 @@
icon_state = "whiskeybottle2"
center_of_mass = list("x"=16, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey/Initialize()
. = ..()
reagents.add_reagent("specialwhiskey", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka
@@ -223,8 +223,8 @@
icon_state = "vodkabottle"
center_of_mass = list("x"=17, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/Initialize()
. = ..()
reagents.add_reagent("vodka", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla
@@ -233,8 +233,8 @@
icon_state = "tequillabottle"
center_of_mass = list("x"=16, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla/Initialize()
. = ..()
reagents.add_reagent("tequilla", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing
@@ -243,8 +243,8 @@
icon_state = "bottleofnothing"
center_of_mass = list("x"=17, "y"=5)
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing/Initialize()
. = ..()
reagents.add_reagent("nothing", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron
@@ -253,8 +253,8 @@
icon_state = "patronbottle"
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron/Initialize()
. = ..()
reagents.add_reagent("patron", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum
@@ -263,8 +263,8 @@
icon_state = "rumbottle"
center_of_mass = list("x"=16, "y"=8)
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum/Initialize()
. = ..()
reagents.add_reagent("rum", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater
@@ -273,8 +273,8 @@
icon_state = "holyflask"
center_of_mass = list("x"=17, "y"=10)
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater/Initialize()
. = ..()
reagents.add_reagent("holywater", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth
@@ -283,8 +283,8 @@
icon_state = "vermouthbottle"
center_of_mass = list("x"=17, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth/Initialize()
. = ..()
reagents.add_reagent("vermouth", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua
@@ -293,8 +293,8 @@
icon_state = "kahluabottle"
center_of_mass = list("x"=17, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua/Initialize()
. = ..()
reagents.add_reagent("kahlua", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager
@@ -303,8 +303,8 @@
icon_state = "goldschlagerbottle"
center_of_mass = list("x"=15, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager/Initialize()
. = ..()
reagents.add_reagent("goldschlager", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac
@@ -313,8 +313,8 @@
icon_state = "cognacbottle"
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac/Initialize()
. = ..()
reagents.add_reagent("cognac", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine
@@ -323,8 +323,8 @@
icon_state = "winebottle"
center_of_mass = list("x"=16, "y"=4)
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine/Initialize()
. = ..()
reagents.add_reagent("wine", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe
@@ -333,8 +333,8 @@
icon_state = "absinthebottle"
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe/Initialize()
. = ..()
reagents.add_reagent("absinthe", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor
@@ -343,8 +343,8 @@
icon_state = "alco-green" //Placeholder.
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor/Initialize()
. = ..()
reagents.add_reagent("melonliquor", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao
@@ -353,8 +353,8 @@
icon_state = "alco-blue" //Placeholder.
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao/Initialize()
. = ..()
reagents.add_reagent("bluecuracao", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine
@@ -363,8 +363,8 @@
icon_state = "grenadinebottle"
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine/Initialize()
. = ..()
reagents.add_reagent("grenadine", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cola
@@ -373,8 +373,8 @@
icon_state = "colabottle"
center_of_mass = list("x"=16, "y"=6)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cola/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/cola/Initialize()
. = ..()
reagents.add_reagent("cola", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up
@@ -403,8 +403,8 @@
icon_state = "pwinebottle"
center_of_mass = list("x"=16, "y"=4)
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine/Initialize()
. = ..()
reagents.add_reagent("pwine", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew
@@ -413,8 +413,8 @@
icon_state = "redeemersbrew"
center_of_mass = list("x"=16, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew/Initialize()
. = ..()
reagents.add_reagent("unathiliquor", 100)
//////////////////////////JUICES AND STUFF ///////////////////////
@@ -427,8 +427,8 @@
center_of_mass = list("x"=16, "y"=7)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice/Initialize()
. = ..()
reagents.add_reagent("orangejuice", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice
@@ -439,8 +439,8 @@
center_of_mass = list("x"=16, "y"=7)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice/Initialize()
. = ..()
reagents.add_reagent("applejuice", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/milk
@@ -451,8 +451,8 @@
center_of_mass = list("x"=16, "y"=9)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/milk/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/milk/Initialize()
. = ..()
reagents.add_reagent("milk", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream
@@ -463,8 +463,8 @@
center_of_mass = list("x"=16, "y"=8)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream/Initialize()
. = ..()
reagents.add_reagent("cream", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice
@@ -475,8 +475,8 @@
center_of_mass = list("x"=16, "y"=8)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice/Initialize()
. = ..()
reagents.add_reagent("tomatojuice", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice
@@ -487,8 +487,8 @@
center_of_mass = list("x"=16, "y"=8)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice/Initialize()
. = ..()
reagents.add_reagent("limejuice", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice
@@ -499,8 +499,8 @@
center_of_mass = list("x"=16, "y"=8)
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice/Initialize()
. = ..()
reagents.add_reagent("lemonjuice", 100)
//Small bottles
@@ -516,8 +516,8 @@
icon_state = "beer"
center_of_mass = list("x"=16, "y"=12)
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer/Initialize()
. = ..()
reagents.add_reagent("beer", 30)
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale
@@ -527,8 +527,8 @@
item_state = "beer"
center_of_mass = list("x"=16, "y"=10)
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale/Initialize()
. = ..()
reagents.add_reagent("ale", 30)
/obj/item/weapon/reagent_containers/food/drinks/bottle/sake
@@ -537,8 +537,8 @@
icon_state = "sakebottle"
center_of_mass = list("x"=16, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/sake/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/sake/Initialize()
. = ..()
reagents.add_reagent("sake", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne
@@ -546,6 +546,6 @@
desc = "For those special occassions."
icon_state = "champagne"
/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne/Initialize()
. = ..()
reagents.add_reagent("champagne", 100)

View File

@@ -141,8 +141,8 @@
volume = 100
matter = list("plastic" = 2000)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/Initialize()
. = ..()
icon_state = pick("fitness-cup_black", "fitness-cup_red", "fitness-cup_black")
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/on_reagent_change()
@@ -169,8 +169,8 @@
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake
name = "protein shake"
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake/New()
..()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake/Initialize()
. = ..()
reagents.add_reagent("nutriment", 30)
reagents.add_reagent("iron", 10)
reagents.add_reagent("protein", 15)

File diff suppressed because it is too large Load Diff

View File

@@ -6,8 +6,8 @@
filling_color = "#FF1C1C"
center_of_mass = list("x"=16, "y"=14)
/obj/item/weapon/reagent_containers/food/snacks/meat/New()
..()
/obj/item/weapon/reagent_containers/food/snacks/meat/Initialize()
. = ..()
reagents.add_reagent("protein", 9)
src.bitesize = 3

View File

@@ -27,8 +27,8 @@
..()
update_icon()
/obj/item/weapon/reagent_containers/glass/bottle/New()
..()
/obj/item/weapon/reagent_containers/glass/bottle/Initialize()
. = ..()
if(!icon_state)
icon_state = "bottle-[rand(1,4)]"

Some files were not shown because too many files have changed in this diff Show More