Merge remote-tracking branch 'upstream/master' into cool-ipcs
This commit is contained in:
@@ -265,10 +265,6 @@
|
||||
var/C = input(owner, "Select Color", "Select color", "#ffffff") as color|null
|
||||
if(!C || QDELETED(src) || QDELETED(user) || QDELETED(owner) || owner != user)
|
||||
return
|
||||
var/list/hsv = ReadHSV(RGBtoHSV(C))
|
||||
if(hsv[2] > 125)
|
||||
to_chat(user, "<span class='warning'>A color that saturated? Surely not!</span>")
|
||||
return
|
||||
var/range = input(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0) as null|num
|
||||
if(!isnum(range))
|
||||
return
|
||||
@@ -276,14 +272,24 @@
|
||||
set_distance(clamp(range, 0, max_light_beam_distance))
|
||||
assume_rgb(C)
|
||||
|
||||
#define MAX_SATURATION 192
|
||||
#define MAX_LIGHTNESS 256
|
||||
|
||||
/obj/item/organ/eyes/robotic/glow/proc/assume_rgb(newcolor)
|
||||
current_color_string = newcolor
|
||||
eye_color = RGB2EYECOLORSTRING(current_color_string)
|
||||
eye_color = RGB2EYECOLORSTRING(newcolor)
|
||||
var/list/hsv = ReadHSV(RGBtoHSV(newcolor))
|
||||
hsv[2] = clamp(hsv[2], 0, MAX_SATURATION)
|
||||
hsv[3] = clamp(hsv[3], 0, MAX_LIGHTNESS)
|
||||
var/new_hsv = hsv(hsv[1], hsv[2], hsv[3])
|
||||
current_color_string = HSVtoRGB(new_hsv)
|
||||
sync_light_effects()
|
||||
cycle_mob_overlay()
|
||||
if(!QDELETED(owner) && ishuman(owner)) //Other carbon mobs don't have eye color.
|
||||
owner.dna.species.handle_body(owner)
|
||||
|
||||
#undef MAX_SATURATION
|
||||
#undef MAX_LIGHTNESS
|
||||
|
||||
/obj/item/organ/eyes/robotic/glow/proc/cycle_mob_overlay()
|
||||
remove_mob_overlay()
|
||||
mob_overlay.color = current_color_string
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
var/say_mod = null
|
||||
var/taste_sensitivity = 15 // lower is more sensitive.
|
||||
maxHealth = TONGUE_MAX_HEALTH
|
||||
var/modifies_speech = FALSE
|
||||
var/list/initial_accents //the ones the tongue starts with, not what it currently has
|
||||
var/list/accents = list() //done in order of priority (please always apply abductor accent and stuttering last)
|
||||
var/static/list/languages_possible_base = typecacheof(list(
|
||||
/datum/language/common,
|
||||
/datum/language/draconic,
|
||||
@@ -30,6 +31,8 @@
|
||||
|
||||
/obj/item/organ/tongue/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/accent in initial_accents)
|
||||
accents += new accent
|
||||
low_threshold_passed = "<span class='info'>Your [name] feels a little sore.</span>"
|
||||
low_threshold_cleared = "<span class='info'>Your [name] soreness has subsided.</span>"
|
||||
high_threshold_passed = "<span class='warning'>Your [name] is really starting to hurt.</span>"
|
||||
@@ -38,12 +41,13 @@
|
||||
now_fixed = "<span class='info'>The excruciating pain of your [name] has subsided.</span>"
|
||||
languages_possible = languages_possible_base
|
||||
|
||||
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
|
||||
return
|
||||
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args) //this wont proc unless there's initial_accents on the tongue
|
||||
for(var/datum/accent/speech_modifier in accents)
|
||||
speech_args = speech_modifier.modify_speech(speech_args, source, owner)
|
||||
|
||||
/obj/item/organ/tongue/applyOrganDamage(d, maximum = maxHealth)
|
||||
. = ..()
|
||||
if (damage >= maxHealth)
|
||||
if(damage >= maxHealth)
|
||||
to_chat(owner, "<span class='userdanger'>Your tongue is singed beyond recognition, and disintegrates!</span>")
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Tongues lost to Fermi")
|
||||
qdel(src)
|
||||
@@ -52,7 +56,7 @@
|
||||
..()
|
||||
if(say_mod && M.dna && M.dna.species)
|
||||
M.dna.species.say_mod = say_mod
|
||||
if (modifies_speech)
|
||||
if(length(initial_accents) || length(accents))
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
@@ -74,16 +78,7 @@
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // combined nose + tongue, extra sensitive
|
||||
maxHealth = 40 //extra sensitivity means tongue is more susceptible to damage
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/lizard/handle_speech(datum/source, list/speech_args)
|
||||
var/static/regex/lizard_hiss = new("s+", "g")
|
||||
var/static/regex/lizard_hiSS = new("S+", "g")
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = lizard_hiss.Replace(message, "sss")
|
||||
message = lizard_hiSS.Replace(message, "SSS")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
initial_accents = list(/datum/accent/lizard)
|
||||
|
||||
/obj/item/organ/tongue/fly
|
||||
name = "proboscis"
|
||||
@@ -92,16 +87,7 @@
|
||||
say_mod = "buzzes"
|
||||
taste_sensitivity = 25 // you eat vomit, this is a mercy
|
||||
maxHealth = 80 //years of eatting trash has made your tongue strong
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/fly/handle_speech(datum/source, list/speech_args)
|
||||
var/static/regex/fly_buzz = new("z+", "g")
|
||||
var/static/regex/fly_buZZ = new("Z+", "g")
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = fly_buzz.Replace(message, "zzz")
|
||||
message = fly_buZZ.Replace(message, "ZZZ")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
initial_accents = list(/datum/accent/fly)
|
||||
|
||||
/obj/item/organ/tongue/abductor
|
||||
name = "superlingual matrix"
|
||||
@@ -110,7 +96,7 @@
|
||||
say_mod = "gibbers"
|
||||
taste_sensitivity = 101 // ayys cannot taste anything.
|
||||
maxHealth = 120 //Ayys probe a lot
|
||||
modifies_speech = TRUE
|
||||
initial_accents = list(/datum/accent/abductor)
|
||||
var/mothership
|
||||
|
||||
/obj/item/organ/tongue/abductor/attack_self(mob/living/carbon/human/H)
|
||||
@@ -138,26 +124,6 @@
|
||||
else
|
||||
. += "<span class='notice'>It is attuned to [mothership].</span>"
|
||||
|
||||
/obj/item/organ/tongue/abductor/handle_speech(datum/source, list/speech_args)
|
||||
//Hacks
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/mob/living/carbon/human/user = source
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
user.log_talk(message, LOG_SAY, tag="abductor")
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T || T.type != type)
|
||||
continue
|
||||
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
|
||||
var/datum/antagonist/abductor/A = user.mind.has_antag_datum(/datum/antagonist/abductor)
|
||||
if(!A || !(H.mind in A.team.members))
|
||||
continue
|
||||
to_chat(H, rendered)
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [rendered]")
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/obj/item/organ/tongue/zombie
|
||||
name = "rotting tongue"
|
||||
desc = "Between the decay and the fact that it's just lying there you doubt a tongue has ever seemed less sexy."
|
||||
@@ -165,23 +131,7 @@
|
||||
say_mod = "moans"
|
||||
taste_sensitivity = 32
|
||||
maxHealth = 65 //Stop! It's already dead...!
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/zombie/handle_speech(datum/source, list/speech_args)
|
||||
var/list/message_list = splittext(speech_args[SPEECH_MESSAGE], " ")
|
||||
var/maxchanges = max(round(message_list.len / 1.5), 2)
|
||||
|
||||
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
|
||||
var/insertpos = rand(1, message_list.len - 1)
|
||||
var/inserttext = message_list[insertpos]
|
||||
|
||||
if(!(copytext(inserttext, -3) == "..."))//3 == length("...")
|
||||
message_list[insertpos] = inserttext + "..."
|
||||
|
||||
if(prob(20) && message_list.len > 3)
|
||||
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
|
||||
|
||||
speech_args[SPEECH_MESSAGE] = jointext(message_list, " ")
|
||||
initial_accents = list(/datum/accent/zombie)
|
||||
|
||||
/obj/item/organ/tongue/alien
|
||||
name = "alien tongue"
|
||||
@@ -190,7 +140,7 @@
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED
|
||||
maxHealth = 500 //They've a little mouth for a tongue, so it's pretty rhobust
|
||||
modifies_speech = TRUE // not really, they just hiss
|
||||
initial_accents = list(/datum/accent/alien)
|
||||
var/static/list/languages_possible_alien = typecacheof(list(
|
||||
/datum/language/xenocommon,
|
||||
/datum/language/common,
|
||||
@@ -202,9 +152,6 @@
|
||||
. = ..()
|
||||
languages_possible = languages_possible_alien
|
||||
|
||||
/obj/item/organ/tongue/alien/handle_speech(datum/source, list/speech_args)
|
||||
playsound(owner, "hiss", 25, 1, 1)
|
||||
|
||||
/obj/item/organ/tongue/bone
|
||||
name = "bone \"tongue\""
|
||||
desc = "Apparently skeletons alter the sounds they produce through oscillation of their teeth, hence their characteristic rattling."
|
||||
@@ -214,14 +161,13 @@
|
||||
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
|
||||
taste_sensitivity = 101 // skeletons cannot taste anything
|
||||
maxHealth = 75 //Take brute damage instead
|
||||
modifies_speech = TRUE
|
||||
var/chattering = FALSE
|
||||
var/phomeme_type = "sans"
|
||||
var/list/phomeme_types = list("sans", "papyrus")
|
||||
var/list/phomeme_types = list(/datum/accent/span/sans, /datum/accent/span/papyrus)
|
||||
|
||||
/obj/item/organ/tongue/bone/Initialize()
|
||||
initial_accents += pick(phomeme_types)
|
||||
. = ..()
|
||||
phomeme_type = pick(phomeme_types)
|
||||
|
||||
/obj/item/organ/tongue/bone/applyOrganDamage(var/d, var/maximum = maxHealth)
|
||||
if(d < 0)
|
||||
@@ -234,19 +180,14 @@
|
||||
return
|
||||
|
||||
/obj/item/organ/tongue/bone/handle_speech(datum/source, list/speech_args)
|
||||
if (chattering)
|
||||
if(chattering)
|
||||
chatter(speech_args[SPEECH_MESSAGE], phomeme_type, source)
|
||||
switch(phomeme_type)
|
||||
if("sans")
|
||||
speech_args[SPEECH_SPANS] |= SPAN_SANS
|
||||
if("papyrus")
|
||||
speech_args[SPEECH_SPANS] |= SPAN_PAPYRUS
|
||||
..()
|
||||
|
||||
/obj/item/organ/tongue/bone/plasmaman
|
||||
name = "plasma bone \"tongue\""
|
||||
desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech."
|
||||
icon_state = "tongueplasma"
|
||||
modifies_speech = FALSE
|
||||
|
||||
/obj/item/organ/tongue/robot
|
||||
name = "robotic voicebox"
|
||||
@@ -256,7 +197,7 @@
|
||||
icon_state = "tonguerobot"
|
||||
say_mod = "states"
|
||||
attack_verb = list("beeped", "booped")
|
||||
modifies_speech = TRUE
|
||||
initial_accents = list(/datum/accent/span/robot)
|
||||
taste_sensitivity = 25 // not as good as an organic tongue
|
||||
maxHealth = 100 //RoboTongue!
|
||||
var/electronics_magic = TRUE
|
||||
@@ -264,34 +205,19 @@
|
||||
/obj/item/organ/tongue/robot/could_speak_language(language)
|
||||
return ..() || electronics_magic
|
||||
|
||||
/obj/item/organ/tongue/robot/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
|
||||
|
||||
/obj/item/organ/tongue/fluffy
|
||||
name = "fluffy tongue"
|
||||
desc = "OwO what's this?"
|
||||
icon_state = "tonguefluffy"
|
||||
taste_sensitivity = 10 // extra sensitive and inquisitive uwu
|
||||
maxHealth = 35 //Sensitive tongue!
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/fluffy/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = replacetext(message, "ne", "nye")
|
||||
message = replacetext(message, "nu", "nyu")
|
||||
message = replacetext(message, "na", "nya")
|
||||
message = replacetext(message, "no", "nyo")
|
||||
message = replacetext(message, "ove", "uv")
|
||||
message = replacetext(message, "l", "w")
|
||||
message = replacetext(message, "r", "w")
|
||||
message = lowertext(message)
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
initial_accents = list(/datum/accent/fluffy)
|
||||
|
||||
/obj/item/organ/tongue/cybernetic
|
||||
name = "cybernetic tongue"
|
||||
desc = "A state of the art robotic tongue that can detect the pH of anything drank."
|
||||
icon_state = "tonguecybernetic"
|
||||
initial_accents = list(/datum/accent/span/robot)
|
||||
taste_sensitivity = 10
|
||||
maxHealth = 60 //It's robotic!
|
||||
organ_flags = ORGAN_SYNTHETIC
|
||||
@@ -303,9 +229,6 @@
|
||||
var/errormessage = list("Runtime in tongue.dm, line 39: Undefined operation \"zapzap ow my tongue\"", "afhsjifksahgjkaslfhashfjsak", "-1.#IND", "Graham's number", "inside you all along", "awaiting at least 1 approving review before merging this taste request")
|
||||
owner.say("The pH is appropriately [pick(errormessage)].", forced = "EMPed synthetic tongue")
|
||||
|
||||
/obj/item/organ/tongue/cybernetic/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
|
||||
|
||||
/obj/item/organ/tongue/robot/ipc
|
||||
name = "positronic voicebox"
|
||||
say_mod = "beeps"
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
tool_behaviour = TOOL_RETRACTOR
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/retractor/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/retractor/advanced
|
||||
name = "mechanical pinches"
|
||||
desc = "An agglomerate of rods and gears."
|
||||
@@ -55,6 +61,12 @@
|
||||
tool_behaviour = TOOL_HEMOSTAT
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/hemostat/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/hemostat/augment
|
||||
name = "hemostat"
|
||||
desc = "Tiny servos power a pair of pincers to stop bleeding."
|
||||
@@ -79,6 +91,12 @@
|
||||
tool_behaviour = TOOL_CAUTERY
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/cautery/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/cautery/augment
|
||||
name = "cautery"
|
||||
desc = "A heated element that cauterizes wounds."
|
||||
@@ -107,6 +125,12 @@
|
||||
tool_behaviour = TOOL_DRILL
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/surgicaldrill/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/surgicaldrill/advanced
|
||||
name = "searing tool"
|
||||
desc = "It projects a high power laser used for medical application."
|
||||
@@ -172,6 +196,12 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed, 100, 0)
|
||||
|
||||
/obj/item/scalpel/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/scalpel/advanced
|
||||
name = "laser scalpel"
|
||||
desc = "An advanced scalpel which uses laser technology to cut."
|
||||
@@ -255,6 +285,11 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 40 * toolspeed, 100, 5, 'sound/weapons/circsawhit.ogg') //saws are very accurate and fast at butchering
|
||||
|
||||
/obj/item/circular_saw/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/circular_saw/augment
|
||||
name = "circular saw"
|
||||
@@ -392,3 +427,9 @@
|
||||
attack_verb = list("corrected", "properly set")
|
||||
tool_behaviour = TOOL_BONESET
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/bonesetter/attack(mob/living/L, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
to_chat(user, "<span class='warning'>You refrain from hitting [L] with [src], as you are in help intent.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user