mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 03:21:30 +00:00
First pass on major conversion of xenomorphs to a human subspecies. Additional condensing of various redundant mob verbs. Converted larva and diona to their own class, collapsed the rest of xenomorphs into a human species, other stuff. Completely removed attack_alien(). Still have to reimplement some of the lost behavior for human/alien. Reapplies lost attack_alien() functionality other than tackling/caressing. Further alien/humanoid cleanup and xenospawn fix-ups. Also uncommented caste verbs. Removed half-finished abilities system since species.dm handles it. All xenomorphs functionality should be working now, other than the HUD, tackling and the xenomorph balance issues. Added icons for xenomorph castes, moved broadcast languages into datums, removed alien_talk and robot_talk vars. Merged with organ removal code. Reapplied verbs to simple_animals/slimes. Updated species definitions to have appropriate organs. Readded tackle as a human verb. Borer changes regarding brain removal. Working on moving the human HUD to the species datum a bit. Mixed results. Moved Cortical Link to a language, added borer husks. Tidied up the HUD stuff. Still need to make it rebuild properly when species is changed, but this will do for no Compile fix, forgot the DME. Fixed up ventcrawl, added new organ mechanics for dionaea. Fixed up some overlooked sections causing mobs without brains to die immediately. Fixed up plasma generation for queens, bugs with organs, force_organ issues with set_species().
165 lines
4.7 KiB
Plaintext
165 lines
4.7 KiB
Plaintext
/mob/proc/say()
|
|
return
|
|
|
|
/mob/verb/whisper()
|
|
set name = "Whisper"
|
|
set category = "IC"
|
|
return
|
|
|
|
/mob/verb/say_verb(message as text)
|
|
set name = "Say"
|
|
set category = "IC"
|
|
if(say_disabled) //This is here to try to identify lag problems
|
|
usr << "\red Speech is currently admin-disabled."
|
|
return
|
|
|
|
set_typing_indicator(0)
|
|
usr.say(message)
|
|
|
|
/mob/verb/me_verb(message as text)
|
|
set name = "Me"
|
|
set category = "IC"
|
|
|
|
if(say_disabled) //This is here to try to identify lag problems
|
|
usr << "\red Speech is currently admin-disabled."
|
|
return
|
|
|
|
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
|
|
|
set_typing_indicator(0)
|
|
if(use_me)
|
|
usr.emote("me",usr.emote_type,message)
|
|
else
|
|
usr.emote(message)
|
|
|
|
/mob/proc/say_dead(var/message)
|
|
var/name = src.real_name
|
|
var/alt_name = ""
|
|
|
|
if(say_disabled) //This is here to try to identify lag problems
|
|
usr << "\red Speech is currently admin-disabled."
|
|
return
|
|
|
|
if(!src.client.holder)
|
|
if(!dsay_allowed)
|
|
src << "\red Deadchat is globally muted"
|
|
return
|
|
|
|
if(client && !(client.prefs.toggles & CHAT_DEAD))
|
|
usr << "\red You have deadchat muted."
|
|
return
|
|
|
|
if(mind && mind.name)
|
|
name = "[mind.name]"
|
|
else
|
|
name = real_name
|
|
if(name != real_name)
|
|
alt_name = " (died as [real_name])"
|
|
|
|
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] [pick("complains","moans","whines","laments","blubbers")], <span class='message'>\"[message]\"</span></span>"
|
|
|
|
for(var/mob/M in player_list)
|
|
if(istype(M, /mob/new_player))
|
|
continue
|
|
if(M.client && M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD))
|
|
M << rendered
|
|
continue
|
|
|
|
if(M.client && M.client.holder && !is_mentor(M.client) && (M.client.prefs.toggles & CHAT_DEAD) ) // Show the message to admins/mods with deadchat toggled on
|
|
M << rendered //Admins can hear deadchat, if they choose to, no matter if they're blind/deaf or not.
|
|
|
|
|
|
return
|
|
|
|
/mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null)
|
|
|
|
if (src.stat == 2) //Dead
|
|
return 1
|
|
|
|
//Universal speak makes everything understandable, for obvious reasons.
|
|
else if(src.universal_speak || src.universal_understand)
|
|
return 1
|
|
|
|
//Languages are handled after.
|
|
if (!speaking)
|
|
if(!other)
|
|
return 1
|
|
if(other.universal_speak)
|
|
return 1
|
|
if(isAI(src) && ispAI(other))
|
|
return 1
|
|
if (istype(other, src.type) || istype(src, other.type))
|
|
return 1
|
|
return 0
|
|
|
|
//Language check.
|
|
for(var/datum/language/L in src.languages)
|
|
if(speaking.name == L.name)
|
|
return 1
|
|
|
|
return 0
|
|
|
|
/*
|
|
***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/proc/say_quote(var/message, var/datum/language/speaking = null)
|
|
var/verb = "says"
|
|
var/ending = copytext(message, length(message))
|
|
if(ending=="!")
|
|
verb=pick("exclaims","shouts","yells")
|
|
else if(ending=="?")
|
|
verb="asks"
|
|
|
|
return verb
|
|
|
|
|
|
/mob/proc/emote(var/act, var/type, var/message)
|
|
if(act == "me")
|
|
return custom_emote(type, message)
|
|
|
|
/mob/proc/get_ear()
|
|
// returns an atom representing a location on the map from which this
|
|
// mob can hear things
|
|
|
|
// should be overloaded for all mobs whose "ear" is separate from their "mob"
|
|
|
|
return get_turf(src)
|
|
|
|
/mob/proc/say_test(var/text)
|
|
var/ending = copytext(text, length(text))
|
|
if (ending == "?")
|
|
return "1"
|
|
else if (ending == "!")
|
|
return "2"
|
|
return "0"
|
|
|
|
//parses the message mode code (e.g. :h, :w) from text, such as that supplied to say.
|
|
//returns the message mode string or null for no message mode.
|
|
//standard mode is the mode returned for the special ';' radio code.
|
|
/mob/proc/parse_message_mode(var/message, var/standard_mode="headset")
|
|
if(length(message) >= 1 && copytext(message,1,2) == ";")
|
|
return standard_mode
|
|
|
|
if(length(message) >= 2)
|
|
var/channel_prefix = copytext(message, 1 ,3)
|
|
return department_radio_keys[channel_prefix]
|
|
|
|
return null
|
|
|
|
//parses the language code (e.g. :j) from text, such as that supplied to say.
|
|
//returns the language object only if the code corresponds to a language that src can speak, otherwise null.
|
|
/mob/proc/parse_language(var/message)
|
|
if(length(message) >= 2)
|
|
var/language_prefix = lowertext(copytext(message, 1 ,3))
|
|
var/datum/language/L = language_keys[language_prefix]
|
|
if (can_speak(L))
|
|
return L
|
|
|
|
return null
|