Wrap (and update loading of) resources

pull/11/head
Daniel Asher Resnick 2 years ago
parent 38a49c8327
commit 849b957a7b
  1. 7
      src/data/dark_elf/resources.json
  2. 7
      src/data/gold/resources/dwarf.json
  3. 7
      src/data/gold/resources/elf.json
  4. 7
      src/data/gold/resources/man.json
  5. 7
      src/data/gold/resources/orc.json
  6. 7
      src/data/gold/resources/roden.json
  7. 7
      src/data/gold/resources/wolf.json
  8. 7
      src/data/troll/resources.json
  9. 3
      src/lib/data/dark_elf.rb
  10. 3
      src/lib/data/gold.rb
  11. 3
      src/lib/data/troll.rb

@ -1,4 +1,6 @@
[
{
"stock": "elf",
"resources": [
{
"name": "Bitter Poison",
"type": "gear",
@ -111,4 +113,5 @@
}
]
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "dwarf",
"resources": [
{
"name": "Shoddy Arms",
"rp": 5,
@ -149,4 +151,5 @@
"rp": 15,
"type": "gear"
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "elf",
"resources": [
{
"name": "Run Of The Mill Bow",
"type": "gear",
@ -173,4 +175,5 @@
}
]
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "man",
"resources": [
{
"name": "Arms",
"type": "gear",
@ -431,4 +433,5 @@
}
]
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "orc",
"resources": [
{
"name": "Rags",
"rp": 1,
@ -208,4 +210,5 @@
"rp": 7,
"type": "gear"
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "roden",
"resources": [
{
"name": "Arms",
"rp": 5,
@ -136,4 +138,5 @@
}
]
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "wolf",
"resources": [
{
"name": "Territory",
"type": "property",
@ -39,4 +41,5 @@
}
]
}
]
]
}

@ -1,4 +1,6 @@
[
{
"stock": "troll",
"resources": [
{
"name": "Rags",
"type": "gear",
@ -54,4 +56,5 @@
"type": "property",
"rp": 5
}
]
]
}

@ -16,7 +16,8 @@ module Charred
lifepaths = contents["settings"]
file = File.read("data/dark_elf/resources.json")
resources = JSON.parse(file)
contents = JSON.parse(file)
resources = contents["resources"]
data[:resources]['elf'] += resources
elf = data[:lifepaths]['elf']

@ -22,7 +22,8 @@ module Charred
lifepaths[stock] = contents["settings"]
file = File.read("data/gold/resources/#{stock}.json")
resources[stock] = JSON.parse(file)
contents = JSON.parse(file)
resources[stock] = contents["resources"]
file = File.read("data/gold/stocks/#{stock}.json")
stocks[stock] = Stock.new(JSON.parse(file))

@ -18,7 +18,8 @@ module Charred
data[:lifepaths]['troll'] = lifepaths
file = File.read("data/troll/resources.json")
resources = JSON.parse(file)
contents = JSON.parse(file)
resources = contents["resources"]
data[:resources]['troll'] = resources
file = File.read("data/troll/stock.json")

Loading…
Cancel
Save