Feeding works! aaaaayyy. Didn't have to martial art it either

This commit is contained in:
Poojawa
2019-03-27 03:18:41 -05:00
parent b11e3bbc96
commit 8d84299d6d
6 changed files with 51 additions and 18 deletions

View File

@@ -129,6 +129,18 @@
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src || 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
if(P != src)
to_chat(world, "<span class='notice'>grabbedby check : [user], [P], [src] (target).</span>")
user.vore_attack(user, P, src) //feed grabbed to other
else
to_chat(world, "<span class='notice'>grabbedby check : [user], [P], [src] (target).</span>")
user.vore_attack(user, P, src) //feed self to grabbed
return
if(!user.pulling || user.pulling != src)
user.start_pulling(src, supress_message)
return
@@ -163,6 +175,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

@@ -43,8 +43,6 @@ mob/living/carbon/proc/toggle_vore_mode()
if(combatmode)
return FALSE //let's not override the main draw of the game these days
voremode = !voremode
if(client)
client.show_popup_menus = !voremode // it's the RIGHT way to nom. gettit
if(hud_used && hud_used.static_inventory)
for(var/obj/screen/voretoggle/selector in hud_used.static_inventory)
selector.rebaseintomygut(src)

View File

@@ -1,6 +1,6 @@
/mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && isliving(pulling))
vore_attack(user, pulling)
vore_attack(user, pulling, user) //feeding prey to self
else
..()

View File

@@ -184,6 +184,10 @@
// Returns the number of mobs so released.
/obj/belly/proc/release_all_contents(var/include_absorbed = FALSE, var/silent = FALSE)
var/atom/destination = drop_location()
//Don't bother if we don't have contents
if(!contents.len)
return 0
var/count = 0
for(var/thing in contents)
var/atom/movable/AM = thing
@@ -204,6 +208,12 @@
for(var/mob/M in get_hearers_in_view(2, get_turf(owner)))
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES))
playsound(get_turf(owner),"[src.release_sound]",50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED)
//Clean up our own business
items_preserved.Cut()
if(isanimal(owner))
owner.update_icons()
if(!silent)
owner.visible_message("<font color='green'><b>[owner] expels everything from their [lowertext(name)]!</b></font>")
items_preserved.Cut()
@@ -244,6 +254,11 @@
if(P.absorbed)
absorbed_count++
Pred.reagents.trans_to(Prey, Pred.reagents.total_volume / absorbed_count)
//Clean up our own business
if(isanimal(owner))
owner.update_icons()
if(!silent)
owner.visible_message("<font color='green'><b>[owner] expels [M] from their [lowertext(name)]!</b></font>")
owner.update_icons()

View File

@@ -81,35 +81,38 @@
if(!user || !prey || !pred)
return
if(prey == src) //you click your target
if(!src.feeding)
if(!isliving(pred)) //no badmin, you can't feed people to ghosts or objects.
return
if(pred == prey) //you click your target
if(!pred.feeding)
to_chat(user, "<span class='notice'>They aren't able to be fed.</span>")
to_chat(src, "<span class='notice'>[user] tried to feed you themselves, but you aren't voracious enough to be fed.</span>")
to_chat(pred, "<span class='notice'>[user] tried to feed you themselves, but you aren't voracious enough to be fed.</span>")
return
if(!is_vore_predator(prey))
if(!is_vore_predator(pred))
to_chat(user, "<span class='notice'>They aren't voracious enough.</span>")
return
feed_self_to_grabbed(user, src)
feed_self_to_grabbed(user, pred)
if(user == src) //you click yourself
else if(pred == user) //you click yourself
if(!is_vore_predator(src))
to_chat(user, "<span class='notice'>You aren't voracious enough.</span>")
return
user.feed_grabbed_to_self(src, prey)
feed_grabbed_to_self(user, prey)
else // click someone other than you/prey
if(!src.feeding)
if(!pred.feeding)
to_chat(user, "<span class='notice'>They aren't voracious enough to be fed.</span>")
to_chat(src, "<span class='notice'>[user] tried to feed you [prey], but you aren't voracious enough to be fed.</span>")
to_chat(pred, "<span class='notice'>[user] tried to feed you [prey], but you aren't voracious enough to be fed.</span>")
return
if(!prey.feeding)
to_chat(user, "<span class='notice'>They aren't able to be fed to someone.</span>")
to_chat(prey, "<span class='notice'>[user] tried to feed you to [src], but you aren't able to be fed to them.</span>")
to_chat(prey, "<span class='notice'>[user] tried to feed you to [pred], but you aren't able to be fed to them.</span>")
return
if(!is_vore_predator(src))
if(!is_vore_predator(pred))
to_chat(user, "<span class='notice'>They aren't voracious enough.</span>")
return
feed_grabbed_to_other(user, prey, src)
feed_grabbed_to_other(user, prey, pred)
//
// Eating procs depending on who clicked what
//
@@ -330,9 +333,9 @@
return
//Actual escaping
forceMove(get_turf(src)) //Just move me up to the turf, let's not cascade through bellies, there's been a problem, let's just leave.
if(is_blind(src) && !has_trait(TRAIT_BLIND))
src.adjust_blindness(-1)
src.cure_blind("belly_[REF(src)]")
src.stop_sound_channel(CHANNEL_PREYLOOP)
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "fedprey", /datum/mood_event/fedprey)
for(var/mob/living/simple_animal/SA in range(10))
SA.prey_excludes[src] = world.time
@@ -384,6 +387,7 @@
P.digestable = src.digestable
P.devourable = src.devourable
P.feeding = src.feeding
P.vore_taste = src.vore_taste
var/list/serialized = list()
@@ -407,6 +411,7 @@
digestable = P.digestable
devourable = P.devourable
feeding = P.feeding
vore_taste = P.vore_taste
release_vore_contents(silent = TRUE)

View File

@@ -56,7 +56,8 @@
/datum/vore_look/proc/gen_vui(var/mob/living/user)
var/dat
dat += "Remember to toggle the vore mode, it's to the left of your combat toggle. Open mouth means you're voracious!<br>"
dat += "<HR>"
var/atom/userloc = user.loc
if (isbelly(userloc))
var/obj/belly/inside_belly = userloc