|
|
@ -12,17 +12,13 @@ module Charred |
|
|
|
verbose_merge data[:traits], json_get(file) |
|
|
|
verbose_merge data[:traits], json_get(file) |
|
|
|
when ".stock" |
|
|
|
when ".stock" |
|
|
|
stock = Stock.new(json_get(file)) |
|
|
|
stock = Stock.new(json_get(file)) |
|
|
|
if(data[:stocks][stock.key]) |
|
|
|
put_or_merge data[:stocks], stock.key, stock |
|
|
|
verbose_merge data[:stocks][stock.key], stock |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
data[:stocks][stock.key] = stock |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
when ".lifepaths" |
|
|
|
when ".lifepaths" |
|
|
|
contents = json_get(file) |
|
|
|
contents = json_get(file) |
|
|
|
verbose_merge data[:lifepaths][contents.stock], contents.settings |
|
|
|
put_or_merge data[:lifepaths], contents["stock"], contents["settings"] |
|
|
|
when ".resources" |
|
|
|
when ".resources" |
|
|
|
contents = json_get(file) |
|
|
|
contents = json_get(file) |
|
|
|
verbose_merge data[:resources][contents.stock], contents.settings |
|
|
|
put_or_merge data[:resources], contents["stock"], contents["resources"] |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
} |
|
|
|
} |
|
|
|