Skip to content

Commit cbb0523

Browse files
authored
Refactor and fixes (#55)
* build: replace luarocks with lux * chore(lsp): replace luals with emmylua_ls * chore(lint): update luacats types and selene stdlibs * feat(vscripts)!: major refactoring: Yes, this is one of those refactor-everything, impossible-to-review, just-trust-me-bro commits. Luckily the test suite holds (mostly) everything together. * add `compat53` * remove `penlight` and `moses` - add `middleclass` for classes - add `inspect` for value formatting - manually implement table/function/string utils * reorganization - rename top-level module `invokation` to `invk` - extract and reorganize a lot of code - remove a lot of unused code - rewrite/refactor tests support code * types - replace ldoc tags with emmylua_ls tags (LuaCATS) * code style - use snake_case * probably a hell of a lot of other things * chore: update ignore files * chore: update luacov config * chore: remove luacov * chore: remove vscode config * build: update tasks to use lux * chore: update biome config * chore: update javascript dependencies * fix(vscripts): fix timers and event handling * chore(panorama): update dependencies * fix(panorama): fix casing for networked data * chore: update selene config * chore(panorama): fix lint warnings * docs: update DEVELOPMENT * feat(vscripts): improve hero reset * test(vscripts): fix tests * chore(lua): update `middleclass` types * chore(vscripts): refactor game events * chore(vscripts): refactor game rules * chore(vscripts): refactor game mode setup * fix(vscripts): fix item key values * chore(vscripts): refactor custom events setup * refactor(vscripts): change table mapping types * fix(panorama): fix item picker * feat(vscripts): improve hero reset * chore: update bun lock
1 parent 66e7f29 commit cbb0523

328 files changed

Lines changed: 21043 additions & 42523 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.busted

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ return {
1515
default = {
1616
ROOT = { "./spec" },
1717
recursive = true,
18+
verbose = true,
19+
output = "htest",
1820
},
1921
_all = {
2022
verbose = true,
21-
coverage = true,
2223
helper = "./spec/helper.lua",
2324
lpath = lpath,
2425
},

.emmyrc.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json",
3+
"runtime": {
4+
"pathStrict": true,
5+
"special": {
6+
"assertf": "assert",
7+
"errorf": "error"
8+
},
9+
"requirePattern": [
10+
"?.lua",
11+
"?/init.lua"
12+
],
13+
"version": "LuaJIT"
14+
},
15+
"workspace": {
16+
"ignoreDir": [
17+
".busted",
18+
".lux",
19+
"tmp"
20+
],
21+
"workspaceRoots": [
22+
"game/scripts/vscripts",
23+
"spec"
24+
],
25+
"library": [
26+
".luacats",
27+
"game/scripts/vscripts/compat53",
28+
"game/scripts/vscripts/fsm.lua",
29+
"game/scripts/vscripts/inspect.lua",
30+
"game/scripts/vscripts/middleclass.lua",
31+
".lux/jit/test_dependencies/jit/01a3c364614bddff7370223a5a9c4580f8e62d144384148444c518ec5367a59b-mediator_lua@1.1.2-0/src",
32+
".lux/jit/test_dependencies/jit/092886a00e3c7cb9cb944528116da6ce7d5e4a25b9d198735ac1b1307f77dca5-bit32@5.3.5-1/src",
33+
".lux/jit/test_dependencies/jit/287e827f4a088d41bba04af5f61a13614346c16fe8150eb7c4246e67d6fd163e-lua-term@0.8-1/src",
34+
".lux/jit/test_dependencies/jit/316ac0b30e04e86a253d64886f3b110bd0508267474e6b58a3b973bd6857dbf4-penlight@1.14.0-3/src",
35+
".lux/jit/test_dependencies/jit/455cd98d50c6191a9685cffcda4ce783efbb957934625e134c39f43bd5df6818-luassert@1.9.0-1/src",
36+
".lux/jit/test_dependencies/jit/47b12edcdc032232157ace97bddf34bddd17f6f458095885e62bbd602ad9e9ec-luasystem@0.6.3-1/src",
37+
".lux/jit/test_dependencies/jit/4e9592a499c9ced4f8ce366db9db7d9c0dd1424ea8d4c8c16c1550ea3a61a696-say@1.4.1-3/src",
38+
".lux/jit/test_dependencies/jit/672112d42de52914cd6daaac8a86cf906f80360bd81d6ad0a1df51224d74e9d4-busted-htest@1.0.0-2/src",
39+
".lux/jit/test_dependencies/jit/6ce29c2c535c40246c386c056f24689344cddb56ec397473931431e6b67694d2-say@1.4.1-3/src",
40+
".lux/jit/test_dependencies/jit/832fd9862ce671c0c9777855d4c8b19f9ad9c2679fb5466c3a183785a51b76b0-luafilesystem@1.8.0-1/src",
41+
".lux/jit/test_dependencies/jit/8a29d183b38f69620275ab4765d677ada24ff5f96f48d2018d0ee7bcd8ad057e-busted@2.2.0-1/src",
42+
".lux/jit/test_dependencies/jit/9a3c8a33388fd17cf44291697753b48efba841849e4a92dc37c4f7a4c6877c86-compat53@0.14.4-1/src",
43+
".lux/jit/test_dependencies/jit/a6c5176043cb3de56336b7de119443dbb3d9e024be1d50e06289ad4b4959a2da-lua_cliargs@3.0.2-1/src",
44+
".lux/jit/test_dependencies/jit/c82b26bea8099fcea79b4e243145c4cf2597abdde010248e02fcd273e490e1bb-penlight@1.14.0-3/src",
45+
".lux/jit/test_dependencies/jit/d792a2d7b67521e3af5c323f99f9c5b20625b649826613bdf93854482c22dd1b-moses@2.1.0-1/src",
46+
".lux/jit/test_dependencies/jit/e4f17b9e67313bbd5e90f425672fc8998dd0bfa43335f7c57ed2de7a799e07a6-dkjson@2.8-1/src"
47+
]
48+
}
49+
}

.gitignore

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# project
2+
23
/.env*
34
/tmp/*
45
!/tmp/.keep
6+
57
# lua
6-
/.lua-version
7-
/.luarocks
8-
/lua
9-
/lua_modules
10-
/luarocks
8+
9+
/.lux
10+
1111
# javascript/typescript
12-
/.node-version
12+
1313
/node_modules
14+
*.tsbuildinfo
15+
1416
# game
17+
1518
/content/panorama/scripts/*
1619
/game/*
1720
!/game/resource

.ignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
game/scripts/vscripts/pl
2-
game/scripts/vscripts/moses.lua
1+
game/scripts/vscripts/compat53
32
game/scripts/vscripts/fsm.lua
3+
game/scripts/vscripts/inspect.lua
4+
game/scripts/vscripts/middleclass.lua
45
images
56
tmp

.luacats/busted.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
---@meta
1+
--# selene: allow(incorrect_standard_library_use)
2+
--- @meta
23

34
assert = require("luassert")
45
spy = require("luassert.spy")

0 commit comments

Comments
 (0)