From f3f0a06c57f9b39c2107ac05feab4340a047f9b1 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Sun, 11 Mar 2018 12:03:15 +0300 Subject: [PATCH 1/3] 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" From b20984af89a2eb775a4f319999623937a9106031 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Tue, 13 Mar 2018 15:38:33 +0300 Subject: [PATCH 2/3] B for Bad Grammar --- .../code/datums/mood_events/generic_negative_events.dm | 4 ++-- .../code/datums/mood_events/generic_positive_events.dm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modular_citadel/code/datums/mood_events/generic_negative_events.dm b/modular_citadel/code/datums/mood_events/generic_negative_events.dm index 1f1aa3739f..cc7e714819 100644 --- a/modular_citadel/code/datums/mood_events/generic_negative_events.dm +++ b/modular_citadel/code/datums/mood_events/generic_negative_events.dm @@ -1,11 +1,11 @@ // Citadel-specific negative moodlets /datum/mood_event/plushjack - description = "I have butchered the plush recently.\n" + description = "I have butchered a plush recently.\n" mood_change = -1 timeout = 1200 /datum/mood_event/plush_nostuffing - description = "A plush i tried to pet had no stuffing...\n" + 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 index 04f626c3cf..40df233fbf 100644 --- a/modular_citadel/code/datums/mood_events/generic_positive_events.dm +++ b/modular_citadel/code/datums/mood_events/generic_positive_events.dm @@ -6,16 +6,16 @@ timeout = 1200 /datum/mood_event/hugbox - description = "I hugged box of hugs recently.\n" + description = "I hugged a box of hugs recently.\n" mood_change = 1 timeout = 1200 /datum/mood_event/plushpet - description = "I have petted plush recently.\n" + description = "I pet a plush recently.\n" mood_change = 1 timeout = 3000 /datum/mood_event/plushplay - description = "I played with plushes recently.\n" + description = "I've played with plushes recently.\n" mood_change = 3 timeout = 3000 From 542f9c63c7cca95980a1e1ed2f234ca6c1aa4c5f Mon Sep 17 00:00:00 2001 From: Anonymous Date: Tue, 13 Mar 2018 15:48:26 +0300 Subject: [PATCH 3/3] Adds check if item is sharp So you won't get false negative mood for playing with plushes. --- modular_citadel/code/datums/mood_events/moodular.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modular_citadel/code/datums/mood_events/moodular.dm b/modular_citadel/code/datums/mood_events/moodular.dm index bf32b9561c..b764c0027e 100644 --- a/modular_citadel/code/datums/mood_events/moodular.dm +++ b/modular_citadel/code/datums/mood_events/moodular.dm @@ -29,10 +29,11 @@ // 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) + if(I.is_sharp()) + 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))