Merge pull request #9666 from Verkister/eggpanel

Moves egg type options to vorepanel
This commit is contained in:
Novacat
2021-02-09 13:00:29 -05:00
committed by GitHub
5 changed files with 22 additions and 5 deletions
+4 -2
View File
@@ -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
@@ -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)
+9
View File
@@ -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)
@@ -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"} />
</LabeledList.Item>
<LabeledList.Item label="Egg Type">
<Button
onClick={() => act("set_attribute", { attribute: "b_egg_type" })}
icon="pen"
content={capitalize(egg_type)} />
</LabeledList.Item>
</LabeledList>
</Flex.Item>
<Flex.Item basis="49%" grow={1}>
File diff suppressed because one or more lines are too long