core: "optimizations"
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local BlockManager = {}
|
local BlockManager = {}
|
||||||
|
|
||||||
BlockManager.BlockIdMappings = {} :: {BasePart}
|
BlockManager.BlockIdMappings = {} :: {BasePart}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local Chunk = {}
|
local Chunk = {}
|
||||||
Chunk.__index = Chunk
|
Chunk.__index = Chunk
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local ChunkBuilder = {}
|
local ChunkBuilder = {}
|
||||||
|
|
||||||
local Chunk = require("./Chunk")
|
local Chunk = require("./Chunk")
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local ChunkManager = {}
|
local ChunkManager = {}
|
||||||
|
|
||||||
local RunService = game:GetService("RunService")
|
local RunService = game:GetService("RunService")
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local Globals = {}
|
local Globals = {}
|
||||||
|
|
||||||
Globals.RenderDistance = 6
|
Globals.RenderDistance = 6
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local ML = {}
|
local ML = {}
|
||||||
|
|
||||||
type modContext = {
|
type modContext = {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local PlacementManager = {}
|
local PlacementManager = {}
|
||||||
|
|
||||||
local ChunkManager = require("./ChunkManager")
|
local ChunkManager = require("./ChunkManager")
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
local module = {}
|
local module = {}
|
||||||
|
|
||||||
|
function module.isNaN(n: number): boolean
|
||||||
|
-- NaN is never equal to itself
|
||||||
|
return n ~= n
|
||||||
|
end
|
||||||
|
|
||||||
|
function module.isInf(n: number): boolean
|
||||||
|
-- Number could be -inf or +inf
|
||||||
|
return math.abs(n) == math.huge
|
||||||
|
end
|
||||||
|
|
||||||
function module.BlockPosStringToCoords(s: string): Vector3
|
function module.BlockPosStringToCoords(s: string): Vector3
|
||||||
-- a,b,c
|
-- a,b,c
|
||||||
local split = string.split(s,",")
|
local split = string.split(s,",")
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local TerrainGen = {}
|
local TerrainGen = {}
|
||||||
|
|
||||||
local deflate = require("./TerrainGen/Deflate")
|
local deflate = require("./TerrainGen/Deflate")
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
print("Hello world!")
|
print("Hello world!")
|
||||||
|
|
||||||
task.synchronize()
|
task.synchronize()
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
if not game:IsLoaded() then
|
if not game:IsLoaded() then
|
||||||
game.Loaded:Wait()
|
game.Loaded:Wait()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
if not game:IsLoaded() then
|
if not game:IsLoaded() then
|
||||||
game.Loaded:Wait()
|
game.Loaded:Wait()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
if not game:IsLoaded() then
|
if not game:IsLoaded() then
|
||||||
game.Loaded:Wait()
|
game.Loaded:Wait()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--!native
|
||||||
|
--!optimize 2
|
||||||
|
|
||||||
local mod = {
|
local mod = {
|
||||||
name = "Blockscraft",
|
name = "Blockscraft",
|
||||||
description = "Base Blockscraft blocks",
|
description = "Base Blockscraft blocks",
|
||||||
|
|||||||
Reference in New Issue
Block a user