Floating Chat Pixel Fix (#19473)

* Fixed the floating chat offset when you speak from inside a mech.
This commit is contained in:
Geeves
2024-06-18 04:37:58 +00:00
committed by GitHub
parent 3f937d9a07
commit faf5bacaad
4 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -729,7 +729,7 @@
return 0
/atom/movable/proc/get_floating_chat_y_offset()
return 0
return 8
/atom/movable/proc/can_attach_sticker(var/mob/user, var/obj/item/sticker/S)
return TRUE
@@ -582,6 +582,9 @@
/mob/living/heavy_vehicle/get_floating_chat_x_offset()
return -offset_x // reverse the offset
/mob/living/heavy_vehicle/get_floating_chat_y_offset()
return 20
/mob/living/heavy_vehicle/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
if(can_listen())
addtimer(CALLBACK(src, PROC_REF(handle_hear_say), speaker, message), 0.5 SECONDS)
+2 -5
View File
@@ -103,17 +103,14 @@ var/list/floating_chat_colors = list()
I.plane = HUD_PLANE
I.layer = UNDER_HUD_LAYER
I.pixel_x = (-round(I.maptext_width/2) + 16) + attached_holder.get_floating_chat_x_offset()
I.appearance_flags = RESET_COLOR|RESET_ALPHA|RESET_TRANSFORM
I.alpha = 0
I.maptext_width = CHAT_MESSAGE_WIDTH
I.maptext_x = (CHAT_MESSAGE_WIDTH - src.bound_width) * -0.5
I.pixel_y = src.get_floating_chat_y_offset()
I.pixel_x = src.get_floating_chat_x_offset()
I.pixel_y = attached_holder.get_floating_chat_y_offset()
I.pixel_x = (-round(I.maptext_width/2) + 16) + attached_holder.get_floating_chat_x_offset()
//Select the various parameters for the maptext, to ensure pixel-perfect scaling
var/font_family
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Fixed the floating chat offset when you speak from inside a mech."