Adds 'Devourable" and 'feeding' prefs

This commit is contained in:
Poojawa
2019-10-15 02:01:51 -05:00
parent a169b6e27f
commit eb0234b1af
4 changed files with 210 additions and 106 deletions

View File

@@ -1,6 +1,8 @@
///////////////////// Mob Living /////////////////////
/mob/living
var/digestable = TRUE // Can the mob be digested inside a belly?
var/devourable = TRUE // Can the mob be devoured at all?
var/feeding = TRUE // Can the mob be vorishly force fed or fed to others?
var/digest_leave_remains = FALSE // Will this mob leave bones/skull/etc after the melty demise?
var/allowmobvore = TRUE // Will simplemobs attempt to eat the mob?
var/showvoreprefs = TRUE // Determines if the mechanical vore preferences button will be displayed on the mob or not.
@@ -35,7 +37,7 @@
M.verbs += /mob/living/proc/lick
M.verbs += /mob/living/proc/switch_scaling
if(M.no_vore) //If the mob isn't supposed to have a stomach, let's not give it an insidepanel so it can make one for itself, or a stomach.
return 1
return TRUE
M.verbs += /mob/living/proc/insidePanel
//Tries to load prefs if a client is present otherwise gives freebie stomach
@@ -43,8 +45,8 @@
if(M)
M.init_vore()
//Return 1 to hook-caller
return 1
//return TRUE to hook-caller
return TRUE
/mob/living/proc/init_vore()
//Something else made organs, meanwhile.
@@ -65,10 +67,10 @@
LAZYINITLIST(vore_organs)
var/obj/belly/B = new /obj/belly(src)
vore_selected = B
B.immutable = 1
B.immutable = TRUE
B.name = "Stomach"
B.desc = "It appears to be rather warm and wet. Makes sense, considering it's inside \the [name]."
B.can_taste = 1
B.can_taste = TRUE
return TRUE
//
@@ -93,29 +95,45 @@
var/mob/living/attacker = user // Typecast to living
// src is the mob clicked on
// src is the mob clicked on and attempted predator
///// If grab clicked on grabber
///// If user clicked on themselves
if((src == G.assailant) && (is_vore_predator(src)))
if (src.feed_grabbed_to_self(src, G.affecting))
if(!(G.affecting.devourable))
to_chat(user, "<span class='notice'>They aren't able to be devoured.</span>")
return FALSE
if(src.feed_grabbed_to_self(src, G.affecting))
qdel(G)
return 1
return TRUE
else
log_debug("[attacker] attempted to feed [G.affecting] to [user] ([user.type]) but it failed.")
///// If grab clicked on grabbed
///// If user clicked on their grabbed target
else if((src == G.affecting) && (attacker.a_intent == I_GRAB) && (attacker.zone_sel.selecting == BP_TORSO) && (is_vore_predator(G.affecting)))
if(!(G.affecting.feeding))
to_chat(user, "<span class='notice'>[G.affecting] isn't willing to be fed.</span>")
return FALSE
if (attacker.feed_self_to_grabbed(attacker, G.affecting))
qdel(G)
return 1
return TRUE
else
log_debug("[attacker] attempted to feed [user] to [G.affecting] ([G.affecting.type]) but it failed.")
///// If grab clicked on anyone else
///// If user clicked on anyone else but their grabbed target
else if((src != G.affecting) && (src != G.assailant) && (is_vore_predator(src)))
if(!(src.feeding))
to_chat(user, "<span class='notice'>[src] isn't willing to be fed.</span>")
return FALSE
if(!(G.affecting.devourable))
to_chat(user, "<span class='notice'>[G.affecting] isn't able to be devoured.</span>")
return FALSE
if(!(G.affecting.feeding))
to_chat(user, "<span class='notice'>[src] isn't able to be fed to someone.</span>")
return FALSE
if (attacker.feed_grabbed_to_other(attacker, G.affecting, src))
qdel(G)
return 1
return TRUE
else
log_debug("[attacker] attempted to feed [G.affecting] to [src] ([src.type]) but it failed.")
@@ -123,7 +141,7 @@
else if(istype(I,/obj/item/weapon/holder))
var/obj/item/weapon/holder/H = I
if(!isliving(user)) return 0 // Return 0 to continue upper procs
if(!isliving(user)) return FALSE // return FALSE to continue upper procs
var/mob/living/attacker = user // Typecast to living
if (is_vore_predator(src))
@@ -131,7 +149,7 @@
if (attacker.eat_held_mob(attacker, M, src))
if (H.held_mob == M)
H.held_mob = null
return 1 //Return 1 to exit upper procs
return TRUE //return TRUE to exit upper procs
else
log_debug("[attacker] attempted to feed [H.contents] to [src] ([src.type]) but it failed.")
@@ -141,16 +159,16 @@
if(confirm == "Yes!")
var/obj/belly/B = input("Which belly?","Select A Belly") as null|anything in vore_organs
if(!istype(B))
return 1
return TRUE
visible_message("<span class='warning'>[user] is trying to stuff a beacon into [src]'s [lowertext(B.name)]!</span>","<span class='warning'>[user] is trying to stuff a beacon into you!</span>")
if(do_after(user,30,src))
user.drop_item()
I.forceMove(B)
return 1
return TRUE
else
return 1 //You don't get to hit someone 'later'
return TRUE //You don't get to hit someone 'later'
return 0
return FALSE
//
// Our custom resist catches for /mob/living
@@ -165,39 +183,41 @@
//Other overridden resists go here
return 0
return FALSE
//
// Verb for saving vore preferences to save file
//
/mob/living/proc/save_vore_prefs()
if(!client || !client.prefs_vr)
return 0
return FALSE
if(!copy_to_prefs_vr())
return 0
return FALSE
if(!client.prefs_vr.save_vore())
return 0
return FALSE
return 1
return TRUE
/mob/living/proc/apply_vore_prefs()
if(!client || !client.prefs_vr)
return 0
return FALSE
if(!client.prefs_vr.load_vore())
return 0
return FALSE
if(!copy_from_prefs_vr())
return 0
return FALSE
return 1
return TRUE
/mob/living/proc/copy_to_prefs_vr()
if(!client || !client.prefs_vr)
to_chat(src,"<span class='warning'>You attempted to save your vore prefs but somehow you're in this character without a client.prefs_vr variable. Tell a dev.</span>")
return 0
return FALSE
var/datum/vore_preferences/P = client.prefs_vr
P.digestable = src.digestable
P.devourable = src.devourable
P.feeding = src.feeding
P.digest_leave_remains = src.digest_leave_remains
P.allowmobvore = src.allowmobvore
P.vore_taste = src.vore_taste
@@ -212,7 +232,7 @@
P.belly_prefs = serialized
return 1
return TRUE
//
// Proc for applying vore preferences, given bellies
@@ -220,11 +240,13 @@
/mob/living/proc/copy_from_prefs_vr()
if(!client || !client.prefs_vr)
to_chat(src,"<span class='warning'>You attempted to apply your vore prefs but somehow you're in this character without a client.prefs_vr variable. Tell a dev.</span>")
return 0
return FALSE
var/datum/vore_preferences/P = client.prefs_vr
digestable = P.digestable
devourable = P.devourable
feeding = P.feeding
digest_leave_remains = P.digest_leave_remains
allowmobvore = P.allowmobvore
vore_taste = P.vore_taste
@@ -237,7 +259,7 @@
for(var/entry in P.belly_prefs)
list_to_object(entry,src)
return 1
return TRUE
//
// Release everything in every vore organ
@@ -305,7 +327,7 @@
/mob/living/proc/get_taste_message(allow_generic = 1)
if(!vore_taste && !allow_generic)
return 0
return FALSE
var/taste_message = ""
if(vore_taste && (vore_taste != ""))
@@ -411,7 +433,7 @@
var/user_to_prey = get_dist(get_turf(user),get_turf(prey))
if(user_to_pred > 1 || user_to_prey > 1)
return 0
return FALSE
// Prepare messages
if(user == pred) //Feeding someone to yourself
@@ -433,7 +455,7 @@
//Timer and progress bar
if(!do_after(user, swallow_time, prey))
return 0 // Prey escpaed (or user disabled) before timer expired.
return FALSE // Prey escpaed (or user disabled) before timer expired.
// If we got this far, nom successful! Announce it!
user.visible_message(success_msg)
@@ -452,7 +474,7 @@
add_attack_logs(pred,prey,"Eaten via [belly.name]")
else
add_attack_logs(user,pred,"Forced to eat [key_name(prey)]")
return 1
return TRUE
//
// Magical pred-air breathing for inside preds
@@ -685,6 +707,8 @@
if("CHAT_LOOC" in client.prefs.preferences_disabled)
dispvoreprefs += "<font color='red'><b>LOOC DISABLED</b></font><br>"
dispvoreprefs += "<b>Digestable:</b> [digestable ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Devourable:</b> [devourable ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Feedable:</b> [feeding ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Leaves Remains:</b> [digest_leave_remains ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Mob Vore:</b> [allowmobvore ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Healbelly permission:</b> [permit_healbelly ? "Allowed" : "Disallowed"]<br>"

View File

@@ -19,14 +19,14 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
-Aro <3 */
#define VORE_VERSION 1 //This is a Define so you don't have to worry about magic numbers.
#define VORE_VERSION 2 //This is a Define so you don't have to worry about magic numbers.
//
// Overrides/additions to stock defines go here, as well as hooks. Sort them by
// the object they are overriding. So all /mob/living together, etc.
//
/datum/configuration
var/items_survive_digestion = 1 //For configuring if the important_items survive digestion
var/items_survive_digestion = TRUE //For configuring if the important_items survive digestion
//
// The datum type bolted onto normal preferences datums for storing Virgo stuff
@@ -37,13 +37,15 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
/hook/client_new/proc/add_prefs_vr(client/C)
C.prefs_vr = new/datum/vore_preferences(C)
if(C.prefs_vr)
return 1
return TRUE
return 0
return FALSE
/datum/vore_preferences
//Actual preferences
var/digestable = TRUE
var/devourable = TRUE
var/feeding = TRUE
var/digest_leave_remains = FALSE
var/allowmobvore = TRUE
var/list/belly_prefs = list()
@@ -70,9 +72,9 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
/proc/is_vore_predator(var/mob/living/O)
if(istype(O,/mob/living))
if(O.vore_organs.len > 0)
return 1
return TRUE
return 0
return FALSE
//
// Belly searching for simplifying other procs
@@ -91,27 +93,29 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
/datum/vore_preferences/proc/load_vore()
if(!client || !client_ckey)
return 0 //No client, how can we save?
return FALSE //No client, how can we save?
if(!client.prefs || !client.prefs.default_slot)
return 0 //Need to know what character to load!
return FALSE //Need to know what character to load!
slot = client.prefs.default_slot
load_path(client_ckey,slot)
if(!path) return 0 //Path couldn't be set?
if(!path) return FALSE //Path couldn't be set?
if(!fexists(path)) //Never saved before
save_vore() //Make the file first
return 1
return TRUE
var/list/json_from_file = json_decode(file2text(path))
if(!json_from_file)
return 0 //My concern grows
return FALSE //My concern grows
var/version = json_from_file["version"]
json_from_file = patch_version(json_from_file,version)
digestable = json_from_file["digestable"]
devourable = json_from_file["devourable"]
feeding = json_from_file["feeding"]
digest_leave_remains = json_from_file["digest_leave_remains"]
allowmobvore = json_from_file["allowmobvore"]
vore_taste = json_from_file["vore_taste"]
@@ -123,6 +127,10 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
//Quick sanitize
if(isnull(digestable))
digestable = TRUE
if(isnull(devourable))
devourable = TRUE
if(isnull(feeding))
feeding = TRUE
if(isnull(digest_leave_remains))
digest_leave_remains = FALSE
if(isnull(allowmobvore))
@@ -136,15 +144,17 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
if(isnull(belly_prefs))
belly_prefs = list()
return 1
return TRUE
/datum/vore_preferences/proc/save_vore()
if(!path) return 0
if(!path) return FALSE
var/version = VORE_VERSION //For "good times" use in the future
var/list/settings_list = list(
"version" = version,
"digestable" = digestable,
"devourable" = devourable,
"feeding" = feeding,
"digest_leave_remains" = digest_leave_remains,
"allowmobvore" = allowmobvore,
"vore_taste" = vore_taste,
@@ -158,7 +168,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
var/json_to_file = json_encode(settings_list)
if(!json_to_file)
log_debug("Saving: [path] failed jsonencode")
return 0
return FALSE
//Write it out
#ifdef RUST_G
@@ -171,9 +181,9 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
#endif
if(!fexists(path))
log_debug("Saving: [path] failed file write")
return 0
return FALSE
return 1
return TRUE
//Can do conversions here
/datum/vore_preferences/proc/patch_version(var/list/json_from_file,var/version)

View File

@@ -193,7 +193,7 @@
dat += "<br><a href='?src=\ref[src];b_wetness=\ref[selected]'>Is this belly fleshy:</a>"
dat += "[selected.is_wet ? "Yes" : "No"]"
if(selected.is_wet)
dat += "<a href='?src=\ref[src];b_wetloop=\ref[selected]'>Internal loop for prey?:</a>"
dat += "<br><a href='?src=\ref[src];b_wetloop=\ref[selected]'>Internal loop for prey?:</a>"
dat += "[selected.wet_loop ? "Yes" : "No"]"
//Digest Mode Button
@@ -309,27 +309,34 @@
switch(user.digestable)
if(TRUE)
dat += "<a href='?src=\ref[src];toggledg=1'>Toggle Digestable</a>"
dat += "<a style='background:#173d15;' href='?src=\ref[src];toggledg=1'>Toggle Digestable (Currently: ON)</a>"
if(FALSE)
dat += "<a href='?src=\ref[src];toggledg=1'><span style='color:green;'>Toggle Digestable</span></a>"
dat += "<a style='background:#990000;' href='?src=\ref[src];toggledg=1'>Toggle Digestable (Currently: OFF)</a>"
switch(user.devourable)
if(TRUE)
dat += "<a style='background:#173d15;' href='?src=\ref[src];toggleddevour=1'>Toggle Devourable (Currently: ON)</a>"
if(FALSE)
dat += "<a style='background:#990000;' href='?src=\ref[src];toggleddevour=1'>Toggle Devourable (Currently: OFF)</a>"
switch(user.feeding)
if(TRUE)
dat += "<br><a style='background:#173d15;' href='?src=\ref[src];toggledfeed=1'>Toggle Feeding (Currently: ON)</a>"
if(FALSE)
dat += "<br><a style='background:#990000;' href='?src=\ref[src];toggledfeed=1'>Toggle Feeding (Currently: OFF)</a>"
switch(user.digest_leave_remains)
if(TRUE)
dat += "<a href='?src=\ref[src];toggledlm=1'><span style='color:red;'>Toggle Leaving Remains</span></a>"
dat += "<a style='background:#173d15;' href='?src=\ref[src];toggledlm=1'>Toggle Leaving Remains (Currently: ON)</a>"
if(FALSE)
dat += "<a href='?src=\ref[src];toggledlm=1'>Toggle Leaving Remains</a>"
dat += "<a style='background:#990000;' href='?src=\ref[src];toggledlm=1'>Toggle Leaving Remains (Currently: OFF)</a>"
switch(user.allowmobvore)
if(TRUE)
dat += "<br><a href='?src=\ref[src];togglemv=1'>Toggle Mob Vore</a>"
dat += "<br><a style='background:#173d15;' href='?src=\ref[src];togglemv=1'>Toggle Mob Vore (Currently: ON)</a>"
if(FALSE)
dat += "<br><a href='?src=\ref[src];togglemv=1'><span style='color:green;'>Toggle Mob Vore</span></a>"
dat += "<br><a style='background:#990000;' href='?src=\ref[src];togglemv=1'>Toggle Mob Vore (Currently: OFF)</a>"
switch(user.permit_healbelly)
if(TRUE)
dat += "<a href='?src=\ref[src];togglehealbelly=1'>Toggle Healbelly Permission</a>"
dat += "<a style='background:#173d15;' href='?src=\ref[src];togglehealbelly=1'>Toggle Healbelly Permission (Currently: ON)</a>"
if(FALSE)
dat += "<a href='?src=\ref[src];togglehealbelly=1'><span style='color:red;'>Toggle Healbelly Permission</span></a>"
dat += "<a style='background:#990000;' href='?src=\ref[src];togglehealbelly=1'>Toggle Healbelly Permission (Currently: OFF)</a>"
dat += "<br><a href='?src=\ref[src];toggle_dropnom_prey=1'>Toggle Drop-nom Prey</a>" //These two get their own, custom row, too.
dat += "<a href='?src=\ref[src];toggle_dropnom_pred=1'>Toggle Drop-nom Pred</a>"
@@ -357,7 +364,7 @@
if(href_list["show_int"])
show_interacts = !show_interacts
return 1 //Force update
return TRUE //Force update
if(href_list["int_help"])
alert("These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \
@@ -365,13 +372,13 @@
These only function as long as interactions are turned on in general. Keep in mind, the 'belly mode' interactions (digest/absorb) \
will affect all prey in that belly, if one resists and triggers digestion/absorption. If multiple trigger at the same time, \
only the first in the order of 'Escape > Transfer > Absorb > Digest' will occur.","Interactions Help")
return 0 //Force update
return FALSE //Force update
if(href_list["outsidepick"])
var/atom/movable/tgt = locate(href_list["outsidepick"])
var/obj/belly/OB = locate(href_list["outsidebelly"])
if(!(tgt in OB)) //Aren't here anymore, need to update menu.
return 1
return TRUE
var/intent = "Examine"
if(istype(tgt,/mob/living))
@@ -384,7 +391,7 @@
if("Help Out") //Help the inside-mob out
if(user.stat || user.absorbed || M.absorbed)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 1
return TRUE
to_chat(user,"<font color='green'>You begin to push [M] to freedom!</font>")
to_chat(M,"[usr] begins to push you to freedom!")
@@ -403,11 +410,11 @@
if("Devour") //Eat the inside mob
if(user.absorbed || user.stat)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 1
return TRUE
if(!user.vore_selected)
to_chat(user,"<span class='warning'>Pick a belly on yourself first!</span>")
return 1
return TRUE
var/obj/belly/TB = user.vore_selected
to_chat(user,"<span class='warning'>You begin to [lowertext(TB.vore_verb)] [M] into your [lowertext(TB.name)]!</span>")
@@ -425,7 +432,7 @@
var/obj/item/T = tgt
if(!(tgt in OB))
//Doesn't exist anymore, update.
return 1
return TRUE
intent = alert("What do you want to do to that?","Query","Examine","Use Hand")
switch(intent)
if("Examine")
@@ -434,7 +441,7 @@
if("Use Hand")
if(user.stat)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 1
return TRUE
user.ClickOn(T)
sleep(5) //Seems to exit too fast for the panel to update
@@ -447,23 +454,23 @@
intent = alert("Eject all, Move all?","Query","Eject all","Cancel","Move all")
switch(intent)
if("Cancel")
return 0
return FALSE
if("Eject all")
if(user.stat)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 0
return FALSE
selected.release_all_contents()
if("Move all")
if(user.stat)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 0
return FALSE
var/obj/belly/choice = input("Move all where?","Select Belly") as null|anything in user.vore_organs
if(!choice)
return 0
return FALSE
for(var/atom/movable/tgt in selected)
to_chat(tgt,"<span class='warning'>You're squished from [user]'s [lowertext(selected)] to their [lowertext(choice.name)]!</span>")
@@ -471,7 +478,7 @@
var/atom/movable/tgt = locate(href_list["insidepick"])
if(!(tgt in selected)) //Old menu, needs updating because they aren't really there.
return 1 //Forces update
return TRUE //Forces update
intent = "Examine"
intent = alert("Examine, Eject, Move? Examine if you want to leave this box.","Query","Examine","Eject","Move")
switch(intent)
@@ -481,25 +488,25 @@
if("Eject")
if(user.stat)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 0
return FALSE
selected.release_specific_contents(tgt)
if("Move")
if(user.stat)
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
return 0
return FALSE
var/obj/belly/choice = input("Move [tgt] where?","Select Belly") as null|anything in user.vore_organs
if(!choice || !(tgt in selected))
return 0
return FALSE
to_chat(tgt,"<span class='warning'>You're squished from [user]'s [lowertext(selected.name)] to their [lowertext(choice.name)]!</span>")
selected.transfer_contents(tgt, choice)
if(href_list["newbelly"])
if(user.vore_organs.len >= BELLIES_MAX)
return 0
return FALSE
var/new_name = html_encode(input(usr,"New belly's name:","New Belly") as text|null)
@@ -516,7 +523,7 @@
if(failure_msg) //Something went wrong.
alert(user,failure_msg,"Error!")
return 0
return FALSE
var/obj/belly/NB = new(user)
NB.name = new_name
@@ -545,7 +552,7 @@
if(failure_msg) //Something went wrong.
alert(user,failure_msg,"Error!")
return 0
return FALSE
selected.name = new_name
@@ -562,13 +569,13 @@
var/new_mode = input("Choose Mode (currently [selected.digest_mode])") as null|anything in menu_list
if(!new_mode)
return 0
return FALSE
if(new_mode == DM_TRANSFORM) //Snowflek submenu
var/list/tf_list = selected.transform_modes
var/new_tf_mode = input("Choose TF Mode (currently [selected.tf_mode])") as null|anything in tf_list
if(!new_tf_mode)
return 0
return FALSE
selected.tf_mode = new_tf_mode
selected.digest_mode = new_mode
@@ -578,7 +585,7 @@
var/list/menu_list = selected.mode_flag_list.Copy()
var/toggle_addon = input("Toggle Addon") as null|anything in menu_list
if(!toggle_addon)
return 0
return FALSE
selected.mode_flags ^= selected.mode_flag_list[toggle_addon]
selected.items_preserved.Cut() //Re-evaltuate all items in belly on addon toggle
@@ -587,7 +594,7 @@
var/new_mode = input("Choose Mode (currently [selected.item_digest_mode])") as null|anything in menu_list
if(!new_mode)
return 0
return FALSE
selected.item_digest_mode = new_mode
selected.items_preserved.Cut() //Re-evaltuate all items in belly on belly-mode change
@@ -599,14 +606,14 @@
var/list/menu_list = contamination_flavors.Copy()
var/new_flavor = input("Choose Contamination Flavor Text Type (currently [selected.contamination_flavor])") as null|anything in menu_list
if(!new_flavor)
return 0
return FALSE
selected.contamination_flavor = new_flavor
if(href_list["b_contamination_color"])
var/list/menu_list = contamination_colors.Copy()
var/new_color = input("Choose Contamination Color (currently [selected.contamination_color])") as null|anything in menu_list
if(!new_color)
return 0
return FALSE
selected.contamination_color = new_color
selected.items_preserved.Cut() //To re-contaminate for new color
@@ -617,10 +624,10 @@
new_desc = readd_quotes(new_desc)
if(length(new_desc) > BELLIES_DESC_MAX)
alert("Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error")
return 0
return FALSE
selected.desc = new_desc
else //Returned null
return 0
return FALSE
if(href_list["b_msgs"])
var/list/messages = list(
@@ -675,7 +682,7 @@
if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN)
alert("Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error")
return 0
return FALSE
selected.vore_verb = new_verb
@@ -800,7 +807,7 @@
var/obj/belly/choice = input("Where do you want your [lowertext(selected.name)] to lead if prey resists?","Select Belly") as null|anything in (user.vore_organs + "None - Remove" - selected)
if(!choice) //They cancelled, no changes
return 0
return FALSE
else if(choice == "None - Remove")
selected.transferlocation = null
else
@@ -819,7 +826,7 @@
if(href_list["b_del"])
var/alert = alert("Are you sure you want to delete your [lowertext(selected.name)]?","Confirmation","Delete","Cancel")
if(!(alert == "Delete"))
return 0
return FALSE
var/failure_msg = ""
@@ -840,7 +847,7 @@
if(failure_msg)
alert(user,failure_msg,"Error!")
return 0
return FALSE
qdel(selected)
selected = user.vore_organs[1]
@@ -855,7 +862,7 @@
if(href_list["applyprefs"])
var/alert = alert("Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation","Reload","Cancel")
if(!alert == "Reload")
return 0
return FALSE
if(!user.apply_vore_prefs())
alert("ERROR: Virgo-specific preferences failed to apply!","Error")
else
@@ -864,19 +871,19 @@
if(href_list["setflavor"])
var/new_flavor = html_encode(input(usr,"What your character tastes like (40ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",user.vore_taste) as text|null)
if(!new_flavor)
return 0
return FALSE
new_flavor = readd_quotes(new_flavor)
if(length(new_flavor) > FLAVOR_MAX)
alert("Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!")
return 0
return FALSE
user.vore_taste = new_flavor
if(href_list["toggle_dropnom_pred"])
var/choice = alert(user, "You are currently [user.can_be_drop_pred ? " able to eat prey that fall from above or that you fall onto" : "not able to eat prey that fall from above or that you fall onto."]", "", "Be Pred", "Cancel", "Don't be Pred")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Be Pred")
user.can_be_drop_pred = TRUE
if("Don't be Pred")
@@ -886,7 +893,7 @@
var/choice = alert(user, "You are currently [user.can_be_drop_prey ? "able to be eaten." : "not able to be eaten."]", "", "Be Prey", "Cancel", "Don't Be Prey")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Be Prey")
user.can_be_drop_prey = TRUE
if("Don't Be Prey")
@@ -896,7 +903,7 @@
var/choice = alert(user, "This button is for those who don't like being digested. It can make you undigestable. Messages admins when changed, so don't try to use it for mechanical benefit. Set it once and save it. Digesting you is currently: [user.digestable ? "Allowed" : "Prevented"]", "", "Allow Digestion", "Cancel", "Prevent Digestion")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Allow Digestion")
user.digestable = TRUE
if("Prevent Digestion")
@@ -907,11 +914,37 @@
if(user.client.prefs_vr)
user.client.prefs_vr.digestable = user.digestable
if(href_list["toggleddevour"])
var/choice = alert(user, "This button is to toggle your ability to be devoured by others. Devouring is currently: [user.devourable ? "Allowed" : "Prevented"]", "", "Be Devourable", "Cancel", "Prevent being Devoured")
switch(choice)
if("Cancel")
return FALSE
if("Be Devourable")
user.devourable = TRUE
if("Prevent being Devoured")
user.devourable = FALSE
if(user.client.prefs_vr)
user.client.prefs_vr.devourable = user.devourable
if(href_list["toggledfeed"])
var/choice = alert(user, "This button is to toggle your ability to be fed to or by others vorishly. Force Feeding is currently: [user.feeding ? "Allowed" : "Prevented"]", "", "Allow Feeding", "Cancel", "Prevent Feeding")
switch(choice)
if("Cancel")
return FALSE
if("Allow Feeding")
user.feeding = TRUE
if("Prevent Feeding")
user.feeding = FALSE
if(user.client.prefs_vr)
user.client.prefs_vr.feeding = user.feeding
if(href_list["toggledlm"])
var/choice = alert(user, "This button allows preds to have your remains be left in their belly after you are digested. This will only happen if pred sets their belly to do so. Remains consist of skeletal parts. Currently you are [user.digest_leave_remains? "" : "not"] leaving remains.", "", "Allow Post-digestion Remains", "Cancel", "Disallow Post-digestion Remains")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Allow Post-digestion Remains")
user.digest_leave_remains = TRUE
if("Disallow Post-digestion Remains")
@@ -924,7 +957,7 @@
var/choice = alert(user, "This button is for those who don't like being eaten by mobs. Messages admins when changed, so don't try to use it for mechanical benefit. Set it once and save it. Mobs are currently: [user.allowmobvore ? "Allowed to eat" : "Prevented from eating"] you.", "", "Allow Mob Predation", "Cancel", "Prevent Mob Predation")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Allow Mob Predation")
user.allowmobvore = TRUE
if("Prevent Mob Predation")
@@ -939,7 +972,7 @@
var/choice = alert(user, "This button is for those who don't like healbelly used on them as a mechanic. It does not affect anything, but is displayed under mechanical prefs for ease of quick checks. You are currently: [user.allowmobvore ? "Okay" : "Not Okay"] with players using healbelly on you.", "", "Allow Healing Belly", "Cancel", "Disallow Healing Belly")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Allow Healing Belly")
user.permit_healbelly = TRUE
if("Disallow Healing Belly")
@@ -952,11 +985,11 @@
var/choice = alert(user, "Toggle audible hunger noises. Currently: [user.noisy ? "Enabled" : "Disabled"]", "", "Enable audible hunger", "Cancel", "Disable audible hunger")
switch(choice)
if("Cancel")
return 0
return FALSE
if("Enable audible hunger")
user.noisy = TRUE
if("Disable audible hunger")
user.noisy = FALSE
//Refresh when interacted with, returning 1 makes vore_look.Topic update
return 1
return TRUE