This repository was archived by the owner on Feb 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
90 lines (55 loc) · 1.75 KB
/
main.lua
File metadata and controls
90 lines (55 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
--[[
How to push to github:
git add .
git commit -m"Message here"
git push origin master
]]
_G.love.graphics.setDefaultFilter("nearest", "nearest")
-- Globals here:
setmetatable(_G, {})
do
-- main ECS
_G.Cyan = require "libs.Cyan.Cyan"
_G.ccall = _G.Cyan.call -- quality of life
_G.Tools = require"libs.tools.tools" -- Tools
_G.CONSTANTS = require"src.misc._CONSTANTS"
end
-- End globals, (Except EH, few lines down.)
setmetatable(_G, {
__newindex = function(_,k) error("DONT MAKE GLOBALS :: " .. tostring(k)) end,
__index = function(_,k)
error("UNDEFINED VAR :: " .. tostring(k))
end,
__metatable = "defensive"
})
-- These aren't globals, but they are mutating the standard library
-- So im gonna put em here.
-- Mutate table library:
table.copy = require "libs.tools.copy"
table.shuffle = require "libs.NM_fisher_yates_shuffle.shuffle"
require("libs.NM_stable_sort.sort"):export() -- exports to `_G.table`
-- Mutate math library:
math.vec3 = require "libs.math.NM_vec3"
math.dot = require "libs.math.dot"
math.roman = require "libs.math.NM_roman" -- roman numeral converter
local USE_STEAM = false
if USE_STEAM then
-- load steam module
local success, luasteam = pcall(require, "luasteam")
if success then
print("[luasteam]: successfully loaded")
rawset(_G, "luasteam", luasteam)
luasteam.init()
else
rawset(_G, "luasteam", false)
end
else
rawset(_G, "luasteam", false)
end
-- Entity construction helper functions / util
rawset(_G, "EH", require 'src.entities._EH')
require("src.systems._SYSTEMS")
require("src.entities")
require("src.misc._MISC")
--print(("We got %d bits left in compbitbase"):format(Cyan.getFreeBits()))
Tools.assertNoDuplicateRequires()