mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 11:07:46 +01:00
Merge pull request #3301 from VOREStation/aro-proteanguts
Refator init_belly() into init_vore()
This commit is contained in:
@@ -69,6 +69,9 @@
|
||||
healing.expire()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/protean_blob/init_vore()
|
||||
return //Don't make a random belly, don't waste your time
|
||||
|
||||
/mob/living/simple_animal/protean_blob/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/simple_animal/cat/fluff/Runtime/init_belly()
|
||||
/mob/living/simple_animal/cat/fluff/Runtime/init_vore()
|
||||
..()
|
||||
var/obj/belly/B = vore_selected
|
||||
B.name = "Stomach"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
var/turns_since_scan = 0
|
||||
var/mob/flee_target
|
||||
|
||||
/mob/living/simple_animal/fox/init_belly()
|
||||
/mob/living/simple_animal/fox/init_vore()
|
||||
..()
|
||||
var/obj/belly/B = vore_selected
|
||||
B.name = "Stomach"
|
||||
@@ -187,7 +187,7 @@
|
||||
tt_desc = "Vulpes nobilis"
|
||||
befriend_job = "Colony Director"
|
||||
|
||||
/mob/living/simple_animal/fox/fluff/Renault/init_belly()
|
||||
/mob/living/simple_animal/fox/fluff/Renault/init_vore()
|
||||
..()
|
||||
var/obj/belly/B = vore_selected
|
||||
B.name = "Stomach"
|
||||
|
||||
@@ -26,13 +26,6 @@
|
||||
var/vore_fullness = 0 // How "full" the belly is (controls icons)
|
||||
var/vore_icons = 0 // Bitfield for which fields we have vore icons for.
|
||||
|
||||
/mob/living/simple_animal/New()
|
||||
..()
|
||||
if(vore_active)
|
||||
init_belly()
|
||||
if(!IsAdvancedToolUser())
|
||||
verbs |= /mob/living/simple_animal/proc/animal_nom
|
||||
|
||||
// Release belly contents before being gc'd!
|
||||
/mob/living/simple_animal/Destroy()
|
||||
release_vore_contents()
|
||||
@@ -116,8 +109,6 @@
|
||||
// TODO - Review this. Could be some issues here
|
||||
/mob/living/simple_animal/proc/EatTarget()
|
||||
ai_log("vr/EatTarget() [target_mob]",2)
|
||||
if(!LAZYLEN(vore_organs))
|
||||
init_belly()
|
||||
stop_automated_movement = 1
|
||||
var/old_target = target_mob
|
||||
handle_stance(STANCE_BUSY)
|
||||
@@ -138,13 +129,18 @@
|
||||
release_vore_contents()
|
||||
. = ..()
|
||||
|
||||
// Simple animals have only one belly. This creates it (if it isn't already set up)
|
||||
/mob/living/simple_animal/proc/init_belly()
|
||||
if(vore_organs.len)
|
||||
return
|
||||
if(no_vore) //If it can't vore, let's not give it a stomach.
|
||||
// Make sure you don't call ..() on this one, otherwise you duplicate work.
|
||||
/mob/living/simple_animal/init_vore()
|
||||
if(!vore_active || no_vore)
|
||||
return
|
||||
|
||||
if(!IsAdvancedToolUser())
|
||||
verbs |= /mob/living/simple_animal/proc/animal_nom
|
||||
|
||||
if(LAZYLEN(vore_organs))
|
||||
return
|
||||
|
||||
//A much more detailed version of the default /living implementation
|
||||
var/obj/belly/B = new /obj/belly(src)
|
||||
vore_selected = B
|
||||
B.immutable = 1
|
||||
|
||||
@@ -124,10 +124,8 @@
|
||||
qdel_null_list(shadekin_abilities)
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/shadekin/init_belly()
|
||||
if(vore_organs.len)
|
||||
return
|
||||
if(no_vore) //If it can't vore, let's not give it a stomach.
|
||||
/mob/living/simple_animal/shadekin/init_vore()
|
||||
if(LAZYLEN(vore_organs))
|
||||
return
|
||||
|
||||
var/obj/belly/B = new /obj/belly(src)
|
||||
|
||||
@@ -34,30 +34,37 @@
|
||||
M.verbs += /mob/living/proc/insidePanel
|
||||
|
||||
//Tries to load prefs if a client is present otherwise gives freebie stomach
|
||||
if(!M.vore_organs || !M.vore_organs.len)
|
||||
spawn(20) //Wait a couple of seconds to make sure copy_to or whatever has gone
|
||||
if(!M) return
|
||||
|
||||
if(M.client && M.client.prefs_vr)
|
||||
if(!M.copy_from_prefs_vr())
|
||||
to_chat(M,"<span class='warning'>ERROR: You seem to have saved VOREStation prefs, but they couldn't be loaded.</span>")
|
||||
return 0
|
||||
if(M.vore_organs && M.vore_organs.len)
|
||||
M.vore_selected = M.vore_organs[1]
|
||||
|
||||
if(!M.vore_organs || !M.vore_organs.len)
|
||||
if(!M.vore_organs)
|
||||
M.vore_organs = list()
|
||||
var/obj/belly/B = new /obj/belly(M)
|
||||
M.vore_selected = B
|
||||
B.immutable = 1
|
||||
B.name = "Stomach"
|
||||
B.desc = "It appears to be rather warm and wet. Makes sense, considering it's inside \the [M.name]."
|
||||
B.can_taste = 1
|
||||
spawn(2 SECONDS)
|
||||
M.init_vore()
|
||||
|
||||
//Return 1 to hook-caller
|
||||
return 1
|
||||
|
||||
/mob/living/proc/init_vore()
|
||||
//Something else made organs, meanwhile.
|
||||
if(LAZYLEN(vore_organs))
|
||||
return TRUE
|
||||
|
||||
//We'll load our client's organs if we have one
|
||||
if(client && client.prefs_vr)
|
||||
if(!copy_from_prefs_vr())
|
||||
to_chat(src,"<span class='warning'>ERROR: You seem to have saved VOREStation prefs, but they couldn't be loaded.</span>")
|
||||
return FALSE
|
||||
if(LAZYLEN(vore_organs))
|
||||
vore_selected = vore_organs[1]
|
||||
return TRUE
|
||||
|
||||
//Or, we can create a basic one for them
|
||||
if(!LAZYLEN(vore_organs))
|
||||
LAZYINITLIST(vore_organs)
|
||||
var/obj/belly/B = new /obj/belly(src)
|
||||
vore_selected = B
|
||||
B.immutable = 1
|
||||
B.name = "Stomach"
|
||||
B.desc = "It appears to be rather warm and wet. Makes sense, considering it's inside \the [name]."
|
||||
B.can_taste = 1
|
||||
return TRUE
|
||||
|
||||
//
|
||||
// Hide vore organs in contents
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user