From 72bd1805c23eec475c007338fc7925958783a5c9 Mon Sep 17 00:00:00 2001 From: Verkister Date: Tue, 9 Feb 2021 19:41:28 +0200 Subject: [PATCH] Moves egg type options to vorepanel Also makes them belly specific. --- code/modules/vore/eating/belly_obj_vr.dm | 6 ++++-- code/modules/vore/eating/bellymodes_datum_vr.dm | 3 +-- code/modules/vore/eating/vorepanel_vr.dm | 9 +++++++++ tgui/packages/tgui/interfaces/VorePanel.js | 7 +++++++ tgui/packages/tgui/public/tgui.bundle.js | 2 +- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 0889c29933b..00acb38504a 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -39,7 +39,7 @@ var/is_wet = TRUE // Is this belly's insides made of slimy parts? var/wet_loop = TRUE // Does the belly have a fleshy loop playing? var/obj/item/weapon/storage/vore_egg/ownegg // Is this belly creating an egg? - var/egg_type = "egg" // Default egg type and path. + var/egg_type = "Egg" // Default egg type and path. var/egg_path = /obj/item/weapon/storage/vore_egg //I don't think we've ever altered these lists. making them static until someone actually overrides them somewhere. @@ -162,7 +162,8 @@ "is_wet", "wet_loop", "belly_fullscreen", - "disable_hud" + "disable_hud", + "egg_type" ) /obj/belly/Initialize() @@ -743,6 +744,7 @@ dupe.wet_loop = wet_loop dupe.belly_fullscreen = belly_fullscreen dupe.disable_hud = disable_hud + dupe.egg_type = egg_type //// Object-holding variables //struggle_messages_outside - strings diff --git a/code/modules/vore/eating/bellymodes_datum_vr.dm b/code/modules/vore/eating/bellymodes_datum_vr.dm index e00860cadaa..4d9199b7270 100644 --- a/code/modules/vore/eating/bellymodes_datum_vr.dm +++ b/code/modules/vore/eating/bellymodes_datum_vr.dm @@ -155,8 +155,7 @@ GLOBAL_LIST_INIT(digest_modes, list()) egg_contents += E if(egg_contents.len) if(!B.ownegg) - if(B.owner.vore_egg_type in tf_vore_egg_types) - B.egg_type = B.owner.vore_egg_type + if(B.egg_type in tf_vore_egg_types) B.egg_path = tf_vore_egg_types[B.egg_type] B.ownegg = new B.egg_path(B) for(var/atom/movable/C in egg_contents) diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 086c5270f7c..945b9e1bd1b 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -150,6 +150,7 @@ "release_sound" = selected.release_sound, // "messages" // TODO "can_taste" = selected.can_taste, + "egg_type" = selected.egg_type, "nutrition_percent" = selected.nutrition_percent, "digest_brute" = selected.digest_brute, "digest_burn" = selected.digest_burn, @@ -164,6 +165,7 @@ if(selected.mode_flags & selected.mode_flag_list[flag_name]) data["selected"]["addons"].Add(flag_name) + data["selected"]["egg_type"] = selected.egg_type data["selected"]["contaminates"] = selected.contaminates data["selected"]["contaminate_flavor"] = null data["selected"]["contaminate_color"] = null @@ -632,6 +634,13 @@ host.vore_selected.contamination_color = new_color host.vore_selected.items_preserved.Cut() //To re-contaminate for new color . = TRUE + if("b_egg_type") + var/list/menu_list = global_vore_egg_types.Copy() + var/new_egg_type = input("Choose Egg Type (currently [host.vore_selected.egg_type])") as null|anything in menu_list + if(!new_egg_type) + return FALSE + host.vore_selected.egg_type = new_egg_type + . = TRUE if("b_desc") var/new_desc = html_encode(input(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc) as message|null) diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index f747f956e02..9603dd85aa7 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -171,6 +171,7 @@ const VoreSelectedBelly = (props, context) => { contaminates, contaminate_flavor, contaminate_color, + egg_type, escapable, interacts, contents, @@ -321,6 +322,12 @@ const VoreSelectedBelly = (props, context) => { selected={can_taste} content={can_taste ? "Yes" : "No"} /> + +