mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-15 15:56:44 +00:00
validate all intent input
This commit is contained in:
@@ -33,6 +33,12 @@ export class NukeExecution implements Execution {
|
||||
) {}
|
||||
|
||||
init(mg: Game, ticks: number): void {
|
||||
if (!mg.hasPlayer(this.senderID)) {
|
||||
console.warn(`NukeExecution: sender ${this.senderID} not found`);
|
||||
this.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
this.mg = mg;
|
||||
this.player = mg.player(this.senderID);
|
||||
this.random = new PseudoRandom(ticks);
|
||||
|
||||
Reference in New Issue
Block a user