Moves languages to a holder datum, gives mind its own language holder
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
diff a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm (rejected hunks)
|
||||
@@ -117,10 +117,12 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
- grant_all_languages()
|
||||
GLOB.dead_mob_list += src
|
||||
+
|
||||
..()
|
||||
|
||||
+ grant_all_languages()
|
||||
+
|
||||
/mob/dead/observer/narsie_act()
|
||||
var/old_color = color
|
||||
color = "#960000"
|
||||
@@ -27,10 +27,9 @@
|
||||
message = capitalize(message)
|
||||
return message
|
||||
|
||||
/mob/living/brain/can_speak_in_language(datum/language/dt)
|
||||
if(HAS_SECONDARY_FLAG(src, OMNITONGUE))
|
||||
. = has_language(dt)
|
||||
else if(istype(container, /obj/item/device/mmi/posibrain/soul_vessel))
|
||||
. = has_language(dt) && ispath(dt, /datum/language/ratvar)
|
||||
/mob/living/brain/could_speak_in_language(datum/language/dt)
|
||||
if(istype(container, /obj/item/device/mmi/posibrain/soul_vessel))
|
||||
// soul vessels can only speak ratvarian.
|
||||
. = ispath(dt, /datum/language/ratvar)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
sight = SEE_MOBS
|
||||
see_in_dark = 4
|
||||
verb_say = "hisses"
|
||||
initial_languages = list(/datum/language/xenocommon)
|
||||
initial_language_holder = /datum/language_holder/alien
|
||||
bubble_icon = "alien"
|
||||
type_of_meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/xeno
|
||||
var/nightvision = 1
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "caucasian_m"
|
||||
|
||||
// ME TARZAN, YOU JANEBOT
|
||||
initial_languages = list(/datum/language/common)
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
status_flags = GODMODE|CANPUSH
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/mob/living/carbon/human
|
||||
initial_languages = list(/datum/language/common)
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,ANTAG_HUD)
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
|
||||
pressure_resistance = 25
|
||||
@@ -49,4 +48,4 @@
|
||||
var/datum/personal_crafting/handcrafting
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
can_ride_typecache = list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot)
|
||||
can_ride_typecache = list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "monkey"
|
||||
voice_name = "monkey"
|
||||
verb_say = "chimpers"
|
||||
initial_languages = list(/datum/language/monkey)
|
||||
initial_language_holder = /datum/language_holder/monkey
|
||||
icon = 'icons/mob/monkey.dmi'
|
||||
icon_state = ""
|
||||
gender = NEUTER
|
||||
|
||||
@@ -29,14 +29,9 @@
|
||||
if(I)
|
||||
. |= I.get_held_item_speechspans(src)
|
||||
|
||||
/mob/living/carbon/can_speak_in_language(datum/language/dt)
|
||||
if(HAS_SECONDARY_FLAG(src, OMNITONGUE))
|
||||
. = has_language(dt)
|
||||
else if(has_language(dt))
|
||||
var/obj/item/organ/tongue/T = getorganslot("tongue")
|
||||
if(T)
|
||||
. = T.can_speak_in_language(dt)
|
||||
else
|
||||
. = initial(dt.flags) & TONGUELESS_SPEECH
|
||||
/mob/living/carbon/could_speak_in_language(datum/language/dt)
|
||||
var/obj/item/organ/tongue/T = getorganslot("tongue")
|
||||
if(T)
|
||||
. = T.could_speak_in_language(dt)
|
||||
else
|
||||
. = FALSE
|
||||
. = initial(dt.flags) & TONGUELESS_SPEECH
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
medhud.add_to_hud(src)
|
||||
faction += "\ref[src]"
|
||||
|
||||
language_menu = new(src)
|
||||
|
||||
|
||||
/mob/living/prepare_huds()
|
||||
..()
|
||||
@@ -50,8 +48,6 @@
|
||||
staticOverlays.len = 0
|
||||
remove_from_all_data_huds()
|
||||
|
||||
QDEL_NULL(language_menu)
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/ghostize(can_reenter_corpse = 1)
|
||||
|
||||
@@ -74,4 +74,3 @@
|
||||
var/datum/riding/riding_datum
|
||||
|
||||
var/datum/language/selected_default_language
|
||||
var/datum/language_menu/language_menu
|
||||
|
||||
@@ -167,11 +167,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
spans += get_spans()
|
||||
|
||||
if(language)
|
||||
var/datum/language/L = GLOB.language_datums[language]
|
||||
if(!istype(L))
|
||||
L = new language
|
||||
GLOB.language_datums[language] = L
|
||||
|
||||
var/datum/language/L = GLOB.language_datum_instances[language]
|
||||
spans |= L.spans
|
||||
|
||||
//Log what we've said with an associated timestamp, using the list's len for safety/to prevent overwriting messages
|
||||
@@ -308,13 +304,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return GLOB.department_radio_keys[key_symbol]
|
||||
|
||||
/mob/living/proc/get_message_language(message)
|
||||
var/static/list/langlist
|
||||
if(!langlist)
|
||||
langlist = subtypesof(/datum/language)
|
||||
|
||||
if(copytext(message, 1, 2) == ",")
|
||||
var/key = copytext(message, 2, 3)
|
||||
for(var/ld in langlist)
|
||||
for(var/ld in GLOB.all_languages)
|
||||
var/datum/language/LD = ld
|
||||
if(initial(LD.key) == key)
|
||||
return LD
|
||||
@@ -435,17 +427,14 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/get_default_language()
|
||||
if(selected_default_language)
|
||||
if(has_language(selected_default_language))
|
||||
return selected_default_language
|
||||
else
|
||||
selected_default_language = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/mob/living/proc/open_language_menu(mob/user)
|
||||
language_menu.ui_interact(user)
|
||||
|
||||
/mob/living/whisper(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null)
|
||||
say("#[message]", bubble_type, spans, sanitize, language)
|
||||
|
||||
/mob/living/get_language_holder(shadow=TRUE)
|
||||
if(mind && shadow)
|
||||
// Mind language holders shadow mob holders.
|
||||
. = mind.get_language_holder()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -164,11 +164,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
/mob/living/silicon/ai/can_speak_in_language(datum/language/dt)
|
||||
if(HAS_SECONDARY_FLAG(src, OMNITONGUE))
|
||||
. = has_language(dt)
|
||||
else if(is_servant_of_ratvar(src))
|
||||
/mob/living/silicon/ai/could_speak_in_language(datum/language/dt)
|
||||
if(is_servant_of_ratvar(src))
|
||||
// Ratvarian AIs can only speak Ratvarian
|
||||
. = ispath(dt, /datum/language/ratvar) && has_language(dt)
|
||||
. = ispath(dt, /datum/language/ratvar)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "declares"
|
||||
verb_yell = "alarms"
|
||||
initial_languages = list(/datum/language/common, /datum/language/machine)
|
||||
initial_language_holder = /datum/language_holder/synthetic
|
||||
see_in_dark = 8
|
||||
bubble_icon = "machine"
|
||||
weather_immunities = list("ash")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "declares"
|
||||
verb_yell = "alarms"
|
||||
initial_languages = list(/datum/language/common, /datum/language/machine)
|
||||
initial_language_holder = /datum/language_holder/synthetic
|
||||
bubble_icon = "machine"
|
||||
|
||||
faction = list("neutral", "silicon" , "turret")
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
voice_name = "synthesized chirp"
|
||||
speak_emote = list("chirps")
|
||||
bubble_icon = "machine"
|
||||
initial_languages = list(/datum/language/common, /datum/language/machine, /datum/language/drone)
|
||||
only_speaks_language = /datum/language/drone
|
||||
initial_language_holder = /datum/language_holder/drone
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
has_unlimited_silicon_privilege = 1
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
picked = TRUE //the appearence of syndrones is static, you don't get to change it.
|
||||
health = 30
|
||||
maxHealth = 120 //If you murder other drones and cannibalize them you can get much stronger
|
||||
initial_language_holder = /datum/language_holder/drone/syndicate
|
||||
faction = list("syndicate")
|
||||
speak_emote = list("hisses")
|
||||
bubble_icon = "syndibot"
|
||||
@@ -110,8 +111,7 @@
|
||||
verb_exclaim = "proclaims"
|
||||
verb_yell = "harangues"
|
||||
bubble_icon = "clock"
|
||||
initial_languages = list(/datum/language/common, /datum/language/ratvar)
|
||||
only_speaks_language = /datum/language/ratvar
|
||||
initial_language_holder = /datum/language_holder/clockmob
|
||||
light_color = "#E42742"
|
||||
heavy_emp_damage = 0
|
||||
laws = "0. Purge all untruths and honor Ratvar."
|
||||
|
||||
@@ -647,8 +647,7 @@ Difficulty: Very Hard
|
||||
verb_ask = "floats inquisitively"
|
||||
verb_exclaim = "zaps"
|
||||
verb_yell = "bangs"
|
||||
initial_languages = list(/datum/language/common, /datum/language/slime)
|
||||
only_speaks_language = /datum/language/slime
|
||||
initial_language_holder = /datum/language_holder/lightbringer
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
light_range = 4
|
||||
faction = list("neutral")
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
|
||||
status_flags = CANPUSH
|
||||
|
||||
// goats bray, cows go moo, and the fox says Geckers
|
||||
initial_languages = list(/datum/language/common)
|
||||
|
||||
var/icon_living = ""
|
||||
var/icon_dead = "" //icon when the animal is dead. Don't use animated icons for this.
|
||||
var/icon_gib = null //We only try to show a gibbing animation if this exists.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
speak_emote = list("telepathically chirps")
|
||||
bubble_icon = "slime"
|
||||
initial_languages = list(/datum/language/common, /datum/language/slime)
|
||||
initial_language_holder = /datum/language_holder/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)
|
||||
|
||||
|
||||
@@ -751,7 +751,6 @@
|
||||
client.move_delay += movement_delay()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||
return 0
|
||||
|
||||
@@ -1014,3 +1013,10 @@
|
||||
if("logging")
|
||||
return debug_variable(var_name, logging, 0, src, FALSE)
|
||||
. = ..()
|
||||
|
||||
/mob/verb/open_language_menu()
|
||||
set name = "Open Language Menu"
|
||||
set category = "IC"
|
||||
|
||||
var/datum/language_holder/H = get_language_holder()
|
||||
H.open_language_menu(usr)
|
||||
|
||||
Reference in New Issue
Block a user