Skip to content

Commit

Permalink
Updated Forge script
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyt3 committed Sep 27, 2023
1 parent afb75b3 commit 5282967
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions forge.lic
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Forge
]

args = parse_args(arg_definitions)
Flags.add('forge-assembly', 'another finished \S+ shield (handle)', 'another finished wooden (hilt|haft)', 'another finished (long|short|small|large) leather (cord|backing)', 'another finished (small|large) cloth (padding)', 'another finished (long|short) wooden (pole)')
Flags.add('work-done', 'from the successful .* process', 'shows a slightly reduced weight', 'Applying the final touches', /^The .* was successfully/)
Flags.add('forge-assembly', 'another finished \S+ shield (handle)', 'another finished wooden (hilt|haft)', 'another finished (long|short|small|large) leather (cord|backing)', 'another finished (small|large) cloth (padding)', 'another finished (long|short) wooden (pole)', 'appears ready to be reinforced with some (leather strips)')
Flags.add('work-done', 'from the successful .* process', 'shows a slightly reduced weight', 'shows improved protection', 'Applying the final touches', /^The .* was successfully/)
Flags.add('ingot-restow', /^You realize .* will not require as much metal as you have, and so you split the ingot and leave the portion you won't be using in your (.*)./)

settings = get_settings
Expand Down Expand Up @@ -79,7 +79,7 @@ class Forge
echo("Tongs adjustable? :: #{@adjustable_tongs}") if @debug
DRCC.stow_crafting_item('tongs', @bag, @forging_belt)
end

find_item if args.resume
DRCC.check_consumables('oil', @info['finisher-room'], @info['finisher-number'], @bag, @bag_items, @forging_belt) unless args.skip
set_defaults
Expand Down Expand Up @@ -148,11 +148,14 @@ class Forge
return if @recipe_name.include?('temper')

if settings.master_crafting_book
DRCC.find_recipe2(@chapter, @recipe_name, settings.master_crafting_book, @book_type)
DRC.bput("turn my #{settings.master_crafting_book} to discipline #{@book_type}", 'You turn the') if settings.master_crafting_book
DRC.bput("turn my #{settings.master_crafting_book} to page #{DRCC.find_recipe(@chapter, @recipe_name, settings.master_crafting_book)}", 'You turn your', 'The .* is already')
DRC.bput("study my #{settings.master_crafting_book}", 'Roundtime')
else
DRCC.get_crafting_item("#{@book_type} book", @bag, @bag_items, @forging_belt)
echo('*** You will need to upgrade to a journeyman or master book before 176 ranks! ***') if DRSkill.getrank('Forging') == 175
DRCC.find_recipe2(@chapter, @recipe_name)
DRC.bput("turn my book to page #{DRCC.find_recipe(@chapter, @recipe_name)}", 'You turn your', 'The book is already')
DRC.bput('study my book', 'Roundtime')
DRCC.stow_crafting_item("book", @bag, @forging_belt)
end
end
Expand Down Expand Up @@ -221,7 +224,7 @@ class Forge
magic_cleanup
exit
end
if /not required/ =~ DRC.bput("assemble my #{@item} with my #{part}", 'affix it securely in place', 'and tighten the pommel to secure it', 'carefully mark where it will attach when you continue crafting', 'is not required to continue crafting')
if /not required/ =~ DRC.bput("assemble my #{@item} with my #{part}", 'affix it securely in place', 'and tighten the pommel to secure it', 'carefully mark where it will attach when you continue crafting', 'You layer the leather strips', 'is not required to continue crafting')
DRC.bput("stow my #{part}")
end
swap_tool(tool) if tool
Expand Down Expand Up @@ -366,7 +369,7 @@ class Forge
when 'not spinning fast enough' # grindstone slowed before we used
spin_grindstone
when 'ready for grinding away of the excess metal', 'now appears ready for grinding and polishing',
'thinning the armor\'s metal at a grindstone', 'The armor is ready to be lightened', 'ready to be ground away' # grindstone time
'thinning the armor\'s metal at a grindstone', 'The armor is ready to be lightened', 'ready to be ground away', 'You think adjusting the armor' # grindstone time
unless DRCI.in_left_hand?(@item)
DRCC.stow_crafting_item(@hammer, @bag, @forging_belt) if DRCI.in_hands?(@hammer)
DRCC.stow_crafting_item('tongs', @bag, @forging_belt) if DRCI.in_hands?('tongs')
Expand Down

0 comments on commit 5282967

Please sign in to comment.