Skip to content

Commit

Permalink
Merge pull request #6775 from MahtraDR/outdoorsmanship_enforce_collect
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtraDR authored Feb 28, 2024
2 parents 1d59ab3 + f3116fe commit fc19c02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion athletics.lic
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Athletics
start = Time.now
DRCT.walk_to(@outdoorsmanship_rooms.sample) unless @outdoorsmanship_rooms.empty?
stow_athletics_items
DRC.wait_for_script_to_complete('outdoorsmanship', [number, "room=#{Room.current.id}", 'collect', 'rock'])
DRC.wait_for_script_to_complete('outdoorsmanship', [number, "room=#{Room.current.id}", 'rock'])
remaining_pause = ((number * 15) - (Time.now - start))
pause remaining_pause if remaining_pause > 0
get_athletics_items
Expand Down
14 changes: 2 additions & 12 deletions outdoorsmanship.lic
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Outdoorsmanship
{ name: 'perception', regex: /perception/, optional: true, description: 'Check Perception skill in place of Outdoorsmanship' },
{ name: 'mindstates', regex: /^\d+/, optional: true, description: 'Number of mindstates or collection attempts to perform before exiting. Defaults to 3' },
{ name: 'room', regex: /(room=(\d+))/, optional: true, description: 'Specific room to forage in - primarily used to locate a trash bin. Syntax: room=1234' },
{ name: 'forage', regex: /forage|collect/, optional: true, description: 'Default method is collect, specify forage to override. Forage is best used with a trash bin.' },
{ name: 'collect_item', regex: /\w+/i, optional: true, description: 'Item to collect. Will use forage_item if not set. Wrap "multiple words" in double quotes.' }
]
]
Expand All @@ -30,7 +29,7 @@ class Outdoorsmanship
@train_method = if DRSkill.getrank('Outdoorsmanship') < 20
'forage'
else
args.forage || @settings.outdoors_method
'collect'
end
@forage_item = if DRSkill.getrank('Outdoorsmanship') < 20
'rock'
Expand All @@ -53,25 +52,16 @@ class Outdoorsmanship
attempt = 0 # Failsafe counter to prevent an infinite loop if item isn't collectable in the room
while (DRSkill.getxp(@skill_name) < @end_exp) && (attempt < @targetxp)
if @train_method == 'forage'
DRC.message("#########################################################################")
DRC.message("##############################NOTICE#####################################")
DRC.message("Using FORAGE is going to be deprecated in favor of using COLLECT PRACTICE")
DRC.message("If you are seeing this message, you should remove the line")
DRC.message("outdoors_method: forage")
DRC.message("From your yaml")
DRC.message("This functionality will be completely removed on the 28th of Feb 2024")
DRC.message("#########################################################################")
DRCA.crafting_magic_routine(@settings)
DRC.forage?(@forage_item)
DRCI.dispose_trash(@forage_item, @worn_trashcan, @worn_trashcan_verb)
attempt += 1
else
item = @forage_item
DRCA.crafting_magic_routine(@settings)
DRC.collect(item)
waitrt?
DRC.kick_pile? unless DRC.kick_pile?("#{item}")
end
attempt += 1
end
magic_cleanup
end
Expand Down
2 changes: 0 additions & 2 deletions profiles/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,6 @@ crossing_training_requires_movement:
performance_pause: 3
# mindstate goal for performance.lic
performance_mindstate_goal: 31
# Define as `forage` to override outdoorsmanship gathering method.
outdoors_method: collect
# If you choose forage method, you'll want a room with a trash bin! Leave blank to not set a default room.
outdoors_room:
# If you choose forage method, you'll want to select a custom item for best learning rate.
Expand Down

0 comments on commit fc19c02

Please sign in to comment.