mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Revert "Revert "Saycode/language/species port from Bay""
This reverts commit d54579850c.
Conflicts:
code/game/gamemodes/nuclear/nuclearbomb.dm
code/game/objects/items/devices/radio/intercom.dm
code/modules/mob/living/silicon/pai/pai.dm
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
if(name == "alien")
|
||||
name = text("alien ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
add_language("Xenomorph")
|
||||
add_language("Hivemind")
|
||||
..()
|
||||
|
||||
//This is fine, works the same as a human
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
name = "alien larva ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
add_language("Xenomorph")
|
||||
add_language("Hivemind")
|
||||
..()
|
||||
|
||||
//This is fine, works the same as a human
|
||||
|
||||
@@ -1,69 +1,28 @@
|
||||
/mob/living/carbon/alien/say(var/message)
|
||||
var/verb = "says"
|
||||
var/message_range = world.view
|
||||
|
||||
if (silent)
|
||||
return
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
if (length(message) >= 2)
|
||||
if (department_radio_keys[copytext(message, 1, 3)] == "alientalk")
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
else
|
||||
alien_talk(message)
|
||||
else
|
||||
if (copytext(message, 1, 2) != "*" && !stat)
|
||||
playsound(loc, "hiss", 25, 1, 1)//So aliens can hiss while they hiss yo/N
|
||||
return ..(message)
|
||||
else
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
/mob/living/proc/alien_talk(var/message)
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
|
||||
if(speaking)
|
||||
message = copytext(message, 2+length(speaking.key))
|
||||
|
||||
log_say("[key_name(src)] : [message]")
|
||||
message = trim(message)
|
||||
|
||||
if (!message)
|
||||
if(!message || stat)
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
for (var/mob/living/S in player_list)
|
||||
if(!S.stat)
|
||||
if(S.alien_talk_understand)
|
||||
if(S.alien_talk_understand == alien_talk_understand)
|
||||
S.show_message(rendered, 2)
|
||||
else if (S.hivecheck())
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
var/list/listening = hearers(1, src)
|
||||
listening -= src
|
||||
listening += src
|
||||
|
||||
var/list/heard = list()
|
||||
for (var/mob/M in listening)
|
||||
if(!istype(M, /mob/living/carbon/alien) && !M.alien_talk_understand)
|
||||
heard += M
|
||||
|
||||
|
||||
if (length(heard))
|
||||
var/message_b
|
||||
|
||||
message_b = "hsssss"
|
||||
message_b = say_quote(message_b)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<i><span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span></i>"
|
||||
|
||||
for (var/mob/M in heard)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
message = say_quote(message)
|
||||
|
||||
rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
var/rendered2 = null
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat > 1 && istype(M, /mob/dead/observer))
|
||||
rendered2 = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
M.show_message(rendered2, 2)
|
||||
..(message, speaking, verb, null, null, message_range, null)
|
||||
@@ -55,4 +55,7 @@
|
||||
canmove = 1
|
||||
use_me = 1 //If it can move, let it emote
|
||||
else canmove = 0
|
||||
return canmove
|
||||
return canmove
|
||||
|
||||
/mob/living/carbon/brain/binarycheck()
|
||||
return istype(loc, /obj/item/device/mmi/posibrain)
|
||||
@@ -1,3 +1,4 @@
|
||||
//TODO: Convert this over for languages.
|
||||
/mob/living/carbon/brain/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
@@ -8,18 +9,31 @@
|
||||
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
|
||||
return //No MMI, can't speak, bucko./N
|
||||
else
|
||||
if ((department_radio_keys[copytext(message, 1, 3)] == "binary") && (container && istype(container, /obj/item/device/mmi/posibrain)))
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
robot_talk(message)
|
||||
return
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if(speaking)
|
||||
message = copytext(message, 2+length(speaking.key))
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
if (speaking)
|
||||
verb = speaking.get_spoken_verb(ending)
|
||||
else
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
if(prob(emp_damage*4))
|
||||
if(prob(10))//10% chane to drop the message entirely
|
||||
return
|
||||
else
|
||||
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
|
||||
|
||||
if(speaking && speaking.flags & HIVEMIND)
|
||||
speaking.broadcast(src,trim(message))
|
||||
return
|
||||
|
||||
if(istype(container, /obj/item/device/mmi/radio_enabled))
|
||||
var/obj/item/device/mmi/radio_enabled/R = container
|
||||
if(R.radio)
|
||||
spawn(0) R.radio.hear_talk(src, sanitize(message))
|
||||
..()
|
||||
spawn(0) R.radio.hear_talk(src, trim(sanitize(message)), verb, speaking)
|
||||
..(trim(message), speaking, verb)
|
||||
|
||||
@@ -9,6 +9,40 @@
|
||||
var/datum/species/species //Contains icon generation and language information, set during New().
|
||||
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
|
||||
|
||||
/mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna=0)
|
||||
if(!species)
|
||||
if(new_species)
|
||||
set_species(new_species,null,1)
|
||||
else
|
||||
set_species()
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
||||
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudunknown")
|
||||
hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
|
||||
..()
|
||||
|
||||
if(dna)
|
||||
dna.real_name = real_name
|
||||
|
||||
prev_gender = gender // Debug for plural genders
|
||||
make_blood()
|
||||
|
||||
// Set up DNA.
|
||||
if(!delay_ready_dna)
|
||||
dna.ready_dna(src)
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
status_flags = GODMODE|CANPUSH
|
||||
@@ -49,8 +83,6 @@
|
||||
|
||||
/mob/living/carbon/human/grey/New(var/new_loc)
|
||||
..(new_loc, "Grey")
|
||||
spell_list += new /obj/effect/proc_holder/spell/wizard/targeted/remotetalk
|
||||
|
||||
|
||||
/mob/living/carbon/human/human/New(var/new_loc)
|
||||
..(new_loc, "Human")
|
||||
@@ -63,50 +95,6 @@
|
||||
h_style = "blue IPC screen"
|
||||
..(new_loc, "Machine")
|
||||
|
||||
/mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna=0)
|
||||
if(!species)
|
||||
if(new_species)
|
||||
set_species(new_species,null,1)
|
||||
else
|
||||
set_species()
|
||||
|
||||
if(species.language)
|
||||
var/datum/language/L = all_languages[species.language]
|
||||
if(L)
|
||||
languages += L
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
if(!dna)
|
||||
dna = new /datum/dna(null)
|
||||
dna.species=species.name
|
||||
|
||||
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
||||
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudunknown")
|
||||
hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
|
||||
..()
|
||||
|
||||
if(dna)
|
||||
dna.real_name = real_name
|
||||
|
||||
prev_gender = gender // Debug for plural genders
|
||||
make_blood()
|
||||
|
||||
// Set up DNA.
|
||||
if(!delay_ready_dna)
|
||||
dna.ready_dna(src)
|
||||
|
||||
|
||||
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
@@ -1313,7 +1301,8 @@
|
||||
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
|
||||
|
||||
/mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs, var/default_colour)
|
||||
|
||||
|
||||
var/datum/species/oldspecies = species
|
||||
if(!dna)
|
||||
if(!new_species)
|
||||
new_species = "Human"
|
||||
@@ -1323,19 +1312,34 @@
|
||||
else
|
||||
dna.species = new_species
|
||||
|
||||
if(species && (species.name && species.name == new_species))
|
||||
return
|
||||
|
||||
if(species && species.language)
|
||||
remove_language(species.language)
|
||||
if(species)
|
||||
if(species.name && species.name == new_species)
|
||||
return
|
||||
|
||||
if(species.language)
|
||||
remove_language(species.language)
|
||||
|
||||
if(species.default_language)
|
||||
remove_language(species.default_language)
|
||||
|
||||
species = all_species[new_species]
|
||||
|
||||
if(oldspecies)
|
||||
if(oldspecies.default_genes.len)
|
||||
oldspecies.handle_dna(src,1) // Remove any genes that belong to the old species
|
||||
|
||||
if(force_organs || !organs || !organs.len)
|
||||
species.create_organs(src)
|
||||
|
||||
if(vessel)
|
||||
vessel = null
|
||||
make_blood()
|
||||
|
||||
if(species.language)
|
||||
add_language(species.language)
|
||||
|
||||
if(species.default_language)
|
||||
add_language(species.default_language)
|
||||
|
||||
see_in_dark = species.darksight
|
||||
if(see_in_dark > 2)
|
||||
@@ -1343,9 +1347,6 @@
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(species.default_mutations.len>0 || species.default_blocks.len>0)
|
||||
do_deferred_species_setup=1
|
||||
|
||||
spawn(0)
|
||||
update_icons()
|
||||
|
||||
@@ -1358,21 +1359,18 @@
|
||||
r_skin = 0
|
||||
g_skin = 0
|
||||
b_skin = 0
|
||||
|
||||
if(!dna)
|
||||
dna = new /datum/dna(null)
|
||||
dna.species = species.name
|
||||
dna.real_name = real_name
|
||||
dna.mutantrace = null
|
||||
|
||||
species.handle_post_spawn(src)
|
||||
|
||||
spawn(0)
|
||||
update_icons()
|
||||
if(species && species.flags & NO_BLOOD) //We want the var for safety but we can do without the actual blood.
|
||||
if(vessel.has_reagent("water") || vessel.has_reagent("blood"))
|
||||
var/water = vessel.get_reagent_amount("water")
|
||||
var/blood = vessel.get_reagent_amount("blood")
|
||||
vessel.remove_reagent("water",water)
|
||||
vessel.remove_reagent("blood",blood)
|
||||
if(species.bloodflags & BLOOD_SLIME)
|
||||
vessel.add_reagent("water",560-vessel.total_volume)
|
||||
else
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
overlays.Cut()
|
||||
update_mutantrace(1)
|
||||
fixblood()
|
||||
|
||||
if(species)
|
||||
|
||||
@@ -32,9 +32,12 @@
|
||||
timeofdeath = 0
|
||||
|
||||
/mob/living/carbon/human/getBrainLoss()
|
||||
if(species && species.flags & NO_INTORGANS) return
|
||||
if(species && species.flags & NO_INTORGANS)
|
||||
return
|
||||
var/res = brainloss
|
||||
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
|
||||
if(!sponge)
|
||||
return
|
||||
if (sponge.is_bruised())
|
||||
res += 20
|
||||
if (sponge.is_broken())
|
||||
@@ -197,6 +200,7 @@
|
||||
UpdateDamageIcon()
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
updatehealth()
|
||||
speech_problem_flag = 1
|
||||
|
||||
|
||||
//Heal MANY external organs, in random order
|
||||
@@ -218,6 +222,7 @@
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
speech_problem_flag = 1
|
||||
if(update) UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
|
||||
var/icon/stand_icon = null
|
||||
var/icon/lying_icon = null
|
||||
|
||||
var/voice = "" //Instead of new say code calling GetVoice() over and over and over, we're just going to ask this variable, which gets updated in Life()
|
||||
|
||||
var/speech_problem_flag = 0
|
||||
|
||||
var/miming = null //Toggle for the mime's abilities.
|
||||
var/special_voice = "" // For changing our voice. Used by a symptom.
|
||||
|
||||
@@ -33,27 +33,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
var/prev_gender = null // Debug for plural genders
|
||||
var/temperature_alert = 0
|
||||
var/in_stasis = 0
|
||||
var/do_deferred_species_setup=0
|
||||
var/exposedtimenow = 0
|
||||
var/firstexposed = 0
|
||||
|
||||
// Doing this during species init breaks shit.
|
||||
/mob/living/carbon/human/proc/DeferredSpeciesSetup()
|
||||
var/mut_update=0
|
||||
if(species.default_mutations.len>0)
|
||||
for(var/mutation in species.default_mutations)
|
||||
if(!(mutation in mutations))
|
||||
mutations.Add(mutation)
|
||||
mut_update=1
|
||||
if(species.default_blocks.len>0)
|
||||
for(var/block in species.default_blocks)
|
||||
if(!dna.GetSEState(block))
|
||||
dna.SetSEState(block,1)
|
||||
mut_update=1
|
||||
if(mut_update)
|
||||
domutcheck(src,null,MUTCHK_FORCED)
|
||||
update_mutations()
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
set invisibility = 0
|
||||
//set background = 1
|
||||
@@ -63,10 +45,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
..()
|
||||
|
||||
if(do_deferred_species_setup)
|
||||
DeferredSpeciesSetup()
|
||||
do_deferred_species_setup=0
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
@@ -84,6 +62,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
if(life_tick%30==15)
|
||||
hud_updateflag = 1022
|
||||
|
||||
voice = GetVoice()
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD && !in_stasis)
|
||||
@@ -252,22 +232,26 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
drop_item()
|
||||
emote("cough")
|
||||
if (disabilities & TOURETTES)
|
||||
speech_problem_flag = 1
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
emote("twitch")
|
||||
if(2 to 3)
|
||||
say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
|
||||
var/tourettes = pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")
|
||||
say("[prob(50) ? ";" : ""][tourettes]")
|
||||
var/x_offset = pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point.
|
||||
var/y_offset = pixel_y + rand(-1,1)
|
||||
animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1)
|
||||
animate(pixel_x = pixel_x - x_offset, pixel_y = pixel_y - y_offset, time = 1)
|
||||
if (disabilities & NERVOUS)
|
||||
speech_problem_flag = 1
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
if (getBrainLoss() >= 60 && stat != 2)
|
||||
speech_problem_flag = 1
|
||||
if (prob(3))
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
@@ -329,6 +313,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(gene.is_active(src))
|
||||
/* if (prob(10) && prob(gene.instability))
|
||||
adjustCloneLoss(1) */
|
||||
speech_problem_flag = 1
|
||||
gene.OnMobLife(src)
|
||||
|
||||
if (radiation)
|
||||
@@ -1091,6 +1076,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(halloss > 0)
|
||||
adjustHalLoss(-3)
|
||||
else if(sleeping)
|
||||
speech_problem_flag = 1
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
adjustHalLoss(-3)
|
||||
@@ -1944,7 +1930,29 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
var/client/C = client
|
||||
for(var/mob/living/carbon/human/H in view(src, 14))
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
|
||||
/mob/living/carbon/human/handle_silent()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return silent
|
||||
|
||||
/mob/living/carbon/human/handle_slurring()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return slurring
|
||||
|
||||
/mob/living/carbon/human/handle_stunned()
|
||||
if(species.flags & NO_PAIN)
|
||||
stunned = 0
|
||||
return 0
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return stunned
|
||||
|
||||
/mob/living/carbon/human/handle_stuttering()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return stuttering
|
||||
|
||||
// Need this in species.
|
||||
//#undef HUMAN_MAX_OXYLOSS
|
||||
|
||||
@@ -1,81 +1,152 @@
|
||||
/mob/living/carbon/human/say(var/message)
|
||||
if(miming)
|
||||
if(length(message) >= 2)
|
||||
if(mind && mind.changeling)
|
||||
if(copytext(message, 1, 2) != "*" && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||
return
|
||||
else
|
||||
return ..(message)
|
||||
if(stat == DEAD)
|
||||
return ..(message)
|
||||
|
||||
if(length(message) >= 1) //In case people forget the '*help' command, this will slow them the message and prevent people from saying one letter at a time
|
||||
if (copytext(message, 1, 2) != "*")
|
||||
return
|
||||
var/verb = "says"
|
||||
var/alt_name = ""
|
||||
var/message_range = world.view
|
||||
var/italics = 0
|
||||
|
||||
if(dna)
|
||||
if(length(message) >= 2)
|
||||
if (copytext(message, 1, 2) != "*" && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||
for(var/datum/dna/gene/gene in dna_genes)
|
||||
if(!gene.block)
|
||||
continue
|
||||
if(gene.is_active(src))
|
||||
message = gene.OnSay(src,message)
|
||||
/*
|
||||
if(dna.mutantrace == "lizard")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = replacetext(message, "s", stutter("ss"))
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
if(dna.mutantrace == "slime" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
message = ";"
|
||||
else
|
||||
message = ""
|
||||
message += "SKR"
|
||||
var/imax = rand(5,20)
|
||||
for(var/i = 0,i<imax,i++)
|
||||
message += "E"*/
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat)
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
|
||||
return
|
||||
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
if(name != GetVoice())
|
||||
alt_name = "(as [get_id_name("Unknown")])"
|
||||
|
||||
//parse the radio code and consume it
|
||||
if (message_mode)
|
||||
if (message_mode == "headset")
|
||||
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
|
||||
else
|
||||
message = copytext(message,3)
|
||||
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if(speaking)
|
||||
message = copytext(message,2+length(speaking.key))
|
||||
else if(species.default_language)
|
||||
speaking = all_languages[species.default_language]
|
||||
|
||||
var/ending = copytext(message, length(message))
|
||||
if (speaking)
|
||||
// This is broadcast to all mobs with the language,
|
||||
// irrespective of distance or anything else.
|
||||
if(speaking.flags & HIVEMIND)
|
||||
speaking.broadcast(src,trim(message))
|
||||
return
|
||||
//If we've gotten this far, keep going!
|
||||
verb = speaking.get_spoken_verb(ending)
|
||||
else
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
message = trim(message)
|
||||
|
||||
if(speech_problem_flag)
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
var/list/obj/item/used_radios = new
|
||||
|
||||
switch (message_mode)
|
||||
if("headset")
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
var/obj/item/device/radio/R = l_ear
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += l_ear
|
||||
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
var/obj/item/device/radio/R = r_ear
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
if("right ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
R = r_ear
|
||||
has_radio = 1
|
||||
if(r_hand && istype(r_hand, /obj/item/device/radio))
|
||||
R = r_hand
|
||||
has_radio = 1
|
||||
if(has_radio)
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += R
|
||||
|
||||
|
||||
if(wear_mask)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = list2text(temp_message, " ")
|
||||
message = replacetext(message, "o", "¤")
|
||||
message = replacetext(message, "p", "þ")
|
||||
message = replacetext(message, "l", "£")
|
||||
message = replacetext(message, "s", "§")
|
||||
message = replacetext(message, "u", "µ")
|
||||
message = replacetext(message, "b", "ß")
|
||||
if("left ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
R = l_ear
|
||||
has_radio = 1
|
||||
if(l_hand && istype(l_hand,/obj/item/device/radio))
|
||||
R = l_hand
|
||||
has_radio = 1
|
||||
if(has_radio)
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += R
|
||||
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")))
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
if("intercom")
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, verb, speaking)
|
||||
used_radios += I
|
||||
if("whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
return
|
||||
else
|
||||
if(message_mode)
|
||||
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||
l_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += l_ear
|
||||
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||
r_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
if ((M_HULK in mutations) && health >= 25 && length(message))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
|
||||
var/sound/speech_sound
|
||||
var/sound_vol
|
||||
if(species.speech_sounds && prob(species.speech_chance))
|
||||
speech_sound = sound(pick(species.speech_sounds))
|
||||
sound_vol = 50
|
||||
|
||||
if (src.slurring)
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = slur(message)
|
||||
//speaking into radios
|
||||
if(used_radios.len)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
if(speaking)
|
||||
message_range = speaking.get_talkinto_msg_range(message)
|
||||
var/msg
|
||||
if(!speaking || !(speaking.flags & NO_TALK_MSG))
|
||||
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
|
||||
for(var/mob/living/M in hearers(5, src))
|
||||
if((M != src) && msg)
|
||||
M.show_message(msg)
|
||||
if (speech_sound)
|
||||
sound_vol *= 0.5
|
||||
|
||||
if((species.name == "Vox" || species.name == "Vox Armalis") && prob(20))
|
||||
playsound(src.loc, 'sound/voice/shriek1.ogg', 50, 1)
|
||||
|
||||
..(message)
|
||||
..(message, speaking, verb, alt_name, italics, message_range, speech_sound, sound_vol) //ohgod we should really be passing a datum here.
|
||||
|
||||
/mob/living/carbon/human/proc/forcesay(list/append)
|
||||
if(stat == CONSCIOUS)
|
||||
@@ -100,6 +171,7 @@
|
||||
if(findtext(temp, "*", 1, 2)) //emotes
|
||||
return
|
||||
temp = copytext(trim_left(temp), 1, rand(5,8))
|
||||
|
||||
var/trimmed = trim_left(temp)
|
||||
if(length(trimmed))
|
||||
if(append)
|
||||
@@ -108,25 +180,45 @@
|
||||
say(temp)
|
||||
winset(client, "input", "text=[null]")
|
||||
|
||||
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
|
||||
/mob/living/carbon/human/say_understands(var/mob/other,var/datum/language/speaking = null)
|
||||
|
||||
if(has_brain_worms()) //Brain worms translate everything. Even mice and alien speak.
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
|
||||
if(species.can_understand(other))
|
||||
return 1
|
||||
|
||||
//These only pertain to common. Languages are handled by mob/say_understands()
|
||||
if (!speaking)
|
||||
if (istype(other, /mob/living/carbon/monkey/diona))
|
||||
if(other.languages.len >= 2) //They've sucked down some blood and can speak common now.
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
|
||||
//This is already covered by mob/say_understands()
|
||||
//if (istype(other, /mob/living/simple_animal))
|
||||
// if((other.universal_speak && !speaking) || src.universal_speak || src.universal_understand)
|
||||
// return 1
|
||||
// return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
var/obj/item/clothing/mask/gas/voice/V = src.wear_mask
|
||||
if(V.vchange)
|
||||
return V.voice
|
||||
else
|
||||
return name
|
||||
|
||||
var/voice_sub
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
|
||||
if(!gear)
|
||||
continue
|
||||
var/obj/item/voice_changer/changer = locate() in gear
|
||||
if(changer && changer.active && changer.voice)
|
||||
voice_sub = changer.voice
|
||||
if(voice_sub)
|
||||
return voice_sub
|
||||
if(mind && mind.changeling && mind.changeling.mimicing)
|
||||
return mind.changeling.mimicing
|
||||
if(GetSpecialVoice())
|
||||
@@ -143,4 +235,81 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/GetSpecialVoice()
|
||||
return special_voice
|
||||
return special_voice
|
||||
|
||||
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
|
||||
if(speaking)
|
||||
verb = speaking.get_spoken_verb(ending)
|
||||
else
|
||||
if(ending == "!")
|
||||
verb = "exclaims"
|
||||
else if(ending == "?")
|
||||
verb = "asks"
|
||||
|
||||
return verb
|
||||
|
||||
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
|
||||
|
||||
var/list/returns[3]
|
||||
var/verb = "says"
|
||||
var/handled = 0
|
||||
if(silent || (sdisabilities & MUTE))
|
||||
message = ""
|
||||
handled = 1
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||
if(hoers.voicechange)
|
||||
if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
verb = pick("whinnies","neighs", "says")
|
||||
handled = 1
|
||||
|
||||
if(dna)
|
||||
for(var/datum/dna/gene/gene in dna_genes)
|
||||
if(!gene.block)
|
||||
continue
|
||||
if(gene.is_active(src))
|
||||
message = gene.OnSay(src,message)
|
||||
handled = 1
|
||||
|
||||
if(message != "")
|
||||
if((M_HULK in mutations) && health >= 25 && length(message))
|
||||
message = "[uppertext(message)]!!!"
|
||||
verb = pick("yells","roars","hollers")
|
||||
handled = 1
|
||||
if(slurring)
|
||||
message = slur(message)
|
||||
verb = "slurs"
|
||||
handled = 1
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
verb = "stammers"
|
||||
handled = 1
|
||||
|
||||
var/braindam = getBrainLoss()
|
||||
if(braindam >= 60)
|
||||
handled = 1
|
||||
if(prob(braindam/4))
|
||||
message = stutter(message)
|
||||
verb = "gibbers"
|
||||
if(prob(braindam))
|
||||
message = uppertext(message)
|
||||
verb = "yells loudly"
|
||||
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
returns[3] = handled
|
||||
return returns
|
||||
|
||||
@@ -290,11 +290,12 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
//Robotic limbs are handled in get_icon() so all we worry about are missing or dead limbs.
|
||||
//No icon stored, so we need to start with a basic one.
|
||||
var/datum/organ/external/chest = get_organ("chest")
|
||||
base_icon = chest.get_icon(g,fat)
|
||||
if(chest)
|
||||
base_icon = chest.get_icon(g,fat)
|
||||
|
||||
if(chest.status & ORGAN_DEAD)
|
||||
base_icon.ColorTone(necrosis_color_mod)
|
||||
base_icon.SetIntensity(0.7)
|
||||
if(chest.status & ORGAN_DEAD)
|
||||
base_icon.ColorTone(necrosis_color_mod)
|
||||
base_icon.SetIntensity(0.7)
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
//Lallander was here
|
||||
/mob/living/carbon/human/whisper(message as text)
|
||||
var/alt_name = ""
|
||||
|
||||
message = trim(copytext(strip_html_simple(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message || silent || miming)
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client)
|
||||
@@ -16,28 +13,74 @@
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
|
||||
if (src.stat == 2)
|
||||
return src.say_dead(message)
|
||||
|
||||
if (src.stat)
|
||||
return
|
||||
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && src.name != GetVoice())
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
// Mute disability
|
||||
if (src.sdisabilities & MUTE)
|
||||
return
|
||||
if(name != GetVoice())
|
||||
alt_name = "(as [get_id_name("Unknown")])"
|
||||
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if (speaking)
|
||||
message = copytext(message,2+length(speaking.key))
|
||||
|
||||
whisper_say(message, speaking, alt_name)
|
||||
|
||||
|
||||
//This is used by both the whisper verb and human/say() to handle whispering
|
||||
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
|
||||
return
|
||||
|
||||
var/italics = 1
|
||||
var/message_range = 1
|
||||
var/eavesdropping_range = 2
|
||||
var/watching_range = 5
|
||||
var/italics = 1
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
var/not_heard //the message displayed to people who could not hear the whispering
|
||||
if (speaking)
|
||||
if (speaking.whisper_verb)
|
||||
verb = speaking.whisper_verb
|
||||
not_heard = "[verb] something"
|
||||
else
|
||||
var/adverb = pick("quietly", "softly")
|
||||
verb = "[speaking.speech_verb] [adverb]"
|
||||
not_heard = "[speaking.speech_verb] something [adverb]"
|
||||
else
|
||||
not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null
|
||||
|
||||
message = capitalize(trim(message))
|
||||
|
||||
if(speech_problem_flag)
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
if(verb == "yells loudly")
|
||||
verb = "slurs emphatically"
|
||||
else
|
||||
var/adverb = pick("quietly", "softly")
|
||||
verb = "[verb] [adverb]"
|
||||
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
if(!message || message=="")
|
||||
return
|
||||
|
||||
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
|
||||
var/voice_sub
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
|
||||
if(!gear)
|
||||
continue
|
||||
var/obj/item/voice_changer/changer = locate() in gear
|
||||
if(changer && changer.active && changer.voice)
|
||||
voice_sub = changer.voice
|
||||
|
||||
if(voice_sub == "Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
@@ -49,97 +92,60 @@
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = list2text(temp_message, " ")
|
||||
message = replacetext(message, "o", "?")
|
||||
message = replacetext(message, "p", "?")
|
||||
message = replacetext(message, "l", "?")
|
||||
message = replacetext(message, "s", "?")
|
||||
message = replacetext(message, "u", "?")
|
||||
message = replacetext(message, "b", "?")
|
||||
|
||||
if (src.stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
for (var/obj/O in view(message_range, src))
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message)
|
||||
message = replacetext(message, "o", "�")
|
||||
message = replacetext(message, "p", "�")
|
||||
message = replacetext(message, "l", "�")
|
||||
message = replacetext(message, "s", "�")
|
||||
message = replacetext(message, "u", "�")
|
||||
message = replacetext(message, "b", "�")
|
||||
|
||||
var/list/listening = hearers(message_range, src)
|
||||
listening |= src
|
||||
|
||||
//ghosts
|
||||
for (var/mob/M in dead_mob_list) //does this include players who joined as observers as well?
|
||||
if (!(M.client))
|
||||
continue
|
||||
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
listening |= M
|
||||
|
||||
//Pass whispers on to anything inside the immediate listeners.
|
||||
for(var/mob/L in listening)
|
||||
for(var/mob/C in L.contents)
|
||||
if(istype(C,/mob/living))
|
||||
listening += C
|
||||
|
||||
var/list/eavesdropping = hearers(2, src)
|
||||
//pass on the message to objects that can hear us.
|
||||
for (var/obj/O in view(message_range, src))
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message, verb, speaking)
|
||||
|
||||
var/list/eavesdropping = hearers(eavesdropping_range, src)
|
||||
eavesdropping -= src
|
||||
eavesdropping -= listening
|
||||
|
||||
var/list/watching = hearers(5, src)
|
||||
var/list/watching = hearers(watching_range, src)
|
||||
watching -= src
|
||||
watching -= listening
|
||||
watching -= eavesdropping
|
||||
|
||||
var/list/heard_a = list() // understood us
|
||||
var/list/heard_b = list() // didn't understand us
|
||||
//now mobs
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
for (var/mob/M in listening)
|
||||
if (M.say_understands(src))
|
||||
heard_a += M
|
||||
else
|
||||
heard_b += M
|
||||
for(var/mob/M in listening)
|
||||
M << speech_bubble
|
||||
M.hear_say(message, verb, speaking, alt_name, italics, src)
|
||||
|
||||
var/rendered = null
|
||||
if (eavesdropping.len)
|
||||
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
|
||||
for(var/mob/M in eavesdropping)
|
||||
M << speech_bubble
|
||||
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
|
||||
|
||||
for (var/mob/M in watching)
|
||||
if (M.say_understands(src))
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers something.</span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_a))
|
||||
var/message_a = message
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_b))
|
||||
var/message_b
|
||||
|
||||
message_b = stars(message)
|
||||
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers, <span class='message'>\"[message_b]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_b)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
for (var/mob/M in eavesdropping)
|
||||
if (M.say_understands(src))
|
||||
var/message_c
|
||||
message_c = stars(message)
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
M.show_message(rendered, 2)
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (italics)
|
||||
message = "<i>[message]</i>"
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if (!(M.client))
|
||||
continue
|
||||
if (M.stat > 1 && !(M in heard_a) && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
if (watching.len)
|
||||
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> [not_heard].</span>"
|
||||
for (var/mob/M in watching)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
@@ -21,3 +21,16 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
if (speaker in Friends)
|
||||
speech_buffer = list()
|
||||
speech_buffer.Add(speaker)
|
||||
speech_buffer.Add(lowertext(html_decode(message)))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="")
|
||||
if (speaker in Friends)
|
||||
speech_buffer = list()
|
||||
speech_buffer.Add(speaker)
|
||||
speech_buffer.Add(lowertext(html_decode(message)))
|
||||
..()
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
|
||||
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
|
||||
var/eyes = "eyes_s" // Icon for eyes.
|
||||
var/blurb = "A completely nondescript species." // A brief lore summary for use in the chargen screen.
|
||||
|
||||
var/primitive // Lesser form, if any (ie. monkey for humans)
|
||||
var/tail // Name of tail image in species effects icon file.
|
||||
var/language // Default racial language, if any.
|
||||
var/unarmed //For empty hand harm-intent attack
|
||||
var/unarmed_type = /datum/unarmed_attack
|
||||
var/mutantrace // Safeguard due to old code.
|
||||
@@ -41,11 +41,8 @@
|
||||
var/brute_mod = null // Physical damage reduction/malus.
|
||||
var/burn_mod = null // Burn damage reduction/malus.
|
||||
|
||||
// For grays
|
||||
var/max_hurt_damage = 9 // Max melee damage dealt + 5 if hulk
|
||||
var/list/default_mutations = list()
|
||||
var/list/default_blocks = list() // Don't touch.
|
||||
var/list/default_block_names = list() // Use this instead, using the names from setupgame.dm
|
||||
var/list/default_genes = list()
|
||||
|
||||
var/flags = 0 // Various specific features.
|
||||
var/bloodflags=0
|
||||
@@ -60,12 +57,21 @@
|
||||
//Used in icon caching.
|
||||
var/race_key = 0
|
||||
var/icon/icon_template
|
||||
|
||||
|
||||
// Language/culture vars.
|
||||
var/default_language = "Galactic Common" // Default language is used when 'say' is used without modifiers.
|
||||
var/language = "Galactic Common" // Default racial language, if any.
|
||||
var/secondary_langs = list() // The names of secondary languages that are available to this species.
|
||||
var/list/speech_sounds // A list of sounds to potentially play when speaking.
|
||||
var/list/speech_chance // The likelihood of a speech sound playing.
|
||||
|
||||
/datum/species/New()
|
||||
unarmed = new unarmed_type()
|
||||
|
||||
|
||||
/datum/species/proc/get_random_name(var/gender)
|
||||
var/datum/language/species_language = all_languages[language]
|
||||
return species_language.get_random_name(gender)
|
||||
|
||||
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
||||
//This is a basic humanoid limb setup.
|
||||
H.organs = list()
|
||||
@@ -81,7 +87,7 @@
|
||||
H.organs_by_name["l_foot"] = new/datum/organ/external/l_foot(H.organs_by_name["l_leg"])
|
||||
H.organs_by_name["r_foot"] = new/datum/organ/external/r_foot(H.organs_by_name["r_leg"])
|
||||
|
||||
if (name!="Slime People")
|
||||
if (name != "Slime People")
|
||||
new/datum/organ/internal/heart(H)
|
||||
new/datum/organ/internal/lungs(H)
|
||||
new/datum/organ/internal/liver(H)
|
||||
@@ -247,6 +253,10 @@
|
||||
return 1
|
||||
|
||||
/datum/species/proc/handle_post_spawn(var/mob/living/carbon/C) //Handles anything not already covered by basic species assignment.
|
||||
handle_dna(C)
|
||||
return
|
||||
|
||||
/datum/species/proc/handle_dna(var/mob/living/carbon/C, var/remove) //Handles DNA mutations, as that doesn't work at init.
|
||||
return
|
||||
|
||||
// Used for species-specific names (Vox, etc)
|
||||
@@ -262,6 +272,10 @@
|
||||
return message
|
||||
|
||||
/datum/species/proc/equip(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
/datum/species/proc/can_understand(var/mob/other)
|
||||
return
|
||||
|
||||
/datum/species/human
|
||||
name = "Human"
|
||||
@@ -272,17 +286,29 @@
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
bodyflags = HAS_SKIN_TONE
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \
|
||||
colonies across a wide swathe of space. They hold a wide range of forms and creeds.<br/><br/> \
|
||||
While the central Sol government maintains control of its far-flung people, powerful corporate \
|
||||
interests, rampant cyber and bio-augmentation and secretive factions make life on most human \
|
||||
worlds tumultous at best."
|
||||
|
||||
/datum/species/unathi
|
||||
name = "Unathi"
|
||||
icobase = 'icons/mob/human_races/r_lizard.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_lizard.dmi'
|
||||
path = /mob/living/carbon/human/unathi
|
||||
default_language = "Galactic Common"
|
||||
language = "Sinta'unathi"
|
||||
tail = "sogtail"
|
||||
unarmed_type = /datum/unarmed_attack/claws
|
||||
primitive = /mob/living/carbon/monkey/unathi
|
||||
darksight = 3
|
||||
|
||||
blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \
|
||||
Uuosa-Eso system, which roughly translates to 'burning mother'.<br/><br/>Coming from a harsh, radioactive \
|
||||
desert planet, they mostly hold ideals of honesty, virtue, martial combat and bravery above all \
|
||||
else, frequently even their own lives. They prefer warmer temperatures than most species and \
|
||||
their native tongue is a heavy hissing laungage called Sinta'Unathi."
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR
|
||||
@@ -305,10 +331,17 @@
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
|
||||
path = /mob/living/carbon/human/tajaran
|
||||
default_language = "Galactic Common"
|
||||
language = "Siik'tajr"
|
||||
tail = "tajtail"
|
||||
unarmed_type = /datum/unarmed_attack/claws
|
||||
darksight = 8
|
||||
|
||||
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
|
||||
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
|
||||
influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \
|
||||
of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \
|
||||
using unique inflections their mouths form."
|
||||
|
||||
cold_level_1 = 200
|
||||
cold_level_2 = 140
|
||||
@@ -331,9 +364,16 @@
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_skrell.dmi'
|
||||
path = /mob/living/carbon/human/skrell
|
||||
default_language = "Galactic Common"
|
||||
language = "Skrellian"
|
||||
primitive = /mob/living/carbon/monkey/skrell
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
blurb = "An amphibious species, Skrell come from the star system known as Qerr'Vallis, which translates to 'Star of \
|
||||
the royals' or 'Light of the Crown'.<br/><br/>Skrell are a highly advanced and logical race who live under the rule \
|
||||
of the Qerr'Katish, a caste within their society which keeps the empire of the Skrell running smoothly. Skrell are \
|
||||
herbivores on the whole and tend to be co-operative with the other species of the galaxy, although they rarely reveal \
|
||||
the secrets of their empire to their allies."
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
bloodflags = BLOOD_GREEN
|
||||
@@ -348,8 +388,20 @@
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_vox.dmi'
|
||||
path = /mob/living/carbon/human/vox
|
||||
language = "Vox-pidgin"
|
||||
|
||||
default_language = "Galactic Common"
|
||||
language = "Vox-pidgin"
|
||||
speech_sounds = list('sound/voice/shriek1.ogg')
|
||||
speech_chance = 20
|
||||
|
||||
unarmed_type = /datum/unarmed_attack/claws //I dont think it will hurt to give vox claws too.
|
||||
|
||||
blurb = "The Vox are the broken remnants of a once-proud race, now reduced to little more than \
|
||||
scavenging vermin who prey on isolated stations, ships or planets to keep their own ancient arkships \
|
||||
alive. They are four to five feet tall, reptillian, beaked, tailed and quilled; human crews often \
|
||||
refer to them as 'shitbirds' for their violent and offensive nature, as well as their horrible \
|
||||
smell.<br/><br/>Most humans will never meet a Vox raider, instead learning of this insular species through \
|
||||
dealing with their traders and merchants; those that do rarely enjoy the experience."
|
||||
|
||||
warning_low_pressure = 50
|
||||
hazard_low_pressure = 0
|
||||
@@ -393,7 +445,6 @@
|
||||
name = "Vox Armalis"
|
||||
icobase = 'icons/mob/human_races/r_armalis.dmi'
|
||||
deform = 'icons/mob/human_races/r_armalis.dmi'
|
||||
language = "Vox-pidgin"
|
||||
path = /mob/living/carbon/human/voxarmalis
|
||||
unarmed_type = /datum/unarmed_attack/claws/armalis
|
||||
|
||||
@@ -454,20 +505,19 @@
|
||||
icobase = 'icons/mob/human_races/r_kidan.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_kidan.dmi'
|
||||
path = /mob/living/carbon/human/kidan
|
||||
default_language = "Galactic Common"
|
||||
language = "Chittin"
|
||||
unarmed_type = /datum/unarmed_attack/claws
|
||||
|
||||
|
||||
brute_mod = 0.8
|
||||
|
||||
flags = IS_WHITELISTED
|
||||
bloodflags = BLOOD_GREEN
|
||||
bodyflags = FEET_CLAWS
|
||||
|
||||
|
||||
|
||||
/datum/species/slime
|
||||
name = "Slime People"
|
||||
default_language = "Galactic Common"
|
||||
language = "Bubblish"
|
||||
path = /mob/living/carbon/human/slime
|
||||
primitive = /mob/living/carbon/slime
|
||||
@@ -478,37 +528,48 @@
|
||||
|
||||
/datum/species/slime/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.dna = new /datum/dna(null)
|
||||
H.dna.species=H.species.name
|
||||
H.dna.real_name = H.real_name
|
||||
H.dna.species = H.species.name
|
||||
H.dna.mutantrace = "slime"
|
||||
H.update_mutantrace()
|
||||
|
||||
return ..()
|
||||
..()
|
||||
|
||||
/datum/species/grey // /vg/
|
||||
/datum/species/grey
|
||||
name = "Grey"
|
||||
icobase = 'icons/mob/human_races/r_grey.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_grey.dmi'
|
||||
language = "Grey"
|
||||
default_language = "Galactic Common"
|
||||
//language = "Grey" // Perhaps if they ever get a hivemind
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
darksight = 5 // BOOSTED from 2
|
||||
eyes = "grey_eyes_s"
|
||||
|
||||
brute_mod = 1.25 //greys are fragile
|
||||
|
||||
default_genes = list(M_REMOTE_TALK)
|
||||
|
||||
primitive = /mob/living/carbon/monkey // TODO
|
||||
|
||||
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
|
||||
// Both must be set or it's only a 45% chance of manifesting.
|
||||
default_mutations=list(M_REMOTE_TALK)
|
||||
default_block_names=list("REMOTETALK")
|
||||
|
||||
|
||||
/datum/species/grey/handle_dna(var/mob/living/carbon/C, var/remove)
|
||||
if(!remove)
|
||||
C.dna.SetSEState(REMOTETALKBLOCK,1,1)
|
||||
C.mutations |= M_REMOTE_TALK
|
||||
genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED)
|
||||
else
|
||||
C.dna.SetSEState(REMOTETALKBLOCK,0,1)
|
||||
C.mutations -= M_REMOTE_TALK
|
||||
genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED)
|
||||
C.update_mutations()
|
||||
..()
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
icobase = 'icons/mob/human_races/r_diona.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_plant.dmi'
|
||||
path = /mob/living/carbon/human/diona
|
||||
default_language = "Galactic Common"
|
||||
language = "Rootspeak"
|
||||
unarmed_type = /datum/unarmed_attack/diona
|
||||
primitive = /mob/living/carbon/monkey/diona
|
||||
@@ -523,6 +584,14 @@
|
||||
heat_level_1 = 300
|
||||
heat_level_2 = 350
|
||||
heat_level_3 = 700
|
||||
|
||||
blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \
|
||||
species hailing from Epsilon Ursae Minoris. Each 'diona' is a cluster of numerous cat-sized organisms called nymphs; \
|
||||
there is no effective upper limit to the number that can fuse in gestalt, and reports exist of the Epsilon Ursae \
|
||||
Minoris primary being ringed with a cloud of singing space-station-sized entities.<br/><br/>The Dionaea coexist peacefully with \
|
||||
all known species, especially the Skrell. Their communal mind makes them slow to react, and they have difficulty understanding \
|
||||
even the simplest concepts of other minds. Their alien physiology allows them survive happily off a diet of nothing but light, \
|
||||
water and other radiation."
|
||||
|
||||
flags = NO_BREATHE | REQUIRE_LIGHT | IS_PLANT | RAD_ABSORB | NO_BLOOD | IS_SLOW | NO_PAIN
|
||||
|
||||
@@ -532,6 +601,12 @@
|
||||
flesh_color = "#907E4A"
|
||||
|
||||
reagent_tag = IS_DIONA
|
||||
|
||||
/datum/species/diona/can_understand(var/mob/other)
|
||||
var/mob/living/carbon/monkey/diona/D = other
|
||||
if(istype(D))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.gender = NEUTER
|
||||
@@ -561,6 +636,7 @@
|
||||
icobase = 'icons/mob/human_races/r_machine.dmi'
|
||||
deform = 'icons/mob/human_races/r_machine.dmi'
|
||||
path = /mob/living/carbon/human/machine
|
||||
default_language = "Galactic Common"
|
||||
language = "Trinary"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
|
||||
+76
-452
@@ -1,25 +1,22 @@
|
||||
var/list/department_radio_keys = list(
|
||||
":r" = "right ear", "#r" = "right ear", ".r" = "right ear", "!r" = "fake right ear",
|
||||
":l" = "left ear", "#l" = "left ear", ".l" = "left ear", "!l" = "fake left ear",
|
||||
":r" = "right ear", "#r" = "right ear", ".r" = "right ear",
|
||||
":l" = "left ear", "#l" = "left ear", ".l" = "left ear",
|
||||
":i" = "intercom", "#i" = "intercom", ".i" = "intercom",
|
||||
":h" = "department", "#h" = "department", ".h" = "department",
|
||||
":+" = "special", "#+" = "special", ".+" = "special", //activate radio-specific special functions
|
||||
":c" = "Command", "#c" = "Command", ".c" = "Command",
|
||||
":n" = "Science", "#n" = "Science", ".n" = "Science",
|
||||
":m" = "Medical", "#m" = "Medical", ".m" = "Medical",
|
||||
":e" = "Engineering", "#e" = "Engineering", ".e" = "Engineering",
|
||||
":s" = "Security", "#s" = "Security", ".s" = "Security",
|
||||
":w" = "whisper", "#w" = "whisper", ".w" = "whisper",
|
||||
":b" = "binary", "#b" = "binary", ".b" = "binary",
|
||||
":d" = "drone", "#d" = "drone", ".d" = "drone",
|
||||
":a" = "alientalk", "#a" = "alientalk", ".a" = "alientalk",
|
||||
":t" = "Syndicate", "#t" = "Syndicate", ".t" = "Syndicate",
|
||||
":u" = "Supply", "#u" = "Supply", ".u" = "Supply",
|
||||
":z" = "Service", "#z" = "Service", ".z" = "Service",
|
||||
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
|
||||
":p" = "AI Private", "#p" = "AI Private", ".p" = "AI Private",
|
||||
|
||||
|
||||
":R" = "right ear", "#R" = "right ear", ".R" = "right ear", "!R" = "fake right ear",
|
||||
":L" = "left ear", "#L" = "left ear", ".L" = "left ear", "!L" = "fake left ear",
|
||||
":R" = "right ear", "#R" = "right ear", ".R" = "right ear",
|
||||
":L" = "left ear", "#L" = "left ear", ".L" = "left ear",
|
||||
":I" = "intercom", "#I" = "intercom", ".I" = "intercom",
|
||||
":H" = "department", "#H" = "department", ".H" = "department",
|
||||
":C" = "Command", "#C" = "Command", ".C" = "Command",
|
||||
@@ -28,40 +25,35 @@ var/list/department_radio_keys = list(
|
||||
":E" = "Engineering", "#E" = "Engineering", ".E" = "Engineering",
|
||||
":S" = "Security", "#S" = "Security", ".S" = "Security",
|
||||
":W" = "whisper", "#W" = "whisper", ".W" = "whisper",
|
||||
":D" = "drone", "#D" = "drone", ".D" = "drone",
|
||||
":B" = "binary", "#B" = "binary", ".B" = "binary",
|
||||
":A" = "alientalk", "#A" = "alientalk", ".A" = "alientalk",
|
||||
":T" = "Syndicate", "#T" = "Syndicate", ".T" = "Syndicate",
|
||||
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
|
||||
":Z" = "Service", "#Z" = "Service", ".Z" = "Service",
|
||||
":G" = "changeling", "#G" = "changeling", ".G" = "changeling"
|
||||
|
||||
/* //kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
":ê" = "right hand", "#ê" = "right hand", ".ê" = "right hand",
|
||||
":ä" = "left hand", "#ä" = "left hand", ".ä" = "left hand",
|
||||
":ø" = "intercom", "#ø" = "intercom", ".ø" = "intercom",
|
||||
":ð" = "department", "#ð" = "department", ".ð" = "department",
|
||||
":ñ" = "Command", "#ñ" = "Command", ".ñ" = "Command",
|
||||
":ò" = "Science", "#ò" = "Science", ".ò" = "Science",
|
||||
":ü" = "Medical", "#ü" = "Medical", ".ü" = "Medical",
|
||||
":ó" = "Engineering", "#ó" = "Engineering", ".ó" = "Engineering",
|
||||
":û" = "Security", "#û" = "Security", ".û" = "Security",
|
||||
":ö" = "whisper", "#ö" = "whisper", ".ö" = "whisper",
|
||||
":è" = "binary", "#è" = "binary", ".è" = "binary",
|
||||
":ô" = "alientalk", "#ô" = "alientalk", ".ô" = "alientalk",
|
||||
":å" = "Syndicate", "#å" = "Syndicate", ".å" = "Syndicate",
|
||||
":é" = "Supply", "#é" = "Supply", ".é" = "Supply",
|
||||
":ï" = "changeling", "#ï" = "changeling", ".ï" = "changeling" */
|
||||
":P" = "AI Private", "#P" = "AI Private", ".P" = "AI Private"
|
||||
)
|
||||
|
||||
|
||||
var/list/channel_to_radio_key = new
|
||||
proc/get_radio_key_from_channel(var/channel)
|
||||
var/key = channel_to_radio_key[channel]
|
||||
if(!key)
|
||||
for(var/radio_key in department_radio_keys)
|
||||
if(department_radio_keys[radio_key] == channel)
|
||||
key = radio_key
|
||||
break
|
||||
if(!key)
|
||||
key = ""
|
||||
channel_to_radio_key[channel] = key
|
||||
|
||||
return key
|
||||
|
||||
/mob/living/proc/binarycheck()
|
||||
|
||||
if (istype(src, /mob/living/silicon/pai))
|
||||
return
|
||||
if (issilicon(src))
|
||||
return 1
|
||||
|
||||
if (!ishuman(src))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.l_ear || H.r_ear)
|
||||
var/obj/item/device/radio/headset/dongle
|
||||
@@ -72,446 +64,78 @@ var/list/department_radio_keys = list(
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_binary) return 1
|
||||
|
||||
/mob/living/proc/hivecheck()
|
||||
if (isalien(src)) return 1
|
||||
if (!ishuman(src)) return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.l_ear || H.r_ear)
|
||||
var/obj/item/device/radio/headset/dongle
|
||||
if(istype(H.l_ear,/obj/item/device/radio/headset))
|
||||
dongle = H.l_ear
|
||||
else
|
||||
dongle = H.r_ear
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_hive) return 1
|
||||
|
||||
/mob/living/say(var/message)
|
||||
|
||||
/*
|
||||
Formatting and sanitizing.
|
||||
*/
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
|
||||
/*
|
||||
Sanity checking and speech failure.
|
||||
*/
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
if(silent)
|
||||
return
|
||||
|
||||
if (stat == 2) // Dead.
|
||||
return say_dead(message)
|
||||
else if (stat) // Unconcious.
|
||||
return
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (muted)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
// undo last word status.
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H=src
|
||||
if(H.said_last_words)
|
||||
H.said_last_words=0
|
||||
|
||||
// Mute disability
|
||||
if (sdisabilities & MUTE)
|
||||
return
|
||||
|
||||
// Muzzled.
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
// Emotes.
|
||||
if (copytext(message, 1, 2) == "*" && !stat)
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
/*
|
||||
Identity hiding.
|
||||
*/
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && name != GetVoice())
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
|
||||
/*
|
||||
Now we get into the real meat of the say processing. Determining the message mode.
|
||||
*/
|
||||
|
||||
var/italics = 0
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
|
||||
var/datum/language/speaking = null //For use if a specific language is being spoken.
|
||||
|
||||
var/braindam = getBrainLoss()
|
||||
if (braindam >= 60)
|
||||
if(prob(braindam/4))
|
||||
message = stutter(message)
|
||||
if(prob(braindam))
|
||||
message = uppertext(message)
|
||||
|
||||
// General public key. Special message handling
|
||||
var/mmode
|
||||
var/cprefix = ""
|
||||
if(length(message) >= 2)
|
||||
cprefix = copytext(message, 1, 3)
|
||||
if(cprefix in department_radio_keys)
|
||||
mmode = department_radio_keys[cprefix]
|
||||
if (copytext(message, 1, 2) == ";" || (prob(braindam/2) && !mmode))
|
||||
message_mode = "headset"
|
||||
message = copytext(message, 2)
|
||||
// Begin checking for either a message mode or a language to speak.
|
||||
else if (length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1, 3)
|
||||
|
||||
//Check if the person is speaking a language that they know.
|
||||
if(languages.len)
|
||||
for(var/datum/language/L in languages)
|
||||
if(lowertext(channel_prefix) == ":[L.key]")
|
||||
speaking = L
|
||||
break
|
||||
message_mode = department_radio_keys[channel_prefix]
|
||||
if (message_mode || speaking || copytext(message,1,2) == ":")
|
||||
message = trim(copytext(message, 3))
|
||||
if (!(istype(src,/mob/living/carbon/human) && !isAI(src) && !isrobot(src) || istype(src,/mob/living/carbon/monkey) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department") || isAI(src) && (message_mode=="department") || (message_mode in radiochannels)))
|
||||
message_mode = null //only humans can use headsets
|
||||
|
||||
if(traumatic_shock > 61 && prob(50))
|
||||
if(message_mode)
|
||||
src << "<span class='warning'>You try to use your radio, but you are in too much pain.</span>"
|
||||
message_mode = null //people in shock will have a high chance of not being able to speak on radio; needed since people don't instantly pass out at 100 damage.
|
||||
|
||||
message = capitalize(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
if (stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// VIDEO KILLED THE RADIO STAR V2.0
|
||||
//
|
||||
// EXPERIMENTAL CODE BY YOUR PALS AT /vg/
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
var/list/obj/item/used_radios = new
|
||||
|
||||
// Actually speaking on the radio?
|
||||
var/is_speaking_radio = 0
|
||||
|
||||
// Devices selected
|
||||
var/list/devices=list()
|
||||
|
||||
// Select all always_talk devices
|
||||
// Carbon lifeforms
|
||||
//if(istype(src, /mob/living/carbon))
|
||||
for(var/obj/item/device/radio/R in contents)
|
||||
if(R.always_talk)
|
||||
devices += R
|
||||
|
||||
//src << "Speaking on [message_mode]: [message]"
|
||||
if(message_mode)
|
||||
switch (message_mode)
|
||||
if ("right ear")
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C=src
|
||||
if(C:r_ear) devices += C:r_ear
|
||||
message_mode="headset"
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("left ear")
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C=src
|
||||
if(C:l_ear) devices += C:l_ear
|
||||
message_mode="headset"
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
// Select a headset and speak into it without actually sending a message
|
||||
if ("fake")
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C=src
|
||||
if(C:l_ear) used_radios += C:l_ear
|
||||
if(C:r_ear) used_radios += C:r_ear
|
||||
if(issilicon(src))
|
||||
var/mob/living/silicon/Ro=src
|
||||
if(Ro:radio) devices += Ro:radio
|
||||
message_range = 1
|
||||
italics = 1
|
||||
if ("fake left ear")
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C=src
|
||||
if(C:l_ear) used_radios += C:l_ear
|
||||
message_range = 1
|
||||
italics = 1
|
||||
if ("fake right ear")
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C=src
|
||||
if(C:r_ear) used_radios += C:r_ear
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("intercom")
|
||||
for (var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
devices += I
|
||||
message_mode=null
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
//I see no reason to restrict such way of whispering
|
||||
if ("whisper")
|
||||
whisper(message)
|
||||
return
|
||||
|
||||
if ("binary")
|
||||
if(robot_talk_understand || binarycheck())
|
||||
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
|
||||
robot_talk(message)
|
||||
return
|
||||
|
||||
if ("alientalk")
|
||||
if(alien_talk_understand || hivecheck())
|
||||
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
|
||||
alien_talk(message)
|
||||
return
|
||||
|
||||
if ("pAI")
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if("changeling")
|
||||
if(mind && mind.changeling)
|
||||
log_say("[key_name(src)] ([mind.changeling.changelingID]): [message]")
|
||||
for(var/mob/Changeling in mob_list)
|
||||
if(istype(Changeling, /mob/living/silicon)) continue //WHY IS THIS NEEDED?
|
||||
if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer))
|
||||
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
|
||||
else if(istype(Changeling,/mob/dead/observer) && (Changeling.client && Changeling.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID] (:</b> <a href='byond://?src=\ref[Changeling];follow2=\ref[Changeling];follow=\ref[src]'>(Follow)</a> [message]</font></i>"
|
||||
return
|
||||
else // headset, department channels.
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C=src
|
||||
if(C:l_ear) devices += C:l_ear
|
||||
if(C:r_ear) devices += C:r_ear
|
||||
if(issilicon(src))
|
||||
if(isAI(src))//for the AI's radio. This can't be with the borg thing above due to typecasting.
|
||||
var/mob/living/silicon/ai/A = src
|
||||
if(A.aiRadio)
|
||||
A.aiRadio.talk_into(src, message, message_mode)
|
||||
used_radios += A.aiRadio
|
||||
else
|
||||
var/mob/living/silicon/Ro=src
|
||||
if(!isAI(Ro))
|
||||
if(Ro:radio)
|
||||
devices += Ro:radio
|
||||
else
|
||||
warning("[src] has no radio!")
|
||||
message_range = 1
|
||||
italics = 1
|
||||
if(devices.len>0)
|
||||
for(var/obj/item/device/radio/R in devices)
|
||||
if(istype(R))
|
||||
R.talk_into(src, message, message_mode)
|
||||
used_radios += R
|
||||
is_speaking_radio = 1
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// </NEW RADIO CODE>
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < SOUND_MINIMUM_PRESSURE)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
|
||||
var/list/listening
|
||||
|
||||
listening = get_mobs_in_view(message_range, src)
|
||||
var/list/onscreen = viewers()
|
||||
for(var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && src.client) // src.client is so that ghosts don't have to listen to mice
|
||||
listening|=M
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/sound/speech_sound, var/sound_vol)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/W = hear(message_range, T)
|
||||
|
||||
for (var/obj/O in ((W | contents)-used_radios))
|
||||
W |= O
|
||||
//handle nonverbal and sign languages here
|
||||
if (speaking)
|
||||
if (speaking.flags & NONVERBAL)
|
||||
if (prob(30))
|
||||
src.custom_emote(1, "[pick(speaking.signlang_verb)].")
|
||||
|
||||
for (var/mob/M in W)
|
||||
W |= M.contents
|
||||
if (speaking.flags & SIGNLANG)
|
||||
return say_signlang(message, pick(speaking.signlang_verb), speaking)
|
||||
|
||||
for (var/atom/A in W)
|
||||
if(istype(A, /mob/living/simple_animal/parrot)) //Parrot speech mimickry
|
||||
if(A == src)
|
||||
continue //Dont imitate ourselves
|
||||
var/list/listening = list()
|
||||
var/list/listening_obj = list()
|
||||
|
||||
var/mob/living/simple_animal/parrot/P = A
|
||||
if(P.speech_buffer.len >= 10)
|
||||
P.speech_buffer.Remove(pick(P.speech_buffer))
|
||||
P.speech_buffer.Add(message)
|
||||
if(T)
|
||||
//make sure the air can transmit speech - speaker's side
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/pressure = (environment)? environment.return_pressure() : 0
|
||||
if(pressure < SOUND_MINIMUM_PRESSURE)
|
||||
message_range = 1
|
||||
|
||||
if (isslime(A))
|
||||
var/mob/living/carbon/slime/S = A
|
||||
if (src in S.Friends)
|
||||
S.speech_buffer = list()
|
||||
S.speech_buffer.Add(src)
|
||||
S.speech_buffer.Add(lowertext(html_decode(message)))
|
||||
if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
|
||||
italics = 1
|
||||
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||
|
||||
if(istype(A, /obj/)) //radio in pocket could work, radio in backpack wouldn't --rastaf0
|
||||
var/obj/O = A
|
||||
spawn (0)
|
||||
if(O && !istype(O.loc, /obj/item/weapon/storage))
|
||||
O.hear_talk(src, message)
|
||||
var/list/hear = hear(message_range, T)
|
||||
var/list/hearturfs = list()
|
||||
|
||||
for(var/I in hear)
|
||||
if(istype(I, /mob/))
|
||||
var/mob/M = I
|
||||
listening += M
|
||||
hearturfs += M.locs[1]
|
||||
for(var/obj/O in M.contents)
|
||||
listening_obj |= O
|
||||
else if(istype(I, /obj/))
|
||||
var/obj/O = I
|
||||
hearturfs += O.locs[1]
|
||||
listening_obj |= O
|
||||
|
||||
var/list/heard_a = list() // understood us
|
||||
var/list/heard_b = list() // didn't understand us
|
||||
|
||||
for (var/M in listening)
|
||||
if(hascall(M,"say_understands"))
|
||||
if (M:say_understands(src,speaking))
|
||||
heard_a += M
|
||||
else
|
||||
heard_b += M
|
||||
else
|
||||
heard_a += M
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
listening |= M
|
||||
continue
|
||||
if(M.loc && M.locs[1] in hearturfs)
|
||||
listening |= M
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
for(var/mob/M in hearers(5, src))
|
||||
if(M != src && is_speaking_radio)
|
||||
M:show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
|
||||
for(var/mob/M in listening)
|
||||
M << speech_bubble
|
||||
M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol)
|
||||
|
||||
/* if(message_mode == null)
|
||||
var/accent = "en-us"
|
||||
var/voice = "m7"
|
||||
var/speed = 175
|
||||
var/pitch = 0
|
||||
var/echo = 10
|
||||
if(istype(src, /mob/living/silicon/ai))
|
||||
echo = 90
|
||||
if(istype(src, /mob/living/silicon/robot))
|
||||
echo = 60
|
||||
if(src.client && src.client.prefs)
|
||||
accent = src.client.prefs.accent
|
||||
voice = src.client.prefs.voice
|
||||
speed = src.client.prefs.talkspeed
|
||||
pitch = src.client.prefs.pitch
|
||||
src:texttospeech(message, speed, pitch, accent, "+[voice]", echo)*/
|
||||
|
||||
var/rendered = null
|
||||
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message,speaking)
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
|
||||
var/message_ghost = "<b>[message_a]</b>" // bold so ghosts know the person is in view.
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
var/rendered2 = null
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
//BEGIN TELEPORT CHANGES
|
||||
/* if(message_mode == null && fexists("sound/playervoices/[src.ckey].ogg"))
|
||||
if(M.client)
|
||||
if(M.client.prefs)
|
||||
if(M.client.prefs.sound & SOUND_VOICES)
|
||||
M.playsound_local(get_turf(src), "sound/playervoices/[src.ckey].ogg", 70, 0, 5, 1)*/
|
||||
if(!istype(M, /mob/new_player))
|
||||
if(M && M.stat == DEAD)
|
||||
if (M.client && M.client.prefs && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen)
|
||||
rendered2 = "<span class='game say'><span class='name'>[GetVoice()]</span></span> [alt_name] <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_ghost]</span></span>"
|
||||
else
|
||||
rendered2 = "<span class='game say'><span class='name'>[GetVoice()]</span></span> [alt_name] <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span>"
|
||||
M:show_message(rendered2, 2)
|
||||
continue
|
||||
//END CHANGES
|
||||
|
||||
if(hascall(M,"show_message"))
|
||||
var/deaf_message = ""
|
||||
var/deaf_type = 1
|
||||
if(M != src)
|
||||
deaf_message = "<span class='name'>[name]</span>[alt_name] talks but you cannot hear them."
|
||||
else
|
||||
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
|
||||
deaf_type = 2 // Since you should be able to hear yourself without looking
|
||||
M:show_message(rendered, 2, deaf_message, deaf_type)
|
||||
M << speech_bubble
|
||||
|
||||
if (length(heard_b))
|
||||
|
||||
var/message_b
|
||||
message_b = stars(message)
|
||||
message_b = say_quote(message_b,speaking)
|
||||
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span>[alt_name] <span class='message'>[message_b]</span></span>" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
|
||||
var/rendered2 = null
|
||||
|
||||
for (var/M in heard_b)
|
||||
var/mob/MM
|
||||
if(istype(M, /mob))
|
||||
MM = M
|
||||
if(!istype(MM, /mob/new_player) && MM)
|
||||
if(MM && MM.stat == DEAD)
|
||||
rendered2 = "<span class='game say'><span class='name'>[voice_name]</span></span> <a href='byond://?src=\ref[MM];follow2=\ref[MM];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_b]</span></span>"
|
||||
MM:show_message(rendered2, 2)
|
||||
continue
|
||||
if(hascall(M,"show_message"))
|
||||
M:show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('icons/effects/speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
*/ /*
|
||||
|
||||
flick("[presay]say", B)
|
||||
|
||||
if(istype(loc, /turf))
|
||||
B.loc = loc
|
||||
else
|
||||
B.loc = loc.loc
|
||||
|
||||
spawn()
|
||||
sleep(11)
|
||||
del(B)
|
||||
*/
|
||||
for(var/obj/O in listening_obj)
|
||||
spawn(0)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
O.hear_talk(src, message, verb, speaking)
|
||||
|
||||
log_say("[name]/[key] : [message]")
|
||||
return 1
|
||||
|
||||
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.hear_signlang(message, verb, language, src)
|
||||
return 1
|
||||
|
||||
/obj/effect/speech_bubble
|
||||
var/mob/parent
|
||||
|
||||
/mob/living/proc/GetVoice()
|
||||
return name
|
||||
|
||||
|
||||
|
||||
@@ -112,6 +112,20 @@ var/list/ai_list = list()
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message, /mob/living/silicon/ai/proc/ai_store_location, /mob/living/silicon/ai/proc/ai_goto_location, /mob/living/silicon/ai/proc/ai_remove_location, /mob/living/silicon/ai/proc/nano_crew_monitor, /mob/living/silicon/ai/proc/ai_cancel_call)
|
||||
|
||||
//Languages
|
||||
add_language("Robot Talk", 1)
|
||||
add_language("Sol Common", 1)
|
||||
add_language("Tradeband", 1)
|
||||
add_language("Sinta'unathi", 0)
|
||||
add_language("Siik'tajr", 0)
|
||||
add_language("Skrellian", 0)
|
||||
add_language("Vox-pidgin", 0)
|
||||
add_language("Rootspeak", 0)
|
||||
add_language("Trinary", 1)
|
||||
add_language("Chittin", 0)
|
||||
add_language("Bubblish", 0)
|
||||
add_language("Gutter", 0)
|
||||
|
||||
if(!safety)//Only used by AIize() to successfully spawn an AI.
|
||||
if (!B)//If there is no player/brain inside.
|
||||
empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
|
||||
@@ -127,6 +141,7 @@ var/list/ai_list = list()
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light,/mob/living/silicon/ai/verb/pick_icon,/mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message, /mob/living/silicon/ai/proc/ai_cancel_call)
|
||||
laws = new /datum/ai_laws/alienmov
|
||||
add_language("xenocommon", 1)
|
||||
else
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
|
||||
/mob/aiEye
|
||||
name = "Inactive AI Eye"
|
||||
icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o
|
||||
icon = 'icons/mob/AI.dmi'
|
||||
icon_state = "eye"
|
||||
alpha = 127
|
||||
var/list/visibleCameraChunks = list()
|
||||
var/mob/living/silicon/ai/ai = null
|
||||
density = 0
|
||||
|
||||
@@ -1,32 +1,8 @@
|
||||
/mob/living/silicon/ai/say(var/message)
|
||||
if(parent && istype(parent) && parent.stat != 2)
|
||||
parent.say(message) //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead.
|
||||
return
|
||||
|
||||
..(message)
|
||||
|
||||
/mob/living/silicon/ai/say_understands(var/other)
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/robot))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/decoy))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/pai))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
if (ending == "?")
|
||||
return "queries, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "declares, \"[text]\"";
|
||||
|
||||
return "states, \"[text]\"";
|
||||
return parent.say(message)
|
||||
//If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead.
|
||||
return ..(message)
|
||||
|
||||
/mob/living/silicon/ai/proc/IsVocal()
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
var/obj/item/radio/integrated/signal/sradio // AI's signaller
|
||||
|
||||
var/translator_on = 0 // keeps track of the translator module
|
||||
|
||||
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
|
||||
canmove = 0
|
||||
@@ -81,6 +82,13 @@
|
||||
if(!card.radio)
|
||||
card.radio = new /obj/item/device/radio(src.card)
|
||||
radio = card.radio
|
||||
|
||||
//Default languages without universal translator software
|
||||
add_language("Sol Common", 1)
|
||||
add_language("Tradeband", 1)
|
||||
add_language("Gutter", 1)
|
||||
add_language("Trinary", 1)
|
||||
|
||||
//Verbs for pAI mobile form, chassis and Say flavor text
|
||||
verbs += /mob/living/silicon/pai/proc/choose_chassis
|
||||
verbs += /mob/living/silicon/pai/proc/choose_verbs
|
||||
@@ -334,7 +342,7 @@
|
||||
//I'm not sure how much of this is necessary, but I would rather avoid issues.
|
||||
if(istype(card.loc,/mob))
|
||||
var/mob/holder = card.loc
|
||||
holder.unEquip(card)
|
||||
holder.drop_from_inventory(card)
|
||||
else if(istype(card.loc,/obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/holder = card.loc
|
||||
holder.pai = null
|
||||
@@ -503,3 +511,7 @@
|
||||
spawn(1)
|
||||
close_up()
|
||||
return 2
|
||||
|
||||
// No binary for pAIs.
|
||||
/mob/living/silicon/pai/binarycheck()
|
||||
return 0
|
||||
@@ -268,7 +268,7 @@
|
||||
src.medHUD = !src.medHUD
|
||||
if("translator")
|
||||
if(href_list["toggle"])
|
||||
src.universal_speak = !src.universal_speak
|
||||
src.translator_toggle()
|
||||
if("doorjack")
|
||||
if(href_list["jack"])
|
||||
if(src.cable && src.cable.machine)
|
||||
@@ -687,4 +687,36 @@
|
||||
else
|
||||
dat += addtext("<tr><td class='a'><i><b>From</b></i></td><td class='a'><i><b>→</b></i></td><td><i><b><a href='byond://?src=\ref[src];software=pdamessage;target=",index["target"],"'>", index["owner"],"</a>: </b></i>", index["message"], "<br></td></tr>")
|
||||
dat += "</table>"
|
||||
return dat
|
||||
return dat
|
||||
|
||||
/mob/living/silicon/pai/proc/translator_toggle()
|
||||
|
||||
// Sol Common, Tradeband, Gutter and Trinary are added with New() and are therefore the current default, always active languages
|
||||
|
||||
if(translator_on)
|
||||
translator_on = 0
|
||||
|
||||
remove_language("Sinta'unathi")
|
||||
remove_language("Siik'tajr")
|
||||
remove_language("Skrellian")
|
||||
remove_language("Vox-pidgin")
|
||||
remove_language("Rootspeak")
|
||||
remove_language("Trinary")
|
||||
remove_language("Chittin")
|
||||
remove_language("Bubblish")
|
||||
|
||||
src << "\blue Translator Module toggled OFF."
|
||||
|
||||
else
|
||||
translator_on = 1
|
||||
|
||||
add_language("Sinta'unathi")
|
||||
add_language("Siik'tajr")
|
||||
add_language("Skrellian")
|
||||
add_language("Vox-pidgin")
|
||||
add_language("Rootspeak")
|
||||
add_language("Trinary")
|
||||
add_language("Chittin")
|
||||
add_language("Bubblish")
|
||||
|
||||
src << "\blue Translator Module toggled ON."
|
||||
@@ -121,6 +121,11 @@
|
||||
/mob/living/silicon/robot/proc/is_component_functioning(module_name)
|
||||
var/datum/robot_component/C = components[module_name]
|
||||
return C && C.installed == 1 && C.toggled && C.is_powered()
|
||||
|
||||
// Returns component by it's string name
|
||||
/mob/living/silicon/robot/proc/get_component(var/component_name)
|
||||
var/datum/robot_component/C = components[component_name]
|
||||
return C
|
||||
|
||||
/obj/item/broken_device
|
||||
name = "broken component"
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
lawupdate = 0
|
||||
density = 1
|
||||
req_access = list(access_engine, access_robotics)
|
||||
|
||||
local_transmit = 1
|
||||
|
||||
// We need to keep track of a few module items so we don't need to do list operations
|
||||
// every time we need them. These get set in New() after the module is chosen.
|
||||
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
|
||||
@@ -25,11 +26,13 @@
|
||||
//Used for self-mailing.
|
||||
var/mail_destination = 0
|
||||
|
||||
//Used for pulling.
|
||||
|
||||
/mob/living/silicon/robot/drone/New()
|
||||
|
||||
..()
|
||||
|
||||
remove_language("Robot Talk")
|
||||
add_language("Drone Talk", 1)
|
||||
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
@@ -88,79 +91,6 @@
|
||||
/mob/living/silicon/robot/drone/pick_module()
|
||||
return
|
||||
|
||||
//Drones can only use binary and say emotes. NOTHING else.
|
||||
//TBD, fix up boilerplate. ~ Z
|
||||
/mob/living/silicon/robot/drone/say(var/message)
|
||||
if (!message)
|
||||
return
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
if (stat == 2)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
return say_dead(message)
|
||||
|
||||
//Must be concious to speak
|
||||
if (stat)
|
||||
return
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
if (length(message) >= 2)
|
||||
var/prefix = copytext(message, 1, 3)
|
||||
if (department_radio_keys[prefix] == "drone")
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(istype(src, /mob/living/silicon/robot/drone))
|
||||
var/mob/living/silicon/robot/drone/R = src
|
||||
if(!R.is_component_functioning("comms"))
|
||||
src << "\red Your drone communications component isn't functional."
|
||||
return
|
||||
drone_talk(message)
|
||||
else
|
||||
var/list/listeners = hearers(5,src)
|
||||
listeners |= src
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
for(var/mob/living/silicon/D in listeners)
|
||||
if(D.client)
|
||||
D << "<b>[src]</b> transmits, \"[message]\""
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && (M.client.prefs.toggles & CHAT_GHOSTEARS) && src.client)
|
||||
M << "<b>[src]</b> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> transmits, \"[message]\""
|
||||
else if(M.stat == 2 && src.client && M in listeners)
|
||||
M << "<b>[src]</b> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> transmits, \"[message]\""
|
||||
|
||||
/mob/living/proc/drone_talk(var/message)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
message = trim(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Drone Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
if(istype(S, /mob/living/silicon/robot/drone))
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
for (var/mob/S in dead_mob_list)
|
||||
if(!istype(S,/mob/new_player) && !istype(S,/mob/living/carbon/brain))
|
||||
var/rendered2 = "<i><span class='game say'>Drone Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(rendered2, 2)
|
||||
|
||||
//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..().
|
||||
/mob/living/silicon/robot/drone/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
add_language("Robot Talk", 1)
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
@@ -174,6 +176,13 @@
|
||||
rbPDA.set_name_and_job(custom_name,braintype)
|
||||
if(hiddenborg)
|
||||
rbPDA.hidden = 1
|
||||
|
||||
/mob/living/silicon/robot/binarycheck()
|
||||
if(is_component_functioning("comms"))
|
||||
var/datum/robot_component/RC = get_component("comms")
|
||||
use_power(RC.energy_consumption)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
|
||||
//Improved /N
|
||||
@@ -197,7 +206,6 @@
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
designation = modtype
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
var/channels = list()
|
||||
|
||||
if(module)
|
||||
return
|
||||
@@ -205,14 +213,14 @@
|
||||
switch(modtype)
|
||||
if("Standard")
|
||||
module = new /obj/item/weapon/robot_module/standard(src)
|
||||
channels = list("Service" = 1)
|
||||
module.channels = list("Service" = 1)
|
||||
module_sprites["Basic"] = "robot_old"
|
||||
module_sprites["Android"] = "droid"
|
||||
module_sprites["Default"] = "robot"
|
||||
|
||||
if("Service")
|
||||
module = new /obj/item/weapon/robot_module/butler(src)
|
||||
channels = list("Service" = 1)
|
||||
module.channels = list("Service" = 1)
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
@@ -221,7 +229,7 @@
|
||||
/*
|
||||
if("Clerical")
|
||||
module = new /obj/item/weapon/robot_module/clerical(src)
|
||||
channels = list("Service" = 1)
|
||||
module.channels = list("Service" = 1)
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
@@ -230,7 +238,7 @@
|
||||
*/
|
||||
if("Miner")
|
||||
module = new /obj/item/weapon/robot_module/miner(src)
|
||||
channels = list("Supply" = 1)
|
||||
module.channels = list("Supply" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("MINE")
|
||||
module_sprites["Basic"] = "Miner_old"
|
||||
@@ -239,7 +247,7 @@
|
||||
|
||||
if("Medical")
|
||||
module = new /obj/item/weapon/robot_module/medical(src)
|
||||
channels = list("Medical" = 1)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
@@ -249,7 +257,7 @@
|
||||
|
||||
if("Security")
|
||||
module = new /obj/item/weapon/robot_module/security(src)
|
||||
channels = list("Security" = 1)
|
||||
module.channels = list("Security" = 1)
|
||||
module_sprites["Basic"] = "secborg"
|
||||
module_sprites["Red Knight"] = "Security"
|
||||
module_sprites["Black Knight"] = "securityrobot"
|
||||
@@ -257,7 +265,7 @@
|
||||
|
||||
if("Engineering")
|
||||
module = new /obj/item/weapon/robot_module/engineering(src)
|
||||
channels = list("Engineering" = 1)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
@@ -266,14 +274,15 @@
|
||||
|
||||
if("Janitor")
|
||||
module = new /obj/item/weapon/robot_module/janitor(src)
|
||||
module.channels = list("Service" = 1)
|
||||
module_sprites["Basic"] = "JanBot2"
|
||||
module_sprites["Mopbot"] = "janitorrobot"
|
||||
module_sprites["Mop Gear Rex"] = "mopgearrex"
|
||||
|
||||
if("Combat")
|
||||
module = new /obj/item/weapon/robot_module/combat(src)
|
||||
module.channels = list("Security" = 1)
|
||||
module_sprites["Combat Android"] = "droidcombat"
|
||||
channels = list("Security" = 1)
|
||||
|
||||
if("Hunter")
|
||||
updatename(module)
|
||||
@@ -283,7 +292,9 @@
|
||||
icon_state = "xenoborg-state-a"
|
||||
modtype = "Xeno-Hu"
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
|
||||
|
||||
//languages
|
||||
module.add_languages(src)
|
||||
|
||||
//Custom_sprite check and entry
|
||||
if (custom_sprite == 1)
|
||||
@@ -297,7 +308,7 @@
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
choose_icon(6,module_sprites)
|
||||
radio.config(channels)
|
||||
radio.config(module.channels)
|
||||
notify_ai(2)
|
||||
|
||||
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
|
||||
@@ -1467,6 +1478,16 @@
|
||||
laws = new /datum/ai_laws/syndicate_override()
|
||||
|
||||
Namepick()
|
||||
|
||||
/mob/living/silicon/robot/syndicate/canUseTopic(atom/movable/M)
|
||||
if(stat || lockcharge || stunned || weakened)
|
||||
return
|
||||
if(z in config.admin_levels)
|
||||
return 1
|
||||
/*if(istype(M, /obj/machinery))
|
||||
var/obj/machinery/Machine = M
|
||||
return Machine.emagged*/
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
|
||||
if(!connected_ai)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/obj/item/emag = null
|
||||
var/obj/item/borg/upgrade/jetpack = null
|
||||
var/list/stacktypes
|
||||
var/channels = list()
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
@@ -55,6 +56,20 @@
|
||||
for(var/obj/O in temp_list)
|
||||
if(O)
|
||||
modules += O
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_languages(var/mob/living/silicon/robot/R)
|
||||
//full set of languages
|
||||
R.add_language("Sol Common", 1)
|
||||
R.add_language("Tradeband", 1)
|
||||
R.add_language("Sinta'unathi", 0)
|
||||
R.add_language("Siik'tajr", 0)
|
||||
R.add_language("Skrellian", 0)
|
||||
R.add_language("Vox-pidgin", 0)
|
||||
R.add_language("Rootspeak", 0)
|
||||
R.add_language("Trinary", 1)
|
||||
R.add_language("Chittin", 0)
|
||||
R.add_language("Bubblish", 0)
|
||||
R.add_language("Gutter", 0)
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
@@ -248,6 +263,20 @@
|
||||
if(src.emag)
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = src.emag
|
||||
B.reagents.add_reagent("beer2", 2)
|
||||
|
||||
/obj/item/weapon/robot_module/butler/add_languages(var/mob/living/silicon/robot/R)
|
||||
//full set of languages
|
||||
R.add_language("Sol Common", 1)
|
||||
R.add_language("Tradeband", 1)
|
||||
R.add_language("Sinta'unathi", 1)
|
||||
R.add_language("Siik'tajr", 1)
|
||||
R.add_language("Skrellian", 1)
|
||||
R.add_language("Vox-pidgin", 1)
|
||||
R.add_language("Rootspeak", 1)
|
||||
R.add_language("Trinary", 1)
|
||||
R.add_language("Chittin", 1)
|
||||
R.add_language("Bubblish", 1)
|
||||
R.add_language("Gutter", 1)
|
||||
|
||||
/*
|
||||
/obj/item/weapon/robot_module/clerical //Whyyyyy?
|
||||
@@ -341,6 +370,10 @@
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray/alien/acid(src)
|
||||
src.emag.reagents.add_reagent("pacid", 125)
|
||||
src.emag.reagents.add_reagent("sacid", 125)
|
||||
|
||||
/obj/item/weapon/robot_module/butler/add_languages(var/mob/living/silicon/robot/R)
|
||||
..()
|
||||
R.add_language("xenocommon", 1)
|
||||
|
||||
/obj/item/weapon/robot_module/drone
|
||||
name = "drone module"
|
||||
|
||||
@@ -2,79 +2,154 @@
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
if (ending == "?")
|
||||
return "[speak_query], \"[text]\"";
|
||||
return speak_query
|
||||
else if (ending == "!")
|
||||
return "[speak_exclamation], \"[text]\"";
|
||||
return speak_exclamation
|
||||
|
||||
return "[speak_statement], \"[text]\"";
|
||||
return speak_statement
|
||||
|
||||
#define IS_AI 1
|
||||
#define IS_ROBOT 2
|
||||
#define IS_PAI 3
|
||||
|
||||
/mob/living/silicon/say_understands(var/other,var/datum/language/speaking = null)
|
||||
//These only pertain to common. Languages are handled by mob/say_understands()
|
||||
if (!speaking)
|
||||
if (istype(other, /mob/living/carbon))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/say(var/message)
|
||||
if (!message)
|
||||
return
|
||||
return 0
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return
|
||||
return 0
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
return 0
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if (stat == 2)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
return say_dead(message)
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
var/bot_type = 0 //Let's not do a fuck ton of type checks, thanks.
|
||||
if(istype(src, /mob/living/silicon/ai))
|
||||
bot_type = IS_AI
|
||||
else if(istype(src, /mob/living/silicon/robot))
|
||||
bot_type = IS_ROBOT
|
||||
else if(istype(src, /mob/living/silicon/pai))
|
||||
bot_type = IS_PAI
|
||||
|
||||
var/mob/living/silicon/ai/AI = src //and let's not declare vars over and over and over for these guys.
|
||||
var/mob/living/silicon/robot/R = src
|
||||
var/mob/living/silicon/pai/P = src
|
||||
|
||||
//Must be concious to speak
|
||||
if (stat)
|
||||
return
|
||||
return 0
|
||||
|
||||
if (length(message) >= 2)
|
||||
var/prefix = copytext(message, 1, 3)
|
||||
if (department_radio_keys[prefix] == "binary")
|
||||
if(istype(src, /mob/living/silicon/pai))
|
||||
return ..(message)
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
var/verb = say_quote(message)
|
||||
|
||||
// TODO: move the component system up to silicon so we don't have to use this ugly hack..
|
||||
if(istype(src, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = src
|
||||
if(!R.is_component_functioning("comms"))
|
||||
src << "\red Your binary communications component isn't functional."
|
||||
return
|
||||
robot_talk(message)
|
||||
|
||||
else if (department_radio_keys[prefix] == "alientalk")
|
||||
if(!alien_talk_understand) return
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
alien_talk(message)
|
||||
else if (department_radio_keys[prefix] == "department")
|
||||
if(isAI(src)&&client) //For patching directly into AI holopads.
|
||||
var/mob/living/silicon/ai/U = src
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
U.holopad_talk(message)
|
||||
else //Will not allow anyone by an active AI to use this function.
|
||||
src << "This function is not available to you."
|
||||
return
|
||||
//parse radio key and consume it
|
||||
var/message_mode = parse_message_mode(message, "general")
|
||||
if (message_mode)
|
||||
if (message_mode == "general")
|
||||
message = trim(copytext(message,2))
|
||||
else
|
||||
var/mob/living/silicon/ai/AI = src
|
||||
if (isAI(src) && AI.aiRadio.disabledAi)
|
||||
src << "\red System Error - Transceiver Disabled"
|
||||
return
|
||||
else
|
||||
return ..(message)
|
||||
else
|
||||
var/mob/living/silicon/ai/AI = src
|
||||
if (isAI(src) && AI.aiRadio.disabledAi)
|
||||
src << "\red System Error - Transceiver Disabled"
|
||||
return
|
||||
message = trim(copytext(message,3))
|
||||
|
||||
//parse language key and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if (speaking)
|
||||
verb = speaking.speech_verb
|
||||
message = trim(copytext(message,2+length(speaking.key)))
|
||||
|
||||
if(speaking.flags & HIVEMIND)
|
||||
speaking.broadcast(src,trim(message))
|
||||
return 1
|
||||
|
||||
// Currently used by drones.
|
||||
if(local_transmit)
|
||||
var/list/listeners = hearers(5,src)
|
||||
listeners |= src
|
||||
|
||||
for(var/mob/living/silicon/D in listeners)
|
||||
if(D.client && istype(D,src.type))
|
||||
D << "<b>[src]</b> transmits, \"[message]\""
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
|
||||
return 1
|
||||
|
||||
if(message_mode && bot_type == IS_ROBOT && !R.is_component_functioning("radio"))
|
||||
src << "\red Your radio isn't functional at this time."
|
||||
return 0
|
||||
|
||||
switch(message_mode)
|
||||
if("department")
|
||||
switch(bot_type)
|
||||
if(IS_AI)
|
||||
return AI.holopad_talk(message, verb, speaking)
|
||||
if(IS_ROBOT)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return R.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
if(IS_PAI)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return P.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
return 0
|
||||
|
||||
if("general")
|
||||
switch(bot_type)
|
||||
if(IS_AI)
|
||||
if (AI.aiRadio.disabledAi || AI.aiRestorePowerRoutine || AI.stat)
|
||||
src << "\red System Error - Transceiver Disabled"
|
||||
return 0
|
||||
else
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return AI.aiRadio.talk_into(src,message,null,verb,speaking)
|
||||
if(IS_ROBOT)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return R.radio.talk_into(src,message,null,verb,speaking)
|
||||
if(IS_PAI)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return P.radio.talk_into(src,message,null,verb,speaking)
|
||||
return 0
|
||||
|
||||
else
|
||||
return ..(message)
|
||||
if(message_mode)
|
||||
switch(bot_type)
|
||||
if(IS_AI)
|
||||
if (AI.aiRadio.disabledAi || AI.aiRestorePowerRoutine || AI.stat)
|
||||
src << "\red System Error - Transceiver Disabled"
|
||||
return 0
|
||||
else
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return AI.aiRadio.talk_into(src,message,message_mode,verb,speaking)
|
||||
if(IS_ROBOT)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return R.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
if(IS_PAI)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
return P.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
return 0
|
||||
|
||||
return ..(message,speaking,verb)
|
||||
|
||||
//For holopads only. Usable by AI.
|
||||
/mob/living/silicon/ai/proc/holopad_talk(var/message)
|
||||
/mob/living/silicon/ai/proc/holopad_talk(var/message, verb, datum/language/speaking)
|
||||
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
@@ -84,18 +159,23 @@
|
||||
return
|
||||
|
||||
var/obj/machinery/hologram/holopad/T = src.holo
|
||||
if(istype(T) && T.hologram && T.master == src)//If there is a hologram and its master is the user.
|
||||
var/message_a = say_quote(message)
|
||||
if(T && T.hologram && T.master == src)//If there is a hologram and its master is the user.
|
||||
|
||||
//Human-like, sorta, heard by those who understand humans.
|
||||
var/rendered_a = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
|
||||
var/rendered_a
|
||||
//Speach distorted, heard by those who do not understand AIs.
|
||||
message = stars(message)
|
||||
var/message_b = say_quote(message)
|
||||
var/rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
|
||||
var/message_stars = stars(message)
|
||||
var/rendered_b
|
||||
|
||||
if(speaking)
|
||||
rendered_a = "<span class='game say'><span class='name'>[name]</span> [speaking.format_message(message, verb)]</span>"
|
||||
rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> [speaking.format_message(message_stars, verb)]</span>"
|
||||
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> [speaking.format_message(message, verb)]</span></i>"//The AI can "hear" its own message.
|
||||
else
|
||||
rendered_a = "<span class='game say'><span class='name'>[name]</span> [verb], <span class='message'>\"[message]\"</span></span>"
|
||||
rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> [verb], <span class='message'>\"[message_stars]\"</span></span>"
|
||||
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> [verb], <span class='message'><span class='body'>\"[message]\"</span></span></span></i>"//The AI can "hear" its own message.
|
||||
|
||||
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message'>[message_a]</span></span></i>"//The AI can "hear" its own message.
|
||||
for(var/mob/M in hearers(T.loc))//The location is the object, default distance.
|
||||
if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to.
|
||||
M.show_message(rendered_a, 2)
|
||||
@@ -105,79 +185,37 @@
|
||||
This is another way of saying that we won't bother dealing with them.*/
|
||||
else
|
||||
src << "No holopad connected."
|
||||
return
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/proc/robot_talk(var/message)
|
||||
/mob/living/silicon/ai/proc/holopad_emote(var/message) //This is called when the AI uses the 'me' verb while using a holopad.
|
||||
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
var/desig = "Unknown" //ezmode for taters
|
||||
if(isrobot(src))
|
||||
var/mob/living/silicon/S = src
|
||||
if(S.designation)
|
||||
desig = trim_left(S.designation)
|
||||
else
|
||||
desig = "Default"
|
||||
else if(isAI(src))
|
||||
desig = "AI"
|
||||
log_emote("[key_name(src)] : [message]")
|
||||
|
||||
message = trim(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name] ([desig])</span> <span class='message'>[message_a]</span></span></i>"
|
||||
var/obj/machinery/hologram/holopad/T = src.holo
|
||||
if(T && T.hologram && T.master == src)
|
||||
var/rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message]</span></span>"
|
||||
src << "<i><span class='game say'>Holopad action relayed, <span class='name'>[real_name]</span> <span class='message'>[message]</span></span></i>"
|
||||
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
if(S.robot_talk_understand && (S.robot_talk_understand == robot_talk_understand)) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name] ([desig])</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else if(istype(S , /mob/dead/observer) && S.stat == DEAD)
|
||||
var/rendered2 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name] ([desig])</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(rendered2, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
|
||||
else if (S.binarycheck())
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else if(istype(S , /mob/dead/observer) && S.stat == DEAD)
|
||||
var/rendered2 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(rendered2, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
var/list/listening = hearers(1, src)
|
||||
listening -= src
|
||||
listening += src
|
||||
|
||||
var/list/heard = list()
|
||||
for (var/mob/M in listening)
|
||||
if(!istype(M, /mob/living/silicon) && !M.robot_talk_understand)
|
||||
heard += M
|
||||
|
||||
if (length(heard))
|
||||
var/message_b
|
||||
|
||||
message_b = "beep beep beep"
|
||||
message_b = say_quote(message_b)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<i><span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span></i>"
|
||||
|
||||
for (var/mob/M in heard)
|
||||
for(var/mob/M in viewers(T.loc))
|
||||
M.show_message(rendered, 2)
|
||||
else //This shouldn't occur, but better safe then sorry.
|
||||
src << "No holopad connected."
|
||||
return
|
||||
return 1
|
||||
|
||||
message = say_quote(message)
|
||||
/mob/living/silicon/ai/emote(var/act, var/type, var/message)
|
||||
var/obj/machinery/hologram/holopad/T = src.holo
|
||||
if(T && T.hologram && T.master == src) //Is the AI using a holopad?
|
||||
src.holopad_emote(message)
|
||||
else //Emote normally, then.
|
||||
..()
|
||||
|
||||
// rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
rendered = null
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
||||
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
M.show_message(rendered, 2)
|
||||
#undef IS_AI
|
||||
#undef IS_ROBOT
|
||||
#undef IS_PAI
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/list/alarms_to_clear = list()
|
||||
immune_to_ssd = 1
|
||||
var/list/hud_list[10]
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/designation = ""
|
||||
@@ -20,6 +21,7 @@
|
||||
var/sensor_mode = 0 //Determines the current HUD.
|
||||
#define SEC_HUD 1 //Security HUD mode
|
||||
#define MED_HUD 2 //Medical HUD mode
|
||||
var/local_transmit //If set, can only speak to others of the same type within a short range.
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
@@ -205,6 +207,37 @@
|
||||
show_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
show_malf_ai()
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
/mob/living/silicon/can_speak(datum/language/speaking)
|
||||
return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
if (..(language) && can_speak)
|
||||
speech_synthesizer_langs.Add(all_languages[language])
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/remove_language(var/rem_language)
|
||||
..(rem_language)
|
||||
|
||||
for (var/datum/language/L in speech_synthesizer_langs)
|
||||
if (L.name == rem_language)
|
||||
speech_synthesizer_langs -= L
|
||||
|
||||
/mob/living/silicon/check_languages()
|
||||
set name = "Check Known Languages"
|
||||
set category = "IC"
|
||||
set src = usr
|
||||
|
||||
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(!(L.flags & NONGLOBAL))
|
||||
dat += "<b>[L.name] (:[L.key])</b><br/>Speech Synthesizer: <i>[(L in speech_synthesizer_langs)? "YES":"NOT SUPPORTED"]</i><br/>[L.desc]<br/><br/>"
|
||||
|
||||
src << browse(dat, "window=checklanguage")
|
||||
return
|
||||
|
||||
// this function displays the stations manifest in a separate window
|
||||
/mob/living/silicon/proc/show_station_manifest()
|
||||
@@ -257,6 +290,9 @@
|
||||
set category = "IC"
|
||||
|
||||
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
|
||||
|
||||
@@ -100,51 +100,12 @@
|
||||
|
||||
/mob/living/simple_animal/borer/New(var/by_gamemode=0)
|
||||
..()
|
||||
add_language("Cortical Link")
|
||||
truename = "[pick("Primary","Secondary","Tertiary","Quaternary")] [rand(1000,9999)]"
|
||||
|
||||
if(!by_gamemode)
|
||||
request_player()
|
||||
|
||||
|
||||
/mob/living/simple_animal/borer/say(var/message)
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = capitalize(message)
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (stat)
|
||||
return
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (muted)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
if (copytext(message, 1, 2) == "*")
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
if (copytext(message, 1, 2) == ";") //Brain borer hivemind.
|
||||
return borer_speak(message)
|
||||
|
||||
if(!host)
|
||||
src << "You have no host to speak to."
|
||||
return //No host, no audible speech.
|
||||
|
||||
src << "You drop words into [host]'s mind: \"[message]\""
|
||||
host << "Your own thoughts speak: \"[message]\""
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.mind && (istype(M, /mob/dead/observer)))
|
||||
M << "<i>Thought-speech, <b>[truename]</b> -> <b>[host]:</b> [copytext(message, 2)]</i>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/borer/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
response_disarm = "gently moves aside the"
|
||||
response_harm = "swats the"
|
||||
stop_automated_movement = 1
|
||||
universal_speak = 1
|
||||
|
||||
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
|
||||
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in life() being run every single tick.
|
||||
@@ -61,7 +62,7 @@
|
||||
var/list/available_channels = list()
|
||||
|
||||
//Headset for Poly to yell at engineers :)
|
||||
var/obj/item/device/radio/headset/l_ear = null
|
||||
var/obj/item/device/radio/headset/ears = null
|
||||
|
||||
//The thing the parrot is currently interested in. This gets used for items the parrot wants to pick up, mobs it wants to steal from,
|
||||
//mobs it wants to attack or mobs that have attacked it
|
||||
@@ -84,13 +85,13 @@
|
||||
|
||||
/mob/living/simple_animal/parrot/New()
|
||||
..()
|
||||
if(!l_ear)
|
||||
if(!ears)
|
||||
var/headset = pick(/obj/item/device/radio/headset/headset_sec, \
|
||||
/obj/item/device/radio/headset/headset_eng, \
|
||||
/obj/item/device/radio/headset/headset_med, \
|
||||
/obj/item/device/radio/headset/headset_sci, \
|
||||
/obj/item/device/radio/headset/headset_cargo)
|
||||
l_ear = new headset(src)
|
||||
ears = new headset(src)
|
||||
|
||||
parrot_sleep_dur = parrot_sleep_max //In case someone decides to change the max without changing the duration var
|
||||
|
||||
@@ -100,7 +101,7 @@
|
||||
/mob/living/simple_animal/parrot/proc/perch_player)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Die()
|
||||
/mob/living/simple_animal/parrot/death()
|
||||
if(held_item)
|
||||
held_item.loc = src.loc
|
||||
held_item = null
|
||||
@@ -119,10 +120,10 @@
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
if(l_ear)
|
||||
dat += "<br><b>Headset:</b> [l_ear] (<a href='?src=\ref[src];remove_inv=l_ear'>Remove</a>)"
|
||||
if(ears)
|
||||
dat += "<br><b>Headset:</b> [ears] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
|
||||
else
|
||||
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=l_ear'>Nothing</a>"
|
||||
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
|
||||
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[real_name]")
|
||||
@@ -134,21 +135,21 @@
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
return
|
||||
|
||||
//Is the usr's mob type able to do this? (lolaliens)
|
||||
if(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))
|
||||
//Is the usr's mob type able to do this?
|
||||
if(ishuman(usr) || ismonkey(usr) || isrobot(usr))
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("l_ear")
|
||||
if(l_ear)
|
||||
if("ears")
|
||||
if(ears)
|
||||
if(available_channels.len)
|
||||
src.say("[pick(available_channels)] BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
|
||||
else
|
||||
src.say("BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
|
||||
l_ear.loc = src.loc
|
||||
l_ear = null
|
||||
ears.loc = src.loc
|
||||
ears = null
|
||||
for(var/possible_phrase in speak)
|
||||
if(copytext(possible_phrase,1,3) in department_radio_keys)
|
||||
possible_phrase = copytext(possible_phrase,3,length(possible_phrase))
|
||||
@@ -163,8 +164,8 @@
|
||||
usr << "\red You have nothing in your hand to put on its [add_to]."
|
||||
return
|
||||
switch(add_to)
|
||||
if("l_ear")
|
||||
if(l_ear)
|
||||
if("ears")
|
||||
if(ears)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
@@ -180,7 +181,7 @@
|
||||
|
||||
usr.drop_item()
|
||||
headset_to_add.loc = src
|
||||
src.l_ear = headset_to_add
|
||||
src.ears = headset_to_add
|
||||
usr << "You fit the headset onto [src]."
|
||||
|
||||
clearlist(available_channels)
|
||||
@@ -214,7 +215,7 @@
|
||||
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M as mob)
|
||||
..()
|
||||
if(client) return
|
||||
if(!stat && M.a_intent == "harm")
|
||||
if(!stat && M.a_intent == "hurt")
|
||||
|
||||
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks
|
||||
|
||||
@@ -231,25 +232,6 @@
|
||||
drop_held_item(0)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
attack_hand(M)
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_alien(mob/living/carbon/monkey/M as mob)
|
||||
attack_hand(M)
|
||||
|
||||
//Simple animals
|
||||
/mob/living/simple_animal/parrot/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(client) return
|
||||
|
||||
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
if(M.melee_damage_upper > 0)
|
||||
parrot_interest = M
|
||||
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
|
||||
icon_state = "parrot_fly"
|
||||
|
||||
//Mobs with objects
|
||||
/mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
@@ -335,7 +317,7 @@
|
||||
if(speak.len)
|
||||
var/list/newspeak = list()
|
||||
|
||||
if(available_channels.len && src.l_ear)
|
||||
if(available_channels.len && src.ears)
|
||||
for(var/possible_phrase in speak)
|
||||
|
||||
//50/50 chance to not use the radio at all
|
||||
@@ -496,11 +478,11 @@
|
||||
var/datum/organ/external/affecting = H.get_organ(ran_zone(pick(parrot_dam_zone)))
|
||||
|
||||
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"), sharp=1)
|
||||
emote(pick("pecks [H]'s [affecting]", "cuts [H]'s [affecting] with its talons"))
|
||||
emote(pick("pecks [H]'s [affecting].", "cuts [H]'s [affecting] with its talons."))
|
||||
|
||||
else
|
||||
L.adjustBruteLoss(damage)
|
||||
emote(pick("pecks at [L]", "claws [L]"))
|
||||
emote(pick("pecks at [L].", "claws [L]."))
|
||||
return
|
||||
|
||||
//Otherwise, fly towards the mob!
|
||||
@@ -700,6 +682,71 @@
|
||||
speak = list("Poly wanna cracker!", ":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS FREE CALL THE SHUTTLE")
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/New()
|
||||
l_ear = new /obj/item/device/radio/headset/headset_eng(src)
|
||||
ears = new /obj/item/device/radio/headset/headset_eng(src)
|
||||
available_channels = list(":e")
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/say(var/message)
|
||||
|
||||
if(stat)
|
||||
return
|
||||
|
||||
var/verb = "says"
|
||||
if(speak_emote.len)
|
||||
verb = pick(speak_emote)
|
||||
|
||||
var/message_mode = null
|
||||
if(copytext(message,1,2) == ";")
|
||||
message_mode = "headset"
|
||||
message = copytext(message,2)
|
||||
|
||||
if(copytext(message,1,2) == ":")
|
||||
var/channel_prefix = copytext(message, 1 ,3)
|
||||
message_mode = department_radio_keys[channel_prefix]
|
||||
var/positioncut = 3
|
||||
message = trim(copytext(message,positioncut))
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
if(message_mode)
|
||||
if(message_mode in radiochannels)
|
||||
if(ears && istype(ears,/obj/item/device/radio))
|
||||
ears.talk_into(src, message, message_mode, verb, null)
|
||||
|
||||
..(message)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "",var/italics = 0, var/mob/speaker = null)
|
||||
if(prob(50))
|
||||
parrot_hear(message)
|
||||
..(message,verb,language,alt_name,italics,speaker)
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0)
|
||||
if(prob(50))
|
||||
parrot_hear("[pick(available_channels)] [message]")
|
||||
..(message,verb,language,part_a,part_b,speaker,hard_to_hear)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/parrot_hear(var/message="")
|
||||
if(!message || stat)
|
||||
return
|
||||
speech_buffer.Add(message)
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_paw(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
var/success = ..()
|
||||
|
||||
if(client)
|
||||
return success
|
||||
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
if(!success)
|
||||
return 0
|
||||
|
||||
parrot_interest = user
|
||||
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
|
||||
icon_state = "parrot_fly"
|
||||
return success
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\blue [M] [response_help] [src].")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if("grab")
|
||||
if (M == src || anchored)
|
||||
@@ -288,12 +289,14 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if("harm", "disarm")
|
||||
adjustBruteLoss(harm_intent_damage)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] [response_harm] [src]!")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
return
|
||||
|
||||
@@ -537,3 +540,22 @@
|
||||
if (S.occupant || S.occupant2)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/say(var/message)
|
||||
if(stat)
|
||||
return
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
if(stat)
|
||||
return
|
||||
|
||||
var/verb = "says"
|
||||
|
||||
if(speak_emote.len)
|
||||
verb = pick(speak_emote)
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, null, verb)
|
||||
|
||||
Reference in New Issue
Block a user