Merge remote-tracking branch 'origin/master' into trait_blacklisting

This commit is contained in:
kevinz000
2019-07-25 15:20:46 -07:00
466 changed files with 4794 additions and 2589 deletions
+4 -2
View File
@@ -32,16 +32,18 @@
//Called when given to a mob
/datum/brain_trauma/proc/on_gain()
to_chat(owner, gain_text)
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
//Called when removed from a mob
/datum/brain_trauma/proc/on_lose(silent)
if(!silent)
to_chat(owner, lose_text)
UnregisterSignal(owner, COMSIG_MOB_SAY)
//Called when hearing a spoken message
/datum/brain_trauma/proc/on_hear(message, speaker, message_language, raw_message, radio_freq)
return message
//Called when speaking
/datum/brain_trauma/proc/on_say(message)
return message
/datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args)
UnregisterSignal(owner, COMSIG_MOB_SAY)
+4 -10
View File
@@ -68,18 +68,12 @@
lose_text = ""
/datum/brain_trauma/mild/speech_impediment/on_gain()
owner.dna.add_mutation(UNINTELLIGIBLE)
..()
//no fiddling with genetics to get out of this one
/datum/brain_trauma/mild/speech_impediment/on_life()
if(!(GLOB.mutations_list[UNINTELLIGIBLE] in owner.dna.mutations))
on_gain()
..()
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
. = ..()
/datum/brain_trauma/mild/speech_impediment/on_lose()
owner.dna.remove_mutation(UNINTELLIGIBLE)
..()
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
. = ..()
/datum/brain_trauma/mild/concussion
name = "Concussion"
+3 -4
View File
@@ -78,14 +78,13 @@
break
return message
/datum/brain_trauma/mild/phobia/on_say(message)
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
for(var/word in trigger_words)
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
if(findtext(message, reg))
if(findtext(speech_args[SPEECH_MESSAGE], reg))
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
return ""
return message
speech_args[SPEECH_MESSAGE] = ""
/datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word)
next_scare = world.time + 120
@@ -199,10 +199,9 @@
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
return message
/datum/brain_trauma/severe/split_personality/brainwashing/on_say(message)
if(findtext(message, codeword))
return "" //oh hey did you want to tell people about the secret word to bring you back?
return message
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
if(findtext(speech_args[SPEECH_MESSAGE], codeword))
speech_args[SPEECH_MESSAGE] = "" //oh hey did you want to tell people about the secret word to bring you back?
/mob/living/split_personality/traitor
name = "split personality"
+40
View File
@@ -0,0 +1,40 @@
/datum/component/bouncy
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
var/bouncy_mod = 1
var/list/bounce_signals = list(COMSIG_MOVABLE_IMPACT, COMSIG_ITEM_HIT_REACT, COMSIG_ITEM_ATTACK)
/datum/component/bouncy/Initialize(_bouncy_mod, list/_bounce_signals)
if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE
if(_bouncy_mod)
bouncy_mod = _bouncy_mod
if(_bounce_signals)
bounce_signals = _bounce_signals
/datum/component/bouncy/InheritComponent(datum/component/bouncy/B, original, _bouncy_mod, list/_bounce_signals)
if(_bouncy_mod)
bouncy_mod = max(bouncy_mod, _bouncy_mod)
if(_bounce_signals)
var/list/diff_bounces = difflist(bounce_signals, _bounce_signals, TRUE)
for(var/bounce in diff_bounces)
bounce_signals += bounce
RegisterSignal(parent, bounce, .proc/bounce_up)
/datum/component/bouncy/RegisterWithParent()
RegisterSignal(parent, bounce_signals, .proc/bounce_up)
/datum/component/bouncy/UnregisterFromParent()
UnregisterSignal(parent, bounce_signals)
/datum/component/bouncy/proc/bounce_up(datum/source)
var/atom/movable/A = parent
switch(rand(1, 3))
if(1)
A.do_jiggle(45 + rand(-10, 10) * bouncy_mod, 14)
if(2)
var/min_b = 0.6/bouncy_mod
var/max_b = 1.2 * bouncy_mod
A.do_squish(rand(min_b, max_b), rand(min_b, max_b), 14)
if(3)
var/pixelshift = 8 * bouncy_mod
A.Shake(pixelshift, pixelshift, duration = 15)
+8 -12
View File
@@ -2,10 +2,10 @@
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
var/mob/living/host_mob
var/nanite_volume = 100 //amount of nanites in the system, used as fuel for nanite programs
var/max_nanites = 500 //maximum amount of nanites in the system
var/nanite_volume = 50 //amount of nanites in the system, used as fuel for nanite programs
var/max_nanites = 250 //maximum amount of nanites in the system
var/regen_rate = 0.5 //nanites generated per second
var/safety_threshold = 50 //how low nanites will get before they stop processing/triggering
var/safety_threshold = 25 //how low nanites will get before they stop processing/triggering
var/cloud_id = 0 //0 if not connected to the cloud, 1-100 to set a determined cloud backup to draw from
var/next_sync = 0
var/list/datum/nanite_program/programs = list()
@@ -46,9 +46,9 @@
RegisterSignal(parent, COMSIG_NANITE_ADD_PROGRAM, .proc/add_program)
RegisterSignal(parent, COMSIG_NANITE_SCAN, .proc/nanite_scan)
RegisterSignal(parent, COMSIG_NANITE_SYNC, .proc/sync)
RegisterSignal(parent, COMSIG_ATOM_EMP_ACT, .proc/on_emp)
if(isliving(parent))
RegisterSignal(parent, COMSIG_ATOM_EMP_ACT, .proc/on_emp)
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/on_death)
RegisterSignal(parent, COMSIG_MOB_ALLOWED, .proc/check_access)
RegisterSignal(parent, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_shock)
@@ -169,23 +169,19 @@
holder.icon_state = "nanites[nanite_percent]"
/datum/component/nanites/proc/on_emp(datum/source, severity)
nanite_volume *= (rand(0.60, 0.90)) //Lose 10-40% of nanites
adjust_nanites(null, -(rand(5, 50))) //Lose 5-50 flat nanite volume
if(prob(40/severity))
cloud_id = 0
adjust_nanites(null, -(nanite_volume * 0.3 + 50)) //Lose 30% variable and 50 flat nanite volume.
for(var/X in programs)
var/datum/nanite_program/NP = X
NP.on_emp(severity)
/datum/component/nanites/proc/on_shock(datum/source, shock_damage)
nanite_volume *= (rand(0.45, 0.80)) //Lose 20-55% of nanites
adjust_nanites(null, -(rand(5, 50))) //Lose 5-50 flat nanite volume
adjust_nanites(null, -(nanite_volume * (shock_damage * 0.005) + shock_damage)) //0.5% of shock damage (@ 50 damage it'd drain 25%) + shock damage flat volume
for(var/X in programs)
var/datum/nanite_program/NP = X
NP.on_shock(shock_damage)
/datum/component/nanites/proc/on_minor_shock(datum/source)
adjust_nanites(null, -(rand(5, 15))) //Lose 5-15 flat nanite volume
adjust_nanites(null, -25)
for(var/X in programs)
var/datum/nanite_program/NP = X
NP.on_minor_shock()
@@ -311,4 +307,4 @@
mob_program["trigger_code"] = P.trigger_code
id++
mob_programs += list(mob_program)
data["mob_programs"] = mob_programs
data["mob_programs"] = mob_programs
+1 -1
View File
@@ -27,7 +27,7 @@
C.stuttering = 20
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
C.adjustStaminaLoss(25) //boneless humanoids don't lose the will to live
to_chat(C, "<font color='red' size='4'><B>DOOT</B></span>")
to_chat(C, "<font color='red' size='4'><B>DOOT</B></font>")
spectral_change(H)
else //the sound will spook monkeys.
+1 -1
View File
@@ -592,7 +592,7 @@
if(!stop_messages)
to_chat(M, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>")
return FALSE //To prevent the stacking of same sized storage items.
if(I.item_flags & NODROP) //SHOULD be handled in unEquip, but better safe than sorry.
if(HAS_TRAIT(I, TRAIT_NODROP)) //SHOULD be handled in unEquip, but better safe than sorry.
to_chat(M, "<span class='warning'>\the [I] is stuck to your hand, you can't put it in \the [host]!</span>")
return FALSE
var/datum/component/storage/concrete/master = master()
+2 -2
View File
@@ -1351,8 +1351,8 @@
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
var/msg = "<span class='notice'>[key_name(usr)] dealt [amount] amount of [Text] damage to [L] </span>"
message_admins(msg)
var/msg = "[key_name(usr)] dealt [amount] amount of [Text] damage to [L] </span>"
message_admins("<span class='notice'>[msg]</span>")
admin_ticket_log(L, msg)
vv_update_display(L, Text, "[newamt]")
else if(href_list["copyoutfit"])
@@ -25,7 +25,7 @@
if(!..())
return
var/mob/living/carbon/M = A.affected_mob
SEND_SIGNAL(M, COMSIG_NANITE_ADJUST_VOLUME, 0.5 * power)
SEND_SIGNAL(M, COMSIG_NANITE_ADJUST_VOLUME, src, power)
if(reverse_boost && SEND_SIGNAL(M, COMSIG_HAS_NANITES))
if(prob(A.stage_prob))
A.stage = min(A.stage + 1,A.max_stages)
@@ -60,4 +60,4 @@
SEND_SIGNAL(M, COMSIG_NANITE_ADJUST_VOLUME, -0.4 * power)
if(reverse_boost && SEND_SIGNAL(M, COMSIG_HAS_NANITES))
if(prob(A.stage_prob))
A.stage = min(A.stage + 1,A.max_stages)
A.stage = min(A.stage + 1,A.max_stages)
+27
View File
@@ -26,3 +26,30 @@
if(4)
if(prob(5))
affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) , forced = "pierrot's throat")
/datum/disease/pierrot_throat/after_add()
RegisterSignal(affected_mob, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/disease/pierrot_throat/proc/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
var/list/split_message = splittext(message, " ") //List each word in the message
var/applied = 0
for (var/i in 1 to length(split_message))
if(prob(3 * stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
if(findtext(split_message[i], "*") || findtext(split_message[i], ";") || findtext(split_message[i], ":"))
continue
split_message[i] = "HONK"
if (applied++ > stage)
break
if (applied)
speech_args[SPEECH_SPANS] |= SPAN_CLOWN // a little bonus
message = jointext(split_message, " ")
speech_args[SPEECH_MESSAGE] = message
/datum/disease/pierrot_throat/Destroy()
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
return ..()
/datum/disease/pierrot_throat/remove_disease()
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
return ..()
-19
View File
@@ -185,25 +185,6 @@
if(DNA_TAUR_BLOCK)
construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
/datum/dna/proc/mutations_say_mods(message)
if(message)
for(var/datum/mutation/human/M in mutations)
message = M.say_mod(message)
return message
/datum/dna/proc/mutations_get_spans()
var/list/spans = list()
for(var/datum/mutation/human/M in mutations)
spans |= M.get_spans()
return spans
/datum/dna/proc/species_get_spans()
var/list/spans = list()
if(species)
spans |= species.get_spans()
return spans
/datum/dna/proc/is_same_as(datum/dna/D)
if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species)
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
+1 -1
View File
@@ -85,7 +85,7 @@
return 1
return 0
/datum/martial_art/krav_maga/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(D.lying || D.IsKnockdown())
return 0
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
-7
View File
@@ -105,13 +105,6 @@ GLOBAL_LIST_EMPTY(mutations_list)
return 0
return 1
/datum/mutation/human/proc/say_mod(message)
if(message)
return message
/datum/mutation/human/proc/get_spans()
return list()
/mob/living/carbon/proc/update_mutations_overlay()
return
+7 -3
View File
@@ -15,6 +15,7 @@
ADD_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
owner.update_body_parts()
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk)
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
if(proximity) //no telekinetic hulk attack
@@ -32,8 +33,11 @@
REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
owner.update_body_parts()
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk")
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/hulk/say_mod(message)
/datum/mutation/human/hulk/proc/handle_speech(original_message, wrapped_message)
var/message = wrapped_message[1]
if(message)
message = "[uppertext(replacetext(message, ".", "!"))]!!"
return message
message = "[replacetext(message, ".", "!")]!!"
wrapped_message[1] = message
return COMPONENT_UPPERCASE_SPEECH
+87 -35
View File
@@ -17,9 +17,20 @@
text_gain_indication = "<span class='sans'>You feel an off sensation in your voicebox.</span>"
text_lose_indication = "<span class='notice'>The off sensation passes.</span>"
/datum/mutation/human/wacky/get_spans()
return list(SPAN_SANS)
/datum/mutation/human/wacky/on_acquiring(mob/living/carbon/human/owner)
. = ..()
if(.)
return
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/wacky/on_losing(mob/living/carbon/human/owner)
. = ..()
if(.)
return
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/wacky/proc/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_SPANS] |= SPAN_SANS
/datum/mutation/human/mute
name = "Mute"
@@ -28,12 +39,14 @@
text_lose_indication = "<span class='danger'>You feel able to speak freely again.</span>"
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
if(..())
. = ..()
if(.)
return
ADD_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
if(..())
. = ..()
if(.)
return
REMOVE_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
@@ -45,7 +58,20 @@
text_gain_indication = "<span class='notice'>You feel so happy. Nothing can be wrong with anything. :)</span>"
text_lose_indication = "<span class='notice'>Everything is terrible again. :(</span>"
/datum/mutation/human/smile/say_mod(message)
/datum/mutation/human/smile/on_acquiring(mob/living/carbon/human/owner)
. = ..()
if(.)
return
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/smile/on_losing(mob/living/carbon/human/owner)
. = ..()
if(.)
return
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/smile/proc/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message)
message = " [message] "
//Time for a friendly game of SS13
@@ -92,7 +118,7 @@
message = replacetext(message," cunt "," privates ")
message = replacetext(message," dick "," jerk ")
message = replacetext(message," vagina "," privates ")
return trim(message)
speech_args[SPEECH_MESSAGE] = trim(message)
/datum/mutation/human/unintelligible
@@ -102,30 +128,17 @@
text_gain_indication = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
text_lose_indication = "<span class='danger'>Your mind feels more clear.</span>"
/datum/mutation/human/unintelligible/say_mod(message)
if(message)
var/prefix=copytext(message,1,2)
if(prefix == ";")
message = copytext(message,2)
else if(prefix in list(":","#"))
prefix += copytext(message,2,3)
message = copytext(message,3)
else
prefix=""
/datum/mutation/human/unintelligible/on_acquiring(mob/living/carbon/human/owner)
. = ..()
if(.)
return
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION)
var/list/words = splittext(message," ")
var/list/rearranged = list()
for(var/i=1;i<=words.len;i++)
var/cword = pick(words)
words.Remove(cword)
var/suffix = copytext(cword,length(cword)-1,length(cword))
while(length(cword)>0 && suffix in list(".",",",";","!",":","?"))
cword = copytext(cword,1 ,length(cword)-1)
suffix = copytext(cword,length(cword)-1,length(cword) )
if(length(cword))
rearranged += cword
message ="[prefix][jointext(rearranged," ")]"
return message
/datum/mutation/human/unintelligible/on_losing(mob/living/carbon/human/owner)
. = ..()
if(.)
return
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION)
/datum/mutation/human/swedish
@@ -135,7 +148,20 @@
text_gain_indication = "<span class='notice'>You feel Swedish, however that works.</span>"
text_lose_indication = "<span class='notice'>The feeling of Swedishness passes.</span>"
/datum/mutation/human/swedish/say_mod(message)
/datum/mutation/human/swedish/on_acquiring(mob/living/carbon/human/owner)
. = ..()
if(.)
return
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/swedish/on_losing(mob/living/carbon/human/owner)
. = ..()
if(.)
return
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/swedish/proc/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message)
message = replacetext(message,"w","v")
message = replacetext(message,"j","y")
@@ -144,7 +170,7 @@
message = replacetext(message,"o",pick("","","o"))
if(prob(30))
message += " Bork[pick("",", bork",", bork, bork")]!"
return message
speech_args[SPEECH_MESSAGE] = trim(message)
/datum/mutation/human/chav
@@ -154,7 +180,20 @@
text_gain_indication = "<span class='notice'>Ye feel like a reet prat like, innit?</span>"
text_lose_indication = "<span class='notice'>You no longer feel like being rude and sassy.</span>"
/datum/mutation/human/chav/say_mod(message)
/datum/mutation/human/chav/on_acquiring(mob/living/carbon/human/owner)
. = ..()
if(.)
return
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/chav/on_losing(mob/living/carbon/human/owner)
. = ..()
if(.)
return
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/chav/proc/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message)
message = " [message] "
message = replacetext(message," looking at "," gawpin' at ")
@@ -178,7 +217,7 @@
message = replacetext(message," break "," do ")
message = replacetext(message," your "," yer ")
message = replacetext(message," security "," coppers ")
return trim(message)
speech_args[SPEECH_MESSAGE] = trim(message)
/datum/mutation/human/elvis
@@ -199,7 +238,20 @@
if(prob(15))
owner.visible_message("<b>[owner]</b> [pick("jiggles their hips", "rotates their hips", "gyrates their hips", "taps their foot", "dances to an imaginary song", "jiggles their legs", "snaps their fingers")]!")
/datum/mutation/human/elvis/say_mod(message)
/datum/mutation/human/elvis/on_acquiring(mob/living/carbon/human/owner)
. = ..()
if(.)
return
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/elvis/on_losing(mob/living/carbon/human/owner)
. = ..()
if(.)
return
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/elvis/proc/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message)
message = " [message] "
message = replacetext(message," i'm not "," I aint ")
@@ -211,7 +263,7 @@
message = replacetext(message," yes ",pick(" sure", "yea "))
message = replacetext(message," faggot "," square ")
message = replacetext(message," muh valids "," getting my kicks ")
return trim(message)
speech_args[SPEECH_MESSAGE] = trim(message)
/datum/mutation/human/stoner
+5 -2
View File
@@ -30,6 +30,7 @@
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
if(WIRE_SHOCK)
A.shocked = !A.shocked
A.shock(usr, 50)
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
if(WIRE_DISABLE)
A.disabled = !A.disabled
@@ -40,9 +41,11 @@
switch(wire)
if(WIRE_HACK)
A.adjust_hacked(!mend)
if(WIRE_HACK)
if(WIRE_SHOCK)
A.shocked = !mend
A.shock(usr, 50)
if(WIRE_DISABLE)
A.disabled = !mend
if(WIRE_ZAP)
A.shock(usr, 50)
A.shock(usr, 50)