From 605d8dd1b33daa37f20dd221c4d5095d1b40b22a Mon Sep 17 00:00:00 2001 From: Nyt3 Date: Sat, 11 Nov 2023 14:25:47 -0500 Subject: [PATCH 1/3] Updated pick.lic to set a separate city for lockpick restock --- pick.lic | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pick.lic b/pick.lic index d28257ba9e..68d7257fef 100644 --- a/pick.lic +++ b/pick.lic @@ -64,7 +64,8 @@ class Pick @has_pick_waggle = @settings.waggle_sets['pick'] picking_data = get_data('picking').picking - @lockpick_costs = picking_data['lockpick_costs'][@settings.fang_cove_override_town || @settings.hometown] + + #@lockpick_costs = picking_data['lockpick_costs'][@settings.fang_cove_override_town || @settings.hometown] @pick_identify_messages = picking_data['pick_messages_by_difficulty']; @pick_retry = picking_data['pick_retry'] @@ -103,6 +104,8 @@ class Pick @picking_room_id = Room.current.id + @refill_town = @settings.refill_town + if @debug echo "Settings..." echo "- Sources: #{@sources}" @@ -133,6 +136,12 @@ class Pick echo "- assumed_difficulty: #{@assumed_difficulty}" end + if @settings.refill_town + @lockpick_costs = picking_data['lockpick_costs'][@settings.refill_town] + else + @lockpick_costs = picking_data['lockpick_costs'][@settings.fang_cove_override_town || @settings.hometown] + end + if args.refill refill_ring elsif stop_picking? @@ -318,8 +327,17 @@ class Pick return end - DRCM.ensure_copper_on_hand(cost * lockpicks_needed, @settings) - DRCT.refill_lockpick_container(@settings.lockpick_type, @settings.fang_cove_override_town || @settings.hometown, @lockpick_container, lockpicks_needed) + if @refill_town + DRCM.ensure_copper_on_hand(cost * lockpicks_needed, @settings, @refill_town) + else + DRCM.ensure_copper_on_hand(cost * lockpicks_needed, @settings) + end + + if @refill_town + DRCT.refill_lockpick_container(@settings.lockpick_type, @refill_town, @lockpick_container, lockpicks_needed) + else + DRCT.refill_lockpick_container(@settings.lockpick_type, @settings.fang_cove_override_town || @settings.hometown, @lockpick_container, lockpicks_needed) + end end def attempt_open(box_noun) From 0714ffcdbada23936ff93ec67feac236622a1514 Mon Sep 17 00:00:00 2001 From: Nyt3 Date: Sat, 11 Nov 2023 14:29:29 -0500 Subject: [PATCH 2/3] Removed debug code from pick.lic --- pick.lic | 2 -- 1 file changed, 2 deletions(-) diff --git a/pick.lic b/pick.lic index 68d7257fef..5d7bc38c3c 100644 --- a/pick.lic +++ b/pick.lic @@ -65,8 +65,6 @@ class Pick picking_data = get_data('picking').picking - #@lockpick_costs = picking_data['lockpick_costs'][@settings.fang_cove_override_town || @settings.hometown] - @pick_identify_messages = picking_data['pick_messages_by_difficulty']; @pick_retry = picking_data['pick_retry'] @pick_quick_threshold = @settings.pick['pick_quick_threshold'] || 2 From a0f7cb27004da4d7f5a1d1de7c222c016c19fd39 Mon Sep 17 00:00:00 2001 From: Nyt3 Date: Mon, 13 Nov 2023 17:09:00 -0500 Subject: [PATCH 3/3] Update pick.lic Accept suggestion to remove trailing whitespace. Co-authored-by: Mahtra <93822896+MahtraDR@users.noreply.github.com> --- pick.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pick.lic b/pick.lic index 5d7bc38c3c..566c89df8a 100644 --- a/pick.lic +++ b/pick.lic @@ -138,7 +138,7 @@ class Pick @lockpick_costs = picking_data['lockpick_costs'][@settings.refill_town] else @lockpick_costs = picking_data['lockpick_costs'][@settings.fang_cove_override_town || @settings.hometown] - end + end if args.refill refill_ring