@korial29/tiny-fps 0.138.0 → 0.140.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -101,7 +101,7 @@ PORT=8787 npx tiny-fps-server
101
101
 
102
102
  `MAP=tranquility` starts a new room on the moon map (the default is `highline`). In local mode the tab that hosts the room starts it on its client's `map` option, which the demo's Map menu sets.
103
103
 
104
- `BOTS=8` fills each room with bots up to 8 players while at least one person plays: the bots even out the teams, and each one leaves when a person joins. In local mode it is the `bots` rule of `localSocket()`, which the demo's Bots menu sets. A bot takes the gun at its rack, runs the routes of Highline (jumps, dashes and wall-runs included) or the lanes of the Moon, takes the flag, chases the one who has its own and shoots the enemies it sees.
104
+ `BOTS=8` fills each room with bots up to 8 players while at least one person plays: the bots even out the teams, and each one leaves when a person joins. In local mode it is the `bots` rule of `localSocket()`, which the demo's Bots menu sets. `BOT_SKILL` (0 to 7, 4 when unset) sets how well they aim, react and dodge, as UT2004's bot skill does: the `botSkill` rule, which the demo's Bot level menu sets in local mode (Novice to Godlike). A bot takes the gun at its rack, runs the routes of Highline (jumps, dashes and wall-runs included) or the lanes of the Moon, takes the flag, chases the one who has its own and shoots the enemies it sees.
105
105
 
106
106
  ### The host picks the map
107
107
 
package/dist/cli.js CHANGED
@@ -2,11 +2,13 @@
2
2
  import { serve } from "./server.js";
3
3
  // src/server/cli.ts
4
4
  var port = Number(process.env.PORT) || 8787;
5
+ var botSkill = process.env.BOT_SKILL ? Number(process.env.BOT_SKILL) : void 0;
5
6
  serve({
6
7
  port,
7
8
  rules: {
8
9
  map: process.env.MAP,
9
- bots: Number(process.env.BOTS) || 0
10
+ bots: Number(process.env.BOTS) || 0,
11
+ botSkill
10
12
  }
11
13
  });
12
14
  console.log(`tiny-fps server on ws://localhost:${port}/<room>`);