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 25 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
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
8 changes: 4 additions & 4 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(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(Ship, function (self)
self.hanger = {}
end)

Expand All @@ -24,7 +24,7 @@
----------------------------------------------------------------------------]]
--

function class(ctor)
function Class(ctor)
local cls = {}
cls.__index = cls
setmetatable(cls, {
Expand All @@ -38,7 +38,7 @@ function class(ctor)
return cls
end

function subclass(base, ctor)
function Subclass(base, ctor)
local cls = {}
cls.__index = cls
setmetatable(cls, {
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(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(function(self, ctor)
self.__ctor = ctor
end)

Expand Down
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(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
11 changes: 11 additions & 0 deletions script/Core/Util/Iterator.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---@class Iterator
function Iterator(t)
local i = 0
local n = #t
Expand All @@ -7,6 +8,16 @@ function Iterator(t)
end
end

---@class IteratorIndexed
function IteratorIndexed(t)
local i = 0
local n = #t
return function()
i = i + 1
if i <= n then return i, t[i] end
end
end

--[[
example of usage:

Expand Down
1 change: 1 addition & 0 deletions script/Core/Util/Log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Message logging functions.
----------------------------------------------------------------------------]]
--
---@class Log
local Log = {}

-- Lowlevel tracing information
Expand Down
51 changes: 51 additions & 0 deletions script/Enums/Archetypes.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
-- Archetypes

---@enum EntityArchetype
Enums.EntityArchetype = {
StarSystemEntity = 1,
StarEntity = 2,
PlanetEntity = 3,
MoonEntity = 4,
AsteroidEntity = 5,
SpaceStationEntity = 6,
SpaceshipEntity = 7,
EffectEntity = 8,
PlayerEntity = 9,
CameraEntity = 10,
-- ...
}

local entityArchetypeNames = {}
for k, v in pairs(Enums.EntityArchetype) do
entityArchetypeNames[v] = k
end

---@param archetype EntityArchetype
---@return string
function Enums.EntityArchetype:getName(archetype)
return entityArchetypeNames[archetype]
end

---@enum ComponentArchetype
Enums.ComponentArchetype = {
NameComponent = 1,
TypeComponent = 2,
HierarchyComponent = 3,
RandomNumberGeneratorComponent = 4,
TransformComponent = 5,
PlayerListComponent = 6,
MeshComponent = 7,
MaterialComponent = 8
-- ...
}

local componentArchetypeNames = {}
for k, v in pairs(Enums.ComponentArchetype) do
componentArchetypeNames[v] = k
end

---@param archetype EntityArchetype
---@return string
function Enums.ComponentArchetype:getName(archetype)
return componentArchetypeNames[archetype]
end
7 changes: 0 additions & 7 deletions script/Enums/EntityType.lua

This file was deleted.

1 change: 1 addition & 0 deletions script/Enums/HullRoleEnums.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Enums.ShipHullRoles = {
}
}

---@enum SpaceShipHullType
Enums.StationHulls = {
Small = 1,
Medium = 2,
Expand Down
7 changes: 7 additions & 0 deletions script/Enums/ShaderEnums.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---@enum TextureType
Enums.TextureType = {
Tex1D = 1,
Tex2D = 2,
Tex3D = 3,
TexCube = 4,
}
2 changes: 1 addition & 1 deletion script/GameObjects/Action.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
----------------------------------------------------------------------------]]
--

local Action = class(function(self) end)
local Action = Class(function(self) end)

-- Virtual ---------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Attack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local SocketType = require('GameObjects.Entities.Ship.SocketType')
-- temp settings
local outOfRangeCancel = 30

local Attack = subclass(Action, function(self, target)
local Attack = Subclass(Action, function(self, target)
self.target = target
end)

Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/CriminalThink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local Player = require('GameObjects.Entities.Player')

-- Temporary File until other systems are more fleshed out, to be merged into a general AI script that handles all the THINKING

local CriminalThink = subclass(Action, function(self)
local CriminalThink = Subclass(Action, function(self)
self.timer = 0
self.rng = RNG.FromTime()
end)
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/DockAt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local rng = RNG.FromTime()
-- TODO : Dock range should be specified by the dockable component
local kDockRange = 2000 -- ships are getting "stuck" at 250

local DockAt = subclass(Action, function(self, target)
local DockAt = Subclass(Action, function(self, target)
self.target = target
end)

Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Escort.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local Escort = subclass(Action, function(self, target, offset)
local Escort = Subclass(Action, function(self, target, offset)
self.target = target
self.offset = offset
end)
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/MaraudAt.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local MaraudAt = subclass(Action, function(self, zone, radius)
local MaraudAt = Subclass(Action, function(self, zone, radius)
self.radius = radius
self.targetPosition = nil
self.system = nil
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/MineAt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local Action = require('GameObjects.Action')
local kLeadTime = 1.0
local orbitTime = 30

local MineAt = subclass(Action, function(self, source, target, miningTimePerItem)
local MineAt = Subclass(Action, function(self, source, target, miningTimePerItem)
assert(source:hasYield())
self.source = source
self.target = target
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/MoveTo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local Action = require('GameObjects.Action')
local rng = RNG.FromTime()
local timeUntilTravelDrive = 15 -- temporary local setting

local MoveTo = subclass(Action, function(self, target, range, useTravelDrive)
local MoveTo = Subclass(Action, function(self, target, range, useTravelDrive)
self.target = target
self.range = range
self.useTravelDrive = useTravelDrive
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/MoveToPos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local Action = require('GameObjects.Action')
local rng = RNG.FromTime()
local timeUntilTravelDrive = 15 -- temporary local setting

local MoveToPos = subclass(Action, function(self, targetPos, range, useTravelDrive)
local MoveToPos = Subclass(Action, function(self, targetPos, range, useTravelDrive)
self.targetPos = targetPos
self.range = range
self.useTravelDrive = useTravelDrive
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Orbit.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local Orbit = subclass(Action, function(self, target, radius, orbitTime)
local Orbit = Subclass(Action, function(self, target, radius, orbitTime)
self.target = target
self.orbitRadius = radius
self.orbitTime = orbitTime
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Patrol.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local Patrol = subclass(Action, function(self, patrolNodes)
local Patrol = Subclass(Action, function(self, patrolNodes)
self.patrolNodes = patrolNodes
self.patrolCurrentNodeIndex = 1
self.system = nil
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Repeat.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local Repeat = subclass(Action, function(self, actions)
local Repeat = Subclass(Action, function(self, actions)
self.actions = actions
end)

Expand Down
4 changes: 2 additions & 2 deletions script/GameObjects/Actions/Think.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local Action = require('GameObjects.Action')
local Player = require('GameObjects.Entities.Player')

local Think = subclass(Action, function(self)
local Think = Subclass(Action, function(self)
self.timer = 0
self.rng = RNG.FromTime()
end)
Expand Down Expand Up @@ -51,7 +51,7 @@ function Think:manageAsset(asset)
asset:pushAction(bestJob)
end
end
]]--
]] --

-- Use payout, not flow
function Think:manageAsset(asset)
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Undock.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local Undock = subclass(Action, function(self) end)
local Undock = Subclass(Action, function(self) end)

function Undock:clone()
return Undock()
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Actions/Wait.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Action = require('GameObjects.Action')

local Wait = subclass(Action, function(self, duration)
local Wait = Subclass(Action, function(self, duration)
self.duration = duration
self.t = 0
end)
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Elements/Components/Armor.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local Entity = require('GameObjects.Entity')
local SocketType = require('GameObjects.Entities.Ship.SocketType')

local Armor = subclass(Entity, function(self)
local Armor = Subclass(Entity, function(self)
self.name = Config.gen.compArmorStats.name
self.healthCurr = Config.gen.compArmorStats.healthCurr
self.healthMax = Config.gen.compArmorStats.healthMax
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Elements/Components/Capacitor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local Bindings = require('States.ApplicationBindings')
local shared
local rng = RNG.FromTime()

local Capacitor = subclass(Entity, function(self)
local Capacitor = Subclass(Entity, function(self)
-- All of this crap is completely worthless, but updateCapacitor() will not be called without it
if not shared then
shared = {}
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Elements/Components/Cloak.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local SocketType = require('GameObjects.Entities.Ship.SocketType')
local shared
local rng = RNG.FromTime()

local Cloak = subclass(Entity, function(self)
local Cloak = Subclass(Entity, function(self)
-- All of this crap is completely worthless, but updateCloak() will not be called without it
if not shared then
shared = {}
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Elements/Components/Communicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local SocketType = require('GameObjects.Entities.Ship.SocketType')
local shared
local rng = RNG.FromTime()

local Communicator = subclass(Entity, function(self)
local Communicator = Subclass(Entity, function(self)
-- All of this crap is completely worthless, but updateCommunicator() will not be called without it
if not shared then
shared = {}
Expand Down
2 changes: 1 addition & 1 deletion script/GameObjects/Elements/Components/Computer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local SocketType = require('GameObjects.Entities.Ship.SocketType')
local shared
local rng = RNG.FromTime()

local Computer = subclass(Entity, function(self)
local Computer = Subclass(Entity, function(self)
-- All of this crap is completely worthless, but updateComputer() will not be called without it
if not shared then
shared = {}
Expand Down
Loading