Skip to content

Commit

Permalink
Merge pull request #6825 from mikejcook/workorders_enchanting_parts_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtraDR authored May 24, 2024
2 parents 4e12039 + d559e04 commit cd8f84d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions data/base-recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8893,7 +8893,7 @@ crafting_recipes:
enchant_stock4:
item:
part:
- bobcat rod
- basalt bobcat rod
- name: a celestial beacon
noun: gem
type: artificing
Expand Down Expand Up @@ -9940,7 +9940,7 @@ crafting_recipes:
enchant_stock4:
item:
part:
- rod
- basalt bobcat rod
- name: an abstract burin
noun: burin
type: artificing
Expand Down Expand Up @@ -9987,7 +9987,7 @@ crafting_recipes:
enchant_stock4:
item:
part:
- rod
- basalt bobcat rod
- name: a precise burin
noun: burin
type: artificing
Expand Down Expand Up @@ -10032,7 +10032,7 @@ crafting_recipes:
enchant_stock4:
item:
part:
- rod
- basalt bobcat rod
- name: a compact enchanter's brazier
noun: brazier
type: artificing
Expand Down
12 changes: 7 additions & 5 deletions workorders.lic
Original file line number Diff line number Diff line change
Expand Up @@ -770,14 +770,16 @@ class WorkOrders
if recipe['part']
(recipe['part']).each do |p|
p.to_s
tmp_part_count = DRCI.count_items_in_container(p.split.last, @bag)

tmp_part_count = DRCI.count_items_in_container(p, @bag)
next unless tmp_part_count < quantity

need_part = quantity - tmp_part_count
# Found a weird challenge that made the temp_part_count equal 1 even though no "part" was in container
need_part += 1 if reget(3, 'but there is nothing in there like that') && (need_part + tmp_part_count) != quantity
DRC.message("need_part with potiental plus 1 is #{need_part}.")
order_parts(recipe['part'], need_part)

DRC.message("need_part is #{need_part}.")

# parts are listed by only their noun
order_parts([p.split.last], need_part)
end
end

Expand Down

0 comments on commit cd8f84d

Please sign in to comment.