mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
commit
ca7c761e01
3 changed files with 7 additions and 5 deletions
|
|
@ -12,7 +12,7 @@ Content-pack folder must contain file **package.json** with following contents:
|
|||
{
|
||||
"id": "pack_id",
|
||||
"title": "pack name will be displayed in the content menu",
|
||||
"version": "content-pack version - major.minor",
|
||||
"version": "content-pack version - major.minor.[patch])",
|
||||
"creator": "content-pack creator",
|
||||
"description": "short description",
|
||||
"dependencies": [
|
||||
|
|
@ -26,6 +26,7 @@ Dependency levels are indicated by prefixes in the name:
|
|||
- '!' - required dependency
|
||||
- '?' - optional dependency
|
||||
- '~' - weak dependency
|
||||
|
||||
If prefix is not specified, '!' level will be used.
|
||||
|
||||
Example: '~randutil' - weak dependency 'randutil'.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
{
|
||||
"id": "выбранное_имя_пака",
|
||||
"title": "имя контент-пака для отображения в меню контента",
|
||||
"version": "версия контент-пака в формате major.minor",
|
||||
"version": "версия контент-пака в формате major.minor.[patch]",
|
||||
"creator": "создатель контент-пака",
|
||||
"description": "краткое описание",
|
||||
"dependencies": [
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
- '!' - обязательная зависимость
|
||||
- '?' - опциональная зависимость
|
||||
- '~' - слабая зависимость
|
||||
|
||||
Отсутствие префикса интерпретируется как '!'.
|
||||
|
||||
Пример: '~randutil' - слабая зависимость 'randutil'.
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ return {
|
|||
goto continue
|
||||
end
|
||||
for _, component in pairs(entity.components) do
|
||||
local callback = component.on_update
|
||||
local callback = rawget(component, "on_update")
|
||||
if not component.__disabled and callback then
|
||||
local result, err = pcall(callback, tps)
|
||||
if err then
|
||||
|
|
@ -143,7 +143,7 @@ return {
|
|||
physics_update = function(delta)
|
||||
for uid, entity in pairs(entities) do
|
||||
for _, component in pairs(entity.components) do
|
||||
local callback = component.on_physics_update
|
||||
local callback = rawget(component, "on_physics_update")
|
||||
if not component.__disabled and callback then
|
||||
local result, err = pcall(callback, delta)
|
||||
if err then
|
||||
|
|
@ -156,7 +156,7 @@ return {
|
|||
render = function(delta)
|
||||
for _,entity in pairs(entities) do
|
||||
for _, component in pairs(entity.components) do
|
||||
local callback = component.on_render
|
||||
local callback = rawget(component, "on_render")
|
||||
if not component.__disabled and callback then
|
||||
local result, err = pcall(callback, delta)
|
||||
if err then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue