I took a bit of code from the files and only showed the bits along with the surrounding code to show what I did and the location.
belly_stomach.dm
- Code: Select all
// Implementation of Oral Vore by the "Stomach" belly type.
// Note: This also handles Anal Vore. Possibly consider more differentiation.
//
/datum/belly/stomach
belly_type = "Stomach"
belly_name = "stomach"
inside_flavor = "There is nothing interesting about this stomach."
// @Override
/datum/belly/stomach/get_examine_msg(t_He, t_his, t_him, t_has, t_is)
if (internal_contents.len)
return "[t_He] [t_has] something solid in [t_his] stomach!\n"
/datum/belly/stomach/toggle_digestion()
digest_mode = input("Stomach Mode") in list("Hold", "Drain", "Digest")
switch (digest_mode)
if("Drain")
owner << "<span class='notice'>You will now drain nutrition from people in your stomach.</span>"
if("Digest")
owner << "<span class='notice'>You will now digest people in your stomach.</span>"
if("Hold")
owner << "<span class='notice'>You will now harmlessly hold people in your stomach.</span>"
// @Override
// @Override
/datum/belly/stomach/process_Life()
for (var/mob/living/M in internal_contents)
//STOMACH DRAIN
if(iscarbon(M) && owner.stat != DEAD && digest_mode == "Drain" && M.stat != DEAD))
if(air_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
if(M.nutrition > 90)
owner.nutrition += 10 // I took it from the womb code because I'm SOOOO clever... Edit the values and the code to your heart's content. -Daisy
M.nutrition -= 10
else if (M.nutrition <= 90)
if (M.weakened == 0) // If they were weakened before and they're that hungry, both of you are probably not going to notice a difference.
owner << "<span class='notice'>You feel [M]'s struggles dying down as their body is drained almost completely to the point of exaustion.</span>" //Pred's message.
M << "<span class='notice'>Your body feels too weak to offer any significant resistance inside of [owner]'s stomach.</span>" //Prey's message.
M.Weaken(10)
else
M.Weaken(10) // Knocked down, but still able to talk and emote clearly.Keeps resetting to 10 until free.
if (M.weight > 70.05) // Turn fat into nutrition!
M.weight -= 0.05
owner.nutrition += 1 // I have no idea how much 1 unit of weight is worth in terms of nutrition
else if (M.weight < 70)
M.weight = 70 // Prevent it from accidentally going lower
Anyway, I hope the code is good enough, and I'd love for it to be added to the game so preds can get their nutrients without having to digest.
Edit: Based on this request: https://github.com/SpadesNeil/VOREstation/issues/273
Edit2: Updated this post's code with what I have recently.
Edit3: Started a poll regarding the weight system we have now.
Edit4: I cut corners, editing belly.dm was unnecessary, so I altered the stomach code a bit and removed the belly.dm code.
Edit5: Here is the file. Make sure to save and replace the old one. Looking over, this whole code may end up getting overshadowed by absorption, but dang it, it is here just in case. Also, I updated the stomach code on the front page to include weight draining.