mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixed Runtime in simple_animal_vr.dm,41: Cannot read null.digest_mode
- Caused by using "Toggle Animal's Digestion" verb on non-vore-capable mobs. - Even better, changed it to not even add those verbs on mobs without vore - Also remove the path from VV addverb since it is a proc now.
This commit is contained in:
@@ -366,7 +366,7 @@
|
||||
if(istype(H,/mob/living/silicon/ai))
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
||||
if(istype(H,/mob/living/simple_mob))
|
||||
possibleverbs += typesof(/mob/living/simple_mob/proc,/mob/living/simple_mob/verb) //VOREStation edit, Apparently polaris simplemobs have no verbs at all.
|
||||
possibleverbs += typesof(/mob/living/simple_mob/proc)
|
||||
possibleverbs -= H.verbs
|
||||
possibleverbs += "Cancel" // ...And one for the bottom
|
||||
|
||||
|
||||
@@ -198,6 +198,10 @@
|
||||
if(LAZYLEN(vore_organs))
|
||||
return
|
||||
|
||||
// Since they have bellies, add verbs to toggle settings on them.
|
||||
verbs |= /mob/living/simple_mob/proc/toggle_digestion
|
||||
verbs |= /mob/living/simple_mob/proc/toggle_fancygurgle
|
||||
|
||||
//A much more detailed version of the default /living implementation
|
||||
var/obj/belly/B = new /obj/belly(src)
|
||||
vore_selected = B
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
//
|
||||
// Simple proc for animals to have their digestion toggled on/off externally
|
||||
// Added as a verb in /mob/living/simple_mob/init_vore() if vore is enabled for this mob.
|
||||
//
|
||||
|
||||
/mob/living/simple_mob/verb/toggle_digestion()
|
||||
/mob/living/simple_mob/proc/toggle_digestion()
|
||||
set name = "Toggle Animal's Digestion"
|
||||
set desc = "Enables digestion on this mob for 20 minutes."
|
||||
set category = "OOC"
|
||||
@@ -35,6 +35,9 @@
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!istype(user) || user.stat) return
|
||||
|
||||
if(!vore_selected)
|
||||
to_chat(user, "<span class='warning'>[src] isn't planning on eating anything much less digesting it.</span>")
|
||||
return
|
||||
if(ai_holder.retaliate || (ai_holder.hostile && faction != user.faction))
|
||||
to_chat(user, "<span class='warning'>This predator isn't friendly, and doesn't give a shit about your opinions of it digesting you.</span>")
|
||||
return
|
||||
@@ -49,7 +52,8 @@
|
||||
if(confirm == "Disable")
|
||||
vore_selected.digest_mode = DM_HOLD
|
||||
|
||||
/mob/living/simple_mob/verb/toggle_fancygurgle()
|
||||
// Added as a verb in /mob/living/simple_mob/init_vore() if vore is enabled for this mob.
|
||||
/mob/living/simple_mob/proc/toggle_fancygurgle()
|
||||
set name = "Toggle Animal's Gurgle sounds"
|
||||
set desc = "Switches between Fancy and Classic sounds on this mob."
|
||||
set category = "OOC"
|
||||
@@ -57,6 +61,9 @@
|
||||
|
||||
var/mob/living/user = usr //I mean, At least ghosts won't use it.
|
||||
if(!istype(user) || user.stat) return
|
||||
if(!vore_selected)
|
||||
to_chat(user, "<span class='warning'>[src] isn't vore capable.</span>")
|
||||
return
|
||||
|
||||
vore_selected.fancy_vore = !vore_selected.fancy_vore
|
||||
to_chat(user, "[src] is now using [vore_selected.fancy_vore ? "Fancy" : "Classic"] vore sounds.")
|
||||
|
||||
Reference in New Issue
Block a user