mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 15:34:35 +00:00
Merge pull request #9815 from VOREStation/upstream-merge-7927
[MIRROR] Removes transform from speech bubbles when speaker is scaled at less than 2x.
This commit is contained in:
committed by
Chompstation Bot
parent
4dafc3196e
commit
7c4508f6c3
@@ -1,15 +1,28 @@
|
||||
/proc/generate_speech_bubble(var/bubble_loc, var/speech_state, var/set_layer = FLOAT_LAYER)
|
||||
var/image/I = image('icons/mob/talk_vr.dmi', bubble_loc, speech_state, set_layer) //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons
|
||||
I.appearance_flags |= (KEEP_APART|RESET_COLOR|PIXEL_SCALE)
|
||||
if(istype(bubble_loc, /atom/movable))
|
||||
var/atom/movable/AM = bubble_loc
|
||||
var/x_scale = AM.get_icon_scale_x()
|
||||
if(abs(x_scale) < 2) // reset transform on bubbles, except for the Very Large
|
||||
I.pixel_z = (AM.icon_expected_height * (x_scale-1))
|
||||
I.appearance_flags |= RESET_TRANSFORM
|
||||
return I
|
||||
|
||||
/mob/proc/init_typing_indicator(var/set_state = "typing")
|
||||
typing_indicator = new
|
||||
typing_indicator.appearance = generate_speech_bubble(null, set_state)
|
||||
typing_indicator.appearance_flags |= (KEEP_APART|RESET_COLOR|RESET_TRANSFORM|PIXEL_SCALE)
|
||||
|
||||
/mob/proc/set_typing_indicator(var/state) //Leaving this here for mobs.
|
||||
|
||||
if(!is_preference_enabled(/datum/client_preference/show_typing_indicator))
|
||||
cut_overlay(typing_indicator, TRUE)
|
||||
if(typing_indicator)
|
||||
cut_overlay(typing_indicator, TRUE)
|
||||
return
|
||||
|
||||
if(!typing_indicator)
|
||||
typing_indicator = new
|
||||
//typing_indicator.icon = 'icons/mob/talk_vr.dmi' //VOREStation Edit - Looks better on the right with job icons.
|
||||
//typing_indicator.icon_state = "typing"
|
||||
typing_indicator.icon = 'icons/mob/talk_vr.dmi' //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons
|
||||
typing_indicator.icon_state = "[speech_bubble_appearance()]_typing"
|
||||
init_typing_indicator("[speech_bubble_appearance()]_typing")
|
||||
|
||||
if(state && !typing)
|
||||
add_overlay(typing_indicator, TRUE)
|
||||
|
||||
Reference in New Issue
Block a user