mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 22:46:22 +01:00
Merge branch 'master' into aro-puppers
This commit is contained in:
@@ -175,6 +175,8 @@
|
||||
// The purpose of this method is to avoid duplicate code, and ensure that all necessary
|
||||
// steps are taken.
|
||||
/datum/belly/proc/nom_mob(var/mob/prey, var/mob/user)
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
if (prey.buckled)
|
||||
prey.buckled.unbuckle_mob()
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
spawn(emoteTime)
|
||||
var/list/EL = emote_lists[digest_mode]
|
||||
for(var/mob/living/M in internal_contents)
|
||||
M << "<span class='notice'>[pick(EL)]</span>"
|
||||
if(M.digestable || !(digest_mode == DM_DIGEST || digest_mode == DM_DIGEST_NUMB || digest_mode == DM_ITEMWEAK)) // don't give digesty messages to indigestible people
|
||||
M << "<span class='notice'>[pick(EL)]</span>"
|
||||
src.emotePend = FALSE
|
||||
|
||||
/////////////////////////// Exit Early ////////////////////////////
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
/obj/effect/overlay/aiholo/Destroy()
|
||||
drop_prey()
|
||||
for(var/mob/M in contents)
|
||||
M.forceMove(loc)
|
||||
walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||
return ..()
|
||||
|
||||
@@ -99,7 +101,7 @@
|
||||
. = ..(user)
|
||||
|
||||
var/msg = "\n"
|
||||
|
||||
|
||||
//If you need an ooc_notes copy paste, this is NOT the one to use.
|
||||
var/ooc_notes = master.ooc_notes
|
||||
if(ooc_notes)
|
||||
|
||||
@@ -35,16 +35,77 @@
|
||||
if(!istype(user) || user.stat) return
|
||||
|
||||
var/datum/belly/B = vore_organs[vore_selected]
|
||||
if(faction != user.faction)
|
||||
if(retaliate || (hostile && faction != user.faction))
|
||||
user << "<span class='warning'>This predator isn't friendly, and doesn't give a shit about your opinions of it digesting you.</span>"
|
||||
return
|
||||
if(B.digest_mode == "Hold")
|
||||
var/confirm = alert(user, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will disable itself after 20 minutes.", "Enabling [name]'s Digestion", "Enable", "Cancel")
|
||||
var/confirm = alert(user, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will reset after 20 minutes.", "Enabling [name]'s Digestion", "Enable", "Cancel")
|
||||
if(confirm == "Enable")
|
||||
B.digest_mode = "Digest"
|
||||
spawn(12000) //12000=20 minutes
|
||||
if(src) B.digest_mode = "Hold"
|
||||
if(src) B.digest_mode = vore_default_mode
|
||||
else
|
||||
var/confirm = alert(user, "This mob is currently set to digest all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", "Disable", "Cancel")
|
||||
var/confirm = alert(user, "This mob is currently set to process all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", "Disable", "Cancel")
|
||||
if(confirm == "Disable")
|
||||
B.digest_mode = "Hold"
|
||||
|
||||
/mob/living/simple_animal/proc/away_from_players()
|
||||
//Reduces the amount of logging spam by only allowing procs to continue if they have a player nearby to listen.
|
||||
//A return of 0 means that it is not away from players.
|
||||
// This is a stripped down version of the proc get_mobs_and_objs_in_view_fast()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T) return 1 // If the turf doesn't exist, we don't want the proc running regardless
|
||||
|
||||
// Quickly grabs the mob's hearing range to check from
|
||||
var/list/hear = dview(world.view,T,INVISIBILITY_MAXIMUM)
|
||||
var/list/hearturfs = list()
|
||||
for(var/thing in hear)
|
||||
if(istype(thing,/mob))
|
||||
hearturfs += get_turf(thing)
|
||||
|
||||
//Check each player to see if they're inside said 'hearing range' turfs
|
||||
for(var/mob in player_list)
|
||||
if(!istype(mob, /mob))
|
||||
crash_with("There is a null or non-mob reference inside player_list.")
|
||||
continue
|
||||
if(get_turf(mob) in hearturfs)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
mob/living/simple_animal/custom_emote()
|
||||
if (away_from_players()) return
|
||||
. = ..()
|
||||
|
||||
mob/living/simple_animal/say()
|
||||
if (away_from_players()) return
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user)
|
||||
if (istype(O, /obj/item/weapon/newspaper) && !(ckey || (hostile && faction != user.faction)) && isturf(user.loc))
|
||||
if (retaliate && prob(vore_pounce_chance/2)) // This is a gamble!
|
||||
user.Weaken(5) //They get tackled anyway whether they're edible or not.
|
||||
user.visible_message("<span class='danger'>\the [user] swats \the [src] with \the [O] and promptly gets tackled!</span>!")
|
||||
if (will_eat(user))
|
||||
stop_automated_movement = 1
|
||||
animal_nom(user)
|
||||
update_icon()
|
||||
stop_automated_movement = 0
|
||||
else if (!target_mob) // no using this to clear a retaliate mob's target
|
||||
target_mob = user //just because you're not tasty doesn't mean you get off the hook. A swat for a swat.
|
||||
AttackTarget()
|
||||
LoseTarget() // only make one attempt at an attack rather than going into full rage mode
|
||||
else
|
||||
user.visible_message("<span class='info'>\the [user] swats \the [src] with \the [O]!</span>!")
|
||||
for(var/I in vore_organs)
|
||||
var/datum/belly/B = vore_organs[I]
|
||||
B.release_all_contents(include_absorbed = TRUE) // Until we can get a mob version of unsorbitol or whatever, release absorbed too
|
||||
for(var/mob/living/L in living_mobs(0)) //add everyone on the tile to the do-not-eat list for a while
|
||||
if(!(L in prey_excludes)) // Unless they're already on it, just to avoid fuckery.
|
||||
prey_excludes += L
|
||||
spawn(3600)
|
||||
if(src && L)
|
||||
prey_excludes -= L
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user