|
|
@ -3,23 +3,23 @@ require 'json' |
|
|
|
module Charred |
|
|
|
module Charred |
|
|
|
module Custom |
|
|
|
module Custom |
|
|
|
def load_custom(data) |
|
|
|
def load_custom(data) |
|
|
|
Dir.glob("data/custom/**/*") { |file| |
|
|
|
#Dir.glob("data/custom/**/*") { |file| |
|
|
|
if File.file?(file) |
|
|
|
# if File.file?(file) |
|
|
|
case File.extname(file) |
|
|
|
# case File.extname(file) |
|
|
|
when "skills" |
|
|
|
# when "skills" |
|
|
|
verbose_merge data[:skills], json_get(file) |
|
|
|
# verbose_merge data[:skills], json_get(file) |
|
|
|
when "traits" |
|
|
|
# when "traits" |
|
|
|
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)) |
|
|
|
data[:stocks][stock.key] = stock # This overwrites existing data... |
|
|
|
# data[:stocks][stock.key] = stock # This overwrites existing data... |
|
|
|
when "lifepaths" |
|
|
|
# when "lifepaths" |
|
|
|
# |
|
|
|
# # |
|
|
|
when "resources" |
|
|
|
# when "resources" |
|
|
|
# |
|
|
|
# # |
|
|
|
end |
|
|
|
# end |
|
|
|
end |
|
|
|
# end |
|
|
|
} |
|
|
|
#} |
|
|
|
# Dir.glob("data/custom/*/") { |dir| |
|
|
|
# Dir.glob("data/custom/*/") { |dir| |
|
|
|
# stock_name = File.basename(dir) |
|
|
|
# stock_name = File.basename(dir) |
|
|
|
|
|
|
|
|
|
|
|