mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +01:00
Merge branch 'master' into mobpathfix
This commit is contained in:
@@ -200,7 +200,7 @@
|
||||
"moles" = round(air2.gas[output_gas], 0.01))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "algae_farm_vr.tmpl", "Algae Farm Control Panel", 500, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -140,7 +140,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
|
||||
@@ -181,7 +181,7 @@
|
||||
switch_filter(dir_flag(href_list["dir"]), mode_return_switch(new_filter))
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
|
||||
@@ -200,7 +200,7 @@
|
||||
con_lock(dir_flag(href_list["dir"]))
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
data["gasTemperatureClass"] = temp_class
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
data["gasTemperatureClass"] = temp_class
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -5,5 +5,3 @@
|
||||
#define PLANE_CH_VANTAG 29 //Vore Antag hud
|
||||
|
||||
#define PLANE_AUGMENTED 40 //Augmented-reality plane
|
||||
|
||||
#define ABOVE_WINDOW_LAYER 3.25 //Above full tile windows so wall items are clickable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
#define TICK_LIMIT_RUNNING 80
|
||||
#define TICK_LIMIT_RUNNING 85 //VOREStation Emergency Edit
|
||||
#define TICK_LIMIT_TO_RUN 70
|
||||
#define TICK_LIMIT_MC 70
|
||||
#define TICK_LIMIT_MC_INIT_DEFAULT 98
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
#define DM_TRANSFORM_FEMALE_EGG "Transform (Female) (EGG)"
|
||||
|
||||
//Addon mode flags
|
||||
#define DM_FLAG_NUMBING 0x1
|
||||
#define DM_FLAG_STRIPPING 0x2
|
||||
//#define DM_FLAG_ITEMWEAK 0x4
|
||||
#define DM_FLAG_NUMBING 0x1
|
||||
#define DM_FLAG_STRIPPING 0x2
|
||||
#define DM_FLAG_LEAVEREMAINS 0x4
|
||||
|
||||
//Item related modes
|
||||
#define IM_HOLD "Hold"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define MAP_LEVEL_SEALED 0x010 // Z-levels that don't allow random transit at edge
|
||||
#define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump)
|
||||
#define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset.
|
||||
#define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation.
|
||||
|
||||
// Misc map defines.
|
||||
#define SUBMAP_MAP_EDGE_PAD 15 // Automatically created submaps are forbidden from being this close to the main map's edge.
|
||||
@@ -145,7 +145,10 @@
|
||||
#define DEFAULT_TABLE_MATERIAL "plastic"
|
||||
#define DEFAULT_WALL_MATERIAL "steel"
|
||||
|
||||
#define MAT_IRON "iron"
|
||||
#define MAT_MARBLE "marble"
|
||||
#define MAT_STEEL "steel"
|
||||
#define MAT_PLASTIC "plastic"
|
||||
#define MAT_GLASS "glass"
|
||||
#define MAT_SILVER "silver"
|
||||
#define MAT_GOLD "gold"
|
||||
@@ -164,6 +167,13 @@
|
||||
#define MAT_DURASTEEL "durasteel"
|
||||
#define MAT_DURASTEELHULL "durasteel hull"
|
||||
#define MAT_TITANIUMHULL "titanium hull"
|
||||
#define MAT_VERDANTIUM "verdantium"
|
||||
#define MAT_MORPHIUM "morphium"
|
||||
#define MAT_MORPHIUMHULL "morphium hull"
|
||||
#define MAT_VALHOLLIDE "valhollide"
|
||||
#define MAT_LEAD "lead"
|
||||
#define MAT_SUPERMATTER "supermatter"
|
||||
#define MAT_METALHYDROGEN "mhydrogen"
|
||||
|
||||
#define SHARD_SHARD "shard"
|
||||
#define SHARD_SHRAPNEL "shrapnel"
|
||||
|
||||
@@ -30,3 +30,8 @@
|
||||
#define SPECIES_ZORREN_FLAT "Flatland Zorren"
|
||||
#define SPECIES_ZORREN_HIGH "Highlander Zorren"
|
||||
#define SPECIES_CUSTOM "Custom Species"
|
||||
|
||||
#define SPECIES_MONKEY_AKULA "Sobaka"
|
||||
#define SPECIES_MONKEY_NEVREAN "Sparra"
|
||||
#define SPECIES_MONKEY_SERGAL "Saru"
|
||||
#define SPECIES_MONKEY_VULPKANIN "Wolpin"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define TECH_DATA "programming"
|
||||
#define TECH_ILLEGAL "syndicate"
|
||||
#define TECH_ARCANE "arcane"
|
||||
#define TECH_PRECURSOR "precursor"
|
||||
|
||||
#define IMPRINTER 0x0001 //For circuits. Uses glass/chemicals.
|
||||
#define PROTOLATHE 0x0002 //New stuff. Uses glass/metal/chemicals
|
||||
|
||||
@@ -73,6 +73,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
#define FIRE_PRIORITY_SHUTTLES 5
|
||||
#define FIRE_PRIORITY_TIMERS 7 //VOREStation Emergency Edit
|
||||
#define FIRE_PRIORITY_ORBIT 8
|
||||
#define FIRE_PRIORITY_VOTE 9
|
||||
#define FIRE_PRIORITY_AI 10
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
#define ARCHAEO_REMAINS_XENO 34
|
||||
#define ARCHAEO_GASMASK 35
|
||||
#define ARCHAEO_ALIEN_ITEM 36
|
||||
#define MAX_ARCHAEO 36
|
||||
#define ARCHAEO_ALIEN_BOAT 37
|
||||
#define ARCHAEO_IMPERION_CIRCUIT 38
|
||||
#define MAX_ARCHAEO 38
|
||||
|
||||
#define DIGSITE_GARDEN 1
|
||||
#define DIGSITE_ANIMAL 2
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -137,6 +137,7 @@ var/global/list/edible_trash = list(/obj/item/broken_device,
|
||||
/obj/item/stack/material/cardboard,
|
||||
/obj/item/toy,
|
||||
/obj/item/trash,
|
||||
/obj/item/weapon/digestion_remains,
|
||||
/obj/item/weapon/bananapeel,
|
||||
/obj/item/weapon/bone,
|
||||
/obj/item/weapon/broken_bottle,
|
||||
@@ -394,6 +395,27 @@ var/global/list/contamination_colors = list("green",
|
||||
"beige",
|
||||
"pink")
|
||||
|
||||
//For the mechanic of leaving remains. Ones listed below are basically ones that got no bones.
|
||||
var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
|
||||
SPECIES_DIONA,
|
||||
SPECIES_ALRAUNE,
|
||||
SPECIES_PROTEAN,
|
||||
SPECIES_MONKEY, //Exclude all monkey subtypes, to prevent abuse of it. They aren't,
|
||||
SPECIES_MONKEY_TAJ, //set to have remains anyway, but making double sure,
|
||||
SPECIES_MONKEY_SKRELL,
|
||||
SPECIES_MONKEY_UNATHI,
|
||||
SPECIES_MONKEY_AKULA,
|
||||
SPECIES_MONKEY_NEVREAN,
|
||||
SPECIES_MONKEY_SERGAL,
|
||||
SPECIES_MONKEY_VULPKANIN,
|
||||
SPECIES_XENO, //Same for xenos,
|
||||
SPECIES_XENO_DRONE,
|
||||
SPECIES_XENO_HUNTER,
|
||||
SPECIES_XENO_SENTINEL,
|
||||
SPECIES_XENO_QUEEN,
|
||||
SPECIES_SHADOW,
|
||||
SPECIES_GOLEM) //Some special species that may or may not be ever used in event too
|
||||
|
||||
/hook/startup/proc/init_vore_datum_ref_lists()
|
||||
var/paths
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
var/datum/controller/process/chemistry/chemistryProcess
|
||||
|
||||
/datum/controller/process/chemistry
|
||||
var/list/active_holders
|
||||
var/list/chemical_reactions
|
||||
var/list/chemical_reagents
|
||||
|
||||
/datum/controller/process/chemistry/setup()
|
||||
name = "chemistry"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
chemistryProcess = src
|
||||
active_holders = list()
|
||||
chemical_reactions = chemical_reactions_list
|
||||
chemical_reagents = chemical_reagents_list
|
||||
|
||||
/datum/controller/process/chemistry/statProcess()
|
||||
..()
|
||||
stat(null, "[active_holders.len] reagent holder\s")
|
||||
|
||||
/datum/controller/process/chemistry/doWork()
|
||||
for(last_object in active_holders)
|
||||
var/datum/reagents/holder = last_object
|
||||
if(!holder.process_reactions())
|
||||
active_holders -= holder
|
||||
SCHECK
|
||||
|
||||
/datum/controller/process/chemistry/proc/mark_for_update(var/datum/reagents/holder)
|
||||
if(holder in active_holders)
|
||||
return
|
||||
|
||||
//Process once, right away. If we still need to continue then add to the active_holders list and continue later
|
||||
if(holder.process_reactions())
|
||||
active_holders += holder
|
||||
@@ -1,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
|
||||
@@ -78,6 +78,8 @@ var/datum/controller/supply/supply_controller = new()
|
||||
return 1
|
||||
if(istype(A,/obj/item/device/radio/beacon))
|
||||
return 1
|
||||
if(istype(A,/obj/item/device/perfect_tele_beacon)) //VOREStation Addition: Translocator beacons
|
||||
return 1 //VOREStation Addition: Translocator beacons
|
||||
|
||||
for(var/atom/B in A.contents)
|
||||
if(.(B))
|
||||
@@ -99,6 +101,7 @@ var/datum/controller/supply/supply_controller = new()
|
||||
EC.name = "\proper[MA.name]"
|
||||
EC.value = 0
|
||||
EC.contents = list()
|
||||
var/base_value = 0
|
||||
|
||||
// Must be in a crate!
|
||||
if(istype(MA,/obj/structure/closet/crate))
|
||||
@@ -106,6 +109,8 @@ var/datum/controller/supply/supply_controller = new()
|
||||
callHook("sell_crate", list(CR, area_shuttle))
|
||||
|
||||
points += CR.points_per_crate
|
||||
if(CR.points_per_crate)
|
||||
base_value = CR.points_per_crate
|
||||
var/find_slip = 1
|
||||
|
||||
for(var/atom/A in CR)
|
||||
@@ -149,6 +154,7 @@ var/datum/controller/supply/supply_controller = new()
|
||||
|
||||
exported_crates += EC
|
||||
points += EC.value
|
||||
EC.value += base_value
|
||||
|
||||
// Duplicate the receipt for the admin-side log
|
||||
var/datum/exported_crate/adm = new()
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
SUBSYSTEM_DEF(nanoui)
|
||||
name = "NanoUI"
|
||||
wait = 5
|
||||
// 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
|
||||
.=..() //VOREStation Edit start: fixing some kevinzing
|
||||
for(var/i in GLOB.clients)
|
||||
send_resources(i) //VOREStation Edit end: fixing some kevinzing
|
||||
|
||||
/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()
|
||||
|
||||
//Sends asset files to a client, called on client/New()
|
||||
/datum/controller/subsystem/nanoui/proc/send_resources(client)
|
||||
if(!subsystem_initialized)
|
||||
return
|
||||
for(var/file in asset_files)
|
||||
client << browse_rsc(file) // send the file to the client
|
||||
@@ -41,24 +41,30 @@ SUBSYSTEM_DEF(persist)
|
||||
return
|
||||
continue
|
||||
|
||||
// Do not collect useless PTO
|
||||
var/department_earning = J.department
|
||||
if(J.department == "Command")
|
||||
department_earning = "Civilian"
|
||||
clear_unused_pto(M)
|
||||
|
||||
// Update client whatever
|
||||
var/client/C = M.client
|
||||
var/wait_in_hours = (wait / (1 HOUR)) * J.timeoff_factor
|
||||
LAZYINITLIST(C.department_hours)
|
||||
var/dept_hours = C.department_hours
|
||||
if(isnum(C.department_hours[J.department]))
|
||||
dept_hours[J.department] += wait_in_hours
|
||||
if(isnum(C.department_hours[department_earning]))
|
||||
dept_hours[department_earning] += wait_in_hours
|
||||
else
|
||||
dept_hours[J.department] = wait_in_hours
|
||||
dept_hours[department_earning] = wait_in_hours
|
||||
|
||||
//Cap it
|
||||
dept_hours[J.department] = min(config.pto_cap, dept_hours[J.department])
|
||||
dept_hours[department_earning] = min(config.pto_cap, dept_hours[department_earning])
|
||||
|
||||
|
||||
// Okay we figured it out, lets update database!
|
||||
var/sql_ckey = sql_sanitize_text(C.ckey)
|
||||
var/sql_dpt = sql_sanitize_text(J.department)
|
||||
var/sql_bal = text2num("[C.department_hours[J.department]]")
|
||||
var/sql_dpt = sql_sanitize_text(department_earning)
|
||||
var/sql_bal = text2num("[C.department_hours[department_earning]]")
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO vr_player_hours (ckey, department, hours) VALUES ('[sql_ckey]', '[sql_dpt]', [sql_bal]) ON DUPLICATE KEY UPDATE hours = VALUES(hours)")
|
||||
query.Execute()
|
||||
|
||||
@@ -79,3 +85,11 @@ SUBSYSTEM_DEF(persist)
|
||||
// Let's check the mind.
|
||||
if(M.mind && M.mind.assigned_role)
|
||||
. = job_master.GetJob(M.mind.assigned_role)
|
||||
|
||||
// This proc tries makes sure old Command PTO doesn't linger
|
||||
/datum/controller/subsystem/persist/proc/clear_unused_pto(var/mob/M)
|
||||
var/client/C = M.client
|
||||
LAZYINITLIST(C.department_hours)
|
||||
if(C.department_hours["Command"])
|
||||
C.department_hours["Command"] = null
|
||||
C.department_hours.Remove("Command")
|
||||
@@ -0,0 +1,45 @@
|
||||
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_reactions_by_reagent = 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
|
||||
chemical_reactions = list()
|
||||
chemical_reactions_by_reagent = list()
|
||||
|
||||
for(var/path in paths)
|
||||
var/datum/chemical_reaction/D = new path
|
||||
chemical_reactions += D
|
||||
if(D.required_reagents && D.required_reagents.len)
|
||||
var/reagent_id = D.required_reagents[1]
|
||||
LAZYINITLIST(chemical_reactions_by_reagent[reagent_id])
|
||||
chemical_reactions_by_reagent[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
|
||||
@@ -6,6 +6,7 @@
|
||||
SUBSYSTEM_DEF(timer)
|
||||
name = "Timer"
|
||||
wait = 1 //SS_TICKER subsystem, so wait is in ticks
|
||||
priority = FIRE_PRIORITY_TIMERS //VOREStation Emergency Edit
|
||||
init_order = INIT_ORDER_TIMER
|
||||
|
||||
flags = SS_TICKER|SS_NO_INIT
|
||||
|
||||
@@ -56,7 +56,7 @@ SUBSYSTEM_DEF(transcore)
|
||||
implants -= imp
|
||||
continue
|
||||
|
||||
//In a human
|
||||
//In a human
|
||||
BITSET(H.hud_updateflag, BACKUP_HUD)
|
||||
|
||||
if(H == imp.imp_in && H.mind && H.stat < DEAD)
|
||||
@@ -93,6 +93,7 @@ SUBSYSTEM_DEF(transcore)
|
||||
else
|
||||
if(curr_MR.dead_state != MR_DEAD) //First time switching to dead
|
||||
notify(name)
|
||||
curr_MR.last_notification = world.time
|
||||
curr_MR.dead_state = MR_DEAD
|
||||
|
||||
if(MC_TICK_CHECK)
|
||||
@@ -158,9 +159,12 @@ SUBSYSTEM_DEF(transcore)
|
||||
return 1
|
||||
|
||||
// Send a past-due notification to the medical radio channel.
|
||||
/datum/controller/subsystem/transcore/proc/notify(var/name)
|
||||
/datum/controller/subsystem/transcore/proc/notify(var/name, var/repeated = FALSE)
|
||||
ASSERT(name)
|
||||
global_announcer.autosay("[name] is past-due for a mind backup. This will be the only notification.", "TransCore Oversight", "Medical")
|
||||
if(repeated)
|
||||
global_announcer.autosay("This is a repeat notification that [name] is past-due for a mind backup.", "TransCore Oversight", "Medical")
|
||||
else
|
||||
global_announcer.autosay("[name] is past-due for a mind backup.", "TransCore Oversight", "Medical")
|
||||
|
||||
// Called from mind_record to add itself to the transcore.
|
||||
/datum/controller/subsystem/transcore/proc/add_backup(var/datum/transhuman/mind_record/MR)
|
||||
|
||||
@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(xenoarch)
|
||||
|
||||
/datum/controller/subsystem/xenoarch/proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in turfs)
|
||||
if(!M.density)
|
||||
if(!M.density || M.z in using_map.xenoarch_exempt_levels)
|
||||
continue
|
||||
|
||||
if(isnull(M.geologic_data))
|
||||
|
||||
@@ -102,8 +102,6 @@
|
||||
options["LEGACY: gas_data"] = gas_data
|
||||
options["LEGACY: plant_controller"] = plant_controller
|
||||
options["LEGACY: alarm_manager"] = alarm_manager
|
||||
options["LEGACY: nanomanager"] = GLOB.nanomanager
|
||||
options["LEGACY: chemistryProcess"] = chemistryProcess
|
||||
|
||||
var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options
|
||||
if(!pick)
|
||||
|
||||
@@ -31,5 +31,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
|
||||
|
||||
@@ -188,9 +188,28 @@
|
||||
return 0
|
||||
*/ //VOREStation Removal End
|
||||
//VOREStation Edit Start
|
||||
if(!local || (destination.z in using_map.player_levels)) //VOREStation Edit
|
||||
var/obstructed = 0
|
||||
var/turf/dest_turf = get_turf(destination)
|
||||
if(local && !(dest_turf.z in using_map.player_levels))
|
||||
if(istype(teleatom, /mob/living))
|
||||
to_chat(teleatom, "<span class='warning'>The portal refuses to carry you that far away!</span>")
|
||||
return 0
|
||||
else if(istype(destination.loc, /obj/belly))
|
||||
var/obj/belly/destination_belly = destination.loc
|
||||
var/mob/living/telenommer = destination_belly.owner
|
||||
if(istype(telenommer))
|
||||
if(!isliving(teleatom))
|
||||
return 1
|
||||
else
|
||||
var/mob/living/telemob = teleatom
|
||||
if(telemob.can_be_drop_prey && telenommer.can_be_drop_pred)
|
||||
return 1
|
||||
obstructed = 1
|
||||
else if(!isturf(destination.loc) || !destination.x || !destination.y || !destination.z) //If we're inside something or outside universe
|
||||
obstructed = 1
|
||||
to_chat(teleatom, "<span class='warning'>Something is blocking way on the other side!</span>")
|
||||
if(obstructed)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if(istype(teleatom, /mob/living))
|
||||
to_chat(teleatom, "<span class='warning'>The portal refuses to carry you that far away!</span>")
|
||||
return 0
|
||||
//VOREStation Edit End
|
||||
@@ -1,12 +1,8 @@
|
||||
/datum/teleport/proc/try_televore()
|
||||
//Destination is in a belly
|
||||
if(isbelly(destination.loc) && isliving(teleatom))
|
||||
var/mob/living/L = teleatom
|
||||
if(isbelly(destination.loc))
|
||||
var/obj/belly/B = destination.loc
|
||||
|
||||
if(!L.can_be_drop_prey) //Overloading this as a pref for 'want to be unexpectedly eaten'
|
||||
return FALSE
|
||||
|
||||
|
||||
teleatom.forceMove(get_turf(B)) //So we can splash the sound and sparks and everything.
|
||||
playSpecials(destination,effectout,soundout)
|
||||
teleatom.forceMove(B)
|
||||
@@ -14,4 +10,3 @@
|
||||
|
||||
//No fun!
|
||||
return FALSE
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
name = "Destroyed"
|
||||
|
||||
/datum/Destroy()
|
||||
GLOB.destroyed_event.raise_event(src)
|
||||
if(GLOB.destroyed_event)
|
||||
GLOB.destroyed_event.raise_event(src)
|
||||
. = ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
|
||||
/datum/wires/seedstorage/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/seed_storage/V = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(V.seconds_electrified)
|
||||
if(V.shock(L, 100))
|
||||
return 0
|
||||
if(V.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -12,10 +12,6 @@ var/const/SMARTFRIDGE_WIRE_IDSCAN = 4
|
||||
|
||||
/datum/wires/smartfridge/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(S.seconds_electrified)
|
||||
if(S.shock(L, 100))
|
||||
return 0
|
||||
if(S.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -9,10 +9,6 @@ var/const/VENDING_WIRE_IDSCAN = 8
|
||||
|
||||
/datum/wires/vending/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/vending/V = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(V.seconds_electrified)
|
||||
if(V.shock(L, 100))
|
||||
return 0
|
||||
if(V.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
@@ -43,7 +39,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
|
||||
if(VENDING_WIRE_THROW)
|
||||
V.shoot_inventory = !mended
|
||||
if(VENDING_WIRE_CONTRABAND)
|
||||
V.categories &= ~CAT_HIDDEN
|
||||
V.categories &= ~CAT_HIDDEN
|
||||
if(VENDING_WIRE_ELECTRIFY)
|
||||
if(mended)
|
||||
V.seconds_electrified = 0
|
||||
|
||||
@@ -555,6 +555,91 @@
|
||||
rating = 3
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 80)
|
||||
|
||||
// Rating 4 - Anomaly
|
||||
|
||||
/obj/item/weapon/stock_parts/capacitor/hyper
|
||||
name = "hyper capacitor"
|
||||
desc = "A hyper-capacity capacitor used in the construction of a variety of devices."
|
||||
icon_state = "capacitor_hyper"
|
||||
origin_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1)
|
||||
rating = 4
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 80, MAT_GLASS = 40)
|
||||
|
||||
/obj/item/weapon/stock_parts/scanning_module/hyper
|
||||
name = "quantum scanning module"
|
||||
desc = "A compact, near-perfect resolution quantum scanning module used in the construction of certain devices."
|
||||
icon_state = "scan_module_hyper"
|
||||
origin_tech = list(TECH_MAGNET = 6, TECH_BLUESPACE = 1, TECH_ARCANE = 1)
|
||||
rating = 4
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 40)
|
||||
|
||||
/obj/item/weapon/stock_parts/manipulator/hyper
|
||||
name = "planck-manipulator"
|
||||
desc = "A miniscule manipulator used in the construction of certain devices."
|
||||
icon_state = "hyper_mani"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 1)
|
||||
rating = 4
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30)
|
||||
|
||||
/obj/item/weapon/stock_parts/micro_laser/hyper
|
||||
name = "hyper-power micro-laser"
|
||||
icon_state = "hyper_micro_laser"
|
||||
desc = "A tiny laser used in certain devices."
|
||||
origin_tech = list(TECH_MAGNET = 6, TECH_ARCANE = 1)
|
||||
rating = 4
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MAT_GLASS = 40)
|
||||
|
||||
/obj/item/weapon/stock_parts/matter_bin/hyper
|
||||
name = "hyper matter bin"
|
||||
desc = "A container for holding compressed matter awaiting re-construction."
|
||||
icon_state = "hyper_matter_bin"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 1)
|
||||
rating = 4
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100)
|
||||
|
||||
// Rating 5 - Precursor
|
||||
|
||||
/obj/item/weapon/stock_parts/capacitor/omni
|
||||
name = "omni-capacitor"
|
||||
desc = "A capacitor of immense capacity used in the construction of a variety of devices."
|
||||
icon_state = "capacitor_omni"
|
||||
origin_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1)
|
||||
rating = 5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 80, MAT_GLASS = 40)
|
||||
|
||||
/obj/item/weapon/stock_parts/scanning_module/omni
|
||||
name = "omni-scanning module"
|
||||
desc = "A compact, perfect resolution temporospatial scanning module used in the construction of certain devices."
|
||||
icon_state = "scan_module_omni"
|
||||
origin_tech = list(TECH_MAGNET = 7, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1)
|
||||
rating = 5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 40)
|
||||
|
||||
/obj/item/weapon/stock_parts/manipulator/omni
|
||||
name = "omni-manipulator"
|
||||
desc = "A strange, infinitesimal manipulator used in the construction of certain devices."
|
||||
icon_state = "omni_mani"
|
||||
origin_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 1)
|
||||
rating = 5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30)
|
||||
|
||||
/obj/item/weapon/stock_parts/micro_laser/omni
|
||||
name = "omni-power micro-laser"
|
||||
icon_state = "omni_micro_laser"
|
||||
desc = "A strange laser used in certain devices."
|
||||
origin_tech = list(TECH_MAGNET = 7, TECH_PRECURSOR = 1)
|
||||
rating = 5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MAT_GLASS = 40)
|
||||
|
||||
/obj/item/weapon/stock_parts/matter_bin/omni
|
||||
name = "omni-matter bin"
|
||||
desc = "A strange container for holding compressed matter awaiting re-construction."
|
||||
icon_state = "omni_matter_bin"
|
||||
origin_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 1)
|
||||
rating = 5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100)
|
||||
|
||||
|
||||
// Subspace stock parts
|
||||
|
||||
/obj/item/weapon/stock_parts/subspace/ansible
|
||||
|
||||
@@ -978,6 +978,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon_state = "entry_D2"
|
||||
base_turf = /turf/space
|
||||
|
||||
/area/hallway/secondary/entry/D2/arrivals
|
||||
name = "\improper Shuttle Dock Hallway - Dock Two"
|
||||
icon_state = "entry_D2"
|
||||
base_turf = /turf/space
|
||||
requires_power = 0
|
||||
|
||||
/area/hallway/secondary/entry/D3
|
||||
name = "\improper Shuttle Dock Hallway - Dock Three"
|
||||
icon_state = "entry_D3"
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
/area/security/nuke_storage
|
||||
flags = BLUE_SHIELDED
|
||||
|
||||
/area/supply
|
||||
flags = BLUE_SHIELDED
|
||||
|
||||
// Add rad shielding to maintenance and construction sites
|
||||
/area/vacant
|
||||
flags = RAD_SHIELDED
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
..()
|
||||
findsleeper()
|
||||
|
||||
/obj/machinery/sleep_console/Destroy()
|
||||
if(sleeper)
|
||||
sleeper.console = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/sleep_console/proc/findsleeper()
|
||||
spawn(5)
|
||||
var/obj/machinery/sleeper/sleepernew = null
|
||||
@@ -34,16 +39,18 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(!sleeper)
|
||||
findsleeper()
|
||||
if(!sleeper)
|
||||
to_chat(user, "<span class='notice'>Sleeper not found!</span>")
|
||||
return
|
||||
|
||||
if(sleeper.panel_open)
|
||||
to_chat(user, "<span class='notice'>Close the maintenance panel first.</span>")
|
||||
return
|
||||
|
||||
if(!sleeper)
|
||||
findsleeper()
|
||||
if(sleeper)
|
||||
return ui_interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Sleeper not found!</span>")
|
||||
|
||||
/obj/machinery/sleep_console/attackby(var/obj/item/I, var/mob/user)
|
||||
if(computer_deconstruction_screwdriver(user, I))
|
||||
@@ -109,7 +116,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)
|
||||
@@ -155,7 +162,8 @@
|
||||
anchored = 1
|
||||
circuit = /obj/item/weapon/circuitboard/sleeper
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/list/available_chemicals = list("inaprovaline" = "Inaprovaline", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin")
|
||||
var/list/available_chemicals = list()
|
||||
var/list/base_chemicals = list("inaprovaline" = "Inaprovaline", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin")
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/filtering = 0
|
||||
var/obj/machinery/sleep_console/console
|
||||
@@ -170,6 +178,7 @@
|
||||
..()
|
||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
@@ -181,6 +190,55 @@
|
||||
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/sleeper/Destroy()
|
||||
if(console)
|
||||
console.sleeper = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/sleeper/RefreshParts(var/limited = 0)
|
||||
var/man_rating = 0
|
||||
var/cap_rating = 0
|
||||
|
||||
available_chemicals.Cut()
|
||||
available_chemicals = base_chemicals.Copy()
|
||||
idle_power_usage = initial(idle_power_usage)
|
||||
active_power_usage = initial(active_power_usage)
|
||||
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||
cap_rating += P.rating
|
||||
|
||||
cap_rating = max(1, round(cap_rating / 2))
|
||||
|
||||
idle_power_usage /= cap_rating
|
||||
active_power_usage /= cap_rating
|
||||
|
||||
if(!limited)
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||
man_rating += P.rating - 1
|
||||
|
||||
var/list/new_chemicals = list()
|
||||
|
||||
if(man_rating >= 4) // Alien tech.
|
||||
var/reag_ID = pickweight(list(
|
||||
"healing_nanites" = 10,
|
||||
"shredding_nanites" = 5,
|
||||
"irradiated_nanites" = 5,
|
||||
"neurophage_nanites" = 2)
|
||||
)
|
||||
new_chemicals[reag_ID] = "Nanite"
|
||||
if(man_rating >= 3) // Anomalous tech.
|
||||
new_chemicals["immunosuprizine"] = "Immunosuprizine"
|
||||
if(man_rating >= 2) // Tier 3.
|
||||
new_chemicals["spaceacillin"] = "Spaceacillin"
|
||||
if(man_rating >= 1) // Tier 2.
|
||||
new_chemicals["leporazine"] = "Leporazine"
|
||||
|
||||
if(new_chemicals.len)
|
||||
available_chemicals += new_chemicals
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
@@ -215,11 +273,8 @@
|
||||
var/obj/item/weapon/grab/G = I
|
||||
if(G.affecting)
|
||||
go_in(G.affecting, user)
|
||||
else if(default_deconstruction_screwdriver(user, I))
|
||||
return
|
||||
else if(default_deconstruction_crowbar(user, I))
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
if(!beaker)
|
||||
beaker = I
|
||||
user.drop_item()
|
||||
@@ -228,6 +283,13 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] has a beaker already.</span>")
|
||||
return
|
||||
if(!occupant)
|
||||
if(default_deconstruction_screwdriver(user, I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, I))
|
||||
return
|
||||
if(default_part_replacement(user, I))
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/verb/move_eject()
|
||||
set name = "Eject occupant"
|
||||
@@ -351,3 +413,7 @@
|
||||
desc = "A limited functionality sleeper, all it can do is put patients into stasis. It lacks the medication and configuration of the larger units."
|
||||
icon_state = "sleeper"
|
||||
stasis_level = 100 //Just one setting
|
||||
|
||||
/obj/machinery/sleeper/survival_pod/Initialize()
|
||||
..()
|
||||
RefreshParts(1)
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
component_parts += new /obj/item/stack/material/glass/reinforced(src, 2)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/bodyscanner/Destroy()
|
||||
if(console)
|
||||
console.scanner = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/bodyscanner/power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
@@ -32,11 +37,7 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/bodyscanner/attackby(var/obj/item/G, user as mob)
|
||||
if(default_deconstruction_screwdriver(user, G))
|
||||
return
|
||||
else if(default_deconstruction_crowbar(user, G))
|
||||
return
|
||||
else if(istype(G, /obj/item/weapon/grab))
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/H = G
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>Close the maintenance panel first.</span>")
|
||||
@@ -61,6 +62,11 @@
|
||||
update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such.
|
||||
add_fingerprint(user)
|
||||
qdel(G)
|
||||
if(!occupant)
|
||||
if(default_deconstruction_screwdriver(user, G))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, G))
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/MouseDrop_T(mob/living/carbon/O, mob/user as mob)
|
||||
if(!istype(O))
|
||||
@@ -176,6 +182,11 @@
|
||||
..()
|
||||
findscanner()
|
||||
|
||||
/obj/machinery/body_scanconsole/Destroy()
|
||||
if(scanner)
|
||||
scanner.console = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/body_scanconsole/attackby(var/obj/item/I, var/mob/user)
|
||||
if(computer_deconstruction_screwdriver(user, I))
|
||||
return
|
||||
@@ -245,18 +256,18 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(!scanner)
|
||||
findscanner()
|
||||
if(!scanner)
|
||||
to_chat(user, "<span class='notice'>Scanner not found!</span>")
|
||||
return
|
||||
|
||||
if (scanner.panel_open)
|
||||
to_chat(user, "<span class='notice'>Close the maintenance panel first.</span>")
|
||||
return
|
||||
|
||||
if(!scanner)
|
||||
findscanner()
|
||||
if(scanner)
|
||||
return ui_interact(user)
|
||||
else if(scanner)
|
||||
if(scanner)
|
||||
return ui_interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Scanner not found!</span>")
|
||||
|
||||
/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
@@ -389,7 +400,7 @@
|
||||
occupantData = attempt_vr(scanner,"get_occupant_data_vr",list(occupantData,H)) //VOREStation Insert
|
||||
data["occupant"] = occupantData
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 800)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
if(!(locked && !remote_connection) || remote_access || issilicon(user))
|
||||
populate_controls(data)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "air_alarm.tmpl", name, 325, 625, master_ui = master_ui, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -260,7 +260,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)
|
||||
@@ -288,7 +288,7 @@ update_flag
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 410, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
@@ -195,7 +195,7 @@
|
||||
update_use_power(new_use_power)
|
||||
if(!on)
|
||||
return
|
||||
|
||||
|
||||
var/power_draw = -1
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
storage_capacity[DEFAULT_WALL_MATERIAL] = mb_rating * 25000
|
||||
storage_capacity["glass"] = mb_rating * 12500
|
||||
build_time = 50 / man_rating
|
||||
mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3
|
||||
mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.6. Maximum rating of parts is 5
|
||||
|
||||
/obj/machinery/autolathe/dismantle()
|
||||
for(var/mat in stored_material)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
var/base_print_delay = 100 // For Adminbus reasons
|
||||
var/printing
|
||||
var/loaded_dna //Blood sample for DNA hashing.
|
||||
var/malfunctioning = FALSE // May cause rejection, or the printing of some alien limb instead!
|
||||
|
||||
// These should be subtypes of /obj/item/organ
|
||||
// Costs roughly 20u Phoron (1 sheet) per internal organ, limbs are 60u for limb and extremity
|
||||
@@ -76,10 +77,19 @@
|
||||
/obj/machinery/organ_printer/RefreshParts()
|
||||
// Print Delay updating
|
||||
print_delay = base_print_delay
|
||||
var/manip_rating = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/manip in component_parts)
|
||||
manip_rating += manip.rating
|
||||
print_delay -= (manip.rating-1)*10
|
||||
print_delay = max(0,print_delay)
|
||||
|
||||
manip_rating = round(manip_rating / 2)
|
||||
|
||||
if(manip_rating >= 5)
|
||||
malfunctioning = TRUE
|
||||
else
|
||||
malfunctioning = initial(malfunctioning)
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/organ_printer/attack_hand(mob/user)
|
||||
@@ -182,7 +192,17 @@
|
||||
O.set_dna(C.dna)
|
||||
O.species = C.species
|
||||
|
||||
if(istype(O, /obj/item/organ/external))
|
||||
var/malfunctioned = FALSE
|
||||
|
||||
if(malfunctioning && prob(30)) // Alien Tech is a hell of a drug.
|
||||
malfunctioned = TRUE
|
||||
var/possible_species = list(SPECIES_HUMAN, SPECIES_VOX, SPECIES_SKRELL, SPECIES_ZADDAT, SPECIES_UNATHI, SPECIES_GOLEM, SPECIES_SHADOW)
|
||||
var/new_species = pick(possible_species)
|
||||
if(!all_species[new_species])
|
||||
new_species = SPECIES_HUMAN
|
||||
O.species = all_species[new_species]
|
||||
|
||||
if(istype(O, /obj/item/organ/external) && !malfunctioned)
|
||||
var/obj/item/organ/external/E = O
|
||||
E.sync_colour_to_human(C)
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -140,7 +140,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)
|
||||
@@ -202,7 +202,7 @@
|
||||
emagged = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/battle/proc/arcade_action()
|
||||
|
||||
@@ -37,7 +37,7 @@ var/global/list/minor_air_alarms = list()
|
||||
data["priority_alarms"] = major_alarms
|
||||
data["minor_alarms"] = minor_alarms
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
switch_to_camera(user, current_camera)
|
||||
data["map_levels"] = using_map.get_map_levels(src.z)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
/obj/machinery/computer/security/process()
|
||||
if(cache_id != camera_repository.camera_cache_id)
|
||||
cache_id = camera_repository.camera_cache_id
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
id_card.forceMove(src)
|
||||
modify = id_card
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
data["regions"] = regions
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700)
|
||||
ui.set_initial_data(data)
|
||||
@@ -235,7 +235,7 @@
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if ("account")
|
||||
if (is_authenticated())
|
||||
@@ -243,7 +243,7 @@
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
modify.associated_account_number = account_num
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if ("mode")
|
||||
mode = text2num(href_list["mode_target"])
|
||||
@@ -253,7 +253,7 @@
|
||||
printing = 1
|
||||
spawn(50)
|
||||
printing = null
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
if (mode)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
data["diskette"] = diskette
|
||||
data["temp"] = temp
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "cloning.tmpl", src.name, 400, 450)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@
|
||||
temp = ""
|
||||
scantemp = ""
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
if(!giver && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
giver = I
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
else if(giver)
|
||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||
return
|
||||
@@ -150,7 +150,7 @@
|
||||
data["log"] = internal_log
|
||||
data["uid"] = uid
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "guest_pass.tmpl", src.name, 400, 520)
|
||||
ui.set_initial_data(data)
|
||||
@@ -242,4 +242,4 @@
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
@@ -19,7 +19,7 @@
|
||||
data["is_ai"] = issilicon(user)
|
||||
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -171,7 +171,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
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(!card && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
card = I
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
update_icon()
|
||||
else if(card)
|
||||
to_chat(user, "<span class='warning'>There is already ID card inside.</span>")
|
||||
@@ -88,7 +88,7 @@
|
||||
// if(job && job.timeoff_factor < 0) // Currently are Off Duty, so gotta lookup what on-duty jobs are open
|
||||
// data["job_choices"] = getOpenOnDutyJobs(user, job.department)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "timeclock_vr.tmpl", capitalize(src.name), 500, 520)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
if(vendmode == 1 && I)
|
||||
scan_id(I, W)
|
||||
vendmode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
if(vendmode == 2 && I)
|
||||
if(reimburse_id(I, W))
|
||||
vendmode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
if(vendmode == 0)
|
||||
if(istype(W, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = W
|
||||
@@ -48,7 +48,7 @@
|
||||
L.loc = src
|
||||
vendmode = 2
|
||||
to_chat(user, "<span class='notice'>You slot your [L.name] into \The [src.name]</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
data["power"] = power
|
||||
data["total"] = total()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "laptop_vendor.tmpl", src.name, 480, 425)
|
||||
ui.set_initial_data(data)
|
||||
@@ -136,7 +136,7 @@
|
||||
vendmode = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/lapvend/proc/vend()
|
||||
if(cardreader > 0)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -205,7 +205,7 @@
|
||||
var/mob/M = grab.affecting
|
||||
qdel(grab)
|
||||
put_mob(M)
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(var/mob/target, var/mob/user) //Allows borgs to put people into cryo without external assistance
|
||||
|
||||
@@ -513,6 +513,12 @@
|
||||
//visible_message("<span class='notice'>\The [initial(name)] hums and hisses as it moves [to_despawn.real_name] into storage.</span>", 3)
|
||||
visible_message("<span class='notice'>\The [initial(name)] [on_store_visible_message_1] [to_despawn.real_name] [on_store_visible_message_2].</span>", 3)
|
||||
|
||||
//VOREStation Edit begin: Dont delete mobs-in-mobs
|
||||
if(to_despawn.client && to_despawn.stat<2)
|
||||
var/mob/observer/dead/newghost = to_despawn.ghostize()
|
||||
newghost.timeofdeath = world.time
|
||||
//VOREStation Edit end: Dont delete mobs-in-mobs
|
||||
|
||||
//This should guarantee that ghosts don't spawn.
|
||||
to_despawn.ckey = null
|
||||
|
||||
|
||||
@@ -746,7 +746,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)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
var/destroy_hits = 10 //How many strong hits it takes to destroy the door
|
||||
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
|
||||
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
|
||||
var/obj/item/stack/material/steel/repairing
|
||||
var/repairing = 0
|
||||
var/block_air_zones = 1 //If set, air zones cannot merge across the door even when it is opened.
|
||||
var/close_door_at = 0 //When to automatically close the door, if possible
|
||||
|
||||
@@ -209,18 +209,18 @@
|
||||
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (attempt_vr(src,"attackby_vr",list(I, user))) return
|
||||
|
||||
if(istype(I))
|
||||
if(attackby_vr(I, user)) //VOREStation begin: Fireproofing
|
||||
return //VOREStation begin: Fireproofing
|
||||
if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name())
|
||||
if(stat & BROKEN)
|
||||
user << "<span class='notice'>It looks like \the [src] is pretty busted. It's going to need more than just patching up now.</span>"
|
||||
to_chat(user, "<span class='notice'>It looks like \the [src] is pretty busted. It's going to need more than just patching up now.</span>")
|
||||
return
|
||||
if(health >= maxhealth)
|
||||
user << "<span class='notice'>Nothing to fix!</span>"
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
return
|
||||
if(!density)
|
||||
user << "<span class='warning'>\The [src] must be closed before you can repair it.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
|
||||
return
|
||||
|
||||
//figure out how much metal we need
|
||||
@@ -228,44 +228,45 @@
|
||||
amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc?
|
||||
|
||||
var/obj/item/stack/stack = I
|
||||
var/transfer
|
||||
if (repairing)
|
||||
transfer = stack.transfer_to(repairing, amount_needed - repairing.amount)
|
||||
if (!transfer)
|
||||
user << "<span class='warning'>You must weld or remove \the [repairing] from \the [src] before you can add anything else.</span>"
|
||||
var/amount_given = amount_needed - repairing
|
||||
var/mats_given = stack.get_amount()
|
||||
if(repairing && amount_given <= 0)
|
||||
to_chat(user, "<span class='warning'>You must weld or remove \the [get_material_name()] from \the [src] before you can add anything else.</span>")
|
||||
else
|
||||
repairing = stack.split(amount_needed)
|
||||
if (repairing)
|
||||
repairing.loc = src
|
||||
transfer = repairing.amount
|
||||
|
||||
if (transfer)
|
||||
user << "<span class='notice'>You fit [transfer] [stack.singular_name]\s to damaged and broken parts on \the [src].</span>"
|
||||
if(mats_given >= amount_given)
|
||||
if(stack.use(amount_given))
|
||||
repairing += amount_given
|
||||
else
|
||||
if(stack.use(mats_given))
|
||||
repairing += mats_given
|
||||
amount_given = mats_given
|
||||
if(amount_given)
|
||||
to_chat(user, "<span class='notice'>You fit [amount_given] [stack.singular_name]\s to damaged and broken parts on \the [src].</span>")
|
||||
|
||||
return
|
||||
|
||||
if(repairing && istype(I, /obj/item/weapon/weldingtool))
|
||||
if(!density)
|
||||
user << "<span class='warning'>\The [src] must be closed before you can repair it.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can repair it.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/weapon/weldingtool/welder = I
|
||||
if(welder.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You start to fix dents and weld \the [repairing] into place.</span>"
|
||||
to_chat(user, "<span class='notice'>You start to fix dents and weld \the [get_material_name()] into place.</span>")
|
||||
playsound(src, welder.usesound, 50, 1)
|
||||
if(do_after(user, (5 * repairing.amount) * welder.toolspeed) && welder && welder.isOn())
|
||||
user << "<span class='notice'>You finish repairing the damage to \the [src].</span>"
|
||||
health = between(health, health + repairing.amount*DOOR_REPAIR_AMOUNT, maxhealth)
|
||||
if(do_after(user, (5 * repairing) * welder.toolspeed) && welder && welder.isOn())
|
||||
to_chat(user, "<span class='notice'>You finish repairing the damage to \the [src].</span>")
|
||||
health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth)
|
||||
update_icon()
|
||||
qdel(repairing)
|
||||
repairing = null
|
||||
repairing = 0
|
||||
return
|
||||
|
||||
if(repairing && I.is_crowbar())
|
||||
user << "<span class='notice'>You remove \the [repairing].</span>"
|
||||
var/obj/item/stack/material/repairing_sheet = get_material().place_sheet(loc)
|
||||
repairing_sheet.amount += repairing-1
|
||||
repairing = 0
|
||||
to_chat(user, "<span class='notice'>You remove \the [repairing_sheet].</span>")
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
repairing.loc = user.loc
|
||||
repairing = null
|
||||
return
|
||||
|
||||
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
|
||||
@@ -325,13 +326,13 @@
|
||||
/obj/machinery/door/examine(mob/user)
|
||||
. = ..()
|
||||
if(src.health <= 0)
|
||||
user << "\The [src] is broken!"
|
||||
to_chat(user, "\The [src] is broken!")
|
||||
if(src.health < src.maxhealth / 4)
|
||||
user << "\The [src] looks like it's about to break!"
|
||||
to_chat(user, "\The [src] looks like it's about to break!")
|
||||
else if(src.health < src.maxhealth / 2)
|
||||
user << "\The [src] looks seriously damaged!"
|
||||
to_chat(user, "\The [src] looks seriously damaged!")
|
||||
else if(src.health < src.maxhealth * 3/4)
|
||||
user << "\The [src] shows signs of damage!"
|
||||
to_chat(user, "\The [src] shows signs of damage!")
|
||||
|
||||
|
||||
/obj/machinery/door/proc/set_broken()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
D.fire_act(adj_air, adj_temp, adj_volume)
|
||||
|
||||
/obj/machinery/door
|
||||
var/obj/item/stack/material/plasteel/reinforcing //vorestation addition
|
||||
var/reinforcing = 0 //vorestation addition
|
||||
|
||||
/obj/machinery/door/firedoor
|
||||
heat_proof = 1
|
||||
@@ -33,113 +33,68 @@
|
||||
|
||||
return ..()
|
||||
|
||||
// Returns true only if one of the actions unique to reinforcing is done, otherwise false and continuing normal attackby
|
||||
/obj/machinery/door/proc/attackby_vr(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/stack/material) && I.get_material_name() == "plasteel") // Add heat shielding if it isn't already.
|
||||
if(!heat_proof)
|
||||
var/obj/item/stack/stack = I
|
||||
var/transfer
|
||||
var/amount_needed = 2
|
||||
if(stat & BROKEN)
|
||||
user << "<span class='notice'>It looks like \the [src] is pretty busted.</span>"
|
||||
if (reinforcing)
|
||||
transfer = stack.transfer_to(reinforcing, amount_needed - reinforcing.amount)
|
||||
if (!transfer)
|
||||
user << "<span class='warning'>You must weld or remove \the [reinforcing] from \the [src] before you can add anything else.</span>"
|
||||
return 1
|
||||
if(istype(I, /obj/item/stack/material) && I.get_material_name() == "plasteel")
|
||||
if(heat_proof)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already reinforced.</span>")
|
||||
return TRUE
|
||||
if((stat & BROKEN) || (health < maxhealth))
|
||||
to_chat(user, "<span class='notice'>It looks like \the [src] broken. Repair it before reinforcing it.</span>")
|
||||
return TRUE
|
||||
if(!density)
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can reinforce it.</span>")
|
||||
return TRUE
|
||||
|
||||
var/amount_needed = 2
|
||||
|
||||
var/obj/item/stack/stack = I
|
||||
var/amount_given = amount_needed - reinforcing
|
||||
var/mats_given = stack.get_amount()
|
||||
if(reinforcing && amount_given <= 0)
|
||||
to_chat(user, "<span class='warning'>You must weld or remove \the plasteel from \the [src] before you can add anything else.</span>")
|
||||
else
|
||||
if(mats_given >= amount_given)
|
||||
if(stack.use(amount_given))
|
||||
reinforcing += amount_given
|
||||
else
|
||||
reinforcing = stack.split(amount_needed)
|
||||
if (reinforcing)
|
||||
reinforcing.loc = src
|
||||
transfer = reinforcing.amount
|
||||
|
||||
if (transfer)
|
||||
user << "<span class='notice'>You fit [transfer] [stack.singular_name]\s to \the [src].</span>"
|
||||
return 1
|
||||
|
||||
if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name())
|
||||
if(stat & BROKEN)
|
||||
if(health >= maxhealth && destroy_hits >= 10)
|
||||
user << "<span class='notice'>The [src] is about as shored up as it's going to get.</span>"
|
||||
return 1
|
||||
if(!density)
|
||||
user << "<span class='warning'>\The [src] must be closed before you can repair it.</span>"
|
||||
return 1
|
||||
|
||||
//figure out how much metal we need
|
||||
var/amount_needed = (maxhealth - health) / DOOR_REPAIR_AMOUNT
|
||||
if (destroy_hits < 10)
|
||||
amount_needed += (20*(10 - destroy_hits) / DOOR_REPAIR_AMOUNT)
|
||||
amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc?
|
||||
|
||||
var/obj/item/stack/stack = I
|
||||
var/transfer
|
||||
if (repairing)
|
||||
transfer = stack.transfer_to(repairing, amount_needed - repairing.amount)
|
||||
if (!transfer)
|
||||
user << "<span class='warning'>You must weld or remove \the [repairing] from \the [src] before you can add anything else.</span>"
|
||||
else
|
||||
repairing = stack.split(amount_needed)
|
||||
if (repairing)
|
||||
repairing.loc = src
|
||||
transfer = repairing.amount
|
||||
|
||||
if (transfer)
|
||||
user << "<span class='notice'>\The [src] is completely broken inside, but you manage to fit [transfer] [stack.singular_name]\s to shore it up.</span>"
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
if(stack.use(mats_given))
|
||||
reinforcing += mats_given
|
||||
amount_given = mats_given
|
||||
if(amount_given)
|
||||
to_chat(user, "<span class='notice'>You fit [amount_given] [stack.singular_name]\s on \the [src].</span>")
|
||||
|
||||
return TRUE
|
||||
|
||||
if(reinforcing && istype(I, /obj/item/weapon/weldingtool))
|
||||
var/amount_needed = 2
|
||||
if(!density)
|
||||
user << "<span class='warning'>\The [src] must be closed before you can repair it.</span>"
|
||||
return 1
|
||||
if (reinforcing.amount < amount_needed)
|
||||
user << "<span class='notice'>You need [amount_needed] [reinforcing.singular_name]\s to reinforce \the [src].</span>"
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>\The [src] must be closed before you can reinforce it.</span>")
|
||||
return TRUE
|
||||
|
||||
if(reinforcing < 2)
|
||||
to_chat(user, "<span class='warning'>You will need more plasteel to reinforce \the [src].</span>")
|
||||
return TRUE
|
||||
|
||||
var/obj/item/weapon/weldingtool/welder = I
|
||||
if(welder.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You start to weld \the [reinforcing] into place.</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 5 * reinforcing.amount) && welder && welder.isOn())
|
||||
user << "<span class='notice'>You finish reinforcing \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You start weld \the plasteel into place.</span>")
|
||||
playsound(src, welder.usesound, 50, 1)
|
||||
if(do_after(user, 10 * welder.toolspeed) && welder && welder.isOn())
|
||||
to_chat(user, "<span class='notice'>You finish reinforcing \the [src].</span>")
|
||||
heat_proof = 1
|
||||
update_icon()
|
||||
qdel(reinforcing)
|
||||
reinforcing = null
|
||||
return 1
|
||||
|
||||
if(repairing && istype(I, /obj/item/weapon/weldingtool) && (stat & BROKEN))
|
||||
if(!density)
|
||||
user << "<span class='warning'>\The [src] must be closed before you can shore it up.</span>"
|
||||
return 1
|
||||
|
||||
var/obj/item/weapon/weldingtool/welder = I
|
||||
if(welder.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You start to weld \the [repairing] into place.</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 5 * repairing.amount) && welder && welder.isOn())
|
||||
user << "<span class='notice'>You finish shoring up \the [src]. It'll hold for at least a little while.</span>"
|
||||
var/damagerepaired = repairing.amount*DOOR_REPAIR_AMOUNT
|
||||
if (destroy_hits < 10)
|
||||
var/severedamage = 10 - destroy_hits
|
||||
destroy_hits = between(destroy_hits, destroy_hits + (damagerepaired)/20, 10)
|
||||
damagerepaired -= 20 * severedamage
|
||||
health = between(health, health + damagerepaired, maxhealth)
|
||||
update_icon()
|
||||
qdel(repairing)
|
||||
repairing = null
|
||||
return 1
|
||||
reinforcing = 0
|
||||
return TRUE
|
||||
|
||||
if(reinforcing && I.is_crowbar())
|
||||
user << "<span class='notice'>You remove \the [reinforcing].</span>"
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
reinforcing.loc = user.loc
|
||||
reinforcing = null
|
||||
return 1
|
||||
return 0
|
||||
var/obj/item/stack/material/plasteel/reinforcing_sheet = new /obj/item/stack/material/plasteel(src.loc)
|
||||
reinforcing_sheet.amount = reinforcing
|
||||
reinforcing = 0
|
||||
to_chat(user, "<span class='notice'>You remove \the [reinforcing_sheet].</span>")
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/door/blast/regular/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return // blast doors are immune to fire completely.
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"secure" = program.memory["secure"]
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -89,7 +89,7 @@
|
||||
"processing" = program.memory["processing"],
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -153,7 +153,7 @@
|
||||
"processing" = program.memory["processing"]
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"override_enabled" = docking_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"airlocks" = airlocks,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290)
|
||||
@@ -73,7 +73,7 @@
|
||||
"override_enabled" = airlock_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"door_lock" = docking_program.memory["door_status"]["lock"],
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -167,7 +167,7 @@
|
||||
log_game(msg)
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
// Proc: get_exonet_node()
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
data["tracks"] = nano_tracks
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "jukebox.tmpl", title, 450, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
recipies_ui[++recipies_ui.len] = list("name" = R.name, "type" = "[T]")
|
||||
data["recipies"] = recipies_ui
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "partslathe.tmpl", "Parts Lathe UI", 500, 450)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
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)
|
||||
|
||||
@@ -44,7 +44,7 @@ obj/machinery/recharger
|
||||
if(E.self_recharge)
|
||||
to_chat(user, "<span class='notice'>Your gun has no recharge port.</span>")
|
||||
return
|
||||
if(!G.get_cell())
|
||||
if(!G.get_cell() && !istype(G, /obj/item/ammo_casing/nsfw_batt)) //VOREStation Edit: NSFW charging
|
||||
to_chat(user, "This device does not have a battery installed.")
|
||||
return
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -215,24 +215,23 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
if(computer_deconstruction_screwdriver(user, O))
|
||||
return
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
if(panel_open)
|
||||
var/input = sanitize(input(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department))
|
||||
if(!input)
|
||||
to_chat(usr, "No input found. Please hang up and try your call again.")
|
||||
return
|
||||
department = input
|
||||
announcement.title = "[department] announcement"
|
||||
announcement.newscast = 1
|
||||
|
||||
name = "[department] Requests Console"
|
||||
allConsoles += src
|
||||
if(departmentType & RC_ASSIST)
|
||||
req_console_assistance |= department
|
||||
if(departmentType & RC_SUPPLY)
|
||||
req_console_supplies |= department
|
||||
if(departmentType & RC_INFO)
|
||||
req_console_information |= department
|
||||
var/input = sanitize(input(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department))
|
||||
if(!input)
|
||||
to_chat(usr, "No input found. Please hang up and try your call again.")
|
||||
return
|
||||
department = input
|
||||
announcement.title = "[department] announcement"
|
||||
announcement.newscast = 1
|
||||
|
||||
name = "[department] Requests Console"
|
||||
allConsoles += src
|
||||
if(departmentType & RC_ASSIST)
|
||||
req_console_assistance |= department
|
||||
if(departmentType & RC_SUPPLY)
|
||||
req_console_supplies |= department
|
||||
if(departmentType & RC_INFO)
|
||||
req_console_information |= department
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
if(inoperable(MAINT)) return
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
id = "[rand(1000, 9999)]"
|
||||
..()
|
||||
underlays.Cut()
|
||||
underlays += image('icons/obj/stationobjs.dmi', icon_state = "telecomp-wires")
|
||||
underlays += image('icons/obj/stationobjs_vr.dmi', icon_state = "telecomp-wires") //VOREStation Edit: different direction for wires to account for dirs
|
||||
return
|
||||
|
||||
/obj/machinery/computer/teleporter/Initialize()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -169,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))
|
||||
@@ -183,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)
|
||||
@@ -195,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)
|
||||
@@ -399,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)
|
||||
@@ -459,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
|
||||
@@ -470,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)
|
||||
@@ -512,7 +512,7 @@
|
||||
status_error = 0
|
||||
vend_ready = 1
|
||||
currently_vending = null
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -568,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))
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
var/speed = 1
|
||||
var/mat_efficiency = 1
|
||||
var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0)
|
||||
var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, MAT_PLASTEEL = 0, "gold" = 0, "silver" = 0, MAT_LEAD = 0, "osmium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, "phoron" = 0, "uranium" = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0)
|
||||
var/list/hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER)
|
||||
var/res_max_amount = 200000
|
||||
|
||||
var/datum/research/files
|
||||
@@ -75,7 +76,7 @@
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5
|
||||
mat_efficiency = max(1 - (T - 1) / 4, 0.2) // 1 -> 0.2
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both
|
||||
T += M.rating
|
||||
speed = T / 2 // 1 -> 3
|
||||
@@ -103,7 +104,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)
|
||||
@@ -273,7 +274,13 @@
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_materials()
|
||||
. = list()
|
||||
for(var/T in materials)
|
||||
. += list(list("mat" = capitalize(T), "amt" = materials[T]))
|
||||
var/hidden_mat = FALSE
|
||||
for(var/HM in hidden_materials) // Direct list contents comparison was failing.
|
||||
if(T == HM && materials[T] == 0)
|
||||
hidden_mat = TRUE
|
||||
continue
|
||||
if(!hidden_mat)
|
||||
. += list(list("mat" = capitalize(T), "amt" = materials[T]))
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
|
||||
var/recursive = amount == -1 ? 1 : 0
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
var/speed = 1
|
||||
var/mat_efficiency = 1
|
||||
var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0, "plasteel" = 0)
|
||||
var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, MAT_PLASTEEL = 0, "gold" = 0, "silver" = 0, MAT_LEAD = 0, "osmium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, "phoron" = 0, "uranium" = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0)
|
||||
var/list/hidden_materials = list(MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM)
|
||||
var/res_max_amount = 200000
|
||||
|
||||
var/datum/research/files
|
||||
@@ -77,7 +78,7 @@
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5
|
||||
mat_efficiency = max(0.2, 1 - (T - 1) / 4) // 1 -> 0.2
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both
|
||||
T += M.rating
|
||||
speed = T / 2 // 1 -> 3
|
||||
@@ -113,7 +114,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)
|
||||
@@ -299,7 +300,13 @@
|
||||
/obj/machinery/pros_fabricator/proc/get_materials()
|
||||
. = list()
|
||||
for(var/T in materials)
|
||||
. += list(list("mat" = capitalize(T), "amt" = materials[T]))
|
||||
var/hidden_mat = FALSE
|
||||
for(var/HM in hidden_materials) // Direct list contents comparison was failing.
|
||||
if(T == HM && materials[T] == 0)
|
||||
hidden_mat = TRUE
|
||||
continue
|
||||
if(!hidden_mat)
|
||||
. += list(list("mat" = capitalize(T), "amt" = materials[T]))
|
||||
|
||||
/obj/machinery/pros_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
|
||||
var/recursive = amount == -1 ? 1 : 0
|
||||
|
||||
@@ -51,20 +51,10 @@
|
||||
|
||||
|
||||
/atom/movable/proc/buckle_mob(mob/living/M, forced = FALSE, check_loc = TRUE)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
|
||||
if(check_loc && M.loc != loc)
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !forced) || M.buckled || M.pinned.len || (buckled_mobs.len >= max_buckled_mobs) || (buckle_require_restraints && !M.restrained()))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs) //Handles trying to buckle yourself to the chair when someone is on it
|
||||
to_chat(M, "<span class='notice'>\The [src] can't buckle anymore people.</span>")
|
||||
if(!can_buckle_check(M, forced))
|
||||
return FALSE
|
||||
|
||||
M.buckled = src
|
||||
@@ -130,6 +120,8 @@
|
||||
if(M in buckled_mobs)
|
||||
to_chat(user, "<span class='warning'>\The [M] is already buckled to \the [src].</span>")
|
||||
return FALSE
|
||||
if(!can_buckle_check(M, forced))
|
||||
return FALSE
|
||||
|
||||
add_fingerprint(user)
|
||||
// unbuckle_mob()
|
||||
@@ -195,3 +187,19 @@
|
||||
else
|
||||
L.set_dir(dir)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/can_buckle_check(mob/living/M, forced = FALSE)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !forced) || M.buckled || M.pinned.len || (buckled_mobs.len >= max_buckled_mobs) || (buckle_require_restraints && !M.restrained()))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs) //Handles trying to buckle yourself to the chair when someone is on it
|
||||
to_chat(M, "<span class='notice'>\The [src] can't buckle anymore people.</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -13,18 +13,24 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
|
||||
anchored = 1.0
|
||||
|
||||
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
||||
if(istype(M,/mob) && !(istype(M,/mob/living)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
src.teleport(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/Crossed(AM as mob|obj)
|
||||
if(istype(AM,/mob) && !(istype(AM,/mob/living)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
src.teleport(AM)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user as mob)
|
||||
if(istype(user) && !(istype(user,/mob/living)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
src.teleport(user)
|
||||
return
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
desc = "Used for repairing or building APCs"
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "apc_frame"
|
||||
|
||||
/obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (W.is_wrench())
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
refund_amt = 2
|
||||
|
||||
/obj/item/frame/apc/try_build(turf/on_wall, mob/user as mob)
|
||||
if (get_dist(on_wall, user)>1)
|
||||
|
||||
@@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
if(mode in no_auto_update)
|
||||
auto_update = 0
|
||||
@@ -647,7 +647,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
@@ -685,7 +685,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
..()
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
@@ -1130,7 +1130,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
P.new_message_from_pda(src, t)
|
||||
GLOB.nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
else
|
||||
to_chat(U, "<span class='notice'>ERROR: Messaging server is not responding.</span>")
|
||||
|
||||
@@ -1150,7 +1150,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(L)
|
||||
if(reception_message)
|
||||
L << reception_message
|
||||
GLOB.nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
/obj/item/device/pda/proc/new_news(var/message)
|
||||
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
|
||||
@@ -1196,7 +1196,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(can_use(usr))
|
||||
mode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
@@ -1297,7 +1297,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
@@ -1325,7 +1325,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
C.loc = src
|
||||
pai = C
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
else if(istype(C, /obj/item/weapon/pen))
|
||||
var/obj/item/weapon/pen/O = locate() in src
|
||||
if(O)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
data["laws"] = laws
|
||||
data["has_laws"] = laws.len
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
// The value element is the actual data, and can take any form necessary for the template
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
@@ -261,7 +261,7 @@
|
||||
notehtml = note
|
||||
|
||||
if(href_list["switch_template"])
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
|
||||
if(ui)
|
||||
ui.add_template("Body", href_list["switch_template"])
|
||||
|
||||
@@ -276,5 +276,5 @@
|
||||
if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions
|
||||
cartridge.Topic(href, href_list)
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -234,7 +234,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
cartridge.forceMove(src)
|
||||
to_chat(usr, "<span class='notice'>You slot \the [cartridge] into \the [src].</span>")
|
||||
modules[++modules.len] = list("module" = "External Device", "icon" = "external64", "number" = EXTRTAB)
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
// Proc: attack_self()
|
||||
|
||||
@@ -121,7 +121,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)
|
||||
@@ -232,7 +232,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
|
||||
@@ -724,7 +724,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)
|
||||
@@ -753,7 +753,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)
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
name = "subspace radio"
|
||||
desc = "A powerful new radio recently gifted to Nanotrasen from KHI, this communications device has the ability to send and recieve transmissions from anywhere."
|
||||
icon = 'icons/vore/custom_items_vr.dmi'
|
||||
icon_override = 'icons/mob/back_vr.dmi'
|
||||
icon_state = "radiopack"
|
||||
item_state = "parachute"
|
||||
item_state = "radiopack"
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 6
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
//TODO: Have this take an assemblyholder
|
||||
else if(isassembly(item))
|
||||
var/obj/item/device/assembly/A = item
|
||||
@@ -58,7 +58,7 @@
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
data["valveOpen"] = valve_open ? 1 : 0
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
|
||||
next_offer_time = world.time + offer_time
|
||||
update_nano_data()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
@@ -110,7 +110,7 @@
|
||||
data += nanoui_data
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui) // No auto-refresh
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
|
||||
data["menu"] = 0
|
||||
@@ -138,7 +138,7 @@
|
||||
UI.buy(src, usr)
|
||||
else if(href_list["lock"])
|
||||
toggle()
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
else if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
|
||||
@@ -9,3 +9,21 @@
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//Robot resizing module
|
||||
|
||||
/obj/item/borg/upgrade/sizeshift
|
||||
name = "robot size alteration module"
|
||||
desc = "Using technology similar to one used in sizeguns, allows cyborgs to adjust their own size as neccesary."
|
||||
icon_state = "cyborg_upgrade2"
|
||||
item_state = "cyborg_upgrade"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/sizeshift/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(/mob/living/proc/set_size in R.verbs)
|
||||
return 0
|
||||
|
||||
R.verbs += /mob/living/proc/set_size
|
||||
return 1
|
||||
@@ -197,6 +197,7 @@
|
||||
board_type = new /datum/frame/frame_types/medical_pod
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 3,
|
||||
/obj/item/weapon/reagent_containers/syringe = 3,
|
||||
|
||||
@@ -79,5 +79,28 @@
|
||||
name = T_BOARD_MECHA("Odysseus central control")
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion
|
||||
name = "Alien Circuit"
|
||||
origin_tech = list(TECH_DATA = 5, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1)
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "circuit"
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/main
|
||||
desc = "It is marked with a <span class='alien'>strange glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/peripherals
|
||||
desc = "It is marked with a <span class='alien'>pulsing glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/targeting
|
||||
desc = "It is marked with an <span class='alien'>ominous glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/phasing
|
||||
desc = "It is marked with a <span class='alien'>disturbing glyph</span>."
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha/imperion/damaged
|
||||
name = "Damaged Alien Circuit"
|
||||
desc = "It is marked with a <span class='alien'>constantly shifting glyph</span>."
|
||||
origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 1, TECH_PRECURSOR = 2)
|
||||
|
||||
//Undef the macro, shouldn't be needed anywhere else
|
||||
#undef T_BOARD_MECHA
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -104,10 +104,7 @@
|
||||
var/static/regex/size_mult = new/regex("\\d+")
|
||||
if(size_mult.Find(msg))
|
||||
var/resizing_value = text2num(size_mult.match)
|
||||
if(findtext(msg, "centimeter")) //Because metric system rules
|
||||
H.resize(CLAMP(resizing_value/170 , 0.25, 2)) //170 cm is average crewmember, I think
|
||||
else
|
||||
H.resize(CLAMP(resizing_value , 0.25, 2))
|
||||
H.resize(CLAMP(resizing_value/100 , 0.25, 2))
|
||||
|
||||
|
||||
|
||||
@@ -128,7 +125,7 @@
|
||||
description_info = {"Only accessable by those who implanted the victim. Self-implanting allows everyone to change host size. The following special commands are available:
|
||||
'Shrink' - host size decreases.
|
||||
'Grow' - host size increases.
|
||||
'Resize (NUMBER)' or 'Resize (NUMBER) centimeter(s)' - for accurate size control.
|
||||
'Resize (NUMBER)' - for accurate size control.
|
||||
'Ignore' - keywords in the speech won't have any effect.
|
||||
'Implant-toggle' - toggles implant."}
|
||||
|
||||
|
||||
@@ -105,6 +105,31 @@ Protectiveness | Armor %
|
||||
if(!material) // No point checking for reflection.
|
||||
return ..()
|
||||
|
||||
if(material.negation && prob(material.negation)) // Strange and Alien materials, or just really strong materials.
|
||||
user.visible_message("<span class='danger'>\The [src] completely absorbs [attack_text]!</span>")
|
||||
return TRUE
|
||||
|
||||
if(material.spatial_instability && prob(material.spatial_instability))
|
||||
user.visible_message("<span class='danger'>\The [src] flashes [user] clear of [attack_text]!</span>")
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(round(material.spatial_instability / 10) + 1, user))
|
||||
if(istype(T,/turf/space)) continue
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-6 || T.x<6) continue
|
||||
if(T.y>world.maxy-6 || T.y<6) continue
|
||||
turfs += T
|
||||
if(!turfs.len) turfs += pick(/turf in orange(6))
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked)) return
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, user.loc)
|
||||
spark_system.start()
|
||||
playsound(user.loc, 'sound/effects/teleport.ogg', 50, 1)
|
||||
|
||||
user.loc = picked
|
||||
return PROJECTILE_FORCE_MISS
|
||||
|
||||
if(material.reflectivity)
|
||||
if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/New()
|
||||
if(random_color)
|
||||
blade_color = pick("red","blue","green","purple")
|
||||
blade_color = pick("red","blue","green","purple","white")
|
||||
lcolor = blade_color
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/green/New()
|
||||
@@ -153,6 +153,10 @@
|
||||
blade_color = "purple"
|
||||
lcolor = "#800080"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/white/New()
|
||||
blade_color = "white"
|
||||
lcolor = "#FFFFFF"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/activate(mob/living/user)
|
||||
if(!active)
|
||||
to_chat(user, "<span class='notice'>\The [src] is now energised.</span>")
|
||||
@@ -161,7 +165,6 @@
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
icon_state = "[active_state][blade_color]"
|
||||
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/deactivate(mob/living/user)
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>\The [src] deactivates!</span>")
|
||||
@@ -237,6 +240,80 @@
|
||||
target.taunt(user)
|
||||
target.adjustFireLoss(force * 6) // 30 Burn, for 50 total.
|
||||
|
||||
/*
|
||||
* Charge blade. Uses a cell, and costs energy per strike.
|
||||
*/
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge
|
||||
name = "charge sword"
|
||||
desc = "A small, handheld device which emits a high-energy 'blade'."
|
||||
origin_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 3, TECH_ILLEGAL = 4)
|
||||
active_force = 25
|
||||
armor_penetration = 25
|
||||
|
||||
var/hitcost = 75
|
||||
var/obj/item/weapon/cell/bcell = null
|
||||
var/cell_type = /obj/item/weapon/cell/device
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/proc/use_charge(var/cost)
|
||||
if(active)
|
||||
if(bcell)
|
||||
if(bcell.checked_use(cost))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return null
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(bcell)
|
||||
to_chat(user, "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>")
|
||||
if(!bcell)
|
||||
to_chat(user, "<span class='warning'>The blade does not have a power source installed.</span>")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/attack_self(mob/user as mob)
|
||||
if((!bcell || bcell.charge < hitcost) && !active)
|
||||
to_chat(user, "<span class='notice'>\The [src] does not seem to have power.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/attack(mob/M, mob/user)
|
||||
if(active)
|
||||
if(!use_charge(hitcost))
|
||||
deactivate(user)
|
||||
visible_message("<span class='notice'>\The [src]'s blade flickers, before retracting.</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, cell_type))
|
||||
if(!bcell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
bcell = W
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
else if(W.is_screwdriver() && bcell)
|
||||
bcell.update_icon()
|
||||
bcell.forceMove(get_turf(loc))
|
||||
bcell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from \the [src].</span>")
|
||||
deactivate()
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/get_cell()
|
||||
return bcell
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/charge/loaded/New()
|
||||
..()
|
||||
bcell = new/obj/item/weapon/cell/device/weapon(src)
|
||||
|
||||
/*
|
||||
*Energy Blade
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user