diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index 5d5504f461b..35e2be7e543 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -200,6 +200,7 @@ the_event = new type(src, param) mood_events[category] = the_event + the_event.category = category update_mood() if(the_event.timeout) @@ -214,6 +215,16 @@ qdel(event) update_mood() +/datum/component/mood/proc/remove_temp_moods(var/admin) //Removes all temp moods + for(var/i in mood_events) + var/datum/mood_event/moodlet = mood_events[i] + if(!moodlet || !moodlet.timeout) + continue + mood_events -= moodlet.category + qdel(moodlet) + update_mood() + + /datum/component/mood/proc/modify_hud(datum/source) var/mob/living/owner = parent var/datum/hud/hud = owner.hud_used @@ -234,7 +245,6 @@ /datum/component/mood/proc/hud_click(datum/source, location, control, params, mob/user) print_mood(user) - /datum/component/mood/proc/HandleNutrition(mob/living/L) switch(L.nutrition) if(NUTRITION_LEVEL_FULL to INFINITY) diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 2a93f74fa7d..e15d6df2dd1 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -113,6 +113,11 @@ description = "I'm missing my family heirloom...\n" mood_change = -4 +/datum/mood_event/healsbadman + description = "You feel a lot better, but wow that was disgusting.\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 + //These are unused so far but I want to remember them to use them later /datum/mood_event/cloned_corpse description = "I recently saw my own corpse...\n" diff --git a/code/datums/mood_events/mood_event.dm b/code/datums/mood_events/mood_event.dm index dfe3049bdd2..1099b580c55 100644 --- a/code/datums/mood_events/mood_event.dm +++ b/code/datums/mood_events/mood_event.dm @@ -3,6 +3,7 @@ var/mood_change = 0 var/timeout = 0 var/hidden = FALSE//Not shown on examine + var/category //string of what category this mood was added in as var/mob/owner /datum/mood_event/New(mob/M, param) diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index d6e99f7361c..30702075397 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -84,6 +84,7 @@ to_chat(user, "You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.") SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) H.revive(full_heal = 1) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "core", /datum/mood_event/healsbadman) //Now THIS is a miner buff (fixed - nerf) qdel(src) /obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 5519c721637..33c34d95a49 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -482,10 +482,7 @@ update_mobility() GET_COMPONENT(mood, /datum/component/mood) if (mood) - QDEL_LIST_ASSOC_VAL(mood.mood_events) - mood.sanity = SANITY_GREAT - mood.update_mood() - + mood.remove_temp_moods(admin_revive) //proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again) /mob/living/proc/can_be_revived()