mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Speech bubble refactor and Features (#13598)
* Speech Bubble Update and Refactor * OBJECTION * magistrate too * args * clean up and plug in atom say * better
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
name = "alien"
|
||||
voice_name = "alien"
|
||||
speak_emote = list("hisses")
|
||||
bubble_icon = "alien"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
gender = NEUTER
|
||||
dna = null
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "alienq_s"
|
||||
status_flags = CANPARALYSE
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
bubble_icon = "alienroyal"
|
||||
large = 1
|
||||
ventcrawler = 0
|
||||
|
||||
|
||||
@@ -269,12 +269,12 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
M.hear_say(message_pieces, verb, italics, src, speech_sound, sound_vol, sound_frequency)
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
spawn(0)
|
||||
if(loc && !isturf(loc))
|
||||
var/atom/A = loc //Non-turf, let it handle the speech bubble
|
||||
A.speech_bubble("hR[speech_bubble_test]", A, speech_bubble_recipients)
|
||||
else //Turf, leave speech bubbles to the mob
|
||||
speech_bubble("h[speech_bubble_test]", src, speech_bubble_recipients)
|
||||
|
||||
if(loc && !isturf(loc))
|
||||
var/atom/A = loc //Non-turf, let it handle the speech bubble
|
||||
A.speech_bubble("[A.bubble_icon][speech_bubble_test]", A, speech_bubble_recipients)
|
||||
else //Turf, leave speech bubbles to the mob
|
||||
speech_bubble("[bubble_icon][speech_bubble_test]", src, speech_bubble_recipients)
|
||||
|
||||
for(var/obj/O in listening_obj)
|
||||
spawn(0)
|
||||
@@ -462,10 +462,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
|
||||
spawn(0)
|
||||
var/image/I = image('icons/mob/talk.dmi', src, "h[speech_bubble_test]", MOB_LAYER + 1)
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
flick_overlay(I, speech_bubble_recipients, 30)
|
||||
speech_bubble("[bubble_icon][speech_bubble_test]", src, speech_bubble_recipients)
|
||||
|
||||
if(watching.len)
|
||||
var/rendered = "<span class='game say'><span class='name'>[name]</span> [not_heard].</span>"
|
||||
@@ -474,7 +471,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list())
|
||||
var/image/I = image('icons/mob/talk.dmi', bubble_loc, bubble_state, MOB_LAYER + 1)
|
||||
/mob/living/speech_bubble(bubble_state = "", bubble_loc = src, list/bubble_recipients = list())
|
||||
var/image/I = image('icons/mob/talk.dmi', bubble_loc, bubble_state, FLY_LAYER)
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
flick_overlay(I, bubble_recipients, 30)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, bubble_recipients, 30)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "repairbot"
|
||||
maxHealth = 35
|
||||
health = 35
|
||||
bubble_icon = "machine"
|
||||
universal_speak = 0
|
||||
universal_understand = 1
|
||||
gender = NEUTER
|
||||
|
||||
@@ -9,6 +9,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
icon_state = "robot"
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
bubble_icon = "robot"
|
||||
universal_understand = 1
|
||||
deathgasp_on_death = TRUE
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
scrambledcodes = 1
|
||||
pdahide = 1
|
||||
faction = list("syndicate")
|
||||
bubble_icon = "syndibot"
|
||||
designation = "Syndicate Assault"
|
||||
modtype = "Syndicate"
|
||||
req_access = list(ACCESS_SYNDICATE)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
gender = NEUTER
|
||||
robot_talk_understand = 1
|
||||
voice_name = "synthesized voice"
|
||||
bubble_icon = "machine"
|
||||
has_unlimited_silicon_privilege = 1
|
||||
weather_immunities = list("ash")
|
||||
var/syndicate = 0
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
speak_emote = list("states")
|
||||
friendly = "boops"
|
||||
|
||||
bubble_icon = "machine"
|
||||
faction = list("neutral", "silicon")
|
||||
|
||||
var/obj/machinery/bot_core/bot_core = null
|
||||
|
||||
@@ -323,13 +323,13 @@
|
||||
/mob/living/simple_animal/bot/mulebot/proc/buzz(type)
|
||||
switch(type)
|
||||
if(SIGH)
|
||||
audible_message("[src] makes a sighing buzz.", "<span class='emote'>You hear an electronic buzzing sound.</span>")
|
||||
audible_message("[src] makes a sighing buzz.")
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
if(ANNOYED)
|
||||
audible_message("[src] makes an annoyed buzzing sound.", "<span class='emote'>You hear an electronic buzzing sound.</span>")
|
||||
audible_message("[src] makes an annoyed buzzing sound.")
|
||||
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
if(DELIGHT)
|
||||
audible_message("[src] makes a delighted ping!", "<span class='emote'>You hear a ping.</span>")
|
||||
audible_message("[src] makes a delighted ping!")
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -601,7 +601,7 @@
|
||||
/mob/living/simple_animal/bot/mulebot/proc/at_target()
|
||||
if(!reached_target)
|
||||
radio_channel = "Supply" //Supply channel
|
||||
audible_message("[src] makes a chiming sound!", "<span class='emote'>You hear a chime.</span>")
|
||||
audible_message("[src] makes a chiming sound!")
|
||||
playsound(loc, 'sound/machines/chime.ogg', 50, 0)
|
||||
reached_target = 1
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
melee_damage_upper = 25
|
||||
attacktext = "slashes"
|
||||
speak_emote = list("hisses")
|
||||
bubble_icon = "alien"
|
||||
a_intent = INTENT_HARM
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
@@ -127,6 +128,7 @@
|
||||
icon_state = "queen_s"
|
||||
icon_living = "queen_s"
|
||||
icon_dead = "queen_dead"
|
||||
bubble_icon = "alienroyal"
|
||||
move_to_delay = 4
|
||||
maxHealth = 400
|
||||
health = 400
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
loot = list(/obj/effect/decal/cleanable/blood/gibs/robot)
|
||||
deathmessage = "blows apart!"
|
||||
bubble_icon = "machine"
|
||||
del_on_death = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/range
|
||||
|
||||
@@ -363,6 +363,7 @@
|
||||
minbodytemp = 0
|
||||
mob_size = MOB_SIZE_TINY
|
||||
flying = 1
|
||||
bubble_icon = "syndibot"
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
del_on_death = 1
|
||||
deathmessage = "is smashed into pieces!"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
response_harm = "stomps on"
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
speak_emote = list("blorbles")
|
||||
bubble_icon = "slime"
|
||||
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
|
||||
@@ -127,14 +127,12 @@
|
||||
// self_message (optional) is what the src mob hears.
|
||||
// deaf_message (optional) is what deaf people will see.
|
||||
// hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
/mob/audible_message(var/message, var/deaf_message, var/hearing_distance, var/self_message)
|
||||
/mob/audible_message(message, deaf_message, hearing_distance)
|
||||
var/range = 7
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
var/msg = message
|
||||
for(var/mob/M in get_mobs_in_view(range, src))
|
||||
if(self_message && M == src)
|
||||
msg = self_message
|
||||
M.show_message(msg, 2, deaf_message, 1)
|
||||
|
||||
// based on say code
|
||||
@@ -156,12 +154,12 @@
|
||||
// message is the message output to anyone who can hear.
|
||||
// deaf_message (optional) is what deaf people will see.
|
||||
// hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
/atom/proc/audible_message(var/message, var/deaf_message, var/hearing_distance)
|
||||
/atom/proc/audible_message(message, deaf_message, hearing_distance)
|
||||
var/range = 7
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
for(var/mob/M in get_mobs_in_view(range, src))
|
||||
M.show_message( message, 2, deaf_message, 1)
|
||||
M.show_message(message, 2, deaf_message, 1)
|
||||
|
||||
/mob/proc/findname(msg)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
return get_turf(src)
|
||||
|
||||
/mob/proc/say_test(var/text)
|
||||
/proc/say_test(text)
|
||||
var/ending = copytext(text, length(text))
|
||||
if(ending == "?")
|
||||
return "1"
|
||||
|
||||
@@ -5,31 +5,32 @@ mob/var/typing
|
||||
mob/var/last_typed
|
||||
mob/var/last_typed_time
|
||||
|
||||
GLOBAL_DATUM(typing_indicator, /image)
|
||||
GLOBAL_LIST_EMPTY(typing_indicator)
|
||||
|
||||
/mob/proc/set_typing_indicator(var/state)
|
||||
/mob/proc/set_typing_indicator(state)
|
||||
|
||||
if(!GLOB.typing_indicator)
|
||||
GLOB.typing_indicator = image('icons/mob/talk.dmi', null, "typing", MOB_LAYER + 1)
|
||||
GLOB.typing_indicator.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
if(!GLOB.typing_indicator[bubble_icon])
|
||||
GLOB.typing_indicator[bubble_icon] = image('icons/mob/talk.dmi', null, "[bubble_icon]typing", FLY_LAYER)
|
||||
var/image/I = GLOB.typing_indicator[bubble_icon]
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if((MUTE in H.mutations) || H.silent)
|
||||
overlays -= GLOB.typing_indicator
|
||||
overlays -= GLOB.typing_indicator[bubble_icon]
|
||||
return
|
||||
|
||||
if(client)
|
||||
if((client.prefs.toggles & SHOW_TYPING) || stat != CONSCIOUS || is_muzzled())
|
||||
overlays -= GLOB.typing_indicator
|
||||
overlays -= GLOB.typing_indicator[bubble_icon]
|
||||
else
|
||||
if(state)
|
||||
if(!typing)
|
||||
overlays += GLOB.typing_indicator
|
||||
overlays += GLOB.typing_indicator[bubble_icon]
|
||||
typing = 1
|
||||
else
|
||||
if(typing)
|
||||
overlays -= GLOB.typing_indicator
|
||||
overlays -= GLOB.typing_indicator[bubble_icon]
|
||||
typing = 0
|
||||
return state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user