Merge remote-tracking branch 'VOREStation/master'

This commit is contained in:
SplinterGP
2020-09-03 15:55:45 -03:00
3 changed files with 31 additions and 16 deletions
+17 -8
View File
@@ -132,16 +132,25 @@ default behaviour is:
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !tmob.buckled && !buckled && can_swap && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
var/turf/oldloc = loc
//VOREstation Edit - Begin
//check bumpnom chance, if it's a simplemob that's doing the bumping
var/mob/living/simple_mob/srcsimp = src
if(istype(srcsimp))
if(srcsimp.tryBumpNom(tmob))
now_pushing = 0
return
//if it's a simplemob being bumped, and the above didn't make them start getting bumpnommed, they get a chance to bumpnom
var/mob/living/simple_mob/tmobsimp = tmob
if(istype(tmobsimp))
if(tmobsimp.tryBumpNom(src))
now_pushing = 0
return
//VOREstation Edit - End
forceMove(tmob.loc)
//VOREstation Edit - Begin
if (istype(tmob, /mob/living/simple_mob)) //check bumpnom chance, if it's a simplemob that's bumped
tmob.Bumped(src)
else if(istype(src, /mob/living/simple_mob)) //otherwise, if it's a simplemob doing the bumping. Simplemob on simplemob doesn't seem to trigger but that's fine.
Bumped(tmob)
if (tmob.loc == src) //check if they got ate, and if so skip the forcemove
now_pushing = 0
return
// In case of micros, we don't swap positions; instead occupying the same square!
if (handle_micro_bump_helping(tmob))
now_pushing = 0
@@ -244,17 +244,23 @@
"The stomach glorps and gurgles as it tries to work you into slop.")
/mob/living/simple_mob/Bumped(var/atom/movable/AM, yes)
if(ismob(AM))
var/mob/tmob = AM
if(will_eat(tmob) && !istype(tmob, type) && prob(vore_bump_chance) && !ckey) //check if they decide to eat. Includes sanity check to prevent cannibalism.
if(tmob.canmove && prob(vore_pounce_chance)) //if they'd pounce for other noms, pounce for these too, otherwise still try and eat them if they hold still
tmob.Weaken(5)
tmob.visible_message("<span class='danger'>\the [src] [vore_bump_emote] \the [tmob]!</span>!")
set_AI_busy(TRUE)
if(tryBumpNom(AM))
return
..()
/mob/living/simple_mob/proc/tryBumpNom(var/mob/tmob)
//returns TRUE if we actually start an attempt to bumpnom, FALSE if checks fail or the random bump nom chance fails
if(istype(tmob) && will_eat(tmob) && !istype(tmob, type) && prob(vore_bump_chance) && !ckey) //check if they decide to eat. Includes sanity check to prevent cannibalism.
if(tmob.canmove && prob(vore_pounce_chance)) //if they'd pounce for other noms, pounce for these too, otherwise still try and eat them if they hold still
tmob.Weaken(5)
tmob.visible_message("<span class='danger'>\the [src] [vore_bump_emote] \the [tmob]!</span>!")
set_AI_busy(TRUE)
spawn()
animal_nom(tmob)
update_icon()
set_AI_busy(FALSE)
..()
return TRUE
return FALSE
// Checks to see if mob doesn't like this kind of turf
/mob/living/simple_mob/IMove(newloc)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB