mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Maptext 2023 tweaks [NO GBP] (#76397)
## About The Pull Request - In PR https://github.com/tgstation/tgstation/pull/76356 missed a few bits of maptext around, such as shuttle signs and the supermatter. Small text adjustments/fixes here. - Large amount of feedback about the context tooltips. Increases size, lightens default color as to not be too imposing. 🆑 LT3 qol: Context tooltip size increased fix: Fixed remnants of old maptext code on various things /🆑
This commit is contained in:
@@ -992,7 +992,7 @@ world
|
||||
letter = lowertext(letter)
|
||||
|
||||
var/image/text_image = new(loc = A)
|
||||
text_image.maptext = MAPTEXT("<font size = 4>[letter]</font>")
|
||||
text_image.maptext = MAPTEXT_TINY_UNICODE("[letter]")
|
||||
text_image.pixel_x = 7
|
||||
text_image.pixel_y = 5
|
||||
qdel(atom_icon)
|
||||
|
||||
@@ -79,9 +79,9 @@
|
||||
button.maptext = ""
|
||||
else
|
||||
if (cooldown_rounding > 0)
|
||||
button.maptext = MAPTEXT("<b>[round(time_left/10, cooldown_rounding)]</b>")
|
||||
button.maptext = MAPTEXT("[round(time_left/10, cooldown_rounding)]")
|
||||
else
|
||||
button.maptext = MAPTEXT("<b>[round(time_left/10)]</b>")
|
||||
button.maptext = MAPTEXT("[round(time_left/10)]")
|
||||
|
||||
if(!IsAvailable() || !is_action_active(button))
|
||||
return
|
||||
|
||||
@@ -104,9 +104,9 @@
|
||||
|
||||
last_color_index = (last_color_index % colors.len) + 1
|
||||
|
||||
var/message = "<b style='color: [colors[last_color_index]]; text-align: center; font-size: 32px'>"
|
||||
message += "HEY! An admin is trying to talk to you!<br>Check your chat window, and click their name to respond!"
|
||||
message += "</b>"
|
||||
var/message = "<span style='color: [colors[last_color_index]]; text-align: center; font-size: 24pt'>"
|
||||
message += "HEY!<br>An admin is trying to talk to you!<br>Check your chat window,<br>and click their name to respond!"
|
||||
message += "</span>"
|
||||
|
||||
maptext = MAPTEXT(message)
|
||||
last_update_time = world.time
|
||||
|
||||
+5
-5
@@ -2035,7 +2035,7 @@
|
||||
active_hud.screentip_text.maptext = ""
|
||||
return
|
||||
|
||||
active_hud.screentip_text.maptext_y = 16 // 16px lines us up with the action buttons top left corner
|
||||
active_hud.screentip_text.maptext_y = 7 // 7px lines us up with the action buttons top left corner
|
||||
var/lmb_rmb_line = ""
|
||||
var/ctrl_lmb_ctrl_rmb_line = ""
|
||||
var/alt_lmb_alt_rmb_line = ""
|
||||
@@ -2102,15 +2102,15 @@
|
||||
extra_lines++
|
||||
|
||||
if(extra_lines)
|
||||
extra_context = "<br><span class='small'>[lmb_rmb_line][ctrl_lmb_ctrl_rmb_line][alt_lmb_alt_rmb_line][shift_lmb_ctrl_shift_lmb_line]</span>"
|
||||
//first extra line pushes atom name line up 11px, subsequent lines push it up 8px, this offsets that and keeps the first line in the same place
|
||||
active_hud.screentip_text.maptext_y = 5 + (extra_lines - 1) * -8
|
||||
extra_context = "<br><span style='font-size: 6pt'>[lmb_rmb_line][ctrl_lmb_ctrl_rmb_line][alt_lmb_alt_rmb_line][shift_lmb_ctrl_shift_lmb_line]</span>"
|
||||
//first extra line pushes atom name line up 8px, subsequent lines push it up 10px, this offsets that and keeps the first line in the same place
|
||||
active_hud.screentip_text.maptext_y = -1 + (extra_lines - 1) * -10
|
||||
|
||||
if (screentips_enabled == SCREENTIP_PREFERENCE_CONTEXT_ONLY && extra_context == "")
|
||||
active_hud.screentip_text.maptext = ""
|
||||
else
|
||||
//We inline a MAPTEXT() here, because there's no good way to statically add to a string like this
|
||||
active_hud.screentip_text.maptext = "<span class='maptext' style='text-align: center; font-size: 6pt; color: [active_hud.screentip_color]'>[name][extra_context]</span>"
|
||||
active_hud.screentip_text.maptext = "<span class='maptext' style='text-align: center; font-size: 12pt; color: [active_hud.screentip_color]'>[name][extra_context]</span>"
|
||||
|
||||
/// Gets a merger datum representing the connected blob of objects in the allowed_types argument
|
||||
/atom/proc/GetMergeGroup(id, list/allowed_types)
|
||||
|
||||
@@ -229,10 +229,10 @@
|
||||
/obj/machinery/status_display/proc/display_shuttle_status(obj/docking_port/mobile/shuttle)
|
||||
if(!shuttle)
|
||||
// the shuttle is missing - no processing
|
||||
set_messages("shutl?","")
|
||||
set_messages("shutl","not in service")
|
||||
return PROCESS_KILL
|
||||
else if(shuttle.timer)
|
||||
var/line1 = "- [shuttle.getModeStr()] -"
|
||||
var/line1 = "<<< [shuttle.getModeStr()]"
|
||||
var/line2 = shuttle.getTimerStr()
|
||||
|
||||
set_messages(line1, line2)
|
||||
@@ -387,8 +387,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/status_display/evac, 32)
|
||||
if(!SSshuttle.supply)
|
||||
// Might be missing in our first update on initialize before shuttles
|
||||
// have loaded. Cross our fingers that it will soon return.
|
||||
line1 = "CARGO"
|
||||
line2 = "shutl?"
|
||||
line1 = "shutl"
|
||||
line2 = "not in service"
|
||||
else if(SSshuttle.supply.mode == SHUTTLE_IDLE)
|
||||
if(is_station_level(SSshuttle.supply.z))
|
||||
line1 = "CARGO"
|
||||
@@ -397,7 +397,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/status_display/evac, 32)
|
||||
line1 = ""
|
||||
line2 = ""
|
||||
else
|
||||
line1 = "- [SSshuttle.supply.getModeStr()] -"
|
||||
line1 = "<<< [SSshuttle.supply.getModeStr()]"
|
||||
line2 = SSshuttle.supply.getTimerStr()
|
||||
set_messages(line1, line2)
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
displayed_text = new_val
|
||||
|
||||
if(displayed_text)
|
||||
maptext = MAPTEXT("<font size = [text_size]>[displayed_text]</font>")
|
||||
maptext = MAPTEXT("[displayed_text]")
|
||||
else
|
||||
maptext = null
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
|
||||
/obj/effect/countdown/supermatter
|
||||
name = "supermatter damage"
|
||||
text_size = 1
|
||||
color = "#00ff80"
|
||||
|
||||
/obj/effect/countdown/supermatter/get_value()
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
client.mob?.hud_used?.screentip_color = value
|
||||
|
||||
/datum/preference/color/screentip_color/create_default_value()
|
||||
return "#ffd391"
|
||||
return LIGHT_COLOR_FAINT_BLUE
|
||||
|
||||
@@ -42,7 +42,7 @@ GLOBAL_DATUM(rpgtitle_controller, /datum/rpgtitle_controller)
|
||||
|
||||
//we must prepare for the mother of all strings
|
||||
new_crewmember.maptext_height = max(new_crewmember.maptext_height, 32)
|
||||
new_crewmember.maptext_width = max(new_crewmember.maptext_width, 80)
|
||||
new_crewmember.maptext_width = max(new_crewmember.maptext_width, 112)
|
||||
new_crewmember.maptext_x = -24 - new_crewmember.base_pixel_x
|
||||
new_crewmember.maptext_y = -32
|
||||
|
||||
|
||||
@@ -1045,7 +1045,7 @@ GLOBAL_LIST_INIT(mafia_role_by_alignment, setup_mafia_role_by_alignment())
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/mafia_popup/proc/update_text(text)
|
||||
maptext = MAPTEXT("<b style='color: [COLOR_RED]; text-align: center; font-size: 32px'> [text]</b>")
|
||||
maptext = MAPTEXT("<span style='color: [COLOR_RED]; text-align: center; font-size: 24pt'> [text]</span>")
|
||||
maptext_width = view_to_pixels(owner.body.client?.view_size.getView())[1]
|
||||
owner.body.client?.screen += src
|
||||
addtimer(CALLBACK(src, PROC_REF(null_text), owner.body.client), 10 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
|
||||
|
||||
Reference in New Issue
Block a user