Merge pull request #918 from MihailRis/fixes

other fixes
This commit is contained in:
MihailRis 2026-08-07 23:38:52 +03:00 • committed by GitHub
commit ca7c761e01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View file

@ -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'.

View file

@ -12,7 +12,7 @@
{
"id": "выбранное_имя_пака",
"title": "имя контент-пака для отображения в меню контента",
"version": "версия контент-пака в формате major.minor",
"version": "версия контент-пака в формате major.minor.[patch]",
"creator": "создатель контент-пака",
"description": "краткое описание",
"dependencies": [
@ -28,6 +28,7 @@
- '!' - обязательная зависимость
- '?' - опциональная зависимость
- '~' - слабая зависимость
Отсутствие префикса интерпретируется как '!'.
Пример: '~randutil' - слабая зависимость 'randutil'.

View file

@ -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