Skip to content

Commit

Permalink
Merge pull request #6735 from Nyt3/pickFix
Browse files Browse the repository at this point in the history
Updated hometown detection logic
  • Loading branch information
MahtraDR authored Nov 23, 2023
2 parents f27abb8 + 591b959 commit e1da350
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pick.lic
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Pick

@picking_room_id = Room.current.id

@refill_town = @settings.refill_town
@refill_town = @settings.refill_town = @settings.refill_town.to_s

if @debug
echo "Settings..."
Expand Down Expand Up @@ -134,10 +134,10 @@ class Pick
echo "- assumed_difficulty: #{@assumed_difficulty}"
end

if @settings.refill_town
@lockpick_costs = picking_data['lockpick_costs'][@settings.refill_town]
else
if @refill_town.empty?
@lockpick_costs = picking_data['lockpick_costs'][@settings.fang_cove_override_town || @settings.hometown]
else
@lockpick_costs = picking_data['lockpick_costs'][@settings.refill_town]
end

if args.refill
Expand Down Expand Up @@ -325,16 +325,16 @@ class Pick
return
end

if @refill_town
DRCM.ensure_copper_on_hand(cost * lockpicks_needed, @settings, @refill_town)
else
if @refill_town.empty?
DRCM.ensure_copper_on_hand(cost * lockpicks_needed, @settings)
else
DRCM.ensure_copper_on_hand(cost * lockpicks_needed, @settings, @refill_town)
end

if @refill_town
DRCT.refill_lockpick_container(@settings.lockpick_type, @refill_town, @lockpick_container, lockpicks_needed)
else
if @refill_town.empty?
DRCT.refill_lockpick_container(@settings.lockpick_type, @settings.fang_cove_override_town || @settings.hometown, @lockpick_container, lockpicks_needed)
else
DRCT.refill_lockpick_container(@settings.lockpick_type, @refill_town, @lockpick_container, lockpicks_needed)
end
end

Expand Down

0 comments on commit e1da350

Please sign in to comment.