forked from public/foundryvtt-wh4-lang-fr-fr
Update README
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -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()
|
||||
|
Reference in New Issue
Block a user