From cb0588c2e0c2b158c8338084677f9b89676cca76 Mon Sep 17 00:00:00 2001 From: Verkister Date: Fri, 26 Nov 2021 16:49:17 +0200 Subject: [PATCH 1/3] Probably fixes a little autotransfer bug Probably fixes a bug where a prey-ghost queued for single-slot autotransfer vanishes from existence, leaving their position on the queue as a null, which neither has the autotransferable var or a thing to remove from that now-occupied-by-a-null list, which basically broke both parts of the thing by having an already "full" queue that wasn't clearing itself and also a blank un-skipped null in the contents list bumping up the tally and hitting the max amount to skip further handling of the contents. --- code/modules/vore/eating/bellymodes_vr.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 4ae820b0ee..c5862c26fb 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -25,15 +25,13 @@ break if(dest_belly) for(var/atom/movable/M in autotransfer_queue) - if(!M.autotransferable) - autotransfer_queue -= M + if(!M || !M.autotransferable) continue transfer_contents(M, dest_belly) autotransfer_queue.Cut() var/tally = 0 for(var/atom/movable/M in autotransferables) - if(!M.autotransferable) - autotransferables -= M + if(!M || !M.autotransferable) continue if(isliving(M)) var/mob/living/L = M From 1be1c90468df9168936abaafa3a54d6a5044ecbc Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 2 Dec 2021 19:03:58 +0200 Subject: [PATCH 2/3] Update bellymodes_vr.dm --- code/modules/vore/eating/bellymodes_vr.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index c5862c26fb..64751f14fc 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -39,7 +39,7 @@ continue tally++ M.belly_cycles++ - if(autotransfer_max_amount > 0 && tally > autotransfer_max_amount) + if(autotransfer_max_amount > 1 && tally > autotransfer_max_amount) continue if(M.belly_cycles >= autotransferwait / 60) check_autotransfer(M, autotransferlocation) From 59f6883265c42ea9471cee58e252089b961a336f Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 2 Dec 2021 19:58:56 +0200 Subject: [PATCH 3/3] Update bellymodes_vr.dm --- code/modules/vore/eating/bellymodes_vr.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 64751f14fc..1da9578618 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -37,12 +37,12 @@ var/mob/living/L = M if(L.absorbed) continue - tally++ M.belly_cycles++ - if(autotransfer_max_amount > 1 && tally > autotransfer_max_amount) - continue if(M.belly_cycles >= autotransferwait / 60) check_autotransfer(M, autotransferlocation) + tally++ + if(autotransfer_max_amount > 0 && tally >= autotransfer_max_amount) + break var/play_sound //Potential sound to play at the end to avoid code duplication. var/to_update = FALSE //Did anything update worthy happen?