set up tstl factorio mod, and auto deploy stuff. A bit of mucking around with kotlin/js & dukat but it didn't go anywhere. Add a license.
This commit is contained in:
parent
fb80ca3f79
commit
17b4fc3b9a
47 changed files with 32006 additions and 112 deletions
4
modules/mod/src/main/resources/mod-data/changelog.txt
Normal file
4
modules/mod/src/main/resources/mod-data/changelog.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.1
|
||||
Features:
|
||||
- Factorio Web Map
|
||||
8
modules/mod/src/main/resources/mod-data/info.json
Normal file
8
modules/mod/src/main/resources/mod-data/info.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "factorio-web-map",
|
||||
"version": "0.0.2",
|
||||
"title": "Factorio Web Map",
|
||||
"author": "fredthedeadhead",
|
||||
"factorio_version": "1.1",
|
||||
"dependencies": []
|
||||
}
|
||||
BIN
modules/mod/src/main/resources/mod-data/thumbnail.png
Normal file
BIN
modules/mod/src/main/resources/mod-data/thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 702 B |
1
modules/mod/src/main/typescript/control.ts
Normal file
1
modules/mod/src/main/typescript/control.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("events")
|
||||
30
modules/mod/src/main/typescript/events.ts
Normal file
30
modules/mod/src/main/typescript/events.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
script.on_event(
|
||||
[defines.events.on_pre_build, defines.events.on_player_dropped_item],
|
||||
(e: OnPreBuildEvent | OnPlayerDroppedItemEvent) => {
|
||||
game.print("player " + e.player_index + " dropped item, tick:" + e.tick)
|
||||
}
|
||||
);
|
||||
|
||||
script.on_event(
|
||||
defines.events.on_tick,
|
||||
(e: OnTickEvent) => {
|
||||
if (e.tick % 60 == 0) {
|
||||
let msg = "test mod tick: " + e.tick + "\n"
|
||||
// game.print(msg)
|
||||
game.write_file("tick.log", msg, true)
|
||||
|
||||
|
||||
let groups = game.permissions.groups.map(val => {
|
||||
return val.name + "\n" + serpent.block(val)
|
||||
}).join("\n")
|
||||
|
||||
game.write_file("permissions.json", groups, false)
|
||||
// game.write_file("permissions-groups.json", serpent.block(game.permissions.groups), false)
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// script.on_load(() => {
|
||||
// game.print("loaded Factorio Web Map!")
|
||||
// });
|
||||
1310
modules/mod/src/main/typescript/package-lock.json
generated
Normal file
1310
modules/mod/src/main/typescript/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
30
modules/mod/src/main/typescript/package.json
Normal file
30
modules/mod/src/main/typescript/package.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "factorio-web-map-mod",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tstl",
|
||||
"dev": "tstl --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"webpack": "5.38.1",
|
||||
"webpack-cli": "4.7.1",
|
||||
"format-util": "1.0.5",
|
||||
"source-map-loader": "3.0.0",
|
||||
"css-loader": "5.2.6",
|
||||
"style-loader": "2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "17.0.2",
|
||||
"typescript-to-lua": "1.0.1",
|
||||
"typed-factorio": "0.7.1",
|
||||
"lua-types": "2.11.0",
|
||||
"typescript": "4.4.3"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"optionalDependencies": {},
|
||||
"bundledDependencies": [],
|
||||
"//": {
|
||||
"react-dom": "17.0.2"
|
||||
}
|
||||
}
|
||||
17
modules/mod/src/main/typescript/tsconfig.json
Normal file
17
modules/mod/src/main/typescript/tsconfig.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"lib": [
|
||||
"esnext"
|
||||
],
|
||||
"moduleResolution": "node",
|
||||
"types": [
|
||||
"typed-factorio/runtime"
|
||||
],
|
||||
"strict": true
|
||||
},
|
||||
"tstl": {
|
||||
"luaTarget": "JIT",
|
||||
"tstlVerbose": true
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue