diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 69f363249fd..e95446094a3 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -456,6 +456,9 @@ GLOBAL_LIST_INIT(pda_styles, sortList(list(MONO, VT, ORBITRON, SHARE))) // Used by PDA and cartridge code to reduce repetitiveness of spritesheets #define PDAIMG(what) {""} +/// Prepares a text to be used for maptext. Use this so it doesn't look hideous. +#define MAPTEXT(text) {"[##text]"} + //Filters #define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, color="#04080FAA") #define GAUSSIAN_BLUR(filter_size) filter(type="blur", size=filter_size) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 593ceebc0ba..ba18fb6d5e5 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -341,7 +341,7 @@ /proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480) if(!isobj(O)) O = new /atom/movable/screen/text() - O.maptext = maptext + O.maptext = MAPTEXT(maptext) O.maptext_height = maptext_height O.maptext_width = maptext_width O.screen_loc = screen_loc diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 842ff641782..e2ae09e89e8 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -988,7 +988,7 @@ world letter = lowertext(letter) var/image/text_image = new(loc = A) - text_image.maptext = "[letter]" + text_image.maptext = MAPTEXT("[letter]") text_image.pixel_x = 7 text_image.pixel_y = 5 qdel(atom_icon) diff --git a/code/_onclick/hud/credits.dm b/code/_onclick/hud/credits.dm index 974f1583236..aaf423ecbcd 100644 --- a/code/_onclick/hud/credits.dm +++ b/code/_onclick/hud/credits.dm @@ -44,7 +44,7 @@ icon = I parent = P icon_state = credited - maptext = credited + maptext = MAPTEXT(credited) maptext_x = world.icon_size + 8 maptext_y = (world.icon_size / 2) - 4 maptext_width = world.icon_size * 3 diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm index 261d898777a..ddc67d4ca0a 100644 --- a/code/_onclick/hud/movable_screen_objects.dm +++ b/code/_onclick/hud/movable_screen_objects.dm @@ -59,7 +59,7 @@ var/atom/movable/screen/movable/M = new() M.name = "Movable UI Object" M.icon_state = "block" - M.maptext = "Movable" + M.maptext = MAPTEXT("Movable") M.maptext_width = 64 var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text|null @@ -78,7 +78,7 @@ var/atom/movable/screen/movable/snap/S = new() S.name = "Snap UI Object" S.icon_state = "block" - S.maptext = "Snap" + S.maptext = MAPTEXT("Snap") S.maptext_width = 64 var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text|null diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm index 5435c0a75eb..23505f19673 100644 --- a/code/controllers/subsystem/explosions.dm +++ b/code/controllers/subsystem/explosions.dm @@ -135,13 +135,13 @@ SUBSYSTEM_DEF(explosions) if(dist < dev) T.color = "red" - T.maptext = "Dev" + T.maptext = MAPTEXT("Dev") else if (dist < heavy) T.color = "yellow" - T.maptext = "Heavy" + T.maptext = MAPTEXT("Heavy") else if (dist < light) T.color = "blue" - T.maptext = "Light" + T.maptext = MAPTEXT("Light") else continue diff --git a/code/datums/action.dm b/code/datums/action.dm index 62ed37605db..c4e2b1aa898 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -640,7 +640,7 @@ /datum/action/cooldown/proc/StartCooldown() next_use_time = world.time + cooldown_time - button.maptext = "[round(cooldown_time/10, 0.1)]" + button.maptext = MAPTEXT("[round(cooldown_time/10, 0.1)]") UpdateButtonIcon() START_PROCESSING(SSfastprocess, src) @@ -654,7 +654,7 @@ UpdateButtonIcon() STOP_PROCESSING(SSfastprocess, src) else - button.maptext = "[round(timeleft/10, 0.1)]" + button.maptext = MAPTEXT("[round(timeleft/10, 0.1)]") /datum/action/cooldown/Grant(mob/M) ..() diff --git a/code/datums/chatmessage.dm b/code/datums/chatmessage.dm index 1eb03ab1cca..b711e3d2ec8 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -162,7 +162,7 @@ var/tgt_color = extra_classes.Find("italics") ? target.chat_color_darkened : target.chat_color // Approximate text height - var/complete_text = "[text]" + var/complete_text = "[text]" var/mheight = WXH_TO_HEIGHT(owned_by.MeasureText(complete_text, null, CHAT_MESSAGE_WIDTH)) approx_lines = max(1, mheight / CHAT_MESSAGE_APPROX_LHEIGHT) @@ -196,7 +196,7 @@ message.maptext_width = CHAT_MESSAGE_WIDTH message.maptext_height = mheight message.maptext_x = (CHAT_MESSAGE_WIDTH - owner.bound_width) * -0.5 - message.maptext = complete_text + message.maptext = MAPTEXT(complete_text) // View the message LAZYADDASSOC(owned_by.seen_messages, message_loc, src) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 0dba8770c6b..125dd563885 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -352,7 +352,7 @@ var/datum/numbered_display/ND = numerical_display_contents[type] ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE ND.sample_object.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]" - ND.sample_object.maptext = "[(ND.number > 1)? "[ND.number]" : ""]" + ND.sample_object.maptext = MAPTEXT("[(ND.number > 1)? "[ND.number]" : ""]") ND.sample_object.layer = ABOVE_HUD_LAYER ND.sample_object.plane = ABOVE_HUD_PLANE cx++ diff --git a/code/game/objects/effects/countdown.dm b/code/game/objects/effects/countdown.dm index 0cbac95e5a2..02017632119 100644 --- a/code/game/objects/effects/countdown.dm +++ b/code/game/objects/effects/countdown.dm @@ -51,7 +51,7 @@ displayed_text = new_val if(displayed_text) - maptext = "[displayed_text]" + maptext = MAPTEXT("[displayed_text]") else maptext = null diff --git a/code/game/objects/items/devices/electroadaptive_pseudocircuit.dm b/code/game/objects/items/devices/electroadaptive_pseudocircuit.dm index 5d8a79d35ae..e32e0ee78f2 100644 --- a/code/game/objects/items/devices/electroadaptive_pseudocircuit.dm +++ b/code/game/objects/items/devices/electroadaptive_pseudocircuit.dm @@ -13,7 +13,7 @@ /obj/item/electroadaptive_pseudocircuit/Initialize() . = ..() - maptext = "[circuits]" + maptext = MAPTEXT(circuits) /obj/item/electroadaptive_pseudocircuit/examine(mob/user) . = ..() @@ -40,7 +40,7 @@ playsound(R, 'sound/items/rped.ogg', 50, TRUE) recharging = TRUE circuits-- - maptext = "[circuits]" + maptext = MAPTEXT(circuits) icon_state = "[initial(icon_state)]_recharging" var/recharge_time = min(600, circuit_cost * 5) //40W of cost for one fabrication = 20 seconds of recharge time; this is to prevent spamming addtimer(CALLBACK(src, .proc/recharge), recharge_time) @@ -53,7 +53,7 @@ if(!is_type_in_typecache(target, recycleable_circuits)) return circuits++ - maptext = "[circuits]" + maptext = MAPTEXT(circuits) user.visible_message("User breaks down [target] with [src].", \ "You recycle [target] into [src]. It now has material for [circuits] circuits.") playsound(user, 'sound/items/deconstruct.ogg', 50, TRUE) diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index 5635d790b38..3f34cda50ec 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -64,7 +64,7 @@ // I assume it's faster to color,tag and OR the turf in, rather // then checking if its there T.color = RANDOM_COLOUR - T.maptext = "[T.x],[T.y],[T.z]" + T.maptext = MAPTEXT("[T.x],[T.y],[T.z]") tagged |= T /obj/item/gps/visible_debug/proc/clear() diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm index 4f6fe3552db..6b248a2e8e9 100644 --- a/code/modules/admin/sound_emitter.dm +++ b/code/modules/admin/sound_emitter.dm @@ -81,7 +81,7 @@ var/new_label = stripped_input(user, "Choose a new label.", "Sound Emitter") if(!new_label) return - maptext = new_label + maptext = MAPTEXT(new_label) to_chat(user, "Label set to [maptext].", confidential = TRUE) if(href_list["edit_sound_file"]) var/new_file = input(user, "Choose a sound file.", "Sound Emitter") as null|sound diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index c53ce57149e..169159b55e2 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -83,7 +83,7 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping) for(var/turf/T in C.can_see()) seen[T]++ for(var/turf/T in seen) - T.maptext = "[seen[T]]" + T.maptext = MAPTEXT(seen[T]) SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm index 4f95aa348ee..28aa034eba1 100644 --- a/code/modules/antagonists/blob/blob_mobs.dm +++ b/code/modules/antagonists/blob/blob_mobs.dm @@ -319,7 +319,7 @@ /mob/living/simple_animal/hostile/blob/blobbernaut/update_health_hud() if(hud_used) - hud_used.healths.maptext = "
[round((health / maxHealth) * 100, 0.5)]%
" + hud_used.healths.maptext = MAPTEXT("
[round((health / maxHealth) * 100, 0.5)]%
") /mob/living/simple_animal/hostile/blob/blobbernaut/AttackingTarget() . = ..() diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 9cdacdc9884..7b22145c56c 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -205,14 +205,14 @@ GLOBAL_LIST_EMPTY(blob_nodes) /mob/camera/blob/update_health_hud() if(blob_core) - hud_used.healths.maptext = "
[round(blob_core.obj_integrity)]
" + hud_used.healths.maptext = MAPTEXT("
[round(blob_core.obj_integrity)]
") for(var/mob/living/simple_animal/hostile/blob/blobbernaut/B in blob_mobs) if(B.hud_used && B.hud_used.blobpwrdisplay) - B.hud_used.blobpwrdisplay.maptext = "
[round(blob_core.obj_integrity)]
" + B.hud_used.blobpwrdisplay.maptext = MAPTEXT("
[round(blob_core.obj_integrity)]
") /mob/camera/blob/proc/add_points(points) blob_points = clamp(blob_points + points, 0, max_blob_points) - hud_used.blobpwrdisplay.maptext = "
[round(blob_points)]
" + hud_used.blobpwrdisplay.maptext = MAPTEXT("
[round(blob_points)]
") /mob/camera/blob/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null) if (!message) diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm index 2eb25714c07..4cd679e1fd1 100644 --- a/code/modules/antagonists/revenant/revenant.dm +++ b/code/modules/antagonists/revenant/revenant.dm @@ -149,7 +149,7 @@ essencecolor = "#9A5ACB" //oh boy you've got a lot of essence else if(!essence) essencecolor = "#1D2953" //oh jeez you're dying - hud_used.healths.maptext = "
[essence]E
" + hud_used.healths.maptext = MAPTEXT("
[essence]E
") /mob/living/simple_animal/revenant/med_hud_set_health() return //we use no hud diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index e09ab938c0d..8ecbfcfa622 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -839,7 +839,7 @@ STOP_PROCESSING(SSfastprocess, src) return - button.maptext = "[COOLDOWN_TIMELEFT(src, usable_cooldown) * 0.1]" + button.maptext = MAPTEXT("[COOLDOWN_TIMELEFT(src, usable_cooldown) * 0.1]") /** * Clears the currently mimic'd skillchip, if any exists. diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 3783427adcc..e37ad48eabc 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -106,7 +106,7 @@ var/strength = round(rad_places[i] / 1000, 0.1) var/image/pic = image(loc = place) var/mutable_appearance/MA = new() - MA.maptext = "[strength]k" + MA.maptext = MAPTEXT("[strength]k") MA.color = "#04e604" MA.layer = RAD_TEXT_LAYER MA.plane = GAME_PLANE diff --git a/code/modules/mob/living/carbon/alien/screen.dm b/code/modules/mob/living/carbon/alien/screen.dm index 32a9eac20bb..363479d0b5d 100644 --- a/code/modules/mob/living/carbon/alien/screen.dm +++ b/code/modules/mob/living/carbon/alien/screen.dm @@ -1,7 +1,7 @@ /mob/living/carbon/alien/proc/updatePlasmaDisplay() if(hud_used) //clientless aliens - hud_used.alien_plasma_display.maptext = "
[round(getPlasma())]
" + hud_used.alien_plasma_display.maptext = MAPTEXT("
[round(getPlasma())]
") /mob/living/carbon/alien/larva/updatePlasmaDisplay() return diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 6a2f0d08739..32143c3b97b 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -375,7 +375,7 @@ if(changeling) changeling.regenerate() hud_used.lingchemdisplay.invisibility = 0 - hud_used.lingchemdisplay.maptext = "
[round(changeling.chem_charges)]
" + hud_used.lingchemdisplay.maptext = MAPTEXT("
[round(changeling.chem_charges)]
") else hud_used.lingchemdisplay.invisibility = INVISIBILITY_ABSTRACT diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 45be892542b..8cfc140d6c3 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -250,7 +250,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - summoner.health) / abs(HEALTH_THRESHOLD_DEAD - summoner.maxHealth)) * 100) else resulthealth = round((summoner.health / summoner.maxHealth) * 100, 0.5) - hud_used.healths.maptext = "
[resulthealth]%
" + hud_used.healths.maptext = MAPTEXT("
[resulthealth]%
") /mob/living/simple_animal/hostile/guardian/adjustHealth(amount, updating_health = TRUE, forced = FALSE) //The spirit is invincible, but passes on damage to the summoner . = amount diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm index 2a9e9de616e..c4eb6df4540 100644 --- a/code/modules/mob/living/simple_animal/hostile/ooze.dm +++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm @@ -99,7 +99,7 @@ ///Updates the display that shows the mobs nutrition /mob/living/simple_animal/hostile/ooze/proc/updateNutritionDisplay() if(hud_used) //clientless oozes - hud_used.alien_plasma_display.maptext = "
[round(ooze_nutrition)]
" + hud_used.alien_plasma_display.maptext = MAPTEXT("
[round(ooze_nutrition)]
") ///* Gelatinious Ooze code below *\\\\ diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index a5bd681e8d9..107e413fc4f 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -134,7 +134,7 @@ maptext_x = 10 if(100) maptext_x = 8 - maptext = "[current_number]" //Finally, apply the maptext + maptext = MAPTEXT(current_number) //Finally, apply the maptext /obj/machinery/ticket_machine/attackby(obj/item/I, mob/user, params) ..() @@ -176,8 +176,8 @@ to_chat(user, "You take a ticket from [src], looks like you're ticket number #[ticket_number]...") var/obj/item/ticket_machine_ticket/theirticket = new /obj/item/ticket_machine_ticket(get_turf(src)) theirticket.name = "Ticket #[ticket_number]" - theirticket.maptext = "[ticket_number]" - theirticket.saved_maptext = "[ticket_number]" + theirticket.maptext = MAPTEXT(ticket_number) + theirticket.saved_maptext = MAPTEXT(ticket_number) theirticket.ticket_number = ticket_number theirticket.source = src theirticket.owner = user diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index e712fbcbb54..e47f84476cc 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -454,7 +454,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri return var/image/restraints_icon = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "cuff") - restraints_icon.maptext = "= CABLE_RESTRAINTS_COST ? "" : "style='color: red'"]>[CABLE_RESTRAINTS_COST]" + restraints_icon.maptext = MAPTEXT("= CABLE_RESTRAINTS_COST ? "" : "style='color: red'"]>[CABLE_RESTRAINTS_COST]") var/list/radial_menu = list( "Layer 1" = image(icon = 'icons/hud/radial.dmi', icon_state = "coil-red"),