Fix a few talking issues

Posibrain talking without a language, give speech bubbles to things inside things, especially posibrains, give gibberish a chance instead of using null languages
This commit is contained in:
Aronai Sieyes
2020-05-20 13:52:08 -04:00
parent 49c00572c9
commit 50e09c0ee7
6 changed files with 53 additions and 23 deletions

View File

@@ -270,7 +270,7 @@
if (species_language)
set_default_language(GLOB.all_languages[species_language])
else
set_default_language(null)
set_default_language(GLOB.all_languages[LANGUAGE_GIBBERISH])
else
var/datum/language/L = locate(href_list["default_lang"])
if(L && (L in languages))

View File

@@ -15,6 +15,7 @@
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
default_language = GLOB.all_languages[LANGUAGE_GALCOM]
/mob/living/carbon/brain/Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
@@ -44,5 +45,24 @@
/mob/living/carbon/brain/isSynthetic()
return istype(loc, /obj/item/device/mmi)
///mob/living/carbon/brain/binarycheck()//No binary without a binary communication device
// return isSynthetic()
/mob/living/carbon/brain/set_typing_indicator(var/state)
if(isturf(loc))
return ..()
if(!is_preference_enabled(/datum/client_preference/show_typing_indicator))
loc.cut_overlay(typing_indicator, TRUE)
return
if(!typing_indicator)
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"
if(state && !typing)
loc.add_overlay(typing_indicator, TRUE)
typing = TRUE
else if(typing)
loc.cut_overlay(typing_indicator, TRUE)
typing = FALSE
return state

View File

@@ -386,9 +386,9 @@
return GLOB.all_languages[LANGUAGE_GIBBERISH]
if(!species)
return null
return GLOB.all_languages[LANGUAGE_GIBBERISH]
return species.default_language ? GLOB.all_languages[species.default_language] : null
return species.default_language ? GLOB.all_languages[species.default_language] : GLOB.all_languages[LANGUAGE_GIBBERISH]
/mob/living/carbon/proc/should_have_organ(var/organ_check)
return 0

View File

@@ -40,18 +40,18 @@ var/list/department_radio_keys = list(
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
":<3A>" = "right ear", ".<2E>" = "right ear",
":<3A>" = "left ear", ".<2E>" = "left ear",
":<3A>" = "intercom", ".<2E>" = "intercom",
":<3A>" = "department", ".<2E>" = "department",
":<3A>" = "Command", ".<2E>" = "Command",
":<3A>" = "Science", ".<2E>" = "Science",
":<3A>" = "Medical", ".<2E>" = "Medical",
":<3A>" = "Engineering", ".<2E>" = "Engineering",
":<3A>" = "Security", ".<2E>" = "Security",
":<3A>" = "whisper", ".<2E>" = "whisper",
":<3A>" = "Mercenary", ".<2E>" = "Mercenary",
":<3A>" = "Supply", ".<2E>" = "Supply",
":<3A>" = "right ear", ".<2E>" = "right ear",
":<3A>" = "left ear", ".<2E>" = "left ear",
":<3A>" = "intercom", ".<2E>" = "intercom",
":<3A>" = "department", ".<2E>" = "department",
":<3A>" = "Command", ".<2E>" = "Command",
":<3A>" = "Science", ".<2E>" = "Science",
":<3A>" = "Medical", ".<2E>" = "Medical",
":<3A>" = "Engineering", ".<2E>" = "Engineering",
":<3A>" = "Security", ".<2E>" = "Security",
":<3A>" = "whisper", ".<2E>" = "whisper",
":<3A>" = "Mercenary", ".<2E>" = "Mercenary",
":<3A>" = "Supply", ".<2E>" = "Supply",
)
@@ -321,6 +321,15 @@ proc/get_radio_key_from_channel(var/channel)
//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()
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/sb_alpha = 255
var/atom/loc_before_turf = src
while(loc_before_turf && !isturf(loc_before_turf.loc))
loc_before_turf = loc_before_turf.loc
sb_alpha -= 50
if(sb_alpha < 0)
break
speech_bubble.loc = loc_before_turf
speech_bubble.alpha = CLAMP(sb_alpha, 0, 255)
images_to_clients[speech_bubble] = list()
// Attempt Multi-Z Talking

View File

@@ -106,8 +106,8 @@ var/list/organ_cache = list()
STOP_PROCESSING(SSobj, src)
handle_organ_mod_special(TRUE)
if(owner && vital)
owner.death()
owner.can_defib = 0
owner.death()
/obj/item/organ/proc/adjust_germ_level(var/amount) // Unless you're setting germ level directly to 0, use this proc instead
germ_level = CLAMP(germ_level + amount, 0, INFECTION_LEVEL_MAX)
@@ -352,7 +352,7 @@ var/list/organ_cache = list()
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
if(affected) affected.internal_organs -= src
loc = get_turf(owner)
forceMove(owner.drop_location())
START_PROCESSING(SSobj, src)
rejecting = null
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
@@ -361,9 +361,10 @@ var/list/organ_cache = list()
if(owner && vital)
if(user)
add_attack_logs(user,owner,"Removed vital organ [src.name]")
owner.death()
add_attack_logs(user, owner, "Removed vital organ [src.name]")
if(owner.stat != DEAD)
owner.can_defib = 0
owner.death()
handle_organ_mod_special(TRUE)

View File

@@ -89,7 +89,7 @@
/obj/item/organ/internal/mmi_holder/emp_act(severity)
// ..() // VOREStation Edit - Don't take damage
owner.adjustToxLoss(rand(6/severity, 12/severity))
owner?.adjustToxLoss(rand(6/severity, 12/severity))
/obj/item/organ/internal/mmi_holder/posibrain
name = "positronic brain interface"