forked from public/foundryvtt-wh4-lang-fr-fr
Synw with 4.3.0
This commit is contained in:
31
tools/foundry_wh4_detect_effects.lua
Normal file
31
tools/foundry_wh4_detect_effects.lua
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
package.path = package.path .. ";luajson/?.lua"
|
||||
local JSON = require"json"
|
||||
|
||||
--local talent_db = "../../WFRP4e-FoundryVTT/packs/talents.db"
|
||||
local traitdb ='/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-core/packs/traits.db'
|
||||
local f1 = io.open(traitdb)
|
||||
|
||||
local function trim1(s)
|
||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
|
||||
local line = f1:read()
|
||||
while line do
|
||||
--print(line)
|
||||
local trait = JSON.decode( line )
|
||||
if trait.effects then
|
||||
for _, effect in pairs(trait.effects) do
|
||||
if effect.flags and effect.flags.wfrp4e and effect.flags.wfrp4e.script then
|
||||
print( trait.name )
|
||||
print( JSON.encode (trait.effects) )
|
||||
print ()
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
line = f1:read()
|
||||
end
|
||||
f1:close()
|
||||
|
Reference in New Issue
Block a user