Replaced all the extraneous flags with bitflags
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
picker_holder.popup = new(src, "insidePanel","Vore Panel", 450, 700, picker_holder)
|
||||
picker_holder.popup.set_content(dat)
|
||||
picker_holder.popup.open()
|
||||
src.openpanel = TRUE
|
||||
vore_flags |= OPEN_PANEL
|
||||
|
||||
/mob/living/proc/updateVRPanel() //Panel popup update call from belly events.
|
||||
if(src.openpanel == TRUE)
|
||||
if(vore_flags & OPEN_PANEL)
|
||||
var/datum/vore_look/picker_holder = new()
|
||||
picker_holder.loop = picker_holder
|
||||
picker_holder.selected = vore_selected
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
//Don't display this part if we couldn't find the belly since could be held in hand.
|
||||
if(inside_belly)
|
||||
dat += "<font color = 'green'>You are currently [user.absorbed ? "absorbed into " : "inside "]</font> <font color = 'yellow'>[eater]'s</font> <font color = 'red'>[inside_belly]</font>!<br><br>"
|
||||
dat += "<font color = 'green'>You are currently [(user.vore_flags & ABSORBED) ? "absorbed into " : "inside "]</font> <font color = 'yellow'>[eater]'s</font> <font color = 'red'>[inside_belly]</font>!<br><br>"
|
||||
|
||||
if(inside_belly.desc)
|
||||
dat += "[inside_belly.desc]<br><br>"
|
||||
@@ -80,8 +80,8 @@
|
||||
continue
|
||||
|
||||
//That's an absorbed person you're checking
|
||||
if(M.absorbed)
|
||||
if(user.absorbed)
|
||||
if(M.vore_flags & ABSORBED)
|
||||
if(user.vore_flags & ABSORBED)
|
||||
dat += "<a href='?src=\ref[src];outsidepick=\ref[O];outsidebelly=\ref[inside_belly]'><span style='color:purple;'>[O]</span></a>"
|
||||
continue
|
||||
else
|
||||
@@ -139,7 +139,7 @@
|
||||
var/mob/living/M = O
|
||||
|
||||
//Absorbed gets special color OOoOOOOoooo
|
||||
if(M.absorbed)
|
||||
if(M.vore_flags & ABSORBED)
|
||||
dat += "<a href='?src=\ref[src];insidepick=\ref[O]'><span style='color:purple;'>[O]</span></a>"
|
||||
continue
|
||||
|
||||
@@ -243,11 +243,11 @@
|
||||
dat += "<HR>"
|
||||
var/pref_on = "#173d15"
|
||||
var/pref_off = "#990000"
|
||||
dat += "<br><a style='background:[user.digestable ? pref_on : pref_off];' href='?src=\ref[src];toggledg=1'>Toggle Digestable (Currently: [user.digestable ? "ON" : "OFF"])</a>"
|
||||
dat += "<br><a style='background:[user.devourable ? pref_on : pref_off];' href='?src=\ref[src];toggledvor=1'>Toggle Devourable (Currently: [user.devourable ? "ON" : "OFF"])</a>"
|
||||
dat += "<br><a style='background:[user.feeding ? pref_on : pref_off];' href='?src=\ref[src];toggledfeed=1'>Toggle Feeding (Currently: [user.feeding ? "ON" : "OFF"])</a>"
|
||||
dat += "<br><a style='background:[(user.vore_flags & DIGESTABLE) ? pref_on : pref_off];' href='?src=\ref[src];toggledg=1'>Toggle Digestable (Currently: [(user.vore_flags & DIGESTABLE) ? "ON" : "OFF"])</a>"
|
||||
dat += "<br><a style='background:[(user.vore_flags & DEVOURABLE) ? pref_on : pref_off];' href='?src=\ref[src];toggledvor=1'>Toggle Devourable (Currently: [(user.vore_flags & DEVOURABLE) ? "ON" : "OFF"])</a>"
|
||||
dat += "<br><a style='background:[(user.vore_flags & FEEDING) ? pref_on : pref_off];' href='?src=\ref[src];toggledfeed=1'>Toggle Feeding (Currently: [(user.vore_flags & FEEDING) ? "ON" : "OFF"])</a>"
|
||||
if(user.client.prefs)
|
||||
dat += "<br><a style='background:[user.client.prefs.lickable ? pref_on : pref_off];' href='?src=\ref[src];toggledlickable=1'>Toggle Licking (Currently: [user.client.prefs.lickable ? "ON" : "OFF"])</a>"
|
||||
dat += "<br><a style='background:[(user.client.prefs.vore_flags & LICKABLE) ? pref_on : pref_off];' href='?src=\ref[src];toggledlickable=1'>Toggle Licking (Currently: [(user.client.prefs.vore_flags & LICKABLE) ? "ON" : "OFF"])</a>"
|
||||
//Returns the dat html to the vore_look
|
||||
return dat
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
if(href_list["close"])
|
||||
qdel(src) // Cleanup
|
||||
user.openpanel = FALSE
|
||||
user.vore_flags &= ~OPEN_PANEL
|
||||
return
|
||||
|
||||
if(href_list["show_int"])
|
||||
@@ -287,7 +287,7 @@
|
||||
M.examine(user)
|
||||
|
||||
if("Help Out") //Help the inside-mob out
|
||||
if(user.stat || user.absorbed || M.absorbed)
|
||||
if(user.stat || user.vore_flags & ABSORBED || M.vore_flags & ABSORBED)
|
||||
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
to_chat(OB.owner,"<font color='green'>Your body efficiently shoves [M] back where they belong.</font>")
|
||||
|
||||
if("Devour") //Eat the inside mob
|
||||
if(user.absorbed || user.stat)
|
||||
if(user.vore_flags & ABSORBED || user.stat)
|
||||
to_chat(user,"<span class='warning'>You can't do that in your state!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -687,58 +687,58 @@
|
||||
user.vore_taste = new_flavor
|
||||
|
||||
if(href_list["toggledg"])
|
||||
var/choice = alert(user, "This button is for those who don't like being digested. It can make you undigestable to all mobs. Digesting you is currently: [user.digestable ? "Allowed" : "Prevented"]", "", "Allow Digestion", "Cancel", "Prevent Digestion")
|
||||
var/choice = alert(user, "This button is for those who don't like being digested. It can make you undigestable to all mobs. Digesting you is currently: [(user.vore_flags & DIGESTABLE) ? "Allowed" : "Prevented"]", "", "Allow Digestion", "Cancel", "Prevent Digestion")
|
||||
if(!user || !user.client)
|
||||
return
|
||||
switch(choice)
|
||||
if("Cancel")
|
||||
return FALSE
|
||||
if("Allow Digestion")
|
||||
user.digestable = TRUE
|
||||
user.vore_flags |= DIGESTABLE
|
||||
user.client.prefs.vore_flags |= DIGESTABLE
|
||||
if("Prevent Digestion")
|
||||
user.digestable = FALSE
|
||||
|
||||
user.client.prefs.digestable = user.digestable
|
||||
user.vore_flags &= ~DIGESTABLE
|
||||
user.client.prefs.vore_flags &= ~DIGESTABLE
|
||||
|
||||
if(href_list["toggledvor"])
|
||||
var/choice = alert(user, "This button is for those who don't like vore at all. Devouring you is currently: [user.devourable ? "Allowed" : "Prevented"]", "", "Allow Devourment", "Cancel", "Prevent Devourment")
|
||||
var/choice = alert(user, "This button is for those who don't like vore at all. Devouring you is currently: [(user.vore_flags & DEVOURABLE) ? "Allowed" : "Prevented"]", "", "Allow Devourment", "Cancel", "Prevent Devourment")
|
||||
if(!user || !user.client)
|
||||
return
|
||||
switch(choice)
|
||||
if("Cancel")
|
||||
return FALSE
|
||||
if("Allow Devourment")
|
||||
user.devourable = TRUE
|
||||
user.vore_flags |= DEVOURABLE
|
||||
user.client.prefs.vore_flags |= DEVOURABLE
|
||||
if("Prevent Devourment")
|
||||
user.devourable = FALSE
|
||||
|
||||
user.client.prefs.devourable = user.devourable
|
||||
user.vore_flags &= ~DEVOURABLE
|
||||
user.client.prefs.vore_flags &= ~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")
|
||||
var/choice = alert(user, "This button is to toggle your ability to be fed to others. Feeding predators is currently: [(user.vore_flags & FEEDING) ? "Allowed" : "Prevented"]", "", "Allow Feeding", "Cancel", "Prevent Feeding")
|
||||
if(!user || !user.client)
|
||||
return
|
||||
switch(choice)
|
||||
if("Cancel")
|
||||
return FALSE
|
||||
if("Allow Feeding")
|
||||
user.feeding = TRUE
|
||||
user.vore_flags |= FEEDING
|
||||
user.client.prefs.vore_flags |= FEEDING
|
||||
if("Prevent Feeding")
|
||||
user.feeding = FALSE
|
||||
|
||||
user.client.prefs.feeding = user.feeding
|
||||
user.vore_flags &= ~FEEDING
|
||||
user.client.prefs.vore_flags &= ~FEEDING
|
||||
|
||||
if(href_list["toggledlickable"])
|
||||
var/choice = alert(user, "This button is to toggle your ability to be licked. Being licked is currently: [user.client.prefs.lickable ? "Allowed" : "Prevented"]", "", "Allow Licking", "Cancel", "Prevent Licking")
|
||||
var/choice = alert(user, "This button is to toggle your ability to be licked. Being licked is currently: [(user.client.prefs.vore_flags & LICKABLE) ? "Allowed" : "Prevented"]", "", "Allow Licking", "Cancel", "Prevent Licking")
|
||||
if(!user || !user.client)
|
||||
return
|
||||
switch(choice)
|
||||
if("Cancel")
|
||||
return FALSE
|
||||
if("Allow Licking")
|
||||
user.client.prefs.lickable = TRUE
|
||||
user.client.prefs.vore_flags |= LICKABLE
|
||||
if("Prevent Licking")
|
||||
user.client.prefs.lickable = FALSE
|
||||
user.client.prefs.vore_flags &= ~LICKABLE
|
||||
|
||||
//Refresh when interacted with, returning 1 makes vore_look.Topic update
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user