Adding sanity

Adds a short timer after being expelled from a belly, during this time frame you cannot be slip nom'd.
This commit is contained in:
FartMaster69420
2022-03-25 22:50:11 -04:00
parent f79768c837
commit 76b3645370
4 changed files with 19 additions and 21 deletions

View File

@@ -138,8 +138,8 @@
if(M.slip("the [floor_type] floor", slip_stun))
for(var/i = 1 to slip_dist)
if(M.slip_vore_in_progress) //Vore edit that's secretely a CHOMPEdit
break
if(isbelly(M.loc)) //VOREEdit, Stop the slip if we're in a belly. Inspired by a chompedit, cleaned it up with isbelly instead of a variable since the var was resetting too fast.
return
step(M, M.dir)
sleep(1)
else

View File

@@ -366,9 +366,11 @@
H.held_mob.muffled = FALSE
H.held_mob.forced_psay = FALSE
if(isliving(M))
var/mob/living/slip = M
slip.slip_protect = world.time + 25 // This is to prevent slipping back into your pred if they stand on soap or something.
//Place them into our drop_location
M.forceMove(drop_location())
items_preserved -= M
//Special treatment for absorbed prey
@@ -774,7 +776,7 @@
/////////////////////////////////////////////////////////////////////////
/obj/belly/proc/handle_absorb_langs()
owner.absorb_langs()
////////////////////////////////////////////////////////////////////////

View File

@@ -3,10 +3,13 @@
/mob/living
var/is_slipping = FALSE
var/slip_vore_in_progress = FALSE
var/slip_protect = 1
/mob/living/proc/can_slip_vore(var/mob/living/target)
if(!target.is_slipping) //Obviously they have to be slipping to get slip vored
return FALSE
if(world.time <= target.slip_protect)
return FALSE
if(!(src.can_be_drop_pred && target.devourable && target.can_be_drop_prey)) //Make sure both of their prefs align with what we're gonna do.
return FALSE
if(!is_vore_predator(src)) //Check their bellies and stuff
@@ -18,6 +21,8 @@
/mob/living/proc/can_be_slip_vored_by(var/mob/living/target)
if(!target.is_slipping) //Obviously they have to be slipping to get slip vored
return FALSE
if(world.time <= target.slip_protect)
return FALSE
if(!(target.can_be_drop_pred && src.devourable && src.can_be_drop_prey)) //Make sure both of their prefs align with what we're gonna do.
return FALSE
if(!is_vore_predator(target)) //Check their bellies and stuff
@@ -27,29 +32,20 @@
return TRUE
/mob/living/Crossed(var/atom/movable/AM)
if(AM == src || AM.is_incorporeal()) // We're not going to run over ourselves or ghosts
return
if(istype(AM, /mob/living/bot/mulebot))
var/mob/living/bot/mulebot/MB = AM
MB.runOver(src)
if(istype(AM, /obj/vehicle))
var/obj/vehicle/V = AM
V.RunOver(src)
..()
var/mob/living/target = AM
if(istype(target) && !target.incorporeal_move && !src.incorporeal_move) //The slip vore begins
if(can_slip_vore(target) && !src.slip_vore_in_progress && !target.slip_vore_in_progress) //If we can vore them go for it
target.slip_vore_in_progress = TRUE //Make them stop slipping
perform_the_nom(src,target,src,src.vore_selected,1)
target.slip_vore_in_progress = FALSE
target.is_slipping = FALSE
return
else if(can_be_slip_vored_by(target) && !src.slip_vore_in_progress && !target.slip_vore_in_progress) //Otherwise, if they can vore us, make it happen.
target.slip_vore_in_progress = TRUE //Make them stop slipping
perform_the_nom(target,src,target,target.vore_selected,1)
target.slip_vore_in_progress = FALSE
target.is_slipping = FALSE
slip_vore_in_progress = FALSE
is_slipping = FALSE
return
/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
. = ..()
@@ -61,4 +57,4 @@
. = ..()
if(is_slipping && !lying)
is_slipping = FALSE
return .
return .

View File

@@ -4113,6 +4113,6 @@
#include "maps\submaps\space_submaps\debrisfield\debrisfield.dm"
#include "maps\submaps\surface_submaps\wilderness\wilderness.dm"
#include "maps\submaps\surface_submaps\wilderness\wilderness_areas.dm"
#include "maps\virgo_minitest\virgo_minitest.dm"
#include "maps\tether\tether.dm"
#include "maps\~map_system\maps.dm"
// END_INCLUDE