From 93cda67173f4a019545c12f5ec2f19c4fbd52c89 Mon Sep 17 00:00:00 2001 From: MahtraDR <93822896+MahtraDR@users.noreply.github.com> Date: Tue, 7 Nov 2023 08:53:50 +1300 Subject: [PATCH] [scripts][corn-maze] Update stow loop. --- corn-maze.lic | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/corn-maze.lic b/corn-maze.lic index 7c87adf9c7..1521f0c307 100644 --- a/corn-maze.lic +++ b/corn-maze.lic @@ -268,7 +268,7 @@ class CornMaze end def count_he_bottle - DRC.bput("count my bottle", /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i + DRC.bput("count my bottle", /^That doesn't tell you much of anything/, /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i end def do_short_task(task) @@ -720,18 +720,13 @@ class CornMaze def stow_thing(thing) if @settings.cornmaze_containers.any? @settings.cornmaze_containers.each do |container| - break if DRCI.put_away_item?(thing, container) - break if DRCI.stow_item?(thing) - - DRC.message("#{thing} didn't fit anywhere. Dropping it.") - DRCI.dispose_trash(thing) - end - else - unless DRCI.stow_item?(thing) - DRC.message("YOU'VE RUN OUT OF ROOM! GET SOME MORE SPACE, YOU LAZY SLOB!") - DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb) + return if DRCI.put_away_item?(thing, container) end end + unless DRCI.stow_item?(thing) + DRC.message("YOU'VE RUN OUT OF ROOM! GET SOME MORE SPACE, YOU LAZY SLOB!") + DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb) + end end def recover_stun @@ -744,7 +739,7 @@ class CornMaze end before_dying do - kernel_count = DRC.bput("count my bottle", /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i + kernel_count = DRC.bput("count my bottle", /^That doesn't tell you much of anything/, /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i DRC.message("CM: Exiting script with #{kernel_count} kernels.") Flags.delete('maze_done') Flags.delete('poisoned')