All compiling errors fixed, except for a few weird ones that I need help

This commit is contained in:
Fermi
2019-05-11 15:40:06 +01:00
parent 3c5bf7f0e2
commit f7655cad25
18 changed files with 186 additions and 16 deletions
+3 -1
View File
@@ -28,4 +28,6 @@
#define MOVESPEED_ID_SIMPLEMOB_VARSPEED "SIMPLEMOB_VARSPEED_MODIFIER"
#define MOVESPEED_ID_ADMIN_VAREDIT "ADMIN_VAREDIT_MODIFIER"
#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER"
#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER"
#define MOVESPEED_ID_SANITY "MOOD_SANITY"
+5
View File
@@ -1,3 +1,6 @@
//We're really behind tg on traits huh?
#define HAS_TRAIT(target, trait) (target.status_traits ? (target.status_traits[trait] ? TRUE : FALSE) : FALSE)
//mob traits
#define TRAIT_BLIND "blind"
#define TRAIT_MUTE "mute"
@@ -50,6 +53,8 @@
#define TRAIT_NOHARDCRIT "nohardcrit"
#define TRAIT_NOSOFTCRIT "nosoftcrit"
#define TRAIT_MINDSHIELD "mindshield"
#define TRAIT_FEARLESS "fearless"
#define TRAIT_UNSTABLE "unstable"
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
+7 -1
View File
@@ -31,6 +31,8 @@
/datum/brain_trauma/mild/phobia/on_life()
..()
if(owner.has_trait(TRAIT_FEARLESS))
return
if(is_blind(owner))
return
if(world.time > next_check && world.time > next_scare)
@@ -70,6 +72,8 @@
/datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq)
if(!owner.can_hear() || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
return message
if(owner.has_trait(TRAIT_FEARLESS))
return message
for(var/word in trigger_words)
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
@@ -79,9 +83,11 @@
return message
/datum/brain_trauma/mild/phobia/on_say(message)
if(owner.has_trait(TRAIT_FEARLESS))
return message
for(var/word in trigger_words)
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
if(findtext(message, reg))
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
return ""
+57
View File
@@ -6,6 +6,7 @@
var/sanity = 100 //Current sanity
var/shown_mood //Shown happiness, this is what others can see when they try to examine you, prevents antag checking by noticing traitors are always very happy.
var/mood_level = 5 //To track what stage of moodies they're on
var/sanity_level = 5 //To track what stage of sanity they're on
var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets
var/datum/mood_event/list/mood_events = list()
var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much?
@@ -165,6 +166,59 @@
HandleNutrition(owner)
/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL)//I'm sure bunging this in here will have no negative repercussions.
var/mob/living/owner = parent
if(amount == sanity)
return
// If we're out of the acceptable minimum-maximum range move back towards it in steps of 0.5
// If the new amount would move towards the acceptable range faster then use it instead
if(sanity < minimum && amount < sanity + 0.5)
amount = sanity + 0.5
else if(sanity > maximum && amount > sanity - 0.5)
amount = sanity - 0.5
// Disturbed stops you from getting any more sane
if(owner.has_trait(TRAIT_UNSTABLE))
sanity = min(amount,sanity)
else
sanity = amount
var/mob/living/master = parent
switch(sanity)
if(SANITY_INSANE to SANITY_CRAZY)
setInsanityEffect(MAJOR_INSANITY_PEN)
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1.5, movetypes=(~FLYING))
sanity_level = 6
if(SANITY_CRAZY to SANITY_UNSTABLE)
setInsanityEffect(MINOR_INSANITY_PEN)
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1, movetypes=(~FLYING))
sanity_level = 5
if(SANITY_UNSTABLE to SANITY_DISTURBED)
setInsanityEffect(0)
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.5, movetypes=(~FLYING))
sanity_level = 4
if(SANITY_DISTURBED to SANITY_NEUTRAL)
setInsanityEffect(0)
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 3
if(SANITY_NEUTRAL+1 to SANITY_GREAT+1) //shitty hack but +1 to prevent it from responding to super small differences
setInsanityEffect(0)
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 2
if(SANITY_GREAT+1 to INFINITY)
setInsanityEffect(0)
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
sanity_level = 1
update_mood_icon()
/datum/component/mood/proc/setInsanityEffect(newval)//More code so that the previous proc works
if(newval == insanity_effect)
return
var/mob/living/master = parent
master.crit_threshold = (master.crit_threshold - insanity_effect) + newval
insanity_effect = newval
/datum/component/mood/proc/DecreaseSanity(amount, minimum = SANITY_INSANE)
if(sanity < minimum) //This might make KevinZ stop fucking pinging me.
IncreaseSanity(0.5)
@@ -177,6 +231,9 @@
insanity_effect = (MINOR_INSANITY_PEN)
/datum/component/mood/proc/IncreaseSanity(amount, maximum = SANITY_NEUTRAL)
// Disturbed stops you from getting any more sane - I'm just gonna bung this in here
if(owner.has_trait(TRAIT_UNSTABLE))
return
if(sanity > maximum)
DecreaseSanity(0.5) //Removes some sanity to go back to our current limit.
else
+2 -2
View File
@@ -46,10 +46,10 @@
description = "<span class='nicegreen'>YES! YES!! YES!!!</span>\n"
mood_change = 100
timeout = 300
special_screen_obj = "mood_happiness_good"
//special_screen_obj = "mood_happiness_good" uncomment when added from tg
/datum/mood_event/happiness_drug_bad_od
description = "<span class='boldwarning'>NO! NO!! NO!!!</span>\n"
mood_change = -100
timeout = 300
special_screen_obj = "mood_happiness_bad"
//special_screen_obj = "mood_happiness_bad" uncomment when added from tg
@@ -117,6 +117,30 @@
description = "<span class='warning'>I'm missing my family heirloom...</span>\n"
mood_change = -4
/datum/mood_event/healsbadman
description = "<span class='warning'>I feel a lot better, but wow that was disgusting.</span>\n" //when you read the latest felinid removal PR and realize you're really not that much of a degenerate
mood_change = -4
timeout = 1200
/datum/mood_event/jittery
description = "<span class='warning'>I'm nervous and on edge and I can't stand still!!</span>\n"
mood_change = -2
/datum/mood_event/vomit
description = "<span class='warning'>I just threw up. Gross.</span>\n"
mood_change = -2
timeout = 1200
/datum/mood_event/vomitself
description = "<span class='warning'>I just threw up all over myself. This is disgusting.</span>\n"
mood_change = -4
timeout = 1800
/datum/mood_event/painful_medicine
description = "<span class='warning'>Medicine may be good for me but right now it stings like hell.</span>\n"
mood_change = -5
timeout = 600
//These are unused so far but I want to remember them to use them later
/datum/mood_event/cloned_corpse
description = "<span class='boldwarning'>I recently saw my own corpse...</span>\n"
@@ -70,3 +70,17 @@
description = "<span class='nicegreen'>There is something soothing about this music.</span>\n"
mood_change = 3
timeout = 600
/datum/mood_event/chemical_euphoria
description = "<span class='nicegreen'>Heh...hehehe...hehe...</span>\n"
mood_change = 4
/datum/mood_event/chemical_laughter
description = "<span class='nicegreen'>Laughter really is the best medicine! Or is it?</span>\n"
mood_change = 4
timeout = 1800
/datum/mood_event/chemical_superlaughter
description = "<span class='nicegreen'>*WHEEZE*</span>\n"
mood_change = 12
timeout = 1800
+9
View File
@@ -315,3 +315,12 @@
if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums))
to_chat(quirk_holder, "<span class='boldannounce'>Your antagonistic nature has caused your voice to be heard.</span>")
qdel(src)
/datum/quirk/unstable
name = "Unstable"
desc = "Due to past troubles, you are unable to recover your sanity if you lose it. Be very careful managing your mood!"
value = -2
mob_trait = TRAIT_UNSTABLE
gain_text = "<span class='danger'>There's a lot on your mind right now.</span>"
lose_text = "<span class='notice'>Your mind finally feels calm.</span>"
medical_record_text = "Patient's mind is in a vulnerable state, and cannot recover from traumatic events."
@@ -297,6 +297,22 @@
for(var/i in 1 to 5)
new /obj/item/reagent_containers/pill/aranesp(src)
/obj/item/storage/pill_bottle/psicodine
name = "bottle of psicodine pills"
desc = "Contains pills used to treat mental distress and traumas."
/obj/item/storage/pill_bottle/psicodine/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/reagent_containers/pill/psicodine(src)
/obj/item/storage/pill_bottle/happiness
name = "happiness pill bottle"
desc = "The label is long gone, in its place an 'H' written with a marker."
/obj/item/storage/pill_bottle/happiness/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/reagent_containers/pill/happiness(src)
/obj/item/storage/pill_bottle/antirad_plus
name = "anti radiation deluxe pill bottle"
desc = "The label says 'Med-Co branded pills'."
+3 -1
View File
@@ -477,11 +477,13 @@
if(message)
visible_message("<span class='danger'>[src] throws up all over [p_them()]self!</span>", \
"<span class='userdanger'>You throw up all over yourself!</span>")
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "vomit", /datum/mood_event/vomitself)
distance = 0
else
if(message)
visible_message("<span class='danger'>[src] throws up!</span>", "<span class='userdanger'>You throw up!</span>")
if(!isflyperson(src))
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "vomit", /datum/mood_event/vomit)
if(stun)
Stun(80)
+14
View File
@@ -49,6 +49,12 @@
/mob/living/carbon/handle_breathing(times_fired)
if((times_fired % 4) == 2 || failed_last_breath)
breathe() //Breathe per 4 ticks, unless suffocating
/* Hey maintainer reading this right now, should we handle suffocation this way?
if(failed_last_breath)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation)
else
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "suffocation")
*/
else
if(istype(loc, /obj/))
var/obj/location_as_object = loc
@@ -229,6 +235,9 @@
else if(SA_partialpressure > 0.01)
if(prob(20))
emote(pick("giggle","laugh"))
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "chemical_euphoria", /datum/mood_event/chemical_euphoria)
else
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "chemical_euphoria")
//BZ (Facepunch port of their Agent B)
if(breath_gases[/datum/gas/bz])
@@ -527,6 +536,9 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
if(jitteriness)
do_jitter_animation(jitteriness)
jitteriness = max(jitteriness - restingpwr, 0)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "jittery", /datum/mood_event/jittery)
else
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "jittery")
if(stuttering)
stuttering = max(stuttering-1, 0)
@@ -612,6 +624,8 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
if(drunkenness >= 101)
adjustToxLoss(4) //Let's be honest you shouldn't be alive by now
else
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "drunk")
//used in human and monkey handle_environment()
/mob/living/carbon/proc/natural_bodytemperature_stabilization()
@@ -168,6 +168,7 @@
/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M)
M.emote("laugh")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_laughter)
..()
/datum/reagent/consumable/superlaughter
@@ -182,6 +183,7 @@
if(prob(30))
M.visible_message("<span class='danger'>[M] bursts out into a fit of uncontrollable laughter!</span>", "<span class='userdanger'>You burst out in a fit of uncontrollable laughter!</span>")
M.Stun(5)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_superlaughter)
..()
/datum/reagent/consumable/potato_juice
@@ -238,6 +238,7 @@
if(show_message)
to_chat(M, "<span class='danger'>You feel your burns healing! It stings like hell!</span>")
M.emote("scream")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
..()
/datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/carbon/M)
@@ -286,6 +287,7 @@
if(show_message)
to_chat(M, "<span class='danger'>You feel your bruises healing! It stings like hell!</span>")
M.emote("scream")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
..()
@@ -391,6 +393,7 @@
M.adjustFireLoss(-1.25 * reac_volume)
if(show_message)
to_chat(M, "<span class='danger'>You feel your burns and bruises healing! It stings like hell!</span>")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
..()
/datum/reagent/medicine/charcoal
@@ -166,6 +166,13 @@
list_reagents = list("insulin" = 50)
roundstart = 1
/obj/item/reagent_containers/pill/psicodine
name = "psicodine pill"
desc = "Used to treat mental instability and traumas."
list_reagents = list("psicodine" = 10)
icon_state = "pill22"
roundstart = 1
/obj/item/reagent_containers/pill/antirad
name = "potassium iodide pill"
desc = "Used to treat radition used to counter radiation poisoning."
@@ -216,6 +223,12 @@
name = "speedy pill"
list_reagents = list("aranesp" = 10)
/obj/item/reagent_containers/pill/happiness
name = "happiness pill"
desc = "It has a creepy smiling face on it."
icon_state = "pill_happy"
list_reagents = list("happiness" = 10)
/obj/item/reagent_containers/pill/floorpill
name = "floorpill"
desc = "A strange pill found in the depths of maintenance"
@@ -240,4 +253,4 @@
/obj/item/reagent_containers/pill/breast_enlargement
name = "breast enlargement pill"
list_reagents = list("BEenlager" = 10)
list_reagents = list("BEenlager" = 10)
+3 -1
View File
@@ -246,6 +246,9 @@
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
H.emote(pick("giggle", "laugh"))
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "chemical_euphoria", /datum/mood_event/chemical_euphoria)
else
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "chemical_euphoria")
// BZ
@@ -443,4 +446,3 @@
heat_level_1_threshold = 400 // better adapted for heat, obv. Lavaland standard is 300
heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3
+1 -4
View File
@@ -1101,11 +1101,8 @@
objective = replacetext(lowertext(objective), "harm", "snuggle")
objective = replacetext(lowertext(objective), "decapitate", "headpat")
objective = replacetext(lowertext(objective), "strangle", "meow at")
H.objective += objective
to_chat(H, "<span class='warning'>Your master whispers you a new objective.</span>")
if(!H.objectives)
to_chat(H, "<b>[LAZYLEN(H.objectives)].</b> [H.objectives.explanation_text]")
to_chat(H, "<b>[LAZYLEN(H.objectives)].</b> [H.objectives.explanation_text]")
brainwash(H, objective)
E.mental_capacity -= 150
//else if (E.mental_capacity >= 150)
else
+4 -2
View File
@@ -27,7 +27,9 @@
contraband = list(/obj/item/reagent_containers/pill/tox = 3,
/obj/item/reagent_containers/pill/morphine = 4,
/obj/item/reagent_containers/pill/charcoal = 6)
premium = list(/obj/item/storage/box/hug/medical = 1,
premium = list(/obj/item/reagent_containers/medspray/synthflesh = 2,
/obj/item/storage/box/hug/medical = 1,
/obj/item/storage/pill_bottle/psicodine = 2,
/obj/item/reagent_containers/hypospray/medipen = 3,
/obj/item/storage/belt/medical = 3,
/obj/item/wrench/medical = 1)
@@ -41,4 +43,4 @@
/obj/machinery/vending/medical/syndicate_access
name = "\improper SyndiMed Plus"
req_access = list(ACCESS_SYNDICATE)
req_access = list(ACCESS_SYNDICATE)
@@ -308,11 +308,13 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
//Give the new clone an idea of their character
//SHOULD print last 5 messages said by the original to the clones chatbox
var/list/say_log = M.logging[LOG_SAY]
var/recent_speech
if(LAZYLEN(say_log) > 5)
var/recent_speech = say_log.Copy(say_log.len+5,0) //0 so len-LING_ARS+1 to end of list
recent_speech = say_log.Copy(say_log.len+5,0) //0 so len-LING_ARS+1 to end of list
else
for(var/spoken_memory in recent_speech)
to_chat(SM, spoken_memory)
recent_speech = say_log
for(var/spoken_memory in recent_speech)
to_chat(SM, spoken_memory)
return