From 68e57c5225c04803554e44727abc73e54cde6fa9 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Mon, 1 Mar 2021 10:08:36 +1100 Subject: [PATCH 1/4] Removes transform from speech bubbles when speaker is scaled at less than 2x. --- code/game/atoms.dm | 2 +- code/modules/mob/living/carbon/brain/brain.dm | 4 ++++ code/modules/mob/living/say.dm | 8 +++++++ code/modules/mob/living/voice/voice.dm | 4 ++++ code/modules/mob/typing_indicator.dm | 23 ++++++++++++++++++- code/modules/multiz/zshadow.dm | 4 ++++ 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 5ec5af0e6b..c20c29be7b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -627,7 +627,7 @@ speech_bubble_hearers += M.client if(length(speech_bubble_hearers)) - var/image/I = image('icons/mob/talk.dmi', src, "[bubble_icon][say_test(message)]", FLY_LAYER) + var/image/I = generate_speech_bubble(src, "[bubble_icon][say_test(message)]", FLY_LAYER) I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_hearers, 30) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 52d0a839e2..d0ffd26bbb 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -54,9 +54,13 @@ return if(!typing_indicator) +<<<<<<< HEAD typing_indicator = new 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") +>>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) if(state && !typing) loc.add_overlay(typing_indicator, TRUE) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 709f146e67..2971d1d703 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -320,7 +320,11 @@ proc/get_radio_key_from_channel(var/channel) var/speech_bubble_test = say_test(message) //var/image/speech_bubble = image('icons/mob/talk_vr.dmi',src,"h[speech_bubble_test]") //VOREStation Edit. Commented this out in case we need to reenable. var/speech_type = speech_bubble_appearance() +<<<<<<< HEAD var/image/speech_bubble = image('icons/mob/talk_vr.dmi',src,"[speech_type][speech_bubble_test]") //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons +======= + var/image/speech_bubble = generate_speech_bubble(src, "[speech_type][speech_bubble_test]") +>>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) var/sb_alpha = 255 var/atom/loc_before_turf = src //VOREStation Add @@ -342,7 +346,11 @@ proc/get_radio_key_from_channel(var/channel) var/turf/ST = get_turf(above) if(ST) var/list/results = get_mobs_and_objs_in_view_fast(ST, world.view) +<<<<<<< HEAD var/image/z_speech_bubble = image('icons/mob/talk_vr.dmi', above, "h[speech_bubble_test]") //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons +======= + var/image/z_speech_bubble = generate_speech_bubble(above, "h[speech_bubble_test]") +>>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) images_to_clients[z_speech_bubble] = list() for(var/item in results["mobs"]) if(item != above && !(item in listening)) diff --git a/code/modules/mob/living/voice/voice.dm b/code/modules/mob/living/voice/voice.dm index 8b9491d902..b5d1895872 100644 --- a/code/modules/mob/living/voice/voice.dm +++ b/code/modules/mob/living/voice/voice.dm @@ -110,7 +110,11 @@ var/speech_bubble_test = say_test(message) //var/image/speech_bubble = image('icons/mob/talk_vr.dmi',comm,"h[speech_bubble_test]") //VOREStation Edit - Commented out in case of needed reenable. var/speech_type = speech_bubble_appearance() +<<<<<<< HEAD var/image/speech_bubble = image('icons/mob/talk_vr.dmi',comm,"[speech_type][speech_bubble_test]") //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons +======= + var/image/speech_bubble = generate_speech_bubble(comm, "[speech_type][speech_bubble_test]") +>>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) spawn(30) qdel(speech_bubble) diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index a260c878fc..a8b8a3d16d 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -1,15 +1,36 @@ +/proc/generate_speech_bubble(var/bubble_loc, var/speech_state, var/set_layer = FLOAT_LAYER) + var/image/I = image('icons/mob/talk.dmi', bubble_loc, speech_state, set_layer) + 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) +<<<<<<< HEAD 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") +>>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) if(state && !typing) add_overlay(typing_indicator, TRUE) diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm index b3e37c6b76..2046c657ae 100644 --- a/code/modules/multiz/zshadow.dm +++ b/code/modules/multiz/zshadow.dm @@ -121,9 +121,13 @@ /mob/zshadow/set_typing_indicator(var/state) if(!typing_indicator) +<<<<<<< HEAD typing_indicator = new typing_indicator.icon = 'icons/mob/talk_vr.dmi' // Looks better on the right with job icons. //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons typing_indicator.icon_state = "typing" +======= + init_typing_indicator("typing") +>>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) if(state && !typing) overlays += typing_indicator typing = 1 From 3578a57dadade9871ef2f0fdee3ac3093fa67cf3 Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Tue, 9 Mar 2021 17:24:04 -0500 Subject: [PATCH 2/4] Update typing_indicator.dm --- code/modules/mob/typing_indicator.dm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index a8b8a3d16d..7f65e4e510 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -1,5 +1,5 @@ /proc/generate_speech_bubble(var/bubble_loc, var/speech_state, var/set_layer = FLOAT_LAYER) - var/image/I = image('icons/mob/talk.dmi', bubble_loc, speech_state, set_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 @@ -22,15 +22,7 @@ return if(!typing_indicator) -<<<<<<< HEAD - 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") ->>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) if(state && !typing) add_overlay(typing_indicator, TRUE) From 1d96426c86cdf5d4403ce944fe0dac24b80dc58b Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Tue, 9 Mar 2021 17:24:21 -0500 Subject: [PATCH 3/4] Update brain.dm --- code/modules/mob/living/carbon/brain/brain.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index d0ffd26bbb..89ff4151fb 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -54,13 +54,7 @@ return if(!typing_indicator) -<<<<<<< HEAD - typing_indicator = new - 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") ->>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) if(state && !typing) loc.add_overlay(typing_indicator, TRUE) From e436ca7b12a50bd4dd200d74c9d99076dc596eca Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 9 Mar 2021 17:28:24 -0500 Subject: [PATCH 4/4] Compat fixes --- .../client/preference_setup/traits/trait_defines.dm | 4 ---- code/modules/mob/living/say.dm | 8 -------- code/modules/mob/living/voice/voice.dm | 4 ---- code/modules/multiz/zshadow.dm | 6 ------ 4 files changed, 22 deletions(-) diff --git a/code/modules/client/preference_setup/traits/trait_defines.dm b/code/modules/client/preference_setup/traits/trait_defines.dm index 1e245bcae5..9eb4793b5e 100644 --- a/code/modules/client/preference_setup/traits/trait_defines.dm +++ b/code/modules/client/preference_setup/traits/trait_defines.dm @@ -23,12 +23,8 @@ // Physical traits are what they sound like, and involve the character's physical body, as opposed to their mental state. /datum/trait/modifier/physical -<<<<<<< HEAD - category = "Physical Quirks" //VOREStation Edit -======= name = "Physical" category = "Physical" ->>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893) /datum/trait/modifier/physical/flimsy diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 2971d1d703..64495ca48c 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -320,11 +320,7 @@ proc/get_radio_key_from_channel(var/channel) var/speech_bubble_test = say_test(message) //var/image/speech_bubble = image('icons/mob/talk_vr.dmi',src,"h[speech_bubble_test]") //VOREStation Edit. Commented this out in case we need to reenable. var/speech_type = speech_bubble_appearance() -<<<<<<< HEAD - var/image/speech_bubble = image('icons/mob/talk_vr.dmi',src,"[speech_type][speech_bubble_test]") //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons -======= var/image/speech_bubble = generate_speech_bubble(src, "[speech_type][speech_bubble_test]") ->>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) var/sb_alpha = 255 var/atom/loc_before_turf = src //VOREStation Add @@ -346,11 +342,7 @@ proc/get_radio_key_from_channel(var/channel) var/turf/ST = get_turf(above) if(ST) var/list/results = get_mobs_and_objs_in_view_fast(ST, world.view) -<<<<<<< HEAD - var/image/z_speech_bubble = image('icons/mob/talk_vr.dmi', above, "h[speech_bubble_test]") //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons -======= var/image/z_speech_bubble = generate_speech_bubble(above, "h[speech_bubble_test]") ->>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) images_to_clients[z_speech_bubble] = list() for(var/item in results["mobs"]) if(item != above && !(item in listening)) diff --git a/code/modules/mob/living/voice/voice.dm b/code/modules/mob/living/voice/voice.dm index b5d1895872..2d070d1a29 100644 --- a/code/modules/mob/living/voice/voice.dm +++ b/code/modules/mob/living/voice/voice.dm @@ -110,11 +110,7 @@ var/speech_bubble_test = say_test(message) //var/image/speech_bubble = image('icons/mob/talk_vr.dmi',comm,"h[speech_bubble_test]") //VOREStation Edit - Commented out in case of needed reenable. var/speech_type = speech_bubble_appearance() -<<<<<<< HEAD - var/image/speech_bubble = image('icons/mob/talk_vr.dmi',comm,"[speech_type][speech_bubble_test]") //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons -======= var/image/speech_bubble = generate_speech_bubble(comm, "[speech_type][speech_bubble_test]") ->>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) spawn(30) qdel(speech_bubble) diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm index 2046c657ae..fcc5ecad65 100644 --- a/code/modules/multiz/zshadow.dm +++ b/code/modules/multiz/zshadow.dm @@ -121,13 +121,7 @@ /mob/zshadow/set_typing_indicator(var/state) if(!typing_indicator) -<<<<<<< HEAD - typing_indicator = new - typing_indicator.icon = 'icons/mob/talk_vr.dmi' // Looks better on the right with job icons. //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons - typing_indicator.icon_state = "typing" -======= init_typing_indicator("typing") ->>>>>>> e67c35e... Removes transform from speech bubbles when speaker is scaled at less than 2x. (#7927) if(state && !typing) overlays += typing_indicator typing = 1