Skip to content

Commit 3da52c4

Browse files
authored
Merge pull request #12 from NotMyWing/evangelion-rebuilds
Rebuild of Evangelion
1 parent 6ed18c9 commit 3da52c4

317 files changed

Lines changed: 12133 additions & 6540 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.

.luarc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"workspace.ignoreDir": [
3+
"src/lua/entities/gmod_wire_expression2"
4+
]
5+
}

NOTICE

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
# The Moonpanel
22

3-
Puzzle panels, written in moon language. As inspired by The Witness, a game by Thekla Inc.
4-
Initially written for Starfall/StarfallEx, now a separate addon.
3+
A Garry's Mod addon for Witness-style puzzle panels. It is written in
4+
MoonScript and compiled to Lua.
55

6-
If you don't understand the puzzle mechanics, then perhaps you should play The Witness.
6+
The project started as a Starfall/StarfallEx experiment and grew into its own
7+
addon. The Witness is the obvious inspiration. [You should play The Witness](https://store.steampowered.com/app/210970/The_Witness/).
78

8-
## Getting Started
9+
## Development
910

10-
TBA.
11-
12-
## Build and package
13-
14-
Install Node.js, npm, LuaJIT, and LuaRocks. Install MoonScript through
15-
LuaRocks, then install the project dependencies and run the test suite:
11+
Install Node.js, LuaJIT, LuaRocks, and MoonScript. Then install the Node
12+
dependencies and run the tests:
1613

1714
```sh
1815
luarocks install moonscript
1916
npm ci
2017
npm test
2118
```
2219

23-
`npm test` compiles the addon into `dest/`, runs the Lua and LuaJIT tests,
24-
and checks a temporary GMA package.
20+
`npm test` rebuilds `dest/`, runs the Lua and LuaJIT suites, and smoke-tests a
21+
temporary GMA package.
2522

2623
Create the distributable files with:
2724

@@ -31,49 +28,44 @@ npm run package:zip
3128
npm run verify:package
3229
```
3330

34-
The GMA, ZIP, and manifest are written to `artifacts/`. The GMA writer is
35-
implemented in Node and does not require Garry's Mod or `gmad`. To also check
36-
the archive with an installed official `gmad`, set `MOONPANEL_GMAD` when
37-
running `npm run verify:package`.
31+
The GMA, ZIP, and manifest go in `artifacts/`. The GMA writer is implemented
32+
in Node, so it does not need Garry's Mod or `gmad`. If `gmad` is installed,
33+
set `MOONPANEL_GMAD` when running `npm run verify:package` to check the archive
34+
with it too.
3835

39-
For live development, use `npm run watch`. It updates files in place using
40-
atomic writes. If generated output is stale, `npm run rebuild` removes and
41-
recreates `dest/` before building.
36+
For live development, use `npm run watch`. It rebuilds generated files in
37+
place. If `dest/` gets stale, run `npm run rebuild`.
4238

43-
## Built With
39+
## Tools
4440

4541
* [Node.js](https://nodejs.org/)
4642
* [LuaJIT](https://luajit.org/)
4743
* [LuaRocks](https://luarocks.org/)
4844
* [Moonscript](https://moonscript.org)
4945

50-
## Contributing
51-
52-
TBA.
53-
54-
## Authors
46+
## People
5547

5648
* **NotMyWing** - [NotMyWing](https://github.com/NotMyWing)
5749

58-
## License
50+
## Code and assets
5951

60-
Moonpanel source code is licensed under the Apache License, Version 2.0, as
61-
declared in `package.json`. Redistributions and derivatives must retain the
62-
copyright, license, and attribution notices, and modified files must identify
63-
their changes. See [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE).
52+
Moonpanel's code is Apache 2.0; see [`LICENSE`](LICENSE).
6453

65-
All The Witness-derived visual assets, audio assets, and other original game
66-
content are strictly credited to Thekla, Inc. They remain the property of
67-
Thekla, Inc. and are not relicensed under the Apache License.
54+
Some code and assets came from other projects. See
55+
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for the list. The Witness
56+
assets belong to Thekla and are not relicensed here.
6857

69-
## Acknowledgments
58+
## Credits
7059

71-
* **Thekla, Inc. and Jonathan Blow** - *The Witness, its puzzle language, original visual and audio assets, and the primary inspiration for this project.*
72-
* [TheFifthMatt](https://windmill.thefifthmatt.com/) - *The existence of The Windmill inspired this project and its later dedicated importer.*
73-
* [Tyler Schrock](https://github.com/Tschrock) - *The Windmill importer.*
74-
* [Soojin Nam](https://github.com/sjnam/lua-dancing-links) - *Lua Dancing Links*
75-
* [thegrb93 and contributors](https://github.com/thegrb93/StarfallEx/) - *StarfallEX and the panel rendering codebase*
76-
* [BytewaveMLP](https://github.com/BytewaveMLP) - *Buildscript*
60+
* **Thekla, Inc. and Jonathan Blow** — The Witness and the puzzle language that
61+
started this whole thing.
62+
* [TheFifthMatt](https://windmill.thefifthmatt.com/) — The Windmill.
63+
* [Tyler Schrock](https://github.com/Tschrock) — The Windmill importer.
64+
* [thegrb93 and contributors](https://github.com/thegrb93/StarfallEx/) — The
65+
StarfallEx panel code this grew out of.
66+
* [WireMod contributors](https://github.com/wiremod/wire) — The editor-presence
67+
animation we adapted.
68+
* [BytewaveMLP](https://github.com/BytewaveMLP) — Buildscript work.
7769

7870
## WireMod and Expression 2
7971

THIRD_PARTY_NOTICES.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Third-party notices
2+
3+
## WireMod
4+
5+
Moonpanel's editor-presence animation is based on WireMod's Expression 2
6+
"in editor" animation. Moonpanel swaps the gears for clue sprites.
7+
8+
- Copyright the WireMod contributors
9+
- Source: https://github.com/wiremod/wire/blob/master/lua/wire/stools/expression2.lua
10+
- License: Apache License 2.0
11+
12+
## The Witness
13+
14+
Moonpanel is inspired by The Witness's puzzle language and presentation.
15+
The Witness is by Thekla, Inc. and Jonathan Blow. Its original code, art,
16+
audio, and other assets are not part of Moonpanel's Apache License 2.0.
17+
18+
- Website: https://the-witness.net/
19+
- Rights holder: Thekla, Inc.

docs/WIREMOD.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ WireMod is optional. Moonpanel works without it.
1515
| --- | --- |
1616
| `Powered` | Whether the panel is powered. |
1717
| `Solved` | Whether the panel is solved. With erasers, this changes after the eraser feedback finishes. |
18-
| `Errored` | Whether the most recent terminal evaluation reported an error. |
19-
| `Success` | Legacy numeric success output. It follows the historical eraser delay. |
18+
| `Errored` | Whether the most recent terminal evaluation failed; with erasers, it latches after feedback. |
2019
| `SolvedPulse` | One pulse for a successful terminal evaluation. |
2120
| `FailedPulse` | One pulse for an unsuccessful terminal evaluation. |
2221
| `AbortedPulse` | One pulse when an active trace is aborted. |
@@ -32,8 +31,7 @@ saves.
3231
WireMod loads the optional Moonpanel E2 extension, which provides:
3332

3433
`moonpanelPowered`, `moonpanelSolved`, `moonpanelErrored`, `moonpanelPath`,
35-
`moonpanelRevision`, `moonpanelWidth`, `moonpanelHeight`, `moonpanelCell`,
36-
`moonpanelData`, and owner-checked `moonpanelReset`.
34+
`moonpanelRevision`, `moonpanelWidth`, `moonpanelHeight`, and owner-checked
35+
`moonpanelReset`.
3736

38-
`moonpanelData` is limited to 8192 characters. `moonpanelReset` clears the
39-
current run without changing the puzzle layout.
37+
`moonpanelReset` clears the current run without changing the puzzle layout.

gulpfile.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const MODEL_GLOBS = [
2323
'src/models/**/*',
2424
];
2525

26+
const STATIC_DATA_GLOBS = [
27+
'src/data_static/**/*',
28+
];
29+
2630
const METADATA_GLOBS = [
2731
'src/addon.json',
2832
];
@@ -114,7 +118,7 @@ function moon() {
114118
.pipe(compileMoonscript())
115119
.pipe(optimizeLua())
116120
.pipe(discourageLuaMod())
117-
// .pipe(minifyLua())
121+
.pipe(minifyLua())
118122
.pipe(atomicDest('dest'));
119123
}
120124
moon.description = "Compiles moonscript files.";
@@ -167,6 +171,16 @@ function model() {
167171
}
168172
model.description = "Copies model files.";
169173

174+
/**
175+
* Copies immutable addon-shipped data. Garry's Mod mounts this through GAME;
176+
* it is deliberately kept separate from the writable DATA realm.
177+
*/
178+
function staticData() {
179+
return gulp.src(STATIC_DATA_GLOBS, { base: 'src', since: gulp.lastRun(staticData) })
180+
.pipe(atomicDest('dest'));
181+
}
182+
staticData.description = "Copies immutable static data files.";
183+
170184
/**
171185
* Copies metadata files.
172186
*/
@@ -195,7 +209,7 @@ packageZip.description = "Packages the compiled addon as a zip.";
195209
/**
196210
* Generates and moves assets.
197211
*/
198-
const assets = gulp.parallel(materials, sound, model, metadata);
212+
const assets = gulp.parallel(materials, sound, model, staticData, metadata);
199213
assets.description = "Generates and copies assets.";
200214

201215
/**
@@ -207,6 +221,7 @@ function watchAssets() {
207221
...MATERIAL_GLOBS,
208222
...SOUND_GLOBS,
209223
...MODEL_GLOBS,
224+
...STATIC_DATA_GLOBS,
210225
...METADATA_GLOBS,
211226
]
212227
, assets
@@ -237,6 +252,7 @@ rebuild.description = "Deletes the output tree, then performs a clean build.";
237252

238253
exports.clean = clean;
239254
exports.materials = materials;
255+
exports.staticData = staticData;
240256
exports.assets = assets;
241257
exports.watchAssets = watchAssets;
242258
exports.packageZip = packageZip;

package-lock.json

Lines changed: 10 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
"rebuild": "gulp rebuild",
1919
"watch": "gulp watch",
2020
"clean": "gulp clean",
21-
"package:gma": "npm run build && node tools/gma.js create --input dest --output artifacts/moonpanel.gma --manifest artifacts/moonpanel.manifest.json",
22-
"package:zip": "npm run build && gulp packageZip",
21+
"package:gma": "npm run rebuild && node tools/gma.js create --input dest --output artifacts/moonpanel.gma --manifest artifacts/moonpanel.manifest.json",
22+
"package:zip": "npm run rebuild && gulp packageZip",
2323
"verify:package": "node tools/package_smoke.js --require-gma --gma artifacts/moonpanel.gma --manifest artifacts/moonpanel.manifest.json",
24-
"test": "npm run build && node tools/sanity.js && node tools/package_smoke.js --temporary"
24+
"test": "npm run rebuild && node tools/sanity.js && node tools/package_smoke.js --temporary"
2525
},
2626
"devDependencies": {
2727
"del": "^6.0.0",
2828
"gulp": "^4.0.2",
2929
"gulp-zip": "^5.0.2",
30-
"luamin": "^1.0.4",
30+
"lua-format": "^1.6.1-b",
3131
"through2": "^4.0.2"
3232
}
3333
}

src/addon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"title": "The Moonpanel",
3-
"description": "Moonpanel source code is licensed under Apache-2.0. The Witness-derived assets remain the property of Thekla, Inc. Credits: Thekla, Inc. and Jonathan Blow; TheFifthMatt for the inspiration behind this project and its later Windmill importer; Tyler Schrock for the Windmill importer.",
3+
"description": "Moonpanel source code is licensed under Apache-2.0. The Witness-derived assets remain the property of Thekla, Inc. Credits: Thekla, Inc. and Jonathan Blow; TheFifthMatt for the inspiration behind this project and its later Windmill importer; Tyler Schrock for the Windmill importer; the WireMod contributors for the adapted editor-presence animation.",
44
"type": "tool",
55
"tags": [],
66
"ignore": [

0 commit comments

Comments
 (0)