Модуль:Сущность/data: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 33: | Строка 33: | ||
end | end | ||
end | end | ||
end | end | ||
| Строка 52: | Строка 45: | ||
end | end | ||
return content | return content | ||
end | end | ||
| Строка 76: | Строка 51: | ||
return {} | return {} | ||
end | end | ||
local entity = dp.loadEntityData(entityId) | |||
if entity then | |||
return dp.collectEntityComponents(entity) | |||
end | end | ||
return {} | |||
end | end | ||
| Строка 114: | Строка 73: | ||
end | end | ||
return dp.entityHasComponent(entity, compName) | |||
end | end | ||
| Строка 822: | Строка 771: | ||
local prototypeBlacklist = frame.args.prototypeBlacklist or frame.args.prototypeblacklist or "" | local prototypeBlacklist = frame.args.prototypeBlacklist or frame.args.prototypeblacklist or "" | ||
local prototypeStoreDefs = | local prototypeStoreDefs = dp.loadCachedData("prototype_store.json") | ||
if not prototypeStoreDefs then | if not prototypeStoreDefs then | ||
return false | return false | ||
| Строка 891: | Строка 840: | ||
end | end | ||
local componentStoreDefs = | local componentStoreDefs = dp.loadCachedData("component_store.json") | ||
if type(componentStoreDefs) == "table" and (not anyEntityWhitelist or compHasWhitelist) then | if type(componentStoreDefs) == "table" and (not anyEntityWhitelist or compHasWhitelist) then | ||
local compStore = componentStoreDefs[id] | local compStore = componentStoreDefs[id] | ||