diff --git a/tff_modular/modules/toys/code/loadout_datum_toys.dm b/tff_modular/modules/toys/code/loadout_datum_toys.dm index cc645eb8133..97293b11812 100644 --- a/tff_modular/modules/toys/code/loadout_datum_toys.dm +++ b/tff_modular/modules/toys/code/loadout_datum_toys.dm @@ -33,3 +33,11 @@ /datum/loadout_item/toys/special/yulia name = "Yulia Plushie" item_path = /obj/item/toy/plush/tff/yulia + +/datum/loadout_item/toys/special/junnia + name = "Junnia Plushie" + item_path = /obj/item/toy/plush/tff/soulmates/junnia + +/datum/loadout_item/toys/special/howe + name = "Howe Plushie" + item_path = /obj/item/toy/plush/tff/soulmates/howe diff --git a/tff_modular/modules/toys/code/plushes.dm b/tff_modular/modules/toys/code/plushes.dm index 33532d1f5a3..1e9b56f1717 100644 --- a/tff_modular/modules/toys/code/plushes.dm +++ b/tff_modular/modules/toys/code/plushes.dm @@ -75,3 +75,4 @@ attack_verb_continuous = list("attacks", "bites", "gnashes at", "hugs") attack_verb_simple = list("attack", "bite", "gnash at", "hug") squeak_override = list('sound/weapons/bite.ogg' = 1,'modular_nova/modules/emotes/sound/voice/feline_purr.ogg' = 1) + diff --git a/tff_modular/modules/toys/code/soulmate_plushes.dm b/tff_modular/modules/toys/code/soulmate_plushes.dm new file mode 100644 index 00000000000..8572495ae8e --- /dev/null +++ b/tff_modular/modules/toys/code/soulmate_plushes.dm @@ -0,0 +1,95 @@ +/obj/item/toy/plush/tff/soulmates + /// Typepath of our soulmate. Used to determine with whom we could kiss and... :flooshed: + var/missing_one + /// link to our actual soulmate. One and only + var/obj/item/toy/plush/tff/soulmates/bindedsoul + /// icon_state when we are not on the same tile with [bindedsoul] + var/depressed_icon_state = "" + /// icon_state when we are on the same tile with [bindedsoul] + var/happy_icon_state = "" + /// same as [depressed_icon_state] but for description + var/depressed_desc = " It seems that toy is unhappy... sad." + /// same as [happy_icon_state] but for description + var/happy_desc = " Oh! The toy is happy!" + +/obj/item/toy/plush/tff/soulmates/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(check_the_mate)) + +/obj/item/toy/plush/tff/soulmates/Destroy() + . = ..() + UnregisterSignal(src, COMSIG_MOVABLE_MOVED) + if(bindedsoul) + bindedsoul.bindedsoul = null + bindedsoul = null + +/// Signal handler for [COMSIG_MOVABLE_MOVED]. Used to check when we are in proximitty with our soulmate to change our [icon_state] accordingly +/obj/item/toy/plush/tff/soulmates/proc/check_the_mate() + SIGNAL_HANDLER + var/obj/item/toy/plush/tff/soulmates/that_missing_one = locate() in range(1, src) + if(istype(that_missing_one, missing_one)) + if(that_missing_one == bindedsoul && that_missing_one.bindedsoul == src) + src.happy() + that_missing_one.happy() + else + src.drama() + if(bindedsoul) + bindedsoul.drama() + else + src.drama() + if(bindedsoul) + bindedsoul.drama() + +/obj/item/toy/plush/tff/soulmates/love(obj/item/toy/plush/tff/soulmates/kisser, mob/living/user) + if(istype(kisser, missing_one)) + if(kisser != bindedsoul) + if(kisser.bindedsoul) + kisser.bindedsoul.bindedsoul = null + kisser.bindedsoul.check_the_mate() + kisser.bindedsoul = null + if(bindedsoul) + src.bindedsoul.bindedsoul = null + src.bindedsoul.check_the_mate() + src.bindedsoul = null + src.bindedsoul = kisser + kisser.bindedsoul = src + kisser.check_the_mate() + user.visible_message(span_notice("[user] makes [kisser] kiss [src]!"), + span_notice("You make [kisser] kiss [src]!")) + return + +/// set our icon and message to sad state +/obj/item/toy/plush/tff/soulmates/proc/drama() + icon_state = depressed_icon_state + mood_message = depressed_desc + update_appearance() + +//set our icon and message to happy state +/obj/item/toy/plush/tff/soulmates/proc/happy() + icon_state = happy_icon_state + mood_message = happy_desc + update_appearance() + +/obj/item/toy/plush/tff/soulmates/junnia + name = "Junnia plushie" + gender = FEMALE + desc = "Looking for her beloved human." + icon_state = "plush_junnia_depressed" + depressed_icon_state = "plush_junnia_depressed" + happy_icon_state = "plush_junnia" + missing_one = /obj/item/toy/plush/tff/soulmates/howe + attack_verb_continuous = list("kisses", "hugs", "cuddles against", "bites", "dismisses") + attack_verb_simple = list("kiss", "hug", "cuddle against", "bite", "dismiss") + squeak_override = list('modular_nova/modules/emotes/sound/emotes/blush.ogg' = 1, 'modular_nova/modules/emotes/sound/voice/wurble.ogg' = 1, 'modular_nova/modules/emotes/sound/voice/peep_once.ogg' = 1) + +/obj/item/toy/plush/tff/soulmates/howe + name = "Howe plushie" + gender = MALE + desc = "Looking for his beloved teshari." + icon_state = "plush_howe_depressed" + depressed_icon_state = "plush_howe_depressed" + happy_icon_state = "plush_howe" + missing_one = /obj/item/toy/plush/tff/soulmates/junnia + attack_verb_continuous = list("hugs", "cuddles against", "protects") + attack_verb_simple = list("hug", "cuddle against", "protect") + squeak_override = list('modular_nova/modules/emotes/sound/emotes/blush.ogg' = 1) diff --git a/tff_modular/modules/toys/icons/plushes.dmi b/tff_modular/modules/toys/icons/plushes.dmi index fe4e9726c26..944fe9fc47d 100644 Binary files a/tff_modular/modules/toys/icons/plushes.dmi and b/tff_modular/modules/toys/icons/plushes.dmi differ diff --git a/tgstation.dme b/tgstation.dme index b0517acc5c0..483bd14f996 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8429,6 +8429,7 @@ #include "tff_modular\modules\timed_citations\crime.dm" #include "tff_modular\modules\toys\code\loadout_datum_toys.dm" #include "tff_modular\modules\toys\code\plushes.dm" +#include "tff_modular\modules\toys\code\soulmate_plushes.dm" #include "tff_modular\modules\uplink_item\code\categories\stealthy_weapons.dm" #include "tff_modular\modules\vulpkanin_accessories\code\ears.dm" #include "tff_modular\modules\vulpkanin_accessories\code\hair.dm"