Add optional selectable fullscreen belly overlays with pred & prey prefs

This commit is contained in:
ShadowLarkens
2020-08-17 01:32:19 -07:00
parent 3d2010e005
commit c2c35e0ea5
11 changed files with 153 additions and 14 deletions
+32 -1
View File
@@ -117,6 +117,10 @@
//List has indexes that are the digestion mode strings, and keys that are lists of strings.
var/tmp/list/emote_lists = list()
// Lets you do a fullscreen overlay. Set to an icon_state string.
var/belly_fullscreen = ""
var/disable_hud = FALSE
//For serialization, keep this updated, required for bellies to save correctly.
/obj/belly/vars_to_save()
return ..() + list(
@@ -155,7 +159,9 @@
"release_sound",
"fancy_vore",
"is_wet",
"wet_loop"
"wet_loop",
"belly_fullscreen",
"disable_hud"
)
/obj/belly/Initialize()
@@ -199,6 +205,7 @@
var/taste
if(can_taste && (taste = M.get_taste_message(FALSE)))
to_chat(owner, "<span class='notice'>[M] tastes of [taste].</span>")
vore_fx(M)
//Stop AI processing in bellies
if(M.ai_holder)
M.ai_holder.go_sleep()
@@ -208,9 +215,31 @@
. = ..()
if(isliving(thing) && !isbelly(thing.loc))
var/mob/living/L = thing
L.clear_fullscreen("belly")
if(!L.hud_used.hud_shown)
L.toggle_hud_vis()
if((L.stat != DEAD) && L.ai_holder)
L.ai_holder.go_wake()
/obj/belly/proc/vore_fx(mob/living/L)
if(!istype(L))
return
if(!L.show_vore_fx)
L.clear_fullscreen("belly")
return
if(belly_fullscreen)
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly)
F.icon_state = belly_fullscreen
// F.color = belly_fullscreen_color
else
L.clear_fullscreen("belly")
if(disable_hud)
if(L.hud_used.hud_shown)
to_chat(L, "<span class='notice'>((Your pred has disabled huds in their belly. Turn off vore FX and hit F12 to get it back; or relax, and enjoy the serenity.))</span>")
L.toggle_hud_vis(TRUE)
// Release all contents of this belly into the owning mob's location.
// If that location is another mob, contents are transferred into whichever of its bellies the owning mob is in.
// Returns the number of mobs so released.
@@ -684,6 +713,8 @@
dupe.fancy_vore = fancy_vore
dupe.is_wet = is_wet
dupe.wet_loop = wet_loop
dupe.belly_fullscreen = belly_fullscreen
dupe.disable_hud = disable_hud
//// Object-holding variables
//struggle_messages_outside - strings
@@ -121,6 +121,9 @@
if(L.absorbed)
L.Weaken(5)
// Fullscreen overlays
vore_fx(L)
//Handle 'human'
if(ishuman(L))
var/mob/living/carbon/human/H = L
+8
View File
@@ -32,6 +32,7 @@
var/adminbus_trash = FALSE // For abusing trash eater for event shenanigans.
var/adminbus_eat_minerals = FALSE // This creature subsists on a diet of pure adminium.
var/vis_height = 32 // Sprite height used for resize features.
var/show_vore_fx = TRUE // Show belly fullscreens
//
// Hook for generic creation of stuff on new creatures
@@ -235,6 +236,7 @@
P.vore_taste = src.vore_taste
P.vore_smell = src.vore_smell
P.permit_healbelly = src.permit_healbelly
P.show_vore_fx = src.show_vore_fx
P.can_be_drop_prey = src.can_be_drop_prey
P.can_be_drop_pred = src.can_be_drop_pred
@@ -266,6 +268,7 @@
vore_taste = P.vore_taste
vore_smell = P.vore_smell
permit_healbelly = P.permit_healbelly
show_vore_fx = P.show_vore_fx
can_be_drop_prey = P.can_be_drop_prey
can_be_drop_pred = P.can_be_drop_pred
@@ -851,3 +854,8 @@
user << browse("<html><head><title>Vore prefs: [src]</title></head><body><center>[dispvoreprefs]</center></body></html>", "window=[name]mvp;size=200x300;can_resize=0;can_minimize=0")
onclose(user, "[name]")
return
// Full screen belly overlays!
/obj/screen/fullscreen/belly
icon = 'icons/mob/screen_full_vore.dmi'
icon_state = ""
+5
View File
@@ -53,6 +53,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
var/vore_taste = "nothing in particular"
var/vore_smell = "nothing in particular"
var/permit_healbelly = TRUE
var/show_vore_fx = TRUE
var/can_be_drop_prey = FALSE
var/can_be_drop_pred = FALSE
@@ -126,6 +127,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
vore_taste = json_from_file["vore_taste"]
vore_smell = json_from_file["vore_smell"]
permit_healbelly = json_from_file["permit_healbelly"]
show_vore_fx = json_from_file["show_vore_fx"]
can_be_drop_prey = json_from_file["can_be_drop_prey"]
can_be_drop_pred = json_from_file["can_be_drop_pred"]
belly_prefs = json_from_file["belly_prefs"]
@@ -145,6 +147,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
allowmobvore = TRUE
if(isnull(permit_healbelly))
permit_healbelly = TRUE
if(isnull(show_vore_fx))
show_vore_fx = TRUE
if(isnull(can_be_drop_prey))
can_be_drop_prey = FALSE
if(isnull(can_be_drop_pred))
@@ -170,6 +174,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
"vore_taste" = vore_taste,
"vore_smell" = vore_smell,
"permit_healbelly" = permit_healbelly,
"show_vore_fx" = show_vore_fx,
"can_be_drop_prey" = can_be_drop_prey,
"can_be_drop_pred" = can_be_drop_pred,
"belly_prefs" = belly_prefs,
+25
View File
@@ -40,6 +40,10 @@
host = null
. = ..()
/datum/vore_look/ui_assets(mob/user)
. = ..()
. += get_asset_datum(/datum/asset/spritesheet/vore)
/datum/vore_look/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
@@ -148,6 +152,8 @@
"digest_burn" = selected.digest_burn,
"bulge_size" = selected.bulge_size,
"shrink_grow_size" = selected.shrink_grow_size,
"belly_fullscreen" = selected.belly_fullscreen,
"possible_fullscreens" = icon_states('icons/mob/screen_full_vore.dmi'),
)
data["selected"]["addons"] = list()
@@ -172,6 +178,8 @@
data["selected"]["interacts"]["absorbchance"] = selected.absorbchance
data["selected"]["interacts"]["digestchance"] = selected.digestchance
data["selected"]["disable_hud"] = selected.disable_hud
data["selected"]["contents"] = list()
for(var/O in selected)
var/list/info = list(
@@ -197,6 +205,7 @@
"digest_leave_remains" = host.digest_leave_remains,
"allowmobvore" = host.allowmobvore,
"permit_healbelly" = host.permit_healbelly,
"show_vore_fx" = host.show_vore_fx,
"can_be_drop_prey" = host.can_be_drop_prey,
"can_be_drop_pred" = host.can_be_drop_pred,
"noisy" = host.noisy,
@@ -354,6 +363,16 @@
host.client.prefs_vr.permit_healbelly = host.permit_healbelly
unsaved_changes = TRUE
return TRUE
if("toggle_fx")
host.show_vore_fx = !host.show_vore_fx
if(host.client.prefs_vr)
host.client.prefs_vr.show_vore_fx = host.show_vore_fx
if(!host.show_vore_fx)
host.clear_fullscreen("belly")
if(!host.hud_used.hud_shown)
host.toggle_hud_vis()
unsaved_changes = TRUE
return TRUE
if("toggle_noisy")
host.noisy = !host.noisy
unsaved_changes = TRUE
@@ -786,6 +805,12 @@
if(!isnull(digest_chance_input))
host.vore_selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(host.vore_selected.digestchance))
. = TRUE
if("b_fullscreen")
host.vore_selected.belly_fullscreen = params["val"]
. = TRUE
if("b_disable_hud")
host.vore_selected.disable_hud = !host.vore_selected.disable_hud
. = TRUE
if("b_del")
var/alert = alert("Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation","Delete","Cancel")
if(!(alert == "Delete"))