Skip to content

Commit

Permalink
Prevent gridworld from setting spawn and borders on non-grid instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielv123 committed Apr 24, 2024
1 parent a443ae5 commit 54dd45d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class InstancePlugin extends BaseInstancePlugin {
// Get gridworld data
const { map_data } = await this.instance.sendTo("controller", new messages.GetMapData());
await this.sendRcon(`/sc gridworld.register_map_data('${JSON.stringify(map_data)}')`);
} else {
}
if (this.instance.config.get("gridworld.is_grid_square")) {
await this.sendRcon("/sc global.is_grid_square = true");
await this.sendRcon("/sc global.disable_crashsite = true");
await this.sendRcon(`/sc gridworld.create_world_limit("${data.x_size}","${data.y_size}","${data.world_x}","${data.world_y}", false)`, true);
await this.sendRcon(`/sc gridworld.create_spawn("${data.x_size}","${data.y_size}","${data.world_x}","${data.world_y}", false)`, true);
Expand Down

0 comments on commit 54dd45d

Please sign in to comment.