Vore mode button and feeding
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
var/lastdirchange
|
||||
var/combatmessagecooldown
|
||||
|
||||
//oh no vore time
|
||||
var/voremode = FALSE
|
||||
|
||||
/mob/living/carbon/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
@@ -19,6 +22,8 @@
|
||||
if(recoveringstam)
|
||||
return TRUE
|
||||
combatmode = !combatmode
|
||||
if(voremode)
|
||||
toggle_vore_mode()
|
||||
if(combatmode)
|
||||
playsound_local(src, 'modular_citadel/sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
|
||||
else
|
||||
@@ -34,6 +39,18 @@
|
||||
SEND_SIGNAL(src, COMSIG_COMBAT_TOGGLED, src, combatmode)
|
||||
return TRUE
|
||||
|
||||
mob/living/carbon/proc/toggle_vore_mode()
|
||||
if(combatmode)
|
||||
return FALSE //let's not override the main draw of the game these days
|
||||
voremode = !voremode
|
||||
if(client)
|
||||
client.show_popup_menus = !voremode // it's the RIGHT way to nom. gettit
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/voretoggle/selector in hud_used.static_inventory)
|
||||
selector.rebaseintomygut(src)
|
||||
SEND_SIGNAL(src, COMSIG_VORE_TOGGLED, src, voremode)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/Move(atom/newloc, direct = 0)
|
||||
var/currentdirection = dir
|
||||
. = ..()
|
||||
|
||||
@@ -233,3 +233,5 @@
|
||||
|
||||
/mob/living/carbon/human/vore
|
||||
devourable = TRUE
|
||||
digestable = TRUE
|
||||
feeding = TRUE
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/obj/belly/vore_selected // Default to no vore capability.
|
||||
var/list/vore_organs = list() // List of vore containers inside a mob
|
||||
var/devourable = FALSE // Can the mob be vored at all?
|
||||
// var/feeding = FALSE // Are we going to feed someone else?
|
||||
var/feeding = FALSE // Are we going to feed someone else?
|
||||
var/vore_taste = null // What the character tastes like
|
||||
var/no_vore = FALSE // If the character/mob can vore.
|
||||
var/openpanel = 0 // Is the vore panel open?
|
||||
@@ -77,13 +77,15 @@
|
||||
|
||||
// Critical adjustments due to TG grab changes - Poojawa
|
||||
|
||||
/mob/living/proc/vore_attack(var/mob/living/user, var/mob/living/prey)
|
||||
if(!user || !prey)
|
||||
/mob/living/proc/vore_attack(var/mob/living/user, var/mob/living/prey, var/mob/living/pred)
|
||||
if(!user || !prey || !pred)
|
||||
return
|
||||
|
||||
if(prey == src && user.zone_selected == "mouth") //you click your target
|
||||
// if(!feeding(src))
|
||||
// return
|
||||
if(prey == src) //you click your target
|
||||
if(!src.feeding)
|
||||
to_chat(user, "<span class='notice'>They aren't able to be fed.</span>")
|
||||
to_chat(src, "<span class='notice'>[user] tried to feed you themselves, but you aren't voracious enough to be fed.</span>")
|
||||
return
|
||||
if(!is_vore_predator(prey))
|
||||
to_chat(user, "<span class='notice'>They aren't voracious enough.</span>")
|
||||
return
|
||||
@@ -96,8 +98,14 @@
|
||||
user.feed_grabbed_to_self(src, prey)
|
||||
|
||||
else // click someone other than you/prey
|
||||
// if(!feeding(src))
|
||||
// return
|
||||
if(!src.feeding)
|
||||
to_chat(user, "<span class='notice'>They aren't voracious enough to be fed.</span>")
|
||||
to_chat(src, "<span class='notice'>[user] tried to feed you [prey], but you aren't voracious enough to be fed.</span>")
|
||||
return
|
||||
if(!prey.feeding)
|
||||
to_chat(user, "<span class='notice'>They aren't able to be fed to someone.</span>")
|
||||
to_chat(prey, "<span class='notice'>[user] tried to feed you to [src], but you aren't able to be fed to them.</span>")
|
||||
return
|
||||
if(!is_vore_predator(src))
|
||||
to_chat(user, "<span class='notice'>They aren't voracious enough.</span>")
|
||||
return
|
||||
@@ -122,7 +130,7 @@
|
||||
return perform_the_nom(user, user, pred, belly)
|
||||
|
||||
/mob/living/proc/feed_grabbed_to_other(var/mob/living/user, var/mob/living/prey, var/mob/living/pred)
|
||||
return//disabled until I can make that toggle work
|
||||
// return//disabled until I can make that toggle work
|
||||
var/belly = input("Choose Belly") in pred.vore_organs
|
||||
return perform_the_nom(user, prey, pred, belly)
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ GLOBAL_LIST_EMPTY(vore_preferences_datums)
|
||||
//Actual preferences
|
||||
var/digestable = FALSE
|
||||
var/devourable = FALSE
|
||||
var/feeding = FALSE
|
||||
// var/allowmobvore = TRUE
|
||||
var/list/belly_prefs = list()
|
||||
var/vore_taste = "nothing in particular"
|
||||
@@ -105,6 +106,7 @@ GLOBAL_LIST_EMPTY(vore_preferences_datums)
|
||||
|
||||
digestable = json_from_file["digestable"]
|
||||
devourable = json_from_file["devourable"]
|
||||
feeding = json_from_file["feeding"]
|
||||
vore_taste = json_from_file["vore_taste"]
|
||||
belly_prefs = json_from_file["belly_prefs"]
|
||||
|
||||
@@ -113,6 +115,8 @@ GLOBAL_LIST_EMPTY(vore_preferences_datums)
|
||||
digestable = FALSE
|
||||
if(isnull(devourable))
|
||||
devourable = FALSE
|
||||
if(isnull(feeding))
|
||||
feeding = FALSE
|
||||
if(isnull(belly_prefs))
|
||||
belly_prefs = list()
|
||||
|
||||
@@ -127,6 +131,7 @@ GLOBAL_LIST_EMPTY(vore_preferences_datums)
|
||||
"version" = version,
|
||||
"digestable" = digestable,
|
||||
"devourable" = devourable,
|
||||
"feeding" = feeding,
|
||||
"vore_taste" = vore_taste,
|
||||
"belly_prefs" = belly_prefs,
|
||||
)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(DM_DIGEST)
|
||||
spanstyle = "color:red;"
|
||||
if(DM_HEAL)
|
||||
spanstyle = "color:green;"
|
||||
spanstyle = "color:darkgreen;"
|
||||
if(DM_NOISY)
|
||||
spanstyle = "color:purple;"
|
||||
if(DM_ABSORB)
|
||||
@@ -238,15 +238,21 @@
|
||||
dat += "<HR>"
|
||||
switch(user.digestable)
|
||||
if(TRUE)
|
||||
dat += "<a href='?src=\ref[src];toggledg=1'>Toggle Digestable (Currently: ON)</a>"
|
||||
dat += "<a href='?src=\ref[src];toggledg=1'>Toggle Digestable <font color='darkgreen'>(Currently: ON)</font></a>"
|
||||
if(FALSE)
|
||||
dat += "<a href='?src=\ref[src];toggledg=1'>Toggle Digestable (Currently: OFF)</a>"
|
||||
dat += "<a href='?src=\ref[src];toggledg=1'>Toggle Digestable <font color='red'>(Currently: OFF)</font></a>"
|
||||
|
||||
switch(user.devourable)
|
||||
if(TRUE)
|
||||
dat += "<a href='?src=\ref[src];toggledvor=1'>Toggle Devourable (Currently: ON)</a>"
|
||||
dat += "<br><a href='?src=\ref[src];toggledvor=1'>Toggle Devourable <font color='darkgreen'>(Currently: ON)</font></a>"
|
||||
if(FALSE)
|
||||
dat += "<a href='?src=\ref[src];toggledvor=1'>Toggle Devourable (Currently: OFF)</a>"
|
||||
dat += "<br><a href='?src=\ref[src];toggledvor=1'>Toggle Devourable <font color='red'>(Currently: OFF)</font></a>"
|
||||
|
||||
switch(user.feeding)
|
||||
if(TRUE)
|
||||
dat += "<br><a href='?src=\ref[src];toggledfeed=1'>Toggle Feeding <font color='darkgreen'>(Currently: ON)</font></a>"
|
||||
if(FALSE)
|
||||
dat += "<br><a href='?src=\ref[src];toggledfeed=1'>Toggle Feeding <font color='red'>(Currently: OFF)</font></a>"
|
||||
|
||||
//Returns the dat html to the vore_look
|
||||
return dat
|
||||
@@ -708,5 +714,18 @@
|
||||
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 others. Feeding predators is currently: [user.feeding ? "Allowed" : "Prevented"]", "", "Allow Feeding", "Cancel", "Prevent Feeding")
|
||||
switch(choice)
|
||||
if("Cancel")
|
||||
return
|
||||
if("Allow Feeding")
|
||||
user.feeding = TRUE
|
||||
if("Prevent Feeding")
|
||||
user.feeding = FALSE
|
||||
|
||||
if(user.client.prefs_vr)
|
||||
user.client.prefs_vr.feeding = user.feeding
|
||||
|
||||
//Refresh when interacted with, returning 1 makes vore_look.Topic update
|
||||
return 1
|
||||
Reference in New Issue
Block a user