Skip to content

Commit

Permalink
Fixed message serialization and made web interface load
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielv123 committed Feb 6, 2024
1 parent 6a64176 commit 7d8202c
Show file tree
Hide file tree
Showing 19 changed files with 367 additions and 231 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@ Substitute clusteriocontroller with clusteriohost or clusterioctl if this a dedi

Clone the repository in clusterio/external_plugins/

cd clusterio
git clone https://github.com/clusterio/clusterio
cd clusterio/external_plugins
git clone https://github.com/Danielv123/gridworld
git clone https://github.com/clusterio/edge_transports
cd ..
pnpm install
node packages/create --dev # Interactive

Interactive:

node packages/create --dev

node packages/ctl plugin add ./external_plugins/gridworld
pnpm install @clusterio/plugin-edge_transports -w
node packages/ctl plugin add ./external_plugins/edge_transports
pnpm install @hornwitser/server_select -w
node packages/controller bootstrap create-ctl-config Danielv123
node packages/controller bootstrap create-admin Danielv123
node packages/controller plugin add @clusterio/plugin-edge_transports
node packages/controller bootstrap create-ctl-config Danielv123
node packages/controller plugin add @hornwitser/server_select
node packages/controller plugin add ./plugins/global_chat
node packages/controller plugin add ./plugins/inventory_sync
Expand All @@ -51,8 +58,6 @@ Log into the webui with the token in token.txt and create a new host token with
node packages/host config set host.name "Host 1"
node packages/host config set host.public_address "localhost"

Luacheck can be downloaded from https://github.com/mpeterv/luacheck/releases/download/0.23.0/luacheck.exe or `sudo apt install lua-check`
Luacheck can be downloaded from https://github.com/mpeterv/luacheck/releases/download/0.23.0/luacheck.exe or `sudo apt install lua-check` or `brew install luacheck`

Put it in your `%path%` and run `luacheck ./module`

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ1c2VyIiwidXNlciI6IkRhbmllbHYxMjMiLCJpYXQiOjE3MDcwNjYwNDR9.g9iiIDvhX8GrEWGQQYig_smOdf212dmst6HKg9LKU3g
13 changes: 8 additions & 5 deletions gridworld.code-workspace
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
{
"folders": [
{
"path": "."
"path": "." // Gridworld
},
{
"path": "../.."
}
"path": "../edge_transports" // Edge transports
},
{
"path": "../.." // Clusterio
},
],
"settings": {
"prettier.useTabs": true,
"editor.insertSpaces": false
},
"extensions": {
"recommendations": [
"yzhang.markdown-all-in-one",
"github.copilot",
"yinfei.luahelper"
"yinfei.luahelper",
"dbaeumer.vscode-eslint"
]
}
}
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,44 +61,44 @@ module.exports = {
type: "number",
title: "Server position on X axis",
description: "Server position index along the X axis in the gridworld",
initial_value: 1000,
initialValue: 1000,
},
"gridworld.grid_y_position": {
type: "number",
title: "Server position on Y axis",
description: "Server position index along the Y axis in the gridworld",
initial_value: 1000,
initialValue: 1000,
},
"gridworld.grid_x_size": {
type: "number",
title: "Server size on X axis",
description: "Server size along the X axis",
initial_value: 512,
initialValue: 512,
},
"gridworld.grid_y_size": {
type: "number",
title: "Server size on Y axis",
description: "Server size along the Y axis",
initial_value: 512,
initialValue: 512,
},
"gridworld.is_lobby_server": {
type: "boolean",
title: "Server is a lobby server",
description: "Make this instance act as a lobby server for a gridworld",
initial_value: false,
initialValue: false,
},
"gridworld.grid_id": {
type: "number",
title: "Grid ID",
description:
"Grid identifier - used to run multiple gridworlds on the same cluster",
initial_value: 0,
initialValue: 0,
},
"gridworld.claimed_by_faction": {
type: "string",
title: "Claimed by faction",
description: "Faction that has claimed this server",
initial_value: "",
initialValue: "",
},
},

Expand All @@ -108,28 +108,28 @@ module.exports = {
type: "number",
title: "Autosave Interval",
description: "Interval the gridworld data is autosaved at in seconds.",
initial_value: 600, // 10 minutes
initialValue: 600, // 10 minutes
},
"gridworld.gridworld_seed": {
type: "number",
title: "Gridworld seed",
description: "Seed for servers created using gridworld generator",
initial_value: 999,
initialValue: 999,
},
"gridworld.gridworld_map_exchange_string": {
type: "string",
title: "Gridworld map exchange string",
description:
"Map exchange string for servers created using gridworld generator",
initial_value:
initialValue:
// eslint-disable-next-line max-len
">>>eNpjZGBk0GIAgwZ7EOZgSc5PzIHwDjiAMFdyfkFBapFuflEqsjBnclFpSqpufiaq4tS81NxK3aTEYqhiiMkcmUX5eegmsBaX5OehipQUpaYWw5wCwtylRYl5maW5EL0H7OGqGb+qrnZoaJFjAOH/9QwK//+DMJD1AGgjCDMwNoBVMwLFYIA1OSczLY2BQcERiJ1A0owMjNUi69wfVk0BMsFAzwHK+AAVOZAEE/GEMfwccEqpwBgmSOYYg8FnJAbE0hKQ/RBVHA4IBkSyBSTJyNj7duuC78cu2DH+Wfnxkm9Sgj2joavIuw9G6+yAkuwgfzLBiVkzQWAnzCsMMDMf2EOlbtoznj0DAm/sGVlBOkRAhIMFkDjgzczAKMAHZC3oARIKMgwwp9nBjBFxYEwDg28wnzyGMS7bo/sDGBA2IMPlQMQJEAG2EO4yRgjTod+B0UEeJiuJUALUb8SA7IYUhA9Pwqw9jGQ/mkMwIwLZH2giKg5YooELZGEKnHjBDHcNMDwvsMN4DvMdGJlBDJCqL0AxCA8kAzMKQgs4gIObmQEBPtgzuMX47gAAJhSjWw==<<<",
},
"gridworld.tiles_directory": {
type: "string",
title: "Tiles directory",
description: "Folder to store map tiles relative to database",
initial_value: "tiles",
initialValue: "tiles",
},
},

Expand Down
Loading

0 comments on commit 7d8202c

Please sign in to comment.