diff --git a/code/controllers/subsystem/dynamic/dynamic.dm b/code/controllers/subsystem/dynamic/dynamic.dm index 73109d0dcca..b56c13308eb 100644 --- a/code/controllers/subsystem/dynamic/dynamic.dm +++ b/code/controllers/subsystem/dynamic/dynamic.dm @@ -202,24 +202,24 @@ SUBSYSTEM_DEF(dynamic) VAR_PRIVATE/next_midround_injection /datum/controller/subsystem/dynamic/proc/admin_panel() - var/list/dat = list("Game Mode Panel

Game Mode Panel

") - dat += "Dynamic Mode \[VV\] \[Refresh\]
" + var/list/dat = list() + dat += "Dynamic Mode VVRefresh
" dat += "Threat Level: [threat_level]
" dat += "Budgets (Roundstart/Midrounds): [initial_round_start_budget]/[threat_level - initial_round_start_budget]
" - dat += "Midround budget to spend: [mid_round_budget] \[Adjust\] \[View Log\]
" + dat += "Midround budget to spend: [mid_round_budget] AdjustView Log
" dat += "
" dat += "Parameters: centre = [threat_curve_centre] ; width = [threat_curve_width].
" dat += "Split parameters: centre = [roundstart_split_curve_centre] ; width = [roundstart_split_curve_width].
" dat += "On average, [clamp(peaceful_percentage, 1, 99)]% of the rounds are more peaceful.
" dat += "Forced extended: [GLOB.dynamic_forced_extended ? "On" : "Off"]
" dat += "No stacking (only one round-ender): [GLOB.dynamic_no_stacking ? "On" : "Off"]
" - dat += "Stacking limit: [GLOB.dynamic_stacking_limit] \[Adjust\]" + dat += "Stacking limit: [GLOB.dynamic_stacking_limit] Adjust" dat += "
" - dat += "\[Force Next Latejoin Ruleset\]
" + dat += "Force Next Latejoin Ruleset
" if (forced_latejoin_rule) dat += {"-> [forced_latejoin_rule.name] <-
"} - dat += "\[Execute Midround Ruleset\]
" + dat += "Execute Midround Ruleset
" dat += "
" dat += "Executed rulesets: " if (executed_rules.len > 0) @@ -229,15 +229,17 @@ SUBSYSTEM_DEF(dynamic) else dat += "none.
" dat += "
Injection Timers: ([get_heavy_midround_injection_chance(dry_run = TRUE)]% heavy midround chance)
" - dat += "Latejoin: [DisplayTimeText(latejoin_injection_cooldown-world.time)] \[Now!\]
" + dat += "Latejoin: [DisplayTimeText(latejoin_injection_cooldown-world.time)] Now!
" var/next_injection = next_midround_injection() if (next_injection == INFINITY) dat += "All midrounds have been exhausted." else - dat += "Midround: [DisplayTimeText(next_injection - world.time)] \[Now!\]
" + dat += "Midround: [DisplayTimeText(next_injection - world.time)] Now!
" - usr << browse(dat.Join(), "window=gamemode_panel;size=500x500") + var/datum/browser/browser = new(usr, "gamemode_panel", "Game Mode Panel", 500, 500) + browser.set_content(dat.Join()) + browser.open() /datum/controller/subsystem/dynamic/Topic(href, href_list) if (..()) // Sanity, maybe ? diff --git a/code/datums/profiling.dm b/code/datums/profiling.dm index 56dd844fb1f..b717346e3fa 100644 --- a/code/datums/profiling.dm +++ b/code/datums/profiling.dm @@ -15,4 +15,6 @@ GLOBAL_REAL_VAR(PROFILE_TIME) var/list/data = PROFILE_STORE[entry] lines += "[entry] => [num2text(data[PROFILE_ITEM_TIME], 10)]ms ([data[PROFILE_ITEM_COUNT]]) (avg:[num2text(data[PROFILE_ITEM_TIME]/(data[PROFILE_ITEM_COUNT] || 1), 99)])" - user << browse("
  1. [lines.Join("
  2. ")]
", "window=[url_encode(GUID())]") + var/datum/browser/browser = new(user, "[url_encode(GUID())]", null, 500, 500) + browser.set_content("
  1. [lines.Join("
  2. ")]
") + browser.open() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 10f0cd72693..986a1c2a5a0 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -19,7 +19,7 @@ if(!check_rights(0)) return - var/dat = "
Game Panel

" + var/dat if(SSticker.current_state <= GAME_STATE_PREGAME) dat += "(Manage Dynamic Rulesets)
" dat += "(Force Roundstart Rulesets)
" @@ -28,12 +28,12 @@ dat += {"-> [rule.name] <-
"} dat += "(Clear Rulesets)
" dat += "(Dynamic mode options)
" - dat += "
" + dat += "
" if(SSticker.IsRoundInProgress()) dat += "(Game Mode Panel)
" dat += "(Manage Dynamic Rulesets)
" + dat += "
" dat += {" -
Create Object
Quick Create Object
Create Turf
@@ -43,7 +43,9 @@ if(marked_datum && istype(marked_datum, /atom)) dat += "Duplicate Marked Datum
" - usr << browse(dat, "window=admin2;size=240x280") + var/datum/browser/browser = new(usr, "admin2", "Game Panel", 240, 280) + browser.set_content(dat) + browser.open() return ////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS @@ -104,10 +106,7 @@ ADMIN_VERB(spawn_cargo, R_SPAWN, "Spawn Cargo", "Spawn a cargo crate.", ADMIN_CA BLACKBOX_LOG_ADMIN_VERB("Spawn Cargo") /datum/admins/proc/dynamic_mode_options(mob/user) - var/dat = {" -

Dynamic Mode Options


-
-

Common options

+ var/dat = {"

Common options

All these options can be changed midround.

Force extended: - Option is [GLOB.dynamic_forced_extended ? "ON" : "OFF"]. @@ -122,18 +121,22 @@ ADMIN_VERB(spawn_cargo, R_SPAWN, "Spawn Cargo", "Spawn a cargo crate.", ADMIN_CA
Stacking threeshold: Current value : [GLOB.dynamic_stacking_limit].
The threshold at which "round-ender" rulesets will stack. A value higher than 100 ensure this never happens.
- "} + "} - user << browse(dat, "window=dyn_mode_options;size=900x650") + var/datum/browser/browser = new(user, "dyn_mode_options", "Dynamic Mode Options", 900, 650) + browser.set_content(dat) + browser.open() /datum/admins/proc/dynamic_ruleset_manager(mob/user) - var/dat = "

Dynamic Ruleset Management


\ - Change these options to forcibly enable or disable dynamic rulesets.
\ - Disabled rulesets will never run, even if they would otherwise be valid.
\ - Enabled rulesets will run even if the qualifying minimum of threat or player count is not present, this does not guarantee that they will necessarily be chosen (for example their weight may be set to 0 in config).
\ - \[force enable all / \ - force disable all / \ - reset all\]" + var/datum/browser/browser = new(user, "dyn_mode_options", "Dynamic Ruleset Management", 900, 650) + var/dat = {" + Change these options to forcibly enable or disable dynamic rulesets.
+ Disabled rulesets will never run, even if they would otherwise be valid.
+ Enabled rulesets will run even if the qualifying minimum of threat or player count is not present, this does not guarantee that they will necessarily be chosen (for example their weight may be set to 0 in config).
+ force enable all + force disable all + reset all + "} if (SSticker.current_state <= GAME_STATE_PREGAME) // Don't bother displaying after the round has started var/static/list/rulesets_by_context = list() @@ -146,29 +149,31 @@ ADMIN_VERB(spawn_cargo, R_SPAWN, "Spawn Cargo", "Spawn a cargo crate.", ADMIN_CA dat += dynamic_ruleset_category_pre_start_display("Roundstart", rulesets_by_context[ROUNDSTART_RULESET]) dat += dynamic_ruleset_category_pre_start_display("Latejoin", rulesets_by_context[LATEJOIN_RULESET]) dat += dynamic_ruleset_category_pre_start_display("Midround", rulesets_by_context[MIDROUND_RULESET]) - user << browse(dat, "window=dyn_mode_options;size=900x650") + browser.set_content(dat) + browser.open() return var/pop_count = length(GLOB.alive_player_list) var/threat_level = SSdynamic.threat_level dat += dynamic_ruleset_category_during_round_display("Latejoin", SSdynamic.latejoin_rules, pop_count, threat_level) dat += dynamic_ruleset_category_during_round_display("Midround", SSdynamic.midround_rules, pop_count, threat_level) - user << browse(dat, "window=dyn_mode_options;size=900x650") + browser.set_content(dat) + browser.open() /datum/admins/proc/dynamic_ruleset_category_pre_start_display(title, list/rules) var/dat = "

[title]

" for (var/datum/dynamic_ruleset/rule as anything in rules) var/forced = GLOB.dynamic_forced_rulesets[rule] || RULESET_NOT_FORCED - var/color = COLOR_BLACK + var/color = COLOR_SILVER switch (forced) if (RULESET_FORCE_ENABLED) color = COLOR_GREEN if (RULESET_FORCE_DISABLED) color = COLOR_RED - dat += "" + dat += "" dat += "
[initial(rule.name)]\[[forced]\]\[\ - force enabled /\ - force disabled /\ - reset\]
[initial(rule.name)]\[ [forced] \] \ + force enabled \ + force disabled \ + reset
" return dat @@ -196,13 +201,14 @@ ADMIN_VERB(spawn_cargo, R_SPAWN, "Spawn Cargo", "Spawn a cargo crate.", ADMIN_CA explanation = " - Forcibly enabled" active = active ? "Active" : "Inactive" - dat += "[rule.name]\ - \[Weight : [rule.weight]\]\ - \[[active][explanation]\]\[\ - force enabled /\ - force disabled /\ - reset\]\ - \[VV\]" + dat += {"[rule.name] + \[ Weight: [rule.weight] \] + \[ [active][explanation] \] + force enabled + force disabled + reset + VV + "} dat += "" return dat diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index a329ad595fa..e3840198665 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -61,4 +61,7 @@ ADMIN_VERB(investigate_show, R_NONE, "Investigate", "Browse various detailed log if(!fexists(F)) to_chat(user, span_danger("No [selected] logfile was found."), confidential = TRUE) return - user << browse(F,"window=investigate[selected];size=800x300") + + var/datum/browser/browser = new(user, "investigate[selected]", "Investigation of [selected]", 800, 300) + browser.set_content(file2text(F)) + browser.open() diff --git a/code/modules/admin/tag.dm b/code/modules/admin/tag.dm index ec0ed3b56fa..eb4b83184db 100644 --- a/code/modules/admin/tag.dm +++ b/code/modules/admin/tag.dm @@ -40,8 +40,8 @@ to_chat(owner, span_warning("[target_datum] was not already tagged.")) /// Quick define for readability -#define TAG_DEL(X) "(UNTAG)" -#define TAG_MARK(X) "(MARK)" +#define TAG_DEL(X) "(UNTAG)" +#define TAG_MARK(X) "(MARK)" #define TAG_SIMPLE_HEALTH(X) "Health: [X.health]" #define TAG_CARBON_HEALTH(X) "Health: [X.health] (\ [X.getBruteLoss()] \ @@ -51,12 +51,12 @@ ADMIN_VERB(display_tags, R_ADMIN, "View Tags", "Display all of the tagged datums.", ADMIN_CATEGORY_GAME) var/index = 0 - var/list/dat = list("
Tag Menu

") + var/list/dat = list() var/list/tagged_datums = user.holder.tagged_datums var/list/marked_datum = user.holder.marked_datum - dat += "
Refresh
" + dat += "
Refresh
" if(LAZYLEN(tagged_datums)) for(var/datum/iter_datum as anything in tagged_datums) index++ @@ -91,8 +91,9 @@ ADMIN_VERB(display_tags, R_ADMIN, "View Tags", "Display all of the tagged datums else dat += "No datums tagged :(" - dat = dat.Join("
") - user << browse(dat, "window=tag;size=800x480") + var/datum/browser/browser = new(user.mob, "tag", "Tag Menu", 800, 480) + browser.set_content(dat.Join("
")) + browser.open() #undef TAG_DEL #undef TAG_MARK diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0ea5e67fbf7..e8d117fdc94 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1380,7 +1380,9 @@ var/list/dat = list("Related accounts by [uppertext(href_list["showrelatedacc"])]:") dat += thing_to_check - usr << browse(dat.Join("
"), "window=related_[C];size=420x300") + var/datum/browser/browser = new(usr, "related_[C]", "[C.ckey] Related Accounts", 420, 300) + browser.set_content(dat.Join("
")) + browser.open() else if(href_list["centcomlookup"]) if(!check_rights(R_ADMIN)) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 804613f3f1b..fc054e9a9cb 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -482,7 +482,9 @@ ADMIN_VERB(modify_goals, R_ADMIN, "Modify Goals", "Modify the station goals for for(var/datum/station_goal/goal as anything in SSstation.get_station_goals()) dat += "[goal.name] - Announce | Remove
" dat += "
Add New Goal" - usr << browse(dat, "window=goals;size=400x400") + var/datum/browser/browser = new(usr, "goals", "Modify Goals", 400, 400) + browser.set_content(dat) + browser.open() ADMIN_VERB(debug_mob_lists, R_DEBUG, "Debug Mob Lists", "For when you just gotta know.", ADMIN_CATEGORY_DEBUG) var/chosen_list = tgui_input_list(user, "Which list?", "Select List", list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients")) @@ -541,7 +543,9 @@ ADMIN_VERB(display_overlay_log, R_DEBUG, "Display Overlay Log", "Display SSoverl render_stats(SSoverlays.stats, user) ADMIN_VERB(init_log, R_DEBUG, "Display Initialize() Log", "Displays a list of things that didn't handle Initialize() properly.", ADMIN_CATEGORY_DEBUG) - user << browse(replacetext(SSatoms.InitLog(), "\n", "
"), "window=initlog") + var/datum/browser/browser = new(user, "initlog", "Initialize Log", 500, 500) + browser.set_content(replacetext(SSatoms.InitLog(), "\n", "
")) + browser.open() ADMIN_VERB(debug_color_test, R_DEBUG, "Colorblind Testing", "Change your view to a budget version of colorblindness to test for usability.", ADMIN_CATEGORY_DEBUG) user.holder.color_test.ui_interact(user.mob) @@ -724,13 +728,15 @@ ADMIN_VERB(check_timer_sources, R_DEBUG, "Check Timer Sources", "Checks the sour var/bucket_list_output = generate_timer_source_output(SStimer.bucket_list) var/second_queue = generate_timer_source_output(SStimer.second_queue) - user << browse({" + var/datum/browser/browser = new(user, "check_timer_sources", "Timer Sources", 700, 700) + browser.set_content({"

bucket_list

[bucket_list_output]

second_queue

[second_queue] - "}, "window=check_timer_sources;size=700x700") + "}) + browser.open() ADMIN_VERB(reestablish_tts_connection, R_DEBUG, "Re-establish Connection To TTS", "Re-establishes connection to the TTS server if possible", ADMIN_CATEGORY_DEBUG) message_admins("[key_name_admin(user)] attempted to re-establish connection to the TTS HTTP server.") diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 177d1f3172f..e13291ed236 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -51,19 +51,23 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w switch(action) //Generic Buttons anyone can use. if("admin_log") - var/dat = "Admin Log
" + var/dat for(var/l in GLOB.admin_activities) dat += "
  • [l]
  • " if(!GLOB.admin_activities.len) dat += "No-one has done anything this round!" - holder << browse(dat, "window=admin_log") + var/datum/browser/browser = new(holder, "admin_log", "Admin Logs", 600, 500) + browser.set_content(dat) + browser.open() if("show_admins") - var/dat = "Current admins:
    " + var/dat if(GLOB.admin_datums) for(var/ckey in GLOB.admin_datums) var/datum/admins/D = GLOB.admin_datums[ckey] dat += "[ckey] - [D.rank_names()]
    " - holder << browse(dat, "window=showadmins;size=600x500") + var/datum/browser/browser = new(holder, "showadmins", "Current admins", 600, 500) + browser.set_content(dat) + browser.open() //Buttons for debug. if("maint_access_engiebrig") if(!is_debugger) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index dd09deae540..0f49164a106 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -429,7 +429,7 @@ ADMIN_VERB(reset_ooc_color, R_FUN, "Reset Player OOC Color", "Returns player OOC //Collect keywords var/list/keywords = mob.get_policy_keywords() var/header = get_policy(POLICY_VERB_HEADER) - var/list/policytext = list(header,"
    ") + var/list/policytext = list(header) var/anything = FALSE for(var/keyword in keywords) var/p = get_policy(keyword) @@ -440,7 +440,9 @@ ADMIN_VERB(reset_ooc_color, R_FUN, "Reset Player OOC Color", "Returns player OOC if(!anything) policytext += "No related rules found." - usr << browse(policytext.Join(""),"window=policy") + var/datum/browser/browser = new(usr, "policy", "Server Policy", 600, 500) + browser.set_content(policytext.Join("")) + browser.open() /client/verb/fix_stat_panel() set name = "Fix Stat Panel" diff --git a/code/modules/mapping/verify.dm b/code/modules/mapping/verify.dm index c9347c7ecdb..b7211bac6a9 100644 --- a/code/modules/mapping/verify.dm +++ b/code/modules/mapping/verify.dm @@ -24,7 +24,6 @@ GLOBAL_LIST_EMPTY(map_reports) /// Show a rendered version of this report to a client. /datum/map_report/proc/show_to(client/C) var/list/html = list() - html += "

    Report for map file [original_path]

    " if(crashed) html += "

    Validation crashed: check the runtime logs.

    " if(!loadable) @@ -48,7 +47,9 @@ GLOBAL_LIST_EMPTY(map_reports) html += "" html += "" html += "

    " - C << browse(html.Join(), "window=[tag];size=600x400") + var/datum/browser/browser = new(C.mob, "[tag]", "Report for map file [original_path]", 600, 400) + browser.set_content(html.Join()) + browser.open() /datum/map_report/Topic(href, href_list) . = ..() diff --git a/html/admin/search.js b/html/admin/search.js index ded0b928446..639a3729fe3 100644 --- a/html/admin/search.js +++ b/html/admin/search.js @@ -23,11 +23,11 @@ function updateSearch(){ } if(found == 0) row.style.display='none'; else{ - row.style.display='block'; + row.style.display='table-row'; /* DON'T make tables with block property */ row.className = alt_style; if(alt_style == 'alt') alt_style = 'norm'; else alt_style = 'alt'; } }catch(err) { } } -} \ No newline at end of file +}