Skip to content

Commit

Permalink
New command !CB to create different biomes --> Used to find which bio…
Browse files Browse the repository at this point in the history
…me has which color
  • Loading branch information
Arcurus committed Jan 14, 2024
1 parent 55949d4 commit 4141f17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"[haxe]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.sortImports": false
"source.sortImports": "never"
}
},
"testExplorer.codeLens": false
Expand Down
9 changes: 9 additions & 0 deletions openlife/server/GlobalPlayerInstance.hx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ using openlife.server.MoveHelper;
class GlobalPlayerInstance extends PlayerInstance implements PlayerInterface implements WorldInterface {
public static var AllPlayerMutex = new Mutex();
private static var Locked = false;
private static var biomeColor = 1;

public static function AcquireMutex() {
if (ServerSettings.UseOneSingleMutex) {
Expand Down Expand Up @@ -5631,6 +5632,14 @@ class GlobalPlayerInstance extends PlayerInstance implements PlayerInterface imp
}
return true;
}
else if (text == '!CB') {
if (checkIfNotAllowed(player)) return true;
WorldMap.world.setBiomeId(player.tx, player.ty, biomeColor);
player.connection.sendMapChunk(player.x, player.y);
player.say('Biome Color ${biomeColor}!', true);
biomeColor += 1;
return true;
}
return false;
}

Expand Down
Binary file modified server.hl
Binary file not shown.

0 comments on commit 4141f17

Please sign in to comment.