Merge pull request #833 from Razgriz1032/Razgriz1032-predator-crate

More animals in predator crates
This commit is contained in:
Razgriz
2019-10-07 04:18:44 -07:00
committed by GitHub
5 changed files with 65 additions and 45 deletions
+8 -21
View File
@@ -1,37 +1,38 @@
/mob
var/datum/gas_mixture/air_contents = new
var/obj/machinery/atmospherics/portables_connector/connected_port
var/obj/item/weapon/tank/holding
var/volume = 1000
var/destroyed = 0
var/start_pressure = ONE_ATMOSPHERE
var/maximum_pressure = 90 * ONE_ATMOSPHERE
var/inflatable = 1
/mob/living
inflatable= 0
/mob/New()
..()
air_contents.volume = volume
air_contents.temperature = T20C
return 1
/mob/Destroy()
qdel_null(air_contents)
qdel_null(holding)
. = ..()
/mob/Life()
if(!connected_port) //only react when pipe_network will ont it do it for you
//Allow for reactions
air_contents.react()
. = ..()
/mob/proc/StandardAirMix()
return list(
"oxygen" = O2STANDARD * MolesForPressure(),
"nitrogen" = N2STANDARD * MolesForPressure())
/mob/proc/MolesForPressure(var/target_pressure = start_pressure)
return (target_pressure * air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
@@ -48,7 +49,7 @@
connected_port = new_port
connected_port.connected_device = src
connected_port.on = 1 //Activate port updates
buckled = 1
anchored = 1 //Prevent movement
//Actually enforce the air sharing
@@ -56,28 +57,22 @@
if(network && !network.gases.Find(air_contents))
network.gases += air_contents
network.update = 1
return 1
/mob/proc/disconnect()
if(!connected_port)
return 0
var/datum/pipe_network/network = connected_port.return_network(src)
if(network)
network.gases -= air_contents
anchored = 0
connected_port.connected_device = null
connected_port = null
return 1
/mob/proc/update_connected_network()
if(!connected_port)
return
var/datum/pipe_network/network = connected_port.return_network(src)
if (network)
network.update = 1
@@ -112,12 +107,4 @@
return 0
/mob/proc/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.air_contents, user)
/datum/trait/inflatable
name = "Inflatable"
desc = "You were born with an unusual ability to store air like a portable canister"
cost = 0
/datum/trait/inflatable/apply(var/datum/species/S,var/mob/living/carbon/human/H)
H.inflatable = 1
..(S,H)
return atmosanalyzer_scan(src, src.air_contents, user)
+9 -22
View File
@@ -89,7 +89,7 @@
var/obj/item/weapon/grab/G = I
//Has to be aggressive grab, has to be living click-er and non-silicon grabbed
if((G.state >= GRAB_AGGRESSIVE) && (isliving(user) && (!issilicon(G.affecting) || ispAI(G.affecting))))//Chompstation edit, lets pAI be eaten
if((G.state >= GRAB_AGGRESSIVE) && (isliving(user) && !issilicon(G.affecting)))
var/mob/living/attacker = user // Typecast to living
@@ -204,7 +204,9 @@
P.vore_taste = src.vore_taste
P.can_be_drop_prey = src.can_be_drop_prey
P.can_be_drop_pred = src.can_be_drop_pred
//ChompStation edit, added in inflation option
P.inflatable = src.inflatable
var/list/serialized = list()
for(var/belly in src.vore_organs)
var/obj/belly/B = belly
@@ -231,6 +233,7 @@
vore_taste = P.vore_taste
can_be_drop_prey = P.can_be_drop_prey
can_be_drop_pred = P.can_be_drop_pred
P.inflatable = src.inflatable
release_vore_contents(silent = TRUE)
vore_organs.Cut()
@@ -384,16 +387,8 @@
belly = pred.vore_selected
return perform_the_nom(user, prey, pred, belly)
/mob/living/proc/feed_self_to_grabbed(var/mob/living/user, var/mob/living/pred, var/belly, var/list/bellys)
//CHOMPEDIT: AUTO BELLY SELECTOR
if (!user.client)
for(var/obj/belly/guttoviolate in pred.vore_organs)
if(guttoviolate.name == "fstomach")
bellys |= guttoviolate
if(!bellys)return
belly = pick(bellys)
//CHOMPEDIT: END
else belly = input("Choose Belly") in pred.vore_organs
/mob/living/proc/feed_self_to_grabbed(var/mob/living/user, var/mob/living/pred)
var/belly = input("Choose Belly") in pred.vore_organs
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)
@@ -569,7 +564,7 @@
to_chat(src, "<span class='notice'>You are not holding anything.</span>")
return
if(is_type_in_list(I,edible_trash) || is_type_in_list(I,edible_tech) && isSynthetic())
if(is_type_in_list(I,edible_trash))
drop_item()
I.forceMove(vore_selected)
updateVRPanel()
@@ -617,17 +612,8 @@
to_chat(src, "<span class='notice'>You can taste the flavor of gluttonous waste of food.</span>")
else if(istype(I,/obj/item/weapon/storage/glass_ornament))
to_chat(src, "<span class='notice'>You can taste the flavor of smooth glass.</span>")
//TFF 10/7/19 - Add custom flavour for collars for trash can trait.
else if (istype(I,/obj/item/clothing/accessory/collar))
visible_message("<span class='warning'>[src] demonstrates their voracious capabilities by swallowing [I] whole!</span>")
to_chat(src, "<span class='notice'>You can taste the submissiveness in the wearer of [I]!</span>")
else if(istype(I,/obj/item/integrated_circuit) ||istype(I,/obj/item/weapon/circuitboard))
to_chat(src, "<span class='notice'>mmm crunchy computer chips.</span>")
else if(istype(I,/obj/item/weapon/cell))
to_chat(src, "<span class='notice'>you can taste the energy filling your stomach.</span>")
else
to_chat(src, "<span class='notice'>You can taste the flavor of garbage. Delicious.</span>")
return
to_chat(src, "<span class='notice'>This item is not appropriate for ethical consumption.</span>")
return
@@ -658,6 +644,7 @@
dispvoreprefs += "<b>Mob Vore:</b> [allowmobvore ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Drop-nom prey:</b> [can_be_drop_prey ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Drop-nom pred:</b> [can_be_drop_pred ? "Enabled" : "Disabled"]<br>"
dispvoreprefs += "<b>Inflatable:</b> [inflatable ? "Enabled" : "Disabled"]<br>"
user << browse("<html><head><title>Vore prefs: [src]</title></head><body><center>[dispvoreprefs]</center></body></html>", "window=[name];size=200x300;can_resize=0;can_minimize=0")
onclose(user, "[name]")
return
+6 -1
View File
@@ -49,6 +49,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
var/vore_taste = "nothing in particular"
var/can_be_drop_prey = FALSE
var/can_be_drop_pred = FALSE
var/inflatable = FALSE
//Mechanically required
var/path
@@ -117,6 +118,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
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"]
inflatable = json_from_file["inflatable"]
//Quick sanitize
if(isnull(digestable))
@@ -132,7 +134,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
allowmobvore = FALSE
if(isnull(belly_prefs))
belly_prefs = list()
if(isnull(inflatable))
inflatable = FALSE
return 1
/datum/vore_preferences/proc/save_vore()
@@ -149,6 +152,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
"can_be_drop_prey" = can_be_drop_prey,
"can_be_drop_pred" = can_be_drop_pred,
"belly_prefs" = belly_prefs,
//ChompStation edit: added in inflation option
"inflatable" = inflatable,
)
//List to JSON
+23
View File
@@ -302,6 +302,13 @@
dat += "<a href='?src=\ref[src];toggle_dropnom_pred=1'>Toggle Drop-nom Pred</a>"
dat += "<br><a href='?src=\ref[src];setflavor=1'>Set Your Taste</a>"
dat += "<a href='?src=\ref[src];togglenoisy=1'>Toggle Hunger Noises</a>"
//ChompStation edit: adds inflatable as an option
switch(user.inflatable)
if(1)
dat += "<a href='?src=\ref[src];toggleinf=1'><span style='color:red;'>Toggle inflation</span></a>"
if(0)
dat += "<a href='?src=\ref[src];toggleinf=1'>Toggle inflation</a>"
dat += "<HR>"
@@ -852,6 +859,22 @@
user.noisy = TRUE
if("Disable audible hunger")
user.noisy = FALSE
if(href_list["toggleinf"])
var/choice = alert(user, "This button allows you to be inflated like a balloon. Setting this will notify admins. Currently you are [user.inflatable? "" : "not"] inflatable.", "", "Allow inflation", "Cancel", "Disallow inflation")
switch(choice)
if("Cancel")
return 0
if("Allow inflation")
user.inflatable = TRUE
if("Disallow inflation")
user.inflatable = FALSE
message_admins("[key_name(user)] toggled their inflatability to [user.inflatable] ([user ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[user.loc.];Y=[user.loc.y];Z=[user.loc.z]'>JMP</a>" : "null"])")
if(user.client.prefs_vr)
user.client.prefs_vr.inflatable = user.inflatable
//Refresh when interacted with, returning 1 makes vore_look.Topic update
return 1