Vore mode button and feeding

This commit is contained in:
Poojawa
2019-03-25 04:19:00 -05:00
parent bdfc3273b8
commit b11e3bbc96
14 changed files with 94 additions and 14 deletions
+3
View File
@@ -12,6 +12,7 @@
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
#define ui_boxarea "EAST-4:6,SOUTH+1:6"
#define ui_boxlang "EAST-5:22,SOUTH+1:6"
#define ui_boxvore "EAST-4:22,SOUTH+1:6"
//Filters
#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, border=0, color="#04080F")
@@ -130,5 +131,7 @@
//component stuff
#define COMSIG_COMBAT_TOGGLED "combatmode_toggled" //called by combat mode toggle on all equipped items. args: (mob/user, combatmode)
#define COMSIG_VORE_TOGGLED "voremode_toggled" // totally not copypasta
//belly sound pref things
#define NORMIE_HEARCHECK 4
+1
View File
@@ -85,6 +85,7 @@
#define ui_crafting "EAST-5:20,SOUTH:5"//CIT CHANGE - moves this over one tile to accommodate for combat mode toggle
#define ui_building "EAST-5:20,SOUTH:21"//CIT CHANGE - ditto
#define ui_language_menu "EAST-5:4,SOUTH:21"//CIT CHANGE - ditto
#define ui_voremode "EAST-5:20,SOUTH:5"
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
+7
View File
@@ -109,6 +109,13 @@
using.screen_loc = ui_boxarea // CIT CHANGE
static_inventory += using
using = new /obj/screen/voretoggle() //We fancy Vore now
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_voremode
if(!widescreenlayout)
using.screen_loc = ui_boxvore
static_inventory += using
action_intent = new /obj/screen/act_intent/segmented
action_intent.icon_state = mymob.a_intent
static_inventory += action_intent
@@ -47,3 +47,21 @@
icon_state = "combat"
else
icon_state = "combat_off"
/obj/screen/voretoggle
name = "toggle vore mode"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "nom_off"
/obj/screen/voretoggle/Click()
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.toggle_vore_mode()
/obj/screen/voretoggle/proc/rebaseintomygut(mob/living/carbon/C)
if(!C)
return
if(C.voremode)
icon_state = "nom"
else
icon_state = "nom_off"
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB