Merge pull request #3023 from Screemonster/stopkillingthedamncat

Adds newspapering, fixes mob digestion toggle, and other tweaks
This commit is contained in:
Aronai Sieyes
2018-02-16 19:33:20 -06:00
committed by GitHub
5 changed files with 156 additions and 95 deletions
+2 -1
View File
@@ -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
//////////////////////// Absorbed Handling ////////////////////////
+32 -4
View File
@@ -30,17 +30,17 @@
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"
@@ -75,3 +75,31 @@ mob/living/simple_animal/custom_emote()
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
..()