diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm
index 2e4068f31f7..6af71afacfb 100644
--- a/code/_helpers/global_lists_vr.dm
+++ b/code/_helpers/global_lists_vr.dm
@@ -107,37 +107,6 @@ var/global/list/fancy_release_sounds = list(
"None" = null
)
-var/global/list/global_vore_egg_types = list(
- "Unathi" = UNATHI_EGG,
- "Tajaran" = TAJARAN_EGG,
- "Akula" = AKULA_EGG,
- "Skrell" = SKRELL_EGG,
- "Nevrean" = NEVREAN_EGG,
- "Sergal" = SERGAL_EGG,
- "Human" = HUMAN_EGG,
- "Slime" = SLIME_EGG,
- "Egg" = EGG_EGG,
- "Xenochimera" = XENOCHIMERA_EGG,
- "Xenomorph" = XENOMORPH_EGG,
- "Chocolate" = CHOCOLATE_EGG,
- "Boney" = BONEY_EGG,
- "Slime glob" = SLIMEGLOB_EGG,
- "Chicken" = CHICKEN_EGG,
- "Synthetic" = SYNTHETIC_EGG,
- "Cooking error" = BADRECIPE_EGG,
- "Escape pod" = ESCAPEPOD_EGG,
- "Web cocoon" = COCOON_EGG,
- "Bug cocoon" = BUGCOCOON_EGG,
- "Rock" = ROCK_EGG,
- "Yellow" = YELLOW_EGG,
- "Blue" = BLUE_EGG,
- "Green" = GREEN_EGG,
- "Orange" = ORANGE_EGG,
- "Purple" = PURPLE_EGG,
- "Red" = RED_EGG,
- "Rainbow" = RAINBOW_EGG,
- "Spotted pink" = PINKSPOTS_EGG)
-
var/global/list/tf_vore_egg_types = list(
"Unathi" = /obj/item/weapon/storage/vore_egg/unathi,
"Tajara" = /obj/item/weapon/storage/vore_egg/tajaran,
diff --git a/code/game/objects/items/weapons/storage/egg_vr.dm b/code/game/objects/items/weapons/storage/egg_vr.dm
index 5b35c776b24..6eef606929a 100644
--- a/code/game/objects/items/weapons/storage/egg_vr.dm
+++ b/code/game/objects/items/weapons/storage/egg_vr.dm
@@ -20,6 +20,22 @@
icon = open_egg_icon
..()
+/obj/item/weapon/storage/vore_egg/proc/hatch(mob/living/user as mob)
+ visible_message("\The [src] begins to shake as something pushes out from within!")
+ animate_shake()
+ if(do_after(user, 50))
+ if(use_sound)
+ playsound(src, src.use_sound, 50, 0, -5)
+ animate_shake()
+ drop_contents()
+ icon = open_egg_icon
+
+/obj/item/weapon/storage/vore_egg/proc/animate_shake()
+ var/init_px = pixel_x
+ var/shake_dir = pick(-1, 1)
+ animate(src, transform=turn(matrix(), 8*shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
+ animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
+
/obj/item/weapon/storage/vore_egg/unathi
name = "unathi egg"
desc = "Some species of Unathi apparently lay soft-shelled eggs!"
@@ -163,4 +179,25 @@
/obj/item/weapon/storage/vore_egg/pinkspots
name = "spotted pink egg"
desc = "It is a cute pink egg with white spots."
- icon_state = "egg_pinkspots"
\ No newline at end of file
+ icon_state = "egg_pinkspots"
+
+/obj/item/weapon/holder/attack_hand(mob/living/user as mob)
+ if(istype(src.loc, /obj/item/weapon/storage/vore_egg)) //Don't scoop up the egged mob
+ src.pickup(user)
+ user.drop_from_inventory(src)
+ return
+ ..()
+
+/obj/item/weapon/holder/container_resist(mob/living/held)
+ if(istype(src.loc, /obj/item/weapon/storage/vore_egg))
+ var/obj/item/weapon/storage/vore_egg/E = src.loc
+ if(isbelly(E.loc))
+ var/confirm = alert(held,
+ "Are you sure you wish to hatch inside your captor?",
+ "Confirmation",
+ "Proceed", "Cancel")
+ if(!confirm == "Proceed")
+ return
+ E.hatch(held)
+ return
+ ..()
\ No newline at end of file
diff --git a/code/modules/client/preference_setup/vore/03_egg.dm b/code/modules/client/preference_setup/vore/03_egg.dm
index 284726c4f1d..b01cc1c26e6 100644
--- a/code/modules/client/preference_setup/vore/03_egg.dm
+++ b/code/modules/client/preference_setup/vore/03_egg.dm
@@ -1,33 +1,3 @@
-var/UNATHI_EGG = "Unathi"
-var/TAJARAN_EGG = "Tajaran"
-var/AKULA_EGG = "Akula"
-var/SKRELL_EGG = "Skrell"
-var/SERGAL_EGG = "Sergal"
-var/HUMAN_EGG = "Human"
-var/NEVREAN_EGG = "nevrean"
-var/SLIME_EGG = "Slime"
-var/EGG_EGG = "Egg"
-var/XENOCHIMERA_EGG = "Xenochimera"
-var/XENOMORPH_EGG = "Xenomorph"
-var/CHOCOLATE_EGG = "Chocolate"
-var/BONEY_EGG = "Boney"
-var/SLIMEGLOB_EGG = "Slime glob"
-var/CHICKEN_EGG = "Chicken"
-var/SYNTHETIC_EGG = "Synthetic"
-var/BADRECIPE_EGG = "Cooking error"
-var/ESCAPEPOD_EGG = "Escape pod"
-var/COCOON_EGG = "Web cocoon"
-var/BUGCOCOON_EGG = "Bug cocoon"
-var/ROCK_EGG = "Rock"
-var/YELLOW_EGG = "Yellow"
-var/BLUE_EGG = "Blue"
-var/GREEN_EGG = "Green"
-var/ORANGE_EGG = "Orange"
-var/PURPLE_EGG = "Purple"
-var/RED_EGG = "Red"
-var/RAINBOW_EGG = "Rainbow"
-var/PINKSPOTS_EGG = "Spotted pink"
-
// Define a place to save appearance in character setup
/datum/preferences
var/vore_egg_type = "Egg" //The egg type they have.
@@ -44,8 +14,7 @@ var/PINKSPOTS_EGG = "Spotted pink"
S["vore_egg_type"] << pref.vore_egg_type
/datum/category_item/player_setup_item/vore/egg/sanitize_character()
- var/valid_vore_egg_types = global_vore_egg_types
- pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, valid_vore_egg_types, initial(pref.vore_egg_type))
+ pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, tf_vore_egg_types, initial(pref.vore_egg_type))
/datum/category_item/player_setup_item/vore/egg/copy_to_mob(var/mob/living/carbon/human/character)
character.vore_egg_type = pref.vore_egg_type
@@ -59,7 +28,7 @@ var/PINKSPOTS_EGG = "Spotted pink"
return TOPIC_NOACTION
else if(href_list["vore_egg_type"])
- var/list/vore_egg_types = global_vore_egg_types
+ var/list/vore_egg_types = tf_vore_egg_types
var/selection = input(user, "Choose your character's egg type:", "Character Preference", pref.vore_egg_type) as null|anything in vore_egg_types
if(selection)
pref.vore_egg_type = vore_egg_types[selection]
diff --git a/code/modules/vore/eating/bellymodes_datum_vr.dm b/code/modules/vore/eating/bellymodes_datum_vr.dm
index 9b9a5bbaa7c..48abf3db5d7 100644
--- a/code/modules/vore/eating/bellymodes_datum_vr.dm
+++ b/code/modules/vore/eating/bellymodes_datum_vr.dm
@@ -14,6 +14,9 @@ GLOBAL_LIST_INIT(digest_modes, list())
/datum/digest_mode/proc/process_mob(obj/belly/B, mob/living/L)
return null
+/datum/digest_mode/proc/handle_atoms(obj/belly/B, list/touchable_atoms)
+ return FALSE
+
/datum/digest_mode/digest
id = DM_DIGEST
noise_chance = 50
@@ -136,4 +139,61 @@ GLOBAL_LIST_INIT(digest_modes, list())
/datum/digest_mode/egg/process_mob(obj/belly/B, mob/living/carbon/human/H)
if(!istype(H) || H.stat == DEAD || H.absorbed)
return null
- B.put_in_egg(H, 1)*/
\ No newline at end of file
+ B.put_in_egg(H, 1)*/
+
+/datum/digest_mode/egg/handle_atoms(obj/belly/B, list/touchable_atoms)
+ var/list/egg_contents = list()
+ for(var/E in touchable_atoms)
+ if(istype(E, /obj/item/weapon/storage/vore_egg)) // Don't egg other eggs.
+ continue
+ if(isliving(E))
+ var/mob/living/L = E
+ if(L.absorbed)
+ continue
+ egg_contents += L
+ if(isitem(E))
+ 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
+ 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)
+ if(isitem(C) && egg_contents.len == 1) //Only egging one item
+ var/obj/item/I = C
+ B.ownegg.w_class = I.w_class
+ B.ownegg.max_storage_space = B.ownegg.w_class
+ I.forceMove(B.ownegg)
+ B.ownegg.icon_scale_x = 0.2 * B.ownegg.w_class
+ B.ownegg.icon_scale_y = 0.2 * B.ownegg.w_class
+ B.ownegg.update_transform()
+ egg_contents -= I
+ B.ownegg = null
+ break
+ if(isliving(C))
+ var/mob/living/M = C
+ B.ownegg.w_class = M.size_multiplier * 4 //Egg size and weight scaled to match occupant.
+ var/obj/item/weapon/holder/H = new M.holder_type(B.ownegg)
+ H.held_mob = M
+ M.forceMove(H)
+ H.sync(M)
+ B.ownegg.max_storage_space = H.w_class
+ B.ownegg.icon_scale_x = 0.25 * B.ownegg.w_class
+ B.ownegg.icon_scale_y = 0.25 * B.ownegg.w_class
+ B.ownegg.update_transform()
+ egg_contents -= M
+ B.ownegg = null
+ break
+ C.forceMove(B.ownegg)
+ if(isitem(C))
+ var/obj/item/I = C
+ B.ownegg.w_class += I.w_class //Let's assume a regular outfit can reach total w_class of 16.
+ B.ownegg.calibrate_size()
+ B.ownegg.orient2hud()
+ B.ownegg.w_class = clamp(B.ownegg.w_class * 0.25, 1, 8) //A total w_class of 16 will result in a backpack sized egg.
+ B.ownegg.icon_scale_x = 0.25 * B.ownegg.w_class
+ B.ownegg.icon_scale_y = 0.25 * B.ownegg.w_class
+ B.ownegg.update_transform()
+ B.ownegg = null
+ return
\ No newline at end of file
diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm
index 427cc1b6590..23ef02e9ac9 100644
--- a/code/modules/vore/eating/bellymodes_vr.dm
+++ b/code/modules/vore/eating/bellymodes_vr.dm
@@ -31,6 +31,14 @@
if(!length(touchable_atoms))
return
+ var/datum/digest_mode/DM = GLOB.digest_modes["[digest_mode]"]
+ if(!DM)
+ log_debug("Digest mode [digest_mode] didn't exist in the digest_modes list!!")
+ return FALSE
+ if(DM.handle_atoms(src, touchable_atoms))
+ updateVRPanels()
+ return
+
var/list/touchable_mobs = null
var/list/hta_returns = handle_touchable_atoms(touchable_atoms)
@@ -54,11 +62,6 @@
continue // don't give digesty messages to indigestible people
to_chat(M, "[pick(EL)]")
- var/datum/digest_mode/DM = GLOB.digest_modes["[digest_mode]"]
- if(!DM)
- log_debug("Digest mode [digest_mode] didn't exist in the digest_modes list!!")
- return FALSE
-
if(!digestion_noise_chance)
digestion_noise_chance = DM.noise_chance
@@ -99,62 +102,6 @@
var/digestion_noise_chance = 0
var/list/touchable_mobs = list()
- if(digest_mode == DM_EGG)
- var/list/egg_contents = list()
- for(var/E in touchable_atoms)
- if(istype(E, /obj/item/weapon/storage/vore_egg)) // Don't egg other eggs.
- continue
- if(isliving(E))
- var/mob/living/L = E
- if(L.absorbed)
- continue
- egg_contents += L
- if(isitem(E))
- egg_contents += E
- if(egg_contents.len)
- if(!ownegg)
- if(owner.vore_egg_type in tf_vore_egg_types)
- egg_type = owner.vore_egg_type
- egg_path = tf_vore_egg_types[egg_type]
- ownegg = new egg_path(src)
- for(var/atom/movable/C in egg_contents)
- if(isitem(C) && egg_contents.len == 1) //Only egging one item
- var/obj/item/I = C
- ownegg.w_class = I.w_class
- ownegg.max_storage_space = ownegg.w_class
- I.forceMove(ownegg)
- ownegg.icon_scale_x = 0.2 * ownegg.w_class
- ownegg.icon_scale_y = 0.2 * ownegg.w_class
- ownegg.update_transform()
- egg_contents -= I
- ownegg = null
- break
- if(isliving(C))
- var/mob/living/M = C
- ownegg.w_class = M.size_multiplier * 4 //Egg size and weight scaled to match occupant.
- var/obj/item/weapon/holder/H = new M.holder_type(ownegg)
- H.held_mob = M
- M.forceMove(H)
- ownegg.max_storage_space = H.w_class
- ownegg.icon_scale_x = 0.25 * ownegg.w_class
- ownegg.icon_scale_y = 0.25 * ownegg.w_class
- ownegg.update_transform()
- egg_contents -= M
- ownegg = null
- break
- C.forceMove(ownegg)
- if(isitem(C))
- var/obj/item/I = C
- ownegg.w_class += I.w_class //Let's assume a regular outfit can reach total w_class of 20.
- ownegg.calibrate_size()
- ownegg.orient2hud()
- ownegg.w_class = clamp(ownegg.w_class * 0.2, 1, 8) //A total w_class of 20 will result in a backpack sized egg.
- ownegg.icon_scale_x = 0.2 * ownegg.w_class
- ownegg.icon_scale_y = 0.2 * ownegg.w_class
- ownegg.update_transform()
- ownegg = null
- return list("to_update" = to_update, "touchable_mobs" = touchable_mobs, "digestion_noise_chance" = digestion_noise_chance)
-
for(var/A in touchable_atoms)
//Handle stray items
if(isitem(A) && !did_an_item)