mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 09:59:44 +00:00
add entity.properties
This commit is contained in:
parent
3edb96e291
commit
283e3c041e
5 changed files with 84 additions and 11 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "world/Level.hpp"
|
||||
#include "world/World.hpp"
|
||||
#include "interfaces/Process.hpp"
|
||||
#include "objects/EntityDef.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
|
@ -298,6 +299,11 @@ void scripting::on_content_load(Content* content) {
|
|||
lua::setfield(L, "properties");
|
||||
lua::pop(L);
|
||||
}
|
||||
if (lua::getglobal(L, "entities")) {
|
||||
push_properties_tables(L, indices.entities);
|
||||
lua::setfield(L, "properties");
|
||||
lua::pop(L);
|
||||
}
|
||||
|
||||
lua::getregistry(L, "app");
|
||||
lua::setglobal(L, "__vc_app");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue