Makes some requested changes to mood (#38851)

cl Floyd
del: removed beauty / dirtyness
balance: Mood no longer gives you hallucinations, instead makes you go into crit sooner
/cl

oranges requested these changes, i havn't coded in DM for a while so I might have made some mistakes
This commit is contained in:
Qustinnus
2018-07-08 03:50:54 +02:00
committed by yogstation13-bot
parent c3ccc6faa9
commit c6e806e9d8
32 changed files with 38 additions and 186 deletions

View File

@@ -15,7 +15,7 @@
if(prob(4))
if(prob(33) && (owner.IsStun() || owner.IsKnockdown() || owner.IsUnconscious()))
speak("unstun", TRUE)
else if(prob(60) && owner.health <= HEALTH_THRESHOLD_CRIT)
else if(prob(60) && owner.health <= owner.crit_modifier())
speak("heal", TRUE)
else if(prob(30) && owner.a_intent == INTENT_HARM)
speak("aggressive")
@@ -133,4 +133,4 @@
QDEL_NULL(psychotic_brawling)
/datum/brain_trauma/special/psychotic_brawling/bath_salts
name = "Chemical Violent Psychosis"
name = "Chemical Violent Psychosis"

View File

@@ -1,34 +0,0 @@
/datum/component/beauty
var/beauty = 0
/datum/component/beauty/Initialize(beautyamount)
if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE
beauty = beautyamount
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/enter_area)
RegisterSignal(parent, COMSIG_EXIT_AREA, .proc/exit_area)
var/area/A = get_area(parent)
if(!A || A.outdoors)
return
A.totalbeauty += beauty
A.update_beauty()
/datum/component/beauty/proc/enter_area(area/A)
if(A.outdoors) //Fuck the outside.
return FALSE
A.totalbeauty += beauty
A.update_beauty()
/datum/component/beauty/proc/exit_area(area/A)
if(A.outdoors) //Fuck the outside.
return FALSE
A.totalbeauty -= beauty
A.update_beauty()
/datum/component/beauty/Destroy()
. = ..()
var/area/A = get_area(parent)
if(!A || A.outdoors)
return
A.totalbeauty -= beauty
A.update_beauty()

View File

@@ -6,21 +6,17 @@
var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets
var/datum/mood_event/list/mood_events = list()
var/mob/living/owner
var/datum/looping_sound/reverse_bear_trap/slow/soundloop //Insanity ticking
/datum/component/mood/Initialize()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
START_PROCESSING(SSmood, src)
owner = parent
soundloop = new(list(owner), FALSE, TRUE)
RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT, .proc/add_event)
RegisterSignal(parent, COMSIG_CLEAR_MOOD_EVENT, .proc/clear_event)
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/update_beauty)
RegisterSignal(COMSIG_ADD_MOOD_EVENT, .proc/add_event)
RegisterSignal(COMSIG_CLEAR_MOOD_EVENT, .proc/clear_event)
/datum/component/mood/Destroy()
STOP_PROCESSING(SSmood, src)
QDEL_NULL(soundloop)
return ..()
/datum/component/mood/proc/print_mood()
@@ -115,20 +111,12 @@
if(SANITY_INSANE to SANITY_CRAZY)
owner.overlay_fullscreen("depression", /obj/screen/fullscreen/depression, 3)
update_mood_icon()
if(prob(7))
owner.playsound_local(null, pick(CREEPY_SOUNDS), 40, 1)
soundloop.start()
if(SANITY_INSANE to SANITY_UNSTABLE)
owner.overlay_fullscreen("depression", /obj/screen/fullscreen/depression, 2)
if(prob(3))
owner.playsound_local(null, pick(CREEPY_SOUNDS), 20, 1)
soundloop.stop()
if(SANITY_UNSTABLE to SANITY_DISTURBED)
owner.overlay_fullscreen("depression", /obj/screen/fullscreen/depression, 1)
soundloop.stop()
if(SANITY_DISTURBED to INFINITY)
owner.clear_fullscreen("depression")
soundloop.stop()
switch(mood_level)
if(1)
@@ -159,10 +147,6 @@
add_event("jolly", /datum/mood_event/jolly)
clear_event("depression")
var/area/A = get_area(owner)
if(A)
update_beauty(A)
/datum/component/mood/proc/DecreaseSanity(amount, limit = 0)
if(sanity < limit) //This might make KevinZ stop fucking pinging me.
IncreaseSanity(0.5)
@@ -199,23 +183,3 @@
mood_events -= category
qdel(event)
update_mood()
/datum/component/mood/proc/update_beauty(area/A)
if(A.outdoors) //if we're outside, we don't care.
clear_event("area_beauty")
return FALSE
switch(A.beauty)
if(-INFINITY to BEAUTY_LEVEL_HORRID)
add_event("area_beauty", /datum/mood_event/horridroom)
if(BEAUTY_LEVEL_HORRID to BEAUTY_LEVEL_BAD)
add_event("area_beauty", /datum/mood_event/badroom)
if(BEAUTY_LEVEL_BAD to BEAUTY_LEVEL_MEH)
add_event("area_beauty", /datum/mood_event/mehroom)
if(BEAUTY_LEVEL_MEH to BEAUTY_LEVEL_DECENT)
clear_event("area_beauty")
if(BEAUTY_LEVEL_DECENT to BEAUTY_LEVEL_GOOD)
add_event("area_beauty", /datum/mood_event/decentroom)
if(BEAUTY_LEVEL_GOOD to BEAUTY_LEVEL_GREAT)
add_event("area_beauty", /datum/mood_event/goodroom)
if(BEAUTY_LEVEL_GREAT to INFINITY)
add_event("area_beauty", /datum/mood_event/greatroom)

View File

@@ -41,11 +41,6 @@
mid_length = 3.5
volume = 25
/datum/looping_sound/reverse_bear_trap/slow
mid_sounds = list('sound/effects/clock_tick.ogg')
mid_length = 10
volume = 40
/datum/looping_sound/reverse_bear_trap_beep
mid_sounds = list('sound/machines/beep.ogg')

View File

@@ -1,23 +0,0 @@
/datum/mood_event/horridroom
description = "<span class='boldwarning'>This room looks terrible!</span>\n"
mood_change = -5
/datum/mood_event/badroom
description = "<span class='warning'>This room looks really bad.</span>\n"
mood_change = -3
/datum/mood_event/mehroom
description = "<span class='warning'>This room doesn't look great.</span>\n"
mood_change = -1
/datum/mood_event/decentroom
description = "<span class='nicegreen'>This room looks alright.</span>\n"
mood_change = 2
/datum/mood_event/goodroom
description = "<span class='nicegreen'>This room looks really pretty!</span>\n"
mood_change = 4
/datum/mood_event/greatroom
description = "<span class='nicegreen'>This room is beautiful!</span>\n"
mood_change = 7

View File

@@ -72,7 +72,7 @@
if(prob(20))
if(carbon_owner)
carbon_owner.handle_dreams()
if(prob(10) && owner.health > HEALTH_THRESHOLD_CRIT)
if(prob(10) && owner.health > owner.crit_modifier())
owner.emote("snore")
/obj/screen/alert/status_effect/asleep