Merge pull request #8164 from Poojawa/vore-mechanic-fixes

[Ready] Vore interactions, feeding, UI cleanup!
This commit is contained in:
deathride58
2019-03-31 21:19:20 -04:00
committed by GitHub
30 changed files with 333 additions and 293 deletions

View File

@@ -1143,7 +1143,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.add_trait(TRAIT_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
if(H.noisy && H.nutrition <= NUTRITION_LEVEL_STARVING)
if(prob(10))
playsound(get_turf(H),"hunger_sounds",35,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED)
else if(H.noisy && H.nutrition <= NUTRITION_LEVEL_HUNGRY)
if(prob(10))
playsound(get_turf(H),"hunger_sounds",15,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED)
// nutrition decrease and satiety
if (H.nutrition > 0 && H.stat != DEAD && !H.has_trait(TRAIT_NOHUNGER))
// THEY HUNGER

View File

@@ -8,6 +8,8 @@
spill_organs(no_brain, no_organs, no_bodyparts)
release_vore_contents(silent = TRUE) // return of the bomb safe internals.
if(!no_bodyparts)
spread_bodyparts(no_brain, no_organs)
@@ -36,6 +38,7 @@
buckled.unbuckle_mob(src, force = TRUE)
dust_animation()
release_vore_contents(silent = TRUE) //technically grief protection, I guess? if they're SM'd it doesn't matter seconds after anyway.
spawn_dust(just_ash)
QDEL_IN(src,5) // since this is sometimes called in the middle of movement, allow half a second for movement to finish, ghosting to happen and animation to play. Looks much nicer and doesn't cause multiple runtimes.

View File

@@ -127,8 +127,18 @@
IgniteMob()
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src || anchored || !isturf(user.loc))
if(user == anchored || !isturf(user.loc))
return FALSE
if(user.pulling && user.grab_state == GRAB_AGGRESSIVE && user.voremode)
if(ismob(user.pulling))
var/mob/P = user.pulling
user.vore_attack(user, P, src) // User, Pulled, Predator target (which can be user, pulling, or src)
return
if(user == src) //we want to be able to self click if we're voracious
return FALSE
if(!user.pulling || user.pulling != src)
user.start_pulling(src, supress_message)
return
@@ -163,6 +173,8 @@
return 0
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != INTENT_GRAB)
return 0
if(user.voremode && user.grab_state == GRAB_AGGRESSIVE)
return 0
user.grab_state++
switch(user.grab_state)
if(GRAB_AGGRESSIVE)

View File

@@ -63,6 +63,9 @@
..()
/mob/living/simple_animal/mouse/handle_automated_action()
if(isbelly(loc))
return
if(prob(chew_probability))
var/turf/open/floor/F = get_turf(src)
if(istype(F) && !F.intact)

View File

@@ -100,7 +100,7 @@
if(!target || !isturf(target.loc) || !isturf(loc) || stat == DEAD)
return
var/target_dir = get_dir(src,target)
var/static/list/cardinal_sidestep_directions = list(-90,-45,0,45,90)
var/static/list/diagonal_sidestep_directions = list(-45,0,45)
var/chosen_dir = 0
@@ -202,6 +202,8 @@
if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
return FALSE
if(isbelly(the_target.loc)) //Target's inside a gut, forget about it too
return FALSE
if(search_objects < 2)
if(isliving(the_target))
var/mob/living/L = the_target
@@ -301,7 +303,7 @@
if(target)
if(targets_from && isturf(targets_from.loc) && target.Adjacent(targets_from)) //If they're next to us, attack
MeleeAction()
else
else
if(rapid_melee > 1 && target_distance <= melee_queue_distance)
MeleeAction(FALSE)
in_melee = FALSE //If we're just preparing to strike do not enter sidestep mode

View File

@@ -83,18 +83,12 @@
if(L.stat != DEAD)
if(!client && ranged && ranged_cooldown <= world.time)
OpenFire()
else if(L.stat >= SOFT_CRIT)
if(vore_active == TRUE && L.devourable == TRUE)
if(isliving(target) && !target.Adjacent(targets_from))
return
else
if(L.Adjacent(src) && (L.stat != CONSCIOUS))
if(vore_active && L.devourable == TRUE)
dragon_feeding(src,L)
if(L.loc == src.contents)
LoseTarget()
return 0
else
devour(L)
LoseTarget()
else
devour(L)
/mob/living/simple_animal/hostile/megafauna/proc/devour(mob/living/L)
if(!L)