Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/__DEFINES/html_assistant.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#define HTML_SKELETON_INTERNAL(head, body) \
"<!DOCTYPE html><html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><meta http-equiv='X-UA-Compatible' content='IE=edge'>[head]</head><body>[body]</body></html>"

#define HTML_SKELETON_TITLE(title, body) HTML_SKELETON_INTERNAL("<title>[title]</title>", body)
#define HTML_SKELETON(body) HTML_SKELETON_INTERNAL("", body)
2 changes: 0 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ block( \
if(I.imp_in)
. |= I.imp_in

#define SIGNV(X) ((X<0)?-1:1)

/proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
var/turf/T
Expand Down Expand Up @@ -301,7 +300,6 @@ block( \
if(IS_OPAQUE_TURF(T))
return 0
return 1
#undef SIGNV


/proc/isInSight(atom/A, atom/B)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/stat_tracking.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
lines += "[entry] => [num2text(data[STAT_ENTRY_TIME], 10)]ms ([data[STAT_ENTRY_COUNT]]) (avg:[num2text(data[STAT_ENTRY_TIME]/(data[STAT_ENTRY_COUNT] || 1), 99)])"

if (user)
user << browse("<ol><li>[lines.Join("</li><li>")]</li></ol>", "window=[url_encode("stats:[REF(stats)]")]")
user << browse(HTML_SKELETON("<ol><li>[lines.Join("</li><li>")]</li></ol>"), "window=[url_encode("stats:[REF(stats)]")]")

. = lines.Join("\n")
11 changes: 11 additions & 0 deletions code/_onclick/hud/map_popups.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@
/atom/movable/screen/proc/set_position(x, y, px = 0, py = 0)
if(assigned_map)
screen_loc = "[assigned_map]:[x]:[px],[y]:[py]"
ASYNC
// HACK: This fixes the character creator in 516 being small and relying on other byondui things (like cameras) to open in order to update and refresh.
// This also will fix the camera console screen being offset, Gateway, and admin pod panel.
// Adding 100 then setting it back seemed to do the trick!
// Why the fuck does this work? This is some byond bug and I honestly have no fucking clue why this works.
// I don't think plane master will be affected, I hope.
// We're stuck in the belly of this awful machine.
sleep(0.2 SECONDS) // If it's too fast, it has a chance to fail? Idk. This seems like a good number.
screen_loc = "[assigned_map]:[x+100]:[px],[y+100]:[py]"
sleep(0.2 SECONDS)
screen_loc = "[assigned_map]:[x]:[px],[y]:[py]"
else
screen_loc = "[x]:[px],[y]:[py]"

Expand Down
7 changes: 7 additions & 0 deletions code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -526,3 +526,10 @@
/datum/config_entry/string/elasticsearch_metrics_endpoint

/datum/config_entry/string/elasticsearch_metrics_apikey

/**
* Tgui ui_act payloads larger than 2kb are split into chunks a maximum of 1kb in size.
* This flag represents the maximum chunk count the server is willing to receive.
*/
/datum/config_entry/number/tgui_max_chunk_count
default = 32
3 changes: 0 additions & 3 deletions code/datums/looping_sounds/machinery_sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
end_sound = 'sound/machines/generator/generator_end.ogg'
volume = 40

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// [CELADON-ADD] - CELADON_GRAVGEN
/datum/looping_sound/gravity_generator
mid_sounds = list('mod_celadon/_storage_sounds/sound/effects/beam.ogg')
Expand All @@ -40,7 +38,6 @@
falloff_distance = 3
// [/CELADON-ADD]

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/oven
start_sound = 'sound/machines/oven/oven_loop_start.ogg'
start_length = 12
Expand Down
4 changes: 3 additions & 1 deletion code/datums/profiling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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("<ol><li>[lines.Join("</li><li>")]</li></ol>", "window=[url_encode(GUID())]")
var/datum/browser/browser = new(user, "[url_encode(GUID())]", null, 500, 500)
browser.set_content("<ol><li>[lines.Join("</li><li>")]</li></ol>")
browser.open()
2 changes: 1 addition & 1 deletion code/datums/wounds/_wounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,4 @@

/// Gets the name of the wound with any interactable topic if possible
/datum/wound/proc/get_topic_name(mob/user)
return show_wound_topic(user) ? "<a href='?src=[REF(src)];wound_topic=1'>[lowertext(name)]</a>" : lowertext(name)
return show_wound_topic(user) ? "<a href='byond://?src=[REF(src)];wound_topic=1'>[lowertext(name)]</a>" : lowertext(name)
2 changes: 1 addition & 1 deletion code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)
to_chat(target, span_boldnotice("If you ghost, log out or close your client now, your character will shortly be permanently removed from the round."))
name = "[name] ([occupant.name])"
log_admin(span_notice("[key_name(target)] entered a stasis pod."))
message_admins("[key_name_admin(target)] entered a stasis pod. (<A HREF='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
message_admins("[key_name_admin(target)] entered a stasis pod. (<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
add_fingerprint(target)

/obj/machinery/cryopod/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/telecomms/machines/message_server.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
M << browse_rsc(picture.picture_image, "pda_photo.png")
M << browse("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>PDA Photo</title></head>" \
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
+ "<img src='pda_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' />" \
+ "<img src='pda_photo.png' width='192' style='image-rendering:pixelated' />" \
+ "</body></html>", "window=pdaphoto;size=[picture.psize_x]x[picture.psize_y];can-close=true")
onclose(M, "pdaphoto")

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/charter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
to_chat(user, span_notice("Your name has been sent to your employers for approval."))
// Autoapproves after a certain time
response_timer_id = addtimer(CALLBACK(src, PROC_REF(rename_station), new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
to_chat(GLOB.admins, span_adminnotice("<b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]"))
to_chat(GLOB.admins, span_adminnotice("<b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A href='byond://?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]"))

/obj/item/sector_charter/proc/reject_proposed(user)
if(!user)
Expand Down
8 changes: 5 additions & 3 deletions code/game/objects/items/devices/paicard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@
dat += "<A href='byond://?src=[REF(src)];wipe=1'>\[Wipe current pAI personality\]</a><br>"
else
dat += "No personality installed.<br>"
dat += "Searching for a personality... Press view available personalities to notify potential candidates."
dat += "Searching for a personality... Press view available personalities to notify potential candidates.<br>"
dat += "<A href='byond://?src=[REF(src)];request=1'>\[View available personalities\]</a><br>"
user << browse(dat, "window=paicard")
onclose(user, "paicard")

var/datum/browser/popup = new(user, "Personal AI Device", name, 500, 430)
popup.set_content(dat)
popup.open()
return

/obj/item/paicard/Topic(href, href_list)
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/storage/secure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
if (!locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='byond://?src=[REF(src)];type=1'>1</A>-<A href='byond://?src=[REF(src)];type=2'>2</A>-<A href='byond://?src=[REF(src)];type=3'>3</A><BR>\n<A href='byond://?src=[REF(src)];type=4'>4</A>-<A href='byond://?src=[REF(src)];type=5'>5</A>-<A href='byond://?src=[REF(src)];type=6'>6</A><BR>\n<A href='byond://?src=[REF(src)];type=7'>7</A>-<A href='byond://?src=[REF(src)];type=8'>8</A>-<A href='byond://?src=[REF(src)];type=9'>9</A><BR>\n<A href='byond://?src=[REF(src)];type=R'>R</A>-<A href='byond://?src=[REF(src)];type=0'>0</A>-<A href='byond://?src=[REF(src)];type=E'>E</A><BR>\n</TT>", message)
user << browse(dat, "window=caselock;size=300x280")
var/datum/browser/popup = new(user, "Passcode Interface", name, 300, 280)
popup.set_content(dat)
popup.open()

/obj/item/storage/secure/Topic(href, href_list)
..()
Expand Down
14 changes: 6 additions & 8 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@
dat += "<hr/>"
if(SSticker.IsRoundInProgress())
dat += "<a href='byond://?src=[REF(src)];[HrefToken()];gamemode_panel=1'>(Game Mode Panel)</a><BR>"
dat += "<hr/>"
dat += {"
<BR>
<A href='byond://?src=[REF(src)];[HrefToken()];create_object=1'>Create Object</A><br>
<A href='byond://?src=[REF(src)];[HrefToken()];quick_create_object=1'>Quick Create Object</A><br>
<A href='byond://?src=[REF(src)];[HrefToken()];create_turf=1'>Create Turf</A><br>
Expand All @@ -460,7 +460,6 @@
var/datum/browser/popup = new(usr, "admin2", null, 240, 280)
popup.set_content(dat)
popup.open()
// usr << browse(dat, "window=admin2;size=240x280")
return

/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
Expand Down Expand Up @@ -868,10 +867,7 @@
to_chat(usr, "<b>No AIs located</b>" , confidential = TRUE)

/datum/admins/proc/dynamic_mode_options(mob/user)
var/dat = {"
<center><B><h2>Dynamic Mode Options</h2></B></center><hr>
<br/>
<h3>Common options</h3>
var/dat = {"<h3>Common options</h3>
<i>All these options can be changed midround.</i> <br/>
<br/>
<b>Force extended:</b> - Option is <a href='byond://?src=[REF(src)];[HrefToken()];f_dynamic_force_extended=1'> <b>[GLOB.dynamic_forced_extended ? "ON" : "OFF"]</a></b>.
Expand Down Expand Up @@ -901,9 +897,11 @@
Midround injection delay:<br>
Minimum: <A href='byond://?src=[REF(src)];[HrefToken()];f_dynamic_roundstart_midround_min=1'>-> [GLOB.dynamic_midround_delay_min / 60 / 10] <-</A> Minutes<br>
Maximum: <A href='byond://?src=[REF(src)];[HrefToken()];f_dynamic_roundstart_midround_max=1'>-> [GLOB.dynamic_midround_delay_max / 60 / 10] <-</A> Minutes<br>
"}
"}

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/create_or_modify_area()
set category = "Debug"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/permissionedit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
deadminlink = " <a class='small' href='byond://?src=[REF(src)];[HrefToken()];editrights=deactivate;key=[adm_ckey]'>\[DA\]</a>"
var/verify_link = ""
if (D.blocked_by_2fa)
verify_link += " | <a class='small' href='?src=[REF(src)];[HrefToken()];editrights=verify;key=[adm_ckey]'>\[2FA VERIFY\]</a>"
verify_link += " | <a class='small' href='byond://?src=[REF(src)];[HrefToken()];editrights=verify;key=[adm_ckey]'>\[2FA VERIFY\]</a>"
output += "<tr>"
output += "<td style='text-align:center;'>[adm_ckey]<br>[deadminlink]<a class='small' href='?src=[REF(src)];[HrefToken()];editrights=remove;key=[adm_ckey]'>\[-\]</a><a class='small' href='?src=[REF(src)];[HrefToken()];editrights=sync;key=[adm_ckey]'>\[SYNC TGDB\]</a>[verify_link]</td>"
output += "<td style='text-align:center;'>[adm_ckey]<br>[deadminlink]<a class='small' href='byond://?src=[REF(src)];[HrefToken()];editrights=remove;key=[adm_ckey]'>\[-\]</a><a class='small' href='byond://?src=[REF(src)];[HrefToken()];editrights=sync;key=[adm_ckey]'>\[SYNC TGDB\]</a>[verify_link]</td>"
output += "<td><a href='byond://?src=[REF(src)];[HrefToken()];editrights=rank;key=[adm_ckey]'>[D.rank.name]</a></td>"
output += "<td><a class='small' href='byond://?src=[REF(src)];[HrefToken()];editrights=permissions;key=[adm_ckey]'>[rights2text(D.rank.include_rights," ")]</a></td>"
output += "<td><a class='small' href='byond://?src=[REF(src)];[HrefToken()];editrights=permissions;key=[adm_ckey]'>[rights2text(D.rank.exclude_rights," ", "-")]</a></td>"
Expand Down
2 changes: 0 additions & 2 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1879,8 +1879,6 @@
var/list/dat = list()
dat += thing_to_check

// usr << browse(dat.Join("<br>"), "window=related_[C];size=420x300")

var/datum/browser/popup = new(usr, "related_[C]", "Related accounts by [uppertext(href_list["showrelatedacc"])]:", 425, 300)
popup.set_content(dat.Join("<br>"))
popup.open()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/SDQL2/SDQL_2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
if(length(select_text))
var/text = islist(select_text)? select_text.Join() : select_text
var/static/result_offset = 0
showmob << browse(text, "window=SDQL-result-[result_offset++]")
showmob << browse(HTML_SKELETON(text), "window=SDQL-result-[result_offset++]")
show_next_to_key = null
if(qdel_on_finish)
qdel(src)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/getlogs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
message_admins("[key_name_admin(src)] accessed file: [path]")
switch(alert("View (in game), Open (in your system's text editor), or Download?", path, "View", "Open", "Download"))
if ("View")
src << browse("<pre style='word-wrap: break-word;'>[html_encode(file2text(file(path)))]</pre>", list2params(list("window" = "viewfile.[path]")))
src << browse(HTML_SKELETON("<pre style='word-wrap: break-word;'>[html_encode(file2text(file(path)))]</pre>"), list2params(list("window" = "viewfile.[path]")))
if ("Open")
src << run(file(path))
if ("Download")
Expand Down
6 changes: 3 additions & 3 deletions code/modules/admin/verbs/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ GLOBAL_PROTECT(admin_verbs_debug_extra)
for(var/turf/T in seen)
T.maptext = "[seen[T]]"
BLACKBOX_LOG_ADMIN_VERB("Show Camera Range")
BLACKBOX_LOG_ADMIN_VERB("Show Camera Range")
//BLACKBOX_LOG_ADMIN_VERB("Show Camera Range") // what the fuck? Why?

#ifdef TESTING
GLOBAL_LIST_EMPTY(dirty_vars)
Expand Down Expand Up @@ -146,7 +146,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
output += "<li><font color='red'>Camera not connected to wall at [ADMIN_VERBOSEJMP(C1)] Network: [json_encode(C1.network)]</font></li>"

output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
usr << browse(HTML_SKELETON(output),"window=airreport;size=1000x500")
BLACKBOX_LOG_ADMIN_VERB("Show Camera Report")

/client/proc/intercom_view()
Expand Down Expand Up @@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
dat += "[ADMIN_VERBOSEJMP(T)]\n"
dat += "<br>"

usr << browse(dat, "window=at_list")
usr << browse(HTML_SKELETON(dat), "window=at_list")

BLACKBOX_LOG_ADMIN_VERB("Show Roundstart Active Turfs")

Expand Down
17 changes: 8 additions & 9 deletions code/modules/admin/verbs/secrets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@
switch(action)
//Generic Buttons anyone can use.
if("admin_log")
var/dat = "<B>Admin Log<HR></B>"
var/dat
for(var/l in GLOB.admin_log)
dat += "<li>[l]</li>"
if(!GLOB.admin_log.len)
dat += "No-one has done anything this round!"
//holder << browse(dat, "window=admin_log") WS edit
var/datum/browser/popup = new(holder, "admin_log", null, 300, 430)
popup.set_content(dat)
popup.open()
var/datum/browser/browser = new(holder, "admin_log", "Admin Logs", 600, 500)
browser.set_content(dat)
browser.open()

//WS Begin - Mentors
if("mentor_log")
Expand All @@ -78,15 +77,15 @@
//WS end

if("show_admins")
var/dat = "<B>Current admins:</B><HR>"
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.name]<br>"
//holder << browse(dat, "window=showadmins;size=600x500") WS edit
var/datum/browser/popup = new(holder, "showadmins", null, 600, 500)
popup.set_content(dat)
popup.open()
var/datum/browser/browser = new(holder, "showadmins", "Current admins", 600, 500)
browser.set_content(dat)
browser.open()

//Buttons for debug.
if("maint_access_engiebrig")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
msg += "Your version: [byond_version]<br>"
msg += "Required version to remove this message: [cwv] or later<br>"
msg += "Visit <a href=\"https://secure.byond.com/download\">BYOND's website</a> to get the latest version of BYOND.<br>"
src << browse(msg, "window=warning_popup")
src << browse(HTML_SKELETON(msg), "window=warning_popup")
else
to_chat(src, span_danger("<b>Your version of byond may be getting out of date:</b>"))
to_chat(src, CONFIG_GET(string/client_warn_message))
Expand Down
Loading
Loading