Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity Component System #319

Draft
wants to merge 133 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
7c2747a
feat(ecs): add basic component & entity structure
IllustrisJack Aug 1, 2024
4418e24
feat(ecs): add initial global storage structure
IllustrisJack Aug 1, 2024
e4bc552
feat(ecs): economy first steps
IllustrisJack Aug 1, 2024
61278c9
feat: component folders & additions
IllustrisJack Aug 2, 2024
0262cc9
feat(ecs): component folders & additions
IllustrisJack Aug 2, 2024
69d463a
Merge branch 'feat/ecs' of https://github.com/Limit-Theory-Redux/lthe…
IllustrisJack Aug 2, 2024
ab98c53
feat(ecs): added test, bunch of fixes & restructures
IllustrisJack Aug 7, 2024
15efb0d
Fixed Class Implementation. Temporary Global Storage Fix. Minor Bugs.
LukeJHarvey Aug 15, 2024
103937b
Temporary Global Storage Fix
LukeJHarvey Aug 15, 2024
73891e1
GlobalStorage Changed to Required, not an Instanced Class
LukeJHarvey Aug 15, 2024
e207d2d
Another GlobalStorage Change. Now returning GlobalStorage() instance.…
LukeJHarvey Aug 15, 2024
0c16576
Initial Material Implementation, Unfinished
LukeJHarvey Aug 16, 2024
95ebd35
feat(ecs): add physics rigid body component
IllustrisJack Aug 16, 2024
b5a1552
feat(ecs): add camera entity skeleton
IllustrisJack Aug 16, 2024
d9ba8f0
Minor Change to Inspect and Log for Linting
LukeJHarvey Aug 17, 2024
5a290ec
Material Implementation Update. AutoShaderVar Working. New RenderingTest
LukeJHarvey Aug 17, 2024
1295a7b
Fixed TransformComponent data types and getters/setters
LukeJHarvey Aug 17, 2024
0108e08
refactor(ecs): make ... argument work
IllustrisJack Aug 17, 2024
2143d8b
feat(ecs): add __tostring mt for components and entities
IllustrisJack Aug 17, 2024
4f5ed39
merging changes
LukeJHarvey Aug 17, 2024
d4ffbb6
merging changes
LukeJHarvey Aug 17, 2024
f40f44b
Fixed __tostring in Entity and Component, removed io write
LukeJHarvey Aug 17, 2024
b617657
minor changes
LukeJHarvey Aug 17, 2024
2539e22
Fixing class constructor LLS definitions
LukeJHarvey Aug 17, 2024
903bc20
fix(ecs): #327 archetype value inconsistency
IllustrisJack Aug 17, 2024
04c0b1a
feat(ecs): camera skeleton
IllustrisJack Aug 19, 2024
3f7e52a
feat(utilities): quick profiler moving average
IllustrisJack Aug 19, 2024
7a33917
refactor(utilities): quickprofiler cleanup
IllustrisJack Aug 19, 2024
0273598
feat(ecs): add basic component & entity structure
IllustrisJack Aug 19, 2024
f9036a5
feat(ecs): add initial global storage structure
IllustrisJack Aug 19, 2024
bbc927a
feat(ecs): economy first steps
IllustrisJack Aug 19, 2024
734b498
feat(ecs): component folders & additions
IllustrisJack Aug 19, 2024
e8fd3d4
feat(ecs): added test, bunch of fixes & restructures
IllustrisJack Aug 19, 2024
2907d17
Fixed Class Implementation. Temporary Global Storage Fix. Minor Bugs.
LukeJHarvey Aug 19, 2024
0d87ed5
Temporary Global Storage Fix
LukeJHarvey Aug 19, 2024
39ef945
GlobalStorage Changed to Required, not an Instanced Class
LukeJHarvey Aug 19, 2024
8b1be7e
Another GlobalStorage Change. Now returning GlobalStorage() instance.…
LukeJHarvey Aug 19, 2024
5297528
Initial Material Implementation, Unfinished
LukeJHarvey Aug 19, 2024
006048e
feat(ecs): add physics rigid body component
IllustrisJack Aug 19, 2024
58bf039
feat(ecs): add camera entity skeleton
IllustrisJack Aug 19, 2024
c17eb3b
Minor Change to Inspect and Log for Linting
LukeJHarvey Aug 19, 2024
ef1ff5a
Material Implementation Update. AutoShaderVar Working. New RenderingTest
LukeJHarvey Aug 19, 2024
492cfec
Fixed TransformComponent data types and getters/setters
LukeJHarvey Aug 19, 2024
00372d2
refactor(ecs): make ... argument work
IllustrisJack Aug 19, 2024
e261f89
feat(ecs): add __tostring mt for components and entities
IllustrisJack Aug 19, 2024
d87bb16
merging changes
LukeJHarvey Aug 19, 2024
64bbf1e
merging changes
LukeJHarvey Aug 19, 2024
4724d9f
Fixed __tostring in Entity and Component, removed io write
LukeJHarvey Aug 19, 2024
222278f
minor changes
LukeJHarvey Aug 19, 2024
ee9f819
Fixing class constructor LLS definitions
LukeJHarvey Aug 19, 2024
7bef968
fix(ecs): #327 archetype value inconsistency
IllustrisJack Aug 19, 2024
d0ee04d
feat(ecs): camera skeleton
IllustrisJack Aug 19, 2024
b879e61
feat(utilities): quick profiler moving average
IllustrisJack Aug 19, 2024
b87a076
refactor(utilities): quickprofiler cleanup
IllustrisJack Aug 19, 2024
b70544c
Merge branch 'feat/ecs' of https://github.com/Limit-Theory-Redux/lthe…
IllustrisJack Aug 19, 2024
315a524
refactor(camera_system): event type
IllustrisJack Aug 19, 2024
637fea5
feat(camera_system): camera selection
IllustrisJack Aug 20, 2024
b8a7093
refactor(camera_system): naming
IllustrisJack Aug 20, 2024
e5e5815
feat(ecs): game view system skeleton
IllustrisJack Aug 20, 2024
425ed54
feat(ecs): proper type support
IllustrisJack Aug 21, 2024
f8ab167
feat(ecs): some economy classes
IllustrisJack Aug 21, 2024
564c84b
refactor(ecs): minor refactors
IllustrisJack Aug 21, 2024
a3e89c2
feat(types): performance test and optimizations
IllustrisJack Aug 21, 2024
545a19b
feat(ecs): new ecs test & universe system
IllustrisJack Aug 21, 2024
7058ff3
fix(ecs): fix some log debugging
IllustrisJack Aug 21, 2024
9778211
feat(ecs): universe generation system concept
IllustrisJack Aug 21, 2024
6dcc25f
fix(ecs): typo
IllustrisJack Aug 21, 2024
bd56bb2
feat(types): dynamic construction of type enum
IllustrisJack Aug 21, 2024
39922cf
feat(types): include examples and fix names
IllustrisJack Aug 21, 2024
27f8101
feat(ecs): zones & triggers skeleton
IllustrisJack Aug 22, 2024
81ed8e5
Moved Render Settings into Config
LukeJHarvey Aug 24, 2024
f52eadf
Removed MeshEntityArchetype
LukeJHarvey Aug 24, 2024
066932f
Added Material Definitions, and GenericAutoShaderVars. Fixed Minor bugs
LukeJHarvey Aug 24, 2024
3320073
More Rendering additions. Material/Mesh Storage Created.
LukeJHarvey Aug 24, 2024
e428fd9
Added Enabled to Entity.
LukeJHarvey Aug 24, 2024
05ba328
Added function to remove registeredEvent
LukeJHarvey Aug 24, 2024
ab84d43
Added Asteroid Generator and initial functionality
LukeJHarvey Aug 24, 2024
b520bd8
Minor Bug fixes, and created RenderingEnums
LukeJHarvey Aug 24, 2024
a11cc22
feat(ecs): economy part I
IllustrisJack Aug 24, 2024
036edaa
Changes to Rendering Systems
LukeJHarvey Aug 25, 2024
51049ce
Deprecating Function in CameraSystem. Fixing Requires
LukeJHarvey Aug 25, 2024
914c1a4
Moving GlobalStorage into Systems/Storage. Fixing Requires
LukeJHarvey Aug 25, 2024
f34171c
Adding /logs/ to .gitignore
LukeJHarvey Aug 25, 2024
369def9
Commenting out pseudo code.
LukeJHarvey Aug 25, 2024
7fbd8a3
Material Changes, Added MaterialDefinitions and UniformFuncs
LukeJHarvey Aug 26, 2024
c2657d3
MaterialDefinition now can Create/Get Material. Added StaticShaderVar…
LukeJHarvey Aug 26, 2024
41e5d83
Fixed MaterialDefinition Argument Names
LukeJHarvey Aug 26, 2024
934db6c
Fixed setTextureToShaderState
LukeJHarvey Aug 26, 2024
b78a5a5
Simplified UniformFunc, fixed bugs w/ UniformFunc
LukeJHarvey Aug 27, 2024
c2ce950
Fixed Implementation of Materials
LukeJHarvey Aug 27, 2024
2c44c4f
Minor Changes in Components
LukeJHarvey Aug 27, 2024
d48041c
Added Debug Box Entity for Testing. Fixed Bug in MeshStorage
LukeJHarvey Aug 27, 2024
e793227
Minor Changes
LukeJHarvey Aug 27, 2024
1ff6450
Fixed Implementation of UniformFuncs
LukeJHarvey Aug 31, 2024
f03d56e
Rendering Test Attempt
LukeJHarvey Aug 31, 2024
1707acd
Fixed rendering.
dgavedissian Aug 31, 2024
93843ef
Fix ClipRect.PushDisabled
dgavedissian Aug 31, 2024
b821a30
Fixed AddConstShaderVar
LukeJHarvey Aug 31, 2024
239f6a3
Rendering Core System Initial Implementation
LukeJHarvey Sep 4, 2024
b6649a5
Removed 'renderState', replaced usage with CameraSystem:getCurrentCam…
LukeJHarvey Sep 4, 2024
9e09f40
Using Window for Size/Position
LukeJHarvey Sep 4, 2024
4652e3d
Merge branch 'main' into feat/ecs
IllustrisJack Oct 27, 2024
955ddc3
Merge commit '13e0067e2ad82a038e92d92efcd0a9c8c708e890' into feat/ecs
IllustrisJack Dec 10, 2024
aae68b7
refactor(ecs): minor fixes & reformatting
IllustrisJack Dec 10, 2024
425919e
fix(ecs): missing self declaration
IllustrisJack Dec 10, 2024
dc7eb44
feat(ecs): item definitions
IllustrisJack Dec 10, 2024
8f9328c
feat: add support for state subdirectory calls
IllustrisJack Dec 10, 2024
1d24821
feat(ecs): link components to entities
IllustrisJack Dec 10, 2024
5463c58
chore(ecs): small entity/comp info helper documentation
IllustrisJack Dec 10, 2024
389493e
feat(ecs): some fixes and comments
IllustrisJack Dec 10, 2024
b443a93
Merge commit '6d5dda0e7b1b632c5d942da55939e8f893a87a14' into feat/ecs
IllustrisJack Dec 10, 2024
74670e2
feat(rendering_test): cool rotating box
IllustrisJack Dec 10, 2024
45cd8c6
fix(rendering): warn instead of error and ignore faulty uniform vars
IllustrisJack Dec 10, 2024
0654857
feat(ecs): economy part II
IllustrisJack Dec 10, 2024
e13fc90
feat(ecs): economy part III
IllustrisJack Dec 11, 2024
8a7af54
fix(ecs): delete all components on entity destroy
IllustrisJack Dec 11, 2024
302ac7c
feat(ecs): item related changes
IllustrisJack Jan 21, 2025
40565ac
refactor(ecs): move box entity setup outside of entity file
IllustrisJack Jan 23, 2025
85f5a8e
feat(ecs): allow quantity locking
IllustrisJack Jan 23, 2025
1af4203
feat(ecs): global storage adjustments
IllustrisJack Jan 23, 2025
dd8ac28
chore(ecs): add provisional ecs doc draft
IllustrisJack Jan 25, 2025
913be68
Merge branch 'main' into feat/ecs
IllustrisJack Jan 26, 2025
0fc7efd
chore(tests): move new worker tests into their own folder
IllustrisJack Jan 26, 2025
946cf17
Merge branch 'main' into feat/ecs
IllustrisJack Jan 26, 2025
d3931da
Rename GlobalStorage to Registry.
dgavedissian Feb 1, 2025
e67e1e6
Don't bother tracking initialized in GlobalStorage
dgavedissian Jan 26, 2025
95d89f6
Integrate Enum.Types into Class() and Subclass().
dgavedissian Feb 2, 2025
17ebbc2
Switch ECS types to use Class().
dgavedissian Feb 2, 2025
73d8f1b
Remove Enum.Types completely.
dgavedissian Feb 2, 2025
3b10a99
Move all classes to the new syntax and remove backwards compatibility
dgavedissian Feb 2, 2025
2bb8c3d
Add class names missed by the regex.
dgavedissian Feb 2, 2025
9b5670b
Define a default tostring method for classes and subclasses.
dgavedissian Feb 2, 2025
4bf6923
Merge remote-tracking branch 'origin/main' into feat/ecs
IllustrisJack Feb 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
/target/
/expand.rs

# Logs
/logs/

# IDEs
.idea/
.vs/
Expand Down
2 changes: 1 addition & 1 deletion .workspaces/engine.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"--preview"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.format.enable": true,
"Lua.completion.callSnippet": "Disable",
Expand Down
10 changes: 9 additions & 1 deletion .workspaces/script.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@
"path": "../engine/lib/phx/script",
"name": "Engine Scripts"
},
{
"path": "../engine/lib/phx/src",
"name": "Engine Src"
},
{
"path": "../script",
"name": "LTR Scripts"
},
{
"path": "../",
"name": "full"
}
],
"settings": {
Expand All @@ -30,7 +38,7 @@
"--preview"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.format.enable": true,
"Lua.completion.callSnippet": "Disable",
Expand Down
38 changes: 21 additions & 17 deletions engine/lib/phx/src/math/clip_rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,27 @@ unsafe extern "C" fn TransformRect(x: &mut f32, y: &mut f32, sx: &mut f32, sy: &
pub extern "C" fn ClipRect_Activate(this: Option<&mut ClipRect>) {
match this {
Some(this) => {
let mut vpSize: IVec2 = IVec2::ZERO;

unsafe { Viewport_GetSize(&mut vpSize) };
glcheck!(gl::Enable(gl::SCISSOR_TEST));

let mut x: f32 = this.x;
let mut y: f32 = this.y;
let mut sx: f32 = this.sx;
let mut sy: f32 = this.sy;

unsafe { TransformRect(&mut x, &mut y, &mut sx, &mut sy) };
glcheck!(gl::Scissor(
x as i32,
vpSize.y - (y + sy) as i32,
sx as i32,
sy as i32
));
if this.enabled {
let mut vpSize: IVec2 = IVec2::ZERO;

unsafe { Viewport_GetSize(&mut vpSize) };
glcheck!(gl::Enable(gl::SCISSOR_TEST));

let mut x: f32 = this.x;
let mut y: f32 = this.y;
let mut sx: f32 = this.sx;
let mut sy: f32 = this.sy;

unsafe { TransformRect(&mut x, &mut y, &mut sx, &mut sy) };
glcheck!(gl::Scissor(
x as i32,
vpSize.y - (y + sy) as i32,
sx as i32,
sy as i32
));
} else {
glcheck!(gl::Disable(gl::SCISSOR_TEST));
}
}
None => glcheck!(gl::Disable(gl::SCISSOR_TEST)),
}
Expand Down
16 changes: 10 additions & 6 deletions engine/lib/phx/src/system/time_stamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ impl TimeStamp {

/// Get difference between 2 timestamps in double seconds.
pub fn get_difference(&self, end_time: &TimeStamp) -> f64 {
let difference = end_time
.value
.duration_since(self.value)
.expect("Cannot get timestamp difference");

difference.as_secs_f64()
match end_time.value.duration_since(self.value) {
Ok(difference) => difference.as_secs_f64(),
Err(_e) => {
let difference = self
.value
.duration_since(end_time.value)
.expect("Time overflow");
-difference.as_secs_f64()
}
}
}

/// Number of seconds elapsed since this timestamp.
Expand Down
7 changes: 7 additions & 0 deletions script/Config/Render/CameraConfig.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Render Settings Moved from 'Render/RenderPipeline' --
Config.render.camera = {
fov = 70, -- Float: 50 - 100
-- Both zNear/zFar potentially duplicated in 'Config/genConfig'
zNear = 0.1, -- default: 0.1 -- for NDC Coordinate System
zFar = 1e6, -- default: 1e6 -- for NDC Coordinate System
}
31 changes: 31 additions & 0 deletions script/Config/Render/PostFxConfig.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- Render Settings Moved from 'Render/RenderPipeline' --
--[[
Given that all these Settings are by default already Disabled
render.postfx is potentially fully depricated.
--]]
Config.PostFx = {
abberation = {
enable = false,
strength = 1 -- Float: 0 - 1
},
bloom = {
enable = false,
radius = 48 -- Float: 4 - 64
},
radialblur = {
enable = false,
strength = 1, -- Float: 0 - 1
scanlines = 1 -- Float: 0 - 1
},
sharpen = false, --
tonemap = false, -- Potentially Depricated
--[[
Vignette is currently unused in RenderPipeline
TODO: Decide on removal of renderPipeline:Vignette
vignette = {
enable = false,
strength = 0.25, -- Float: 0 - 1
hardness = 20.0 -- Float: 2 - 32
}
--]]
}
37 changes: 29 additions & 8 deletions script/Config/Render/RenderConfig.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
Config.render = {
defaultResX = 1920,
defaultResY = 1080,
-- Render Settings Moved from 'Render/RenderPipeline' --
Config.render.general = {
superSampleRate = 1, -- 1: 1x, 2: 2x, 3: 4x
downSampleRate = 4,
thrusterLights = false,
pulseLights = false,
fullscreen = false,
fullscreenExclusive = false,
presentMode = PresentMode.Vsync,
fov = 70,
zNear = 0.1, -- default: 0.1
zFar = 1e6, -- default: 1e6
thrusterLights = false,
pulseLights = false,
}

Config.render.window = {
defaultResX = 1920,
defaultResY = 1080,
}

--[[
Both showBuffers and cullFace potentially Depricated
]]--
Config.render.debug = {
showBuffers = false, -- Used Once in Rendering Pipeline, "Show Deferred Buffers"
}
Config.render.renderState = {
cullFace = false, -- Used Once in Rendering Pipeline, "Backface Culling"
}

-- Settings Removed --
--[[
- render.lodScale -- Unused
- render.wireframe -- Currently in Config.debug.physics
- render.logZNear -- Unused
- render.logZFar -- Unused
]]
10 changes: 10 additions & 0 deletions script/Core/LuaExtensions/TypeEx.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local rawtype = type

type = function(value)
local mt = getmetatable(value)
if mt and mt.__type then
return mt.__type
else
return rawtype(value)
end
end
65 changes: 53 additions & 12 deletions script/Core/Structures/Class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Example:

local Ship = class(function (self, name, hp)
local Ship = Class("Ship", function (self, name, hp)
self.name = name
self.health = hp
self.healthMax = hp
Expand All @@ -15,7 +15,7 @@
function Ship:addHangar (unit) assert(false, "No hangar!") end
function Ship:getHangar () return {} end

local Carrier = subclass(Ship, function (self)
local Carrier = Subclass("Carrier", Ship, function (self)
self.hanger = {}
end)

Expand All @@ -24,29 +24,70 @@
----------------------------------------------------------------------------]]
--

function class(ctor)
-- This function takes the class instance `self` and generates a string representation of it in
-- the form: ClassName{field1: 0, field2: 0}.
local function defaulttostring(self)
local result = {}
for key, value in pairs(self) do
local keyStr = tostring(key)
local valueStr = tostring(value)
table.insert(result, keyStr .. ": " .. valueStr)
end
return tostring(type(self)) .. "{" .. table.concat(result, ", ") .. "}"
end

function Class(name, ctor)
-- Define the class.
local cls = {}
cls.__index = cls
cls.__type = cls
cls.__tostring = defaulttostring

-- Define the default constructor
-- This just invokes ctor if it is not nil.
function cls.new(...)
local self = {}
setmetatable(self, cls)
if ctor then ctor(self, ...) end
return self
end

-- Set up the class metatable.
setmetatable(cls, {
__call = function(T, ...)
local self = {}
setmetatable(self, cls)
if ctor then ctor(self, ...) end
return self
return cls.new(...)
end,
__tostring = function()
return name
end
})

return cls
end

function subclass(base, ctor)
function Subclass(name, base, ctor)
-- Define the class.
local cls = {}
cls.__index = cls
cls.__type = cls
cls.__tostring = defaulttostring

-- Define the default constructor.
-- This just invokes ctor on an instance of base() if it is not nil.
function cls.new(...)
local self = base()
setmetatable(self, cls)
if ctor then ctor(self, ...) end
return self
end

-- Set up the class metatable.
setmetatable(cls, {
__call = function(T, ...)
local self = base()
setmetatable(self, cls)
if ctor then ctor(self, ...) end
return self
return cls.new(...)
end,
__tostring = function()
return name
end,
__index = base,
})
Expand Down
2 changes: 1 addition & 1 deletion script/Core/Structures/List.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Includes some useful generic algorithms for common linear list operations.
----------------------------------------------------------------------------]]
--
local List = class(function(self, ...)
local List = Class("List", function(self, ...)
local args = { ... }
for i = 1, #args do
self[i] = args[i]
Expand Down
2 changes: 1 addition & 1 deletion script/Core/Structures/Map.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local Map = class(function(self, ctor)
local Map = Class("Map", function(self, ctor)
self.__ctor = ctor
end)

Expand Down
32 changes: 32 additions & 0 deletions script/Core/Util/Clone.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function ShallowClone(obj)
local copy = {}
for key, value in pairs(obj) do
copy[key] = value
end

-- Preserve the metatable
setmetatable(copy, getmetatable(obj))

return copy
end

function DeepClone(obj, seen)
if type(obj) ~= "table" then
return obj
end

if seen and seen[obj] then
return seen[obj] -- Handle circular references
end

local copy = {}
seen = seen or {}
seen[obj] = copy

for key, value in pairs(obj) do
copy[DeepClone(key, seen)] = DeepClone(value, seen)
end

setmetatable(copy, getmetatable(obj)) -- Preserve metatable
return copy
end
11 changes: 0 additions & 11 deletions script/Core/Util/Copy.lua

This file was deleted.

2 changes: 1 addition & 1 deletion script/Core/Util/Distribution.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
TODO : Implement Alias Method for O(1) sampling. Sampling is currently O(n).
----------------------------------------------------------------------------]]

local Distribution = class(function(self)
local Distribution = Class("Distribution", function(self)
self.values = {}
self.weights = {}
end)
Expand Down
2 changes: 1 addition & 1 deletion script/Core/Util/Inspect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 th
end
; local math = _tl_compat and _tl_compat.math or math; local string = _tl_compat and _tl_compat.string or string; local table =
_tl_compat and _tl_compat.table or table
local inspect = { Options = {}, }
local inspect = { Options = {}, }



Expand Down
Loading
Loading