mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
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:
@@ -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()
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user