Merge remote-tracking branch 'upstream/master'

This commit is contained in:
DeltaFire
2020-09-25 23:14:04 +02:00
20 changed files with 241 additions and 127 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+1
View File
@@ -122,6 +122,7 @@
#define FIRE_PRIORITY_PROJECTILES 200 #define FIRE_PRIORITY_PROJECTILES 200
#define FIRE_PRIORITY_TICKER 200 #define FIRE_PRIORITY_TICKER 200
#define FIRE_PRIORITY_ATMOS_ADJACENCY 300 #define FIRE_PRIORITY_ATMOS_ADJACENCY 300
#define FIRE_PRIORITY_STATPANEL 390
#define FIRE_PRIORITY_CHAT 400 #define FIRE_PRIORITY_CHAT 400
#define FIRE_PRIORITY_OVERLAYS 500 #define FIRE_PRIORITY_OVERLAYS 500
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost. #define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
-6
View File
@@ -553,12 +553,6 @@
if(D.vars[varname] == value) if(D.vars[varname] == value)
return D return D
//remove all nulls from a list
/proc/removeNullsFromList(list/L)
while(L.Remove(null))
continue
return L
//Copies a list, and all lists inside it recusively //Copies a list, and all lists inside it recusively
//Does not copy any other reference type //Does not copy any other reference type
/proc/deepCopyList(list/l) /proc/deepCopyList(list/l)
+3 -2
View File
@@ -1223,7 +1223,7 @@ GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of ico
return "<img class='icon icon-[A.icon_state]' src='data:image/png;base64,[bicon_cache[key]]'>" return "<img class='icon icon-[A.icon_state]' src='data:image/png;base64,[bicon_cache[key]]'>"
//Costlier version of icon2html() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs. //Costlier version of icon2html() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.
/proc/costly_icon2html(thing, target) /proc/costly_icon2html(thing, target, sourceonly = FALSE)
if (!thing) if (!thing)
return return
@@ -1231,4 +1231,5 @@ GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of ico
return icon2html(thing, target) return icon2html(thing, target)
var/icon/I = getFlatIcon(thing) var/icon/I = getFlatIcon(thing)
return icon2html(I, target) return icon2html(I, target, sourceonly = sourceonly)
+35 -21
View File
@@ -16,7 +16,6 @@ SUBSYSTEM_DEF(air)
var/cost_atmos_machinery = 0 var/cost_atmos_machinery = 0
var/cost_equalize = 0 var/cost_equalize = 0
var/list/active_turfs = list()
var/list/hotspots = list() var/list/hotspots = list()
var/list/networks = list() var/list/networks = list()
var/list/pipenets_needing_rebuilt = list() var/list/pipenets_needing_rebuilt = list()
@@ -54,13 +53,16 @@ SUBSYSTEM_DEF(air)
msg += "PN:[round(cost_pipenets,1)]|" msg += "PN:[round(cost_pipenets,1)]|"
msg += "AM:[round(cost_atmos_machinery,1)]" msg += "AM:[round(cost_atmos_machinery,1)]"
msg += "} " msg += "} "
msg += "AT:[active_turfs.len]|" var/active_turfs_len = get_amt_active_turfs()
msg += "AT:[active_turfs_len]|"
msg += "EG:[get_amt_excited_groups()]|" msg += "EG:[get_amt_excited_groups()]|"
msg += "HS:[hotspots.len]|" msg += "HS:[hotspots.len]|"
msg += "PN:[networks.len]|" msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|" msg += "HP:[high_pressure_delta.len]|"
msg += "AS:[active_super_conductivity.len]|" msg += "AS:[active_super_conductivity.len]|"
msg += "AT/MS:[round((cost ? active_turfs.len/cost : 0),0.1)]" msg += "GA:[get_amt_gas_mixes()]|"
msg += "MG:[get_max_gas_mixes()]|"
msg += "AT/MS:[round((cost ? active_turfs_len/cost : 0),0.1)]"
return ..() return ..()
/datum/controller/subsystem/air/Initialize(timeofday) /datum/controller/subsystem/air/Initialize(timeofday)
@@ -70,9 +72,11 @@ SUBSYSTEM_DEF(air)
setup_atmos_machinery() setup_atmos_machinery()
setup_pipenets() setup_pipenets()
gas_reactions = init_gas_reactions() gas_reactions = init_gas_reactions()
extools_update_reactions()
return ..() return ..()
/datum/controller/subsystem/air/proc/extools_update_ssair() /datum/controller/subsystem/air/proc/extools_update_ssair()
/datum/controller/subsystem/air/proc/extools_update_reactions()
/datum/controller/subsystem/air/fire(resumed = 0) /datum/controller/subsystem/air/fire(resumed = 0)
var/timer = TICK_USAGE_REAL var/timer = TICK_USAGE_REAL
@@ -237,6 +241,8 @@ SUBSYSTEM_DEF(air)
return return
/datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0) /datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0)
return process_turf_equalize_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
/*
//cache for sanic speed //cache for sanic speed
var/fire_count = times_fired var/fire_count = times_fired
if (!resumed) if (!resumed)
@@ -251,8 +257,11 @@ SUBSYSTEM_DEF(air)
//equalize_pressure_in_zone(T, fire_count) //equalize_pressure_in_zone(T, fire_count)
if (MC_TICK_CHECK) if (MC_TICK_CHECK)
return return
*/
/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0) /datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
return process_active_turfs_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
/*
//cache for sanic speed //cache for sanic speed
var/fire_count = times_fired var/fire_count = times_fired
if (!resumed) if (!resumed)
@@ -266,10 +275,10 @@ SUBSYSTEM_DEF(air)
T.process_cell(fire_count) T.process_cell(fire_count)
if (MC_TICK_CHECK) if (MC_TICK_CHECK)
return return
*/
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0) /datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
if(process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)) return process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
sleep()
/* /*
if (!resumed) if (!resumed)
src.currentrun = excited_groups.Copy() src.currentrun = excited_groups.Copy()
@@ -288,13 +297,20 @@ SUBSYSTEM_DEF(air)
return return
*/ */
/datum/controller/subsystem/air/proc/process_active_turfs_extools()
/datum/controller/subsystem/air/proc/process_turf_equalize_extools()
/datum/controller/subsystem/air/proc/process_excited_groups_extools() /datum/controller/subsystem/air/proc/process_excited_groups_extools()
/datum/controller/subsystem/air/proc/get_amt_excited_groups() /datum/controller/subsystem/air/proc/get_amt_excited_groups()
/datum/controller/subsystem/air/proc/get_amt_active_turfs()
/datum/controller/subsystem/air/proc/get_amt_gas_mixes()
/datum/controller/subsystem/air/proc/get_max_gas_mixes()
/datum/controller/subsystem/air/proc/add_to_active_extools()
/datum/controller/subsystem/air/proc/remove_from_active_extools()
/datum/controller/subsystem/air/proc/get_active_turfs()
/datum/controller/subsystem/air/proc/clear_active_turfs()
/datum/controller/subsystem/air/proc/remove_from_active(turf/open/T) /datum/controller/subsystem/air/proc/remove_from_active(turf/open/T)
active_turfs -= T remove_from_active_extools(T)
if(currentpart == SSAIR_ACTIVETURFS)
currentrun -= T
#ifdef VISUALIZE_ACTIVE_TURFS #ifdef VISUALIZE_ACTIVE_TURFS
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#00ff00") T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#00ff00")
#endif #endif
@@ -308,9 +324,7 @@ SUBSYSTEM_DEF(air)
T.add_atom_colour("#00ff00", TEMPORARY_COLOUR_PRIORITY) T.add_atom_colour("#00ff00", TEMPORARY_COLOUR_PRIORITY)
#endif #endif
T.set_excited(TRUE) T.set_excited(TRUE)
active_turfs |= T add_to_active_extools(T)
if(currentpart == SSAIR_ACTIVETURFS)
currentrun |= T
if(blockchanges) if(blockchanges)
T.eg_garbage_collect() T.eg_garbage_collect()
else if(T.flags_1 & INITIALIZED_1) else if(T.flags_1 & INITIALIZED_1)
@@ -335,12 +349,11 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/proc/setup_allturfs() /datum/controller/subsystem/air/proc/setup_allturfs()
var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz)) var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))
var/list/active_turfs = src.active_turfs
var/times_fired = ++src.times_fired var/times_fired = ++src.times_fired
// Clear active turfs - faster than removing every single turf in the world // Clear active turfs - faster than removing every single turf in the world
// one-by-one, and Initalize_Atmos only ever adds `src` back in. // one-by-one, and Initalize_Atmos only ever adds `src` back in.
active_turfs.Cut() clear_active_turfs()
for(var/thing in turfs_to_init) for(var/thing in turfs_to_init)
var/turf/T = thing var/turf/T = thing
@@ -348,28 +361,27 @@ SUBSYSTEM_DEF(air)
continue continue
T.Initalize_Atmos(times_fired) T.Initalize_Atmos(times_fired)
CHECK_TICK CHECK_TICK
var/starting_ats = get_amt_active_turfs()
if(active_turfs.len) if(starting_ats)
var/starting_ats = active_turfs.len
sleep(world.tick_lag) sleep(world.tick_lag)
var/timer = world.timeofday var/timer = world.timeofday
log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).") log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).")
for(var/turf/T in active_turfs) var/list/turfs_to_check = get_amt_active_turfs()
for(var/T in turfs_to_check)
GLOB.active_turfs_startlist += T GLOB.active_turfs_startlist += T
//now lets clear out these active turfs //now lets clear out these active turfs
var/list/turfs_to_check = active_turfs.Copy()
do do
var/list/new_turfs_to_check = list() var/list/new_turfs_to_check = list()
for(var/turf/open/T in turfs_to_check) for(var/turf/open/T in turfs_to_check)
new_turfs_to_check += T.resolve_active_graph() new_turfs_to_check += T.resolve_active_graph()
CHECK_TICK CHECK_TICK
for(var/T in new_turfs_to_check)
active_turfs += new_turfs_to_check add_to_active_extools(T)
turfs_to_check = new_turfs_to_check turfs_to_check = new_turfs_to_check
while (turfs_to_check.len) while (turfs_to_check.len)
var/ending_ats = active_turfs.len var/ending_ats = get_amt_active_turfs()
/*for(var/thing in excited_groups) /*for(var/thing in excited_groups)
var/datum/excited_group/EG = thing var/datum/excited_group/EG = thing
//EG.self_breakdown(space_is_all_consuming = 1) //EG.self_breakdown(space_is_all_consuming = 1)
@@ -445,6 +457,8 @@ SUBSYSTEM_DEF(air)
return pipe_init_dirs_cache[type]["[dir]"] return pipe_init_dirs_cache[type]["[dir]"]
/proc/get_extools_benchmarks()
#undef SSAIR_PIPENETS #undef SSAIR_PIPENETS
#undef SSAIR_ATMOSMACHINERY #undef SSAIR_ATMOSMACHINERY
#undef SSAIR_ACTIVETURFS #undef SSAIR_ACTIVETURFS
+158 -82
View File
@@ -1,7 +1,8 @@
SUBSYSTEM_DEF(statpanels) SUBSYSTEM_DEF(statpanels)
name = "Stat Panels" name = "Stat Panels"
wait = 4 wait = 4
init_order = INIT_ORDER_STATPANELS //Really early so we can debug MC roundstart init_order = INIT_ORDER_STATPANELS
priority = FIRE_PRIORITY_STATPANEL
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/list/currentrun = list() var/list/currentrun = list()
var/encoded_global_data var/encoded_global_data
@@ -9,13 +10,15 @@ SUBSYSTEM_DEF(statpanels)
var/list/cached_images = list() var/list/cached_images = list()
/datum/controller/subsystem/statpanels/fire(resumed = FALSE) /datum/controller/subsystem/statpanels/fire(resumed = FALSE)
if(!resumed) if (!resumed)
var/datum/map_config/cached = SSmapping.next_map_config var/datum/map_config/cached = SSmapping.next_map_config
var/round_time = world.time - SSticker.round_start_time
var/list/global_data = list( var/list/global_data = list(
"Map: [SSmapping.config?.map_name || "Loading..."]", "Map: [SSmapping.config?.map_name || "Loading..."]",
cached ? "Next Map: [cached.map_name]" : null, cached ? "Next Map: [cached.map_name]" : null,
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]", "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
"[SStime_track.stat_time_text]", "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]",
"Round Time: [round_time > MIDNIGHT_ROLLOVER ? "[round(round_time/MIDNIGHT_ROLLOVER)]:[worldtime2text()]" : worldtime2text()]",
"Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]", "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]",
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)" "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)"
) )
@@ -24,96 +27,169 @@ SUBSYSTEM_DEF(statpanels)
var/ETA = SSshuttle.emergency.getModeStr() var/ETA = SSshuttle.emergency.getModeStr()
if(ETA) if(ETA)
global_data += "[ETA] [SSshuttle.emergency.getTimerStr()]" global_data += "[ETA] [SSshuttle.emergency.getTimerStr()]"
/* Please fix
if(SSvote.mode)
var/static/list/supported = list(PLURALITY_VOTING, APPROVAL_VOTING)
global_data += "Vote active!, There is currently a vote running. Question: [SSvote.question]"
if(!(SSvote.vote_system in supported))
global_data += "<STATPANEL VOTING DISABLED>, The current vote system is not supported by statpanel rendering. Please vote manually by opening the vote popup using the action button or chat link."
return
global_data += "Time Left:, [round(SSvote.end_time - world.time)] seconds"
global_data += "Choices:"
for(var/i in 1 to SSvote.choice_statclicks.len)
var/choice = SSvote.choice_statclicks[i]
var/ivotedforthis = FALSE
if(usr.ckey)
switch(SSvote.vote_system)
if(APPROVAL_VOTING)
ivotedforthis = SSvote.voted[usr.ckey] && (i in SSvote.voted[usr.ckey])
if(PLURALITY_VOTING)
ivotedforthis = SSvote.voted[usr.ckey] == i
global_data += (ivotedforthis? "\[X\]" : "\[ \]", SSvote.choice_statclicks[choice])
*/
encoded_global_data = url_encode(json_encode(global_data)) encoded_global_data = url_encode(json_encode(global_data))
var/list/mc_data = list(
list("CPU:", world.cpu),
list("Instances:", "[num2text(world.contents.len, 10)]"),
list("World Time:", "[world.time]"),
list("Globals:", GLOB.stat_entry(), "\ref[GLOB]"),
list("[config]:", config.stat_entry(), "\ref[config]"),
list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"),
list("Master Controller:", Master.stat_entry(), "\ref[Master]"),
list("Failsafe Controller:", Failsafe.stat_entry(), "\ref[Failsafe]"),
list("","")
)
for(var/ss in Master.subsystems)
var/datum/controller/subsystem/sub_system = ss
mc_data[++mc_data.len] = list("\[[sub_system.state_letter()]][sub_system.name]", sub_system.stat_entry(), "\ref[sub_system]")
mc_data[++mc_data.len] = list("Camera Net", "Cameras: [GLOB.cameranet.cameras.len] | Chunks: [GLOB.cameranet.chunks.len]", "\ref[GLOB.cameranet]")
mc_data_encoded = url_encode(json_encode(mc_data))
src.currentrun = GLOB.clients.Copy() src.currentrun = GLOB.clients.Copy()
mc_data_encoded = null
var/list/currentrun = src.currentrun var/list/currentrun = src.currentrun
while(length(currentrun)) while(length(currentrun))
var/client/target = currentrun[length(currentrun)] var/client/target = currentrun[length(currentrun)]
currentrun.len-- currentrun.len--
var/ping_str = url_encode("Ping: [round(target.lastping, 1)]ms (Average: [round(target.avgping, 1)]ms)") if(!target.statbrowser_ready)
var/other_str = url_encode(json_encode(target.mob.get_status_tab_items())) continue
target << output("[encoded_global_data];[ping_str];[other_str]", "statbrowser:update") if(target.stat_tab == "Status")
var/ping_str = url_encode("Ping: [round(target.lastping, 1)]ms (Average: [round(target.avgping, 1)]ms)")
var/other_str = url_encode(json_encode(target.mob.get_status_tab_items()))
target << output("[encoded_global_data];[ping_str];[other_str]", "statbrowser:update")
if(!target.holder) if(!target.holder)
target << output("", "statbrowser:remove_admin_tabs") target << output("", "statbrowser:remove_admin_tabs")
else else
var/turf/eye_turf = get_turf(target.eye) if(!("MC" in target.panel_tabs) || !("Tickets" in target.panel_tabs))
var/coord_entry = url_encode(COORD(eye_turf)) target << output("[url_encode(target.holder.href_token)]", "statbrowser:add_admin_tabs")
target << output("[mc_data_encoded];[coord_entry];[url_encode(target.holder.href_token)]", "statbrowser:update_mc") if(target.stat_tab == "MC")
var/list/ahelp_tickets = GLOB.ahelp_tickets.stat_entry() var/turf/eye_turf = get_turf(target.eye)
target << output("[url_encode(json_encode(ahelp_tickets))];", "statbrowser:update_tickets") var/coord_entry = url_encode(COORD(eye_turf))
if(!length(GLOB.sdql2_queries)) if(!mc_data_encoded)
generate_mc_data()
target << output("[mc_data_encoded];[coord_entry]", "statbrowser:update_mc")
if(target.stat_tab == "Tickets")
var/list/ahelp_tickets = GLOB.ahelp_tickets.stat_entry()
target << output("[url_encode(json_encode(ahelp_tickets))];", "statbrowser:update_tickets")
if(!length(GLOB.sdql2_queries) && ("SDQL2" in target.panel_tabs))
target << output("", "statbrowser:remove_sdql2") target << output("", "statbrowser:remove_sdql2")
else else if(length(GLOB.sdql2_queries) && (target.stat_tab == "SDQL2" || !("SDQL2" in target.panel_tabs)))
var/list/sqdl2A = list() var/list/sdql2A = list()
sqdl2A[++sqdl2A.len] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj)) sdql2A[++sdql2A.len] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj))
var/list/sqdl2B = list() var/list/sdql2B = list()
for(var/i in GLOB.sdql2_queries) for(var/i in GLOB.sdql2_queries)
var/datum/SDQL2_query/Q = i var/datum/SDQL2_query/Q = i
sqdl2B = Q.generate_stat() sdql2B = Q.generate_stat()
sqdl2A += sqdl2B sdql2A += sdql2B
target << output(url_encode(json_encode(sqdl2A)), "statbrowser:update_sdql2") target << output(url_encode(json_encode(sdql2A)), "statbrowser:update_sdql2")
var/list/proc_holders = target.mob.get_proc_holders() if(target.mob)
target.spell_tabs.Cut() var/mob/M = target.mob
for(var/phl in proc_holders) if((target.stat_tab in target.spell_tabs) || !length(target.spell_tabs) && (length(M.mob_spell_list) || length(M.mind?.spell_list)))
var/list/proc_holder_list = phl var/list/proc_holders = M.get_proc_holders()
target.spell_tabs |= proc_holder_list[1] target.spell_tabs.Cut()
var/proc_holders_encoded = "" for(var/phl in proc_holders)
if(length(proc_holders)) var/list/proc_holder_list = phl
proc_holders_encoded = url_encode(json_encode(proc_holders)) target.spell_tabs |= proc_holder_list[1]
target << output("[url_encode(json_encode(target.spell_tabs))];[proc_holders_encoded]", "statbrowser:update_spells") var/proc_holders_encoded = ""
if(target.mob?.listed_turf) if(length(proc_holders))
var/mob/target_mob = target.mob proc_holders_encoded = url_encode(json_encode(proc_holders))
if(!target_mob.TurfAdjacent(target_mob.listed_turf)) target << output("[url_encode(json_encode(target.spell_tabs))];[proc_holders_encoded]", "statbrowser:update_spells")
target << output("", "statbrowser:remove_listedturf") if(M?.listed_turf)
target_mob.listed_turf = null var/mob/target_mob = M
else if(!target_mob.TurfAdjacent(target_mob.listed_turf))
var/list/overrides = list() target << output("", "statbrowser:remove_listedturf")
var/list/turfitems = list() target_mob.listed_turf = null
for(var/img in target.images) else if(target.stat_tab == M?.listed_turf.name || !(M?.listed_turf.name in target.panel_tabs))
var/image/target_image = img var/list/overrides = list()
if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override) var/list/turfitems = list()
continue for(var/img in target.images)
overrides += target_image.loc var/image/target_image = img
if(!(REF(target_mob.listed_turf) in cached_images)) if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override)
target << browse_rsc(getFlatIcon(target_mob.listed_turf, no_anim = TRUE), "[REF(target_mob.listed_turf)].png") continue
cached_images += REF(target_mob.listed_turf) overrides += target_image.loc
turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), "[REF(target_mob.listed_turf)].png") turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), icon2html(target_mob.listed_turf, target, sourceonly=TRUE))
for(var/tc in target_mob.listed_turf) for(var/tc in target_mob.listed_turf)
var/atom/movable/turf_content = tc var/atom/movable/turf_content = tc
if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT) if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT)
continue continue
if(turf_content.invisibility > target_mob.see_invisible) if(turf_content.invisibility > target_mob.see_invisible)
continue continue
if(turf_content in overrides) if(turf_content in overrides)
continue continue
if(turf_content.IsObscured()) if(turf_content.IsObscured())
continue continue
if(length(turfitems) < 30) // only create images for the first 30 items on the turf, for performance reasons if(length(turfitems) < 30) // only create images for the first 30 items on the turf, for performance reasons
if(!(REF(turf_content) in cached_images)) if(!(REF(turf_content) in cached_images))
target << browse_rsc(getFlatIcon(turf_content, no_anim = TRUE), "[REF(turf_content)].png") cached_images += REF(turf_content)
cached_images += REF(turf_content) turf_content.RegisterSignal(turf_content, COMSIG_PARENT_QDELETING, /atom/.proc/remove_from_cache) // we reset cache if anything in it gets deleted
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), "[REF(turf_content)].png") if(ismob(turf_content) || length(turf_content.overlays) > 2)
else turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), costly_icon2html(turf_content, target, sourceonly=TRUE))
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content)) else
turfitems = url_encode(json_encode(turfitems)) turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), icon2html(turf_content, target, sourceonly=TRUE))
target << output("[turfitems];", "statbrowser:update_listedturf") else
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content))
else
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content))
turfitems = url_encode(json_encode(turfitems))
target << output("[turfitems];", "statbrowser:update_listedturf")
if(MC_TICK_CHECK) if(MC_TICK_CHECK)
return return
/datum/controller/subsystem/statpanels/proc/generate_mc_data()
var/list/mc_data = list(
list("CPU:", world.cpu),
list("Instances:", "[num2text(world.contents.len, 10)]"),
list("World Time:", "[world.time]"),
list("Globals:", GLOB.stat_entry(), "\ref[GLOB]"),
list("[config]:", config.stat_entry(), "\ref[config]"),
list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"),
list("Master Controller:", Master.stat_entry(), "\ref[Master]"),
list("Failsafe Controller:", Failsafe.stat_entry(), "\ref[Failsafe]"),
list("","")
)
for(var/ss in Master.subsystems)
var/datum/controller/subsystem/sub_system = ss
mc_data[++mc_data.len] = list("\[[sub_system.state_letter()]][sub_system.name]", sub_system.stat_entry(), "\ref[sub_system]")
mc_data[++mc_data.len] = list("Camera Net", "Cameras: [GLOB.cameranet.cameras.len] | Chunks: [GLOB.cameranet.chunks.len]", "\ref[GLOB.cameranet]")
mc_data_encoded = url_encode(json_encode(mc_data))
/atom/proc/remove_from_cache()
SSstatpanels.cached_images -= REF(src)
/// verbs that send information from the browser UI
/client/verb/set_tab(tab as text|null)
set name = "Set Tab"
set hidden = TRUE
stat_tab = tab
/client/verb/send_tabs(tabs as text|null)
set name = "Send Tabs"
set hidden = TRUE
panel_tabs |= tabs
/client/verb/remove_tabs(tabs as text|null)
set name = "Remove Tabs"
set hidden = TRUE
panel_tabs -= tabs
/client/verb/reset_tabs()
set name = "Reset Tabs"
set hidden = TRUE
panel_tabs = list()
/client/verb/panel_ready()
set name = "Panel Ready"
set hidden = TRUE
statbrowser_ready = TRUE
+3 -2
View File
@@ -718,8 +718,9 @@ GENETICS SCANNER
to_chat(user, "<span class='notice'>Pressure: [round(pressure,0.01)] kPa</span>") to_chat(user, "<span class='notice'>Pressure: [round(pressure,0.01)] kPa</span>")
for(var/id in air_contents.get_gases()) for(var/id in air_contents.get_gases())
var/gas_concentration = air_contents.get_moles(id)/total_moles if(air_contents.get_moles(id) >= 0.005)
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>") var/gas_concentration = air_contents.get_moles(id)/total_moles
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>")
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] &deg;C ([round(temperature, 0.01)] K)</span>") to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] &deg;C ([round(temperature, 0.01)] K)</span>")
else else
+1 -1
View File
@@ -210,7 +210,7 @@
if(!get_excited() && air.compare(enemy_air)) if(!get_excited() && air.compare(enemy_air))
//testing("Active turf found. Return value of compare(): [is_active]") //testing("Active turf found. Return value of compare(): [is_active]")
set_excited(TRUE) set_excited(TRUE)
SSair.active_turfs |= src SSair.add_to_active_extools(src)
/turf/open/proc/GetHeatCapacity() /turf/open/proc/GetHeatCapacity()
. = air.heat_capacity() . = air.heat_capacity()
-6
View File
@@ -273,12 +273,6 @@ GLOBAL_LIST(topic_status_cache)
..() ..()
/world/Del() /world/Del()
// memory leaks bad
var/num_deleted = 0
for(var/datum/gas_mixture/GM)
GM.__gasmixture_unregister()
num_deleted++
log_world("Deallocated [num_deleted] gas mixtures")
shutdown_logging() // makes sure the thread is closed before end, else we terminate shutdown_logging() // makes sure the thread is closed before end, else we terminate
..() ..()
@@ -196,7 +196,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
//Compares sample to self to see if within acceptable ranges that group processing may be enabled //Compares sample to self to see if within acceptable ranges that group processing may be enabled
//Returns: a string indicating what check failed, or "" if check passes //Returns: a string indicating what check failed, or "" if check passes
/datum/gas_mixture/proc/react(turf/open/dump_location) /datum/gas_mixture/proc/react(datum/holder)
//Performs various reactions such as combustion or fusion (LOL) //Performs various reactions such as combustion or fusion (LOL)
//Returns: 1 if any reaction took place; 0 otherwise //Returns: 1 if any reaction took place; 0 otherwise
@@ -243,7 +243,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
set_moles(path, text2num(gas[id])) set_moles(path, text2num(gas[id]))
archive() archive()
return 1 return 1
/*
/datum/gas_mixture/react(datum/holder) /datum/gas_mixture/react(datum/holder)
. = NO_REACTION . = NO_REACTION
if(!total_moles()) if(!total_moles())
@@ -291,7 +291,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
. |= reaction.react(src, holder) . |= reaction.react(src, holder)
if (. & STOP_REACTIONS) if (. & STOP_REACTIONS)
break break
*/
//Takes the amount of the gas you want to PP as an argument //Takes the amount of the gas you want to PP as an argument
//So I don't have to do some hacky switches/defines/magic strings //So I don't have to do some hacky switches/defines/magic strings
//eg: //eg:
@@ -275,7 +275,7 @@
for (var/gas_id in air.get_gases()) for (var/gas_id in air.get_gases())
gas_power += (gas_fusion_powers[gas_id]*air.get_moles(gas_id)) gas_power += (gas_fusion_powers[gas_id]*air.get_moles(gas_id))
var/instability = MODULUS((gas_power*INSTABILITY_GAS_POWER_FACTOR)**2,toroidal_size) //Instability effects how chaotic the behavior of the reaction is var/instability = MODULUS((gas_power*INSTABILITY_GAS_POWER_FACTOR)**2,toroidal_size) //Instability effects how chaotic the behavior of the reaction is
cached_scan_results[id] = instability//used for analyzer feedback cached_scan_results["fusion"] = instability//used for analyzer feedback
var/plasma = (initial_plasma-FUSION_MOLE_THRESHOLD)/(scale_factor) //We have to scale the amounts of carbon and plasma down a significant amount in order to show the chaotic dynamics we want var/plasma = (initial_plasma-FUSION_MOLE_THRESHOLD)/(scale_factor) //We have to scale the amounts of carbon and plasma down a significant amount in order to show the chaotic dynamics we want
var/carbon = (initial_carbon-FUSION_MOLE_THRESHOLD)/(scale_factor) //We also subtract out the threshold amount to make it harder for fusion to burn itself out. var/carbon = (initial_carbon-FUSION_MOLE_THRESHOLD)/(scale_factor) //We also subtract out the threshold amount to make it harder for fusion to burn itself out.
@@ -206,7 +206,7 @@
. = other_airs + air . = other_airs + air
if(null in .) if(null in .)
stack_trace("[src]([REF(src)]) has one or more null gas mixtures, which may cause bugs. Null mixtures will not be considered in reconcile_air().") stack_trace("[src]([REF(src)]) has one or more null gas mixtures, which may cause bugs. Null mixtures will not be considered in reconcile_air().")
return removeNullsFromList(.) return listclearnulls(.)
/datum/pipeline/proc/reconcile_air() /datum/pipeline/proc/reconcile_air()
var/list/datum/gas_mixture/GL = list() var/list/datum/gas_mixture/GL = list()
+9
View File
@@ -130,6 +130,15 @@
/// datum wrapper for client view /// datum wrapper for client view
var/datum/view_data/view_size var/datum/view_data/view_size
/// our current tab
var/stat_tab
/// whether our browser is ready or not yet
var/statbrowser_ready = FALSE
/// list of all tabs
var/list/panel_tabs = list()
/// list of tabs containing spells and abilities /// list of tabs containing spells and abilities
var/list/spell_tabs = list() var/list/spell_tabs = list()
/// list of tabs containing verbs /// list of tabs containing verbs
+1 -1
View File
@@ -64,7 +64,7 @@
originMachine.visible_message("[originMachine] beeps and seems lifeless.") originMachine.visible_message("[originMachine] beeps and seems lifeless.")
kill() kill()
return return
vendingMachines = removeNullsFromList(vendingMachines) vendingMachines = listclearnulls(vendingMachines)
if(!vendingMachines.len) //if every machine is infected if(!vendingMachines.len) //if every machine is infected
for(var/obj/machinery/vending/upriser in infectedMachines) for(var/obj/machinery/vending/upriser in infectedMachines)
if(prob(70) && !QDELETED(upriser)) if(prob(70) && !QDELETED(upriser))
@@ -5,7 +5,8 @@
default_color = "00FF00" default_color = "00FF00"
blacklisted = 0 blacklisted = 0
sexes = 0 sexes = 0
species_traits = list(MUTCOLORS,NOEYES,NOTRANSSTING,HAS_FLESH,HAS_BONE) species_traits = list(MUTCOLORS,NOEYES,NOTRANSSTING,HAS_FLESH,HAS_BONE,HAIR)
hair_alpha = 210
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
mutant_bodyparts = list("ipc_screen" = "Blank", "ipc_antenna" = "None") mutant_bodyparts = list("ipc_screen" = "Blank", "ipc_antenna" = "None")
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
+12
View File
@@ -50,6 +50,18 @@
--> -->
<div class="commit sansserif"> <div class="commit sansserif">
<h2 class="date">25 September 2020</h2>
<h3 class="author">Putnam3145 updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Removed a non-working proc that already had its functionality implemented in another proc in the same file.</li>
</ul>
<h2 class="date">24 September 2020</h2>
<h3 class="author">Putnam3145 updated:</h3>
<ul class="changes bgimages16">
<li class="refactor">Atmos is free.</li>
</ul>
<h2 class="date">22 September 2020</h2> <h2 class="date">22 September 2020</h2>
<h3 class="author">Arturlang updated:</h3> <h3 class="author">Arturlang updated:</h3>
<ul class="changes bgimages16"> <ul class="changes bgimages16">
+7
View File
@@ -27361,3 +27361,10 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- imageadd: Mechsuits, robotics jumpsuits added to RoboDrobe - imageadd: Mechsuits, robotics jumpsuits added to RoboDrobe
timothyteakettle: timothyteakettle:
- tweak: character previews should be more consistent now - tweak: character previews should be more consistent now
2020-09-24:
Putnam3145:
- refactor: Atmos is free.
2020-09-25:
Putnam3145:
- bugfix: Removed a non-working proc that already had its functionality implemented
in another proc in the same file.
@@ -0,0 +1,4 @@
author: "CoreFlare"
delete-after: True
changes:
- rscadd: "IPC's can have hair. Why wasn't this added earlier. Use the bald hairstyle for no hair."
Binary file not shown.