From 737cadaf2b23b3720bcf89fc78989ebb31605015 Mon Sep 17 00:00:00 2001 From: Derek Hoffmann Date: Thu, 21 Sep 2023 11:47:40 -0400 Subject: [PATCH] [forge.lic] Change logic for selecting item enhancements Change from gsub replacement to case statement. --- forge.lic | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/forge.lic b/forge.lic index d652288b76..7c4d8ea200 100644 --- a/forge.lic +++ b/forge.lic @@ -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