From da36d2f268dde859303983d7ce50676e656b219c Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 18 Aug 2018 14:09:08 +0300 Subject: [PATCH 1/4] Makes item digestion gradual and belly damage based. -No more instantly disappearing everything. -The initial "health" of the items is based on their w_class. (but the w_class is not the health, so you can't just go gurgling things lighter) -Default damage (2+2) will take 3 cycles to chew through a normal sized (w_class 3) item. Basically one cycle per w_class. -Lower damages will chew through shit slower, and higher damages will do it faster. Max damage (6+6) will get through a normal sized item with one cycle. -They will all require two hits however, same way as how mobs take the deadly blow before final meltdown. -Also the nutrition gains scale according to the damages now. --- code/modules/vore/eating/bellymodes_vr.dm | 1 + code/modules/vore/eating/digest_act_vr.dm | 45 +++++++++++++++++------ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 4278f7a59e..b824330558 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -42,6 +42,7 @@ items_preserved |= I to_update = TRUE else + I.gurgle_contaminate(src, cont_flavor) digest_item(I) to_update = TRUE did_an_item = TRUE diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index cc247b5497..6087739222 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -4,17 +4,36 @@ // Ye default implementation. /obj/item/proc/digest_act(var/atom/movable/item_storage = null) - for(var/obj/item/O in contents) - if(istype(O,/obj/item/weapon/storage/internal)) //Dump contents from dummy pockets. - for(var/obj/item/SO in O) - if(item_storage) - SO.forceMove(item_storage) - qdel(O) - else if(item_storage) - O.forceMove(item_storage) - - qdel(src) - return w_class + if(istype(item_storage,/obj/item/device/dogborg/sleeper)) + for(var/obj/item/O in contents) + if(istype(O,/obj/item/weapon/storage/internal)) //Dump contents from dummy pockets. + for(var/obj/item/SO in O) + if(item_storage) + SO.forceMove(item_storage) + qdel(O) + else if(item_storage) + O.forceMove(item_storage) + qdel(src) + return w_class + var/g_damage = 4 + if(digest_stage == null) + digest_stage = w_class + if(digest_stage > 0) + if(isbelly(item_storage)) + var/obj/belly/B = item_storage + g_damage = B.digest_brute + B.digest_burn + digest_stage -= 0.25 * g_damage + else + for(var/obj/item/O in contents) + if(istype(O,/obj/item/weapon/storage/internal)) //Dump contents from dummy pockets. + for(var/obj/item/SO in O) + if(item_storage) + SO.forceMove(item_storage) + qdel(O) + else if(item_storage) + O.forceMove(item_storage) + qdel(src) + return 0.25 * g_damage ///////////// // Some indigestible stuff @@ -91,3 +110,7 @@ /obj/item/device/mmi/digital/posibrain/digest_act(var/atom/movable/item_storage = null) //Replace this with a VORE setting so all types of posibrains can/can't be digested on a whim return FALSE + +// Gradual damage measurement +/obj/item + var/digest_stage = null \ No newline at end of file From 3c7bf97205e08dfb2f931468119fc553485de07b Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 18 Aug 2018 15:23:55 +0300 Subject: [PATCH 2/4] Some tweaks and such. --- code/modules/vore/eating/digest_act_vr.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index 6087739222..2641a43700 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -15,14 +15,16 @@ O.forceMove(item_storage) qdel(src) return w_class - var/g_damage = 4 + var/g_damage = 1 if(digest_stage == null) digest_stage = w_class + if(isbelly(item_storage)) + var/obj/belly/B = item_storage + g_damage = 0.25 * (B.digest_brute + B.digest_burn) if(digest_stage > 0) - if(isbelly(item_storage)) - var/obj/belly/B = item_storage - g_damage = B.digest_brute + B.digest_burn - digest_stage -= 0.25 * g_damage + if(g_damage > digest_stage) + g_damage = digest_stage + digest_stage -= g_damage else for(var/obj/item/O in contents) if(istype(O,/obj/item/weapon/storage/internal)) //Dump contents from dummy pockets. @@ -33,7 +35,7 @@ else if(item_storage) O.forceMove(item_storage) qdel(src) - return 0.25 * g_damage + return g_damage ///////////// // Some indigestible stuff From ccf26413853f7719e1c848928f98cf9bf74fe34b Mon Sep 17 00:00:00 2001 From: Verkister Date: Mon, 10 Sep 2018 11:35:52 +0300 Subject: [PATCH 3/4] makes did_an_item only do the skip if an item was done --- code/modules/vore/eating/bellymodes_vr.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index b824330558..6c35c0ea79 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -41,11 +41,13 @@ I.gurgle_contaminate(src, cont_flavor) items_preserved |= I to_update = TRUE + did_an_item = TRUE else I.gurgle_contaminate(src, cont_flavor) digest_item(I) - to_update = TRUE - did_an_item = TRUE + to_update = TRUE + if(I.digest_stage <= 0) + did_an_item = TRUE //Handle eaten mobs else if(isliving(A)) From 74ec886aae73755e126056ad2c1e97a7ae778385 Mon Sep 17 00:00:00 2001 From: Verkister Date: Mon, 10 Sep 2018 12:44:50 +0300 Subject: [PATCH 4/4] Tweaks to fix GC issues --- code/modules/vore/eating/bellymodes_vr.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 6c35c0ea79..0854f88e13 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -44,10 +44,12 @@ did_an_item = TRUE else I.gurgle_contaminate(src, cont_flavor) - digest_item(I) - to_update = TRUE - if(I.digest_stage <= 0) + if(I.digest_stage && I.digest_stage > 0) + digest_item(I) + else + digest_item(I) did_an_item = TRUE + to_update = TRUE //Handle eaten mobs else if(isliving(A))