Skip to content

Commit

Permalink
[forge.lic] Change logic for selecting item enhancements
Browse files Browse the repository at this point in the history
Change from gsub replacement to case statement.
  • Loading branch information
vtcifer authored Sep 21, 2023
1 parent 010e09c commit 737cada
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions forge.lic
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,18 @@ class Forge
@instruction = args.instructions
@item = args.noun
@info = get_data('crafting')['blacksmithing'][@hometown]
args.recipe_name.sub!("hone", "metal weapon honing")
args.recipe_name.sub!("balance", "metal weapon balancing")
args.recipe_name.sub!("lighten", "metal armor lightening")
args.recipe_name.sub!("reinforce", "metal armor reinforcing")
@recipe_name = args.recipe_name
case args.recipe_name
when 'hone'
@recipe_name = "metal weapon honing"
when 'balance'
@recipe_name = "metal weapon balancing"
when 'lighten'
@recipe_name = "metal armor lightening"
when 'reinforce'
@recipe_name = "metal armor reinforcing"
else
@recipe_name = args.recipe_name
end
echo("Recipe :: #{@recipe_name}") if @debug
@metal = args.metal
@next_spin = Time.now
Expand Down

0 comments on commit 737cada

Please sign in to comment.