Module:GameData: Difference between revisions

Remove redundant caching wrappers, mw.loadJsonData already caches (with help from vergir-bot LLM)
Vergir (talk | contribs)
m remove weapon dive, clean comments a bit
Line 1: Line 1:
-- Module:GameData
-- Provides generic access to game data files
-- Provides generic access to game data files, with consistent active-entity filtering.
-- Used by ItemTables, and intended for future AbilityTables, HeroTables, etc.


local p = {}
local p = {}
Line 143: Line 141:
     local result = resolve_prop(entity, prop)
     local result = resolve_prop(entity, prop)
     if result ~= nil then return result end
     if result ~= nil then return result end
    if entity.Weapon then
        result = resolve_prop(entity.Weapon, prop)
        if result ~= nil then return result end
    end


     return '<span style="color:red;">Prop not found: ' .. name .. '/' .. prop .. '</span>'
     return '<span style="color:red;">Prop not found: ' .. name .. '/' .. prop .. '</span>'