Update README

This commit is contained in:
2020-04-20 09:18:48 +02:00
parent 99ed71a623
commit e43be2c832
4 changed files with 6338 additions and 6296 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
package.path = package.path .. ";lua_scripts/libraries/luajson/?.lua"
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
local path_in = "/home/sigmar/work/foundryvtt/WFRP-4th-Edition-FoundryVTT/packs/"
@ -38,8 +38,8 @@ while line do
--print(beast.name, beast.items)
if beast.items then
for _, traitbeast in pairs( beast.items) do
--print(beast.name, traitbeast)
if traitbeast.name then
print(beast.name, traitbeast.name)
local found, ntentacle = false
local name, bonus_or_category = traitbeast.name:match("([%w%s]+)%s%(([%s%w]+)%)")
if not name then ntentacle, name = traitbeast.name:match("(%d)x%s*(Tentacles)") end
@ -47,9 +47,11 @@ while line do
for _, traitdata in pairs(traits.entries) do
if traitdata.id == trim1(name) then
found = true
--traitbeast._id = nil
--traitbeast.id = traitbeast.name --Swap !
traitbeast.name = traitdata.name
traitbeast.data.description.value = traitdata.description
--print(" Found trait " .. trait.name, traitdata.name)
print(" Found trait " .. traitdata.name)
break
end
end
@ -67,4 +69,4 @@ f1:close()
local jsonout = JSON.encode( beast_french )
local fout = io.open("beasts.json", "w+")
fout:write( jsonout )
fout:close()
fout:close()