Component Server
Component is a very useful module to manage entity component. The module is designed to create a persistence of component colors if you defined a custom colorway.
JO Functions
jo.component.getFullHorseComponentList()
A function to get the list of horse's components sorted by category
Syntax
lua
jo.component.getFullHorseComponentList()
Return Value
Type : table
Example
lua
local horseComponents = jo.component.getFullHorseComponentList()
for category,datas in pairs (horseComponents) do
print(category, table.count(datas))
end
jo.component.getFullPedComponentList()
A function to get the list of clothes sorted by sex and category
Syntax
lua
jo.component.getFullPedComponentList()
Return Value
Type : table
Example
lua
local pedComponents = jo.component.getFullPedComponentList()
for category,datas in pairs (pedComponents) do
print(category, table.count(datas))
end