diff --git a/src/lib/data/custom.rb b/src/lib/data/custom.rb index a64abd9..c357ee5 100644 --- a/src/lib/data/custom.rb +++ b/src/lib/data/custom.rb @@ -12,17 +12,13 @@ module Charred verbose_merge data[:traits], json_get(file) when ".stock" stock = Stock.new(json_get(file)) - if(data[:stocks][stock.key]) - verbose_merge data[:stocks][stock.key], stock - else - data[:stocks][stock.key] = stock - end + put_or_merge data[:stocks], stock.key, stock when ".lifepaths" contents = json_get(file) - verbose_merge data[:lifepaths][contents.stock], contents.settings + put_or_merge data[:lifepaths], contents["stock"], contents["settings"] when ".resources" contents = json_get(file) - verbose_merge data[:resources][contents.stock], contents.settings + put_or_merge data[:resources], contents["stock"], contents["resources"] end end }