From f3f0a06c57f9b39c2107ac05feab4340a047f9b1 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Sun, 11 Mar 2018 12:03:15 +0300 Subject: [PATCH] Adds positive moods for headpatting, hugging box of hugs and playing with plush. Also, you will now receive negative mood for butchering plush and trying to pet such plush. --- .../mood_events/generic_negative_events.dm | 11 +++++ .../mood_events/generic_positive_events.dm | 21 ++++++++++ .../code/datums/mood_events/moodular.dm | 41 +++++++++++++++++++ tgstation.dme | 3 ++ 4 files changed, 76 insertions(+) create mode 100644 modular_citadel/code/datums/mood_events/generic_negative_events.dm create mode 100644 modular_citadel/code/datums/mood_events/generic_positive_events.dm create mode 100644 modular_citadel/code/datums/mood_events/moodular.dm diff --git a/modular_citadel/code/datums/mood_events/generic_negative_events.dm b/modular_citadel/code/datums/mood_events/generic_negative_events.dm new file mode 100644 index 0000000000..1f1aa3739f --- /dev/null +++ b/modular_citadel/code/datums/mood_events/generic_negative_events.dm @@ -0,0 +1,11 @@ +// Citadel-specific negative moodlets + +/datum/mood_event/plushjack + description = "I have butchered the plush recently.\n" + mood_change = -1 + timeout = 1200 + +/datum/mood_event/plush_nostuffing + description = "A plush i tried to pet had no stuffing...\n" + mood_change = -1 + timeout = 1200 diff --git a/modular_citadel/code/datums/mood_events/generic_positive_events.dm b/modular_citadel/code/datums/mood_events/generic_positive_events.dm new file mode 100644 index 0000000000..04f626c3cf --- /dev/null +++ b/modular_citadel/code/datums/mood_events/generic_positive_events.dm @@ -0,0 +1,21 @@ +// Citadel-specific positive moodlets + +/datum/mood_event/headpat + description = "Headpats are nice.\n" + mood_change = 2 + timeout = 1200 + +/datum/mood_event/hugbox + description = "I hugged box of hugs recently.\n" + mood_change = 1 + timeout = 1200 + +/datum/mood_event/plushpet + description = "I have petted plush recently.\n" + mood_change = 1 + timeout = 3000 + +/datum/mood_event/plushplay + description = "I played with plushes recently.\n" + mood_change = 3 + timeout = 3000 diff --git a/modular_citadel/code/datums/mood_events/moodular.dm b/modular_citadel/code/datums/mood_events/moodular.dm new file mode 100644 index 0000000000..bf32b9561c --- /dev/null +++ b/modular_citadel/code/datums/mood_events/moodular.dm @@ -0,0 +1,41 @@ +// Modular stuff to use with Citadel-specific moods. + +// box of hugs +/obj/item/storage/box/hug/attack_self(mob/user) + . = ..() + GET_COMPONENT_FROM(mood, /datum/component/mood, user) + if(mood) + mood.add_event("hugbox", /datum/mood_event/hugbox) + +// headpats (IMPORTANT) +/mob/living/carbon/help_shake_act(mob/living/carbon/M) + . = ..() + GET_COMPONENT_FROM(mood, /datum/component/mood, src) + if(mood) + mood.add_event("headpat", /datum/mood_event/headpat) + +// plush petting +/obj/item/toy/plush/attack_self(mob/user) + . = ..() + if(stuffed || grenade) + GET_COMPONENT_FROM(mood, /datum/component/mood, user) + if(mood) + mood.add_event("plushpet", /datum/mood_event/plushpet) + else + GET_COMPONENT_FROM(mood, /datum/component/mood, user) + if(mood) + mood.add_event("plush_nostuffing", /datum/mood_event/plush_nostuffing) + +// Jack the Ripper starring plush +/obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params) + . = ..() + if(!grenade) + GET_COMPONENT_FROM(mood, /datum/component/mood, user) + if(mood) + mood.add_event("plushjack", /datum/mood_event/plushjack) + +// plush playing (plush-on-plush action) + if(istype(I, /obj/item/toy/plush)) + GET_COMPONENT_FROM(mood, /datum/component/mood, user) + if(mood) + mood.add_event("plushplay", /datum/mood_event/plushplay) diff --git a/tgstation.dme b/tgstation.dme index ec4b134561..5cacbd6ecd 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2590,6 +2590,9 @@ #include "modular_citadel\code\controllers\subsystem\research.dm" #include "modular_citadel\code\controllers\subsystem\shuttle.dm" #include "modular_citadel\code\datums\uplink_items_cit.dm" +#include "modular_citadel\code\datums\mood_events\generic_negative_events.dm" +#include "modular_citadel\code\datums\mood_events\generic_positive_events.dm" +#include "modular_citadel\code\datums\mood_events\moodular.dm" #include "modular_citadel\code\datums\mutations\hulk.dm" #include "modular_citadel\code\datums\traits\neutral.dm" #include "modular_citadel\code\datums\wires\airlock.dm"