mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge branch 'dev' into schedule
This commit is contained in:
commit
2c60e7c6ae
16 changed files with 1303 additions and 1 deletions
|
|
@ -317,10 +317,30 @@ entities.get_all = function(uids)
|
|||
return stdcomp.get_all(uids)
|
||||
end
|
||||
end
|
||||
|
||||
local bytearray = require "core:internal/bytearray"
|
||||
|
||||
Bytearray = bytearray.FFIBytearray
|
||||
Bytearray_as_string = bytearray.FFIBytearray_as_string
|
||||
Bytearray_construct = function(...) return Bytearray(...) end
|
||||
|
||||
file.open = require "core:internal/stream_providers/file"
|
||||
file.open_named_pipe = require "core:internal/stream_providers/named_pipe"
|
||||
|
||||
if ffi.os == "Windows" then
|
||||
ffi.cdef[[
|
||||
unsigned long GetCurrentProcessId();
|
||||
]]
|
||||
|
||||
os.pid = ffi.C.GetCurrentProcessId()
|
||||
else
|
||||
ffi.cdef[[
|
||||
int getpid(void);
|
||||
]]
|
||||
|
||||
os.pid = ffi.C.getpid()
|
||||
end
|
||||
|
||||
ffi = nil
|
||||
|
||||
math.randomseed(time.uptime() * 1536227939)
|
||||
|
|
@ -506,6 +526,7 @@ function __vc_on_world_quit()
|
|||
_rules.clear()
|
||||
gui_util:__reset_local()
|
||||
stdcomp.__reset()
|
||||
file.__close_all_descriptors()
|
||||
end
|
||||
|
||||
local __vc_coroutines = {}
|
||||
|
|
@ -662,4 +683,4 @@ function dofile(path)
|
|||
end
|
||||
end
|
||||
return _dofile(path)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue