Skip to content

Commit

Permalink
Junnia and Howe plushies + plushie soulmate mechanics (#3455)
Browse files Browse the repository at this point in the history
* Well...

* Fixes

* For Vishenka0702

* Moved proc -> COMSIG_MOVABLE_MOVED signal

* Iajret wish

* autodocs?

---------

Co-authored-by: Iajret <[email protected]>
  • Loading branch information
RaShCAt and Iajret authored May 24, 2024
1 parent 14dbc30 commit 72e5cdd
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tff_modular/modules/toys/code/loadout_datum_toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions tff_modular/modules/toys/code/plushes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

95 changes: 95 additions & 0 deletions tff_modular/modules/toys/code/soulmate_plushes.dm
Original file line number Diff line number Diff line change
@@ -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)
Binary file modified tff_modular/modules/toys/icons/plushes.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 72e5cdd

Please sign in to comment.