add command line arguments
This commit is contained in:
parent
4f42723f4a
commit
1160466cf9
13 changed files with 129 additions and 7 deletions
|
@ -4,7 +4,22 @@ class CommandProcessor {
|
|||
}
|
||||
|
||||
run(command, arg) {
|
||||
if (command == 'setname') this.setName(arg);
|
||||
if (command == 'setname') {
|
||||
this.setName(arg);
|
||||
} else if (command == 'commands') {
|
||||
game.gui.chat.addMessage({
|
||||
type: 'server',
|
||||
message: 'Available commands:<br /> ' +
|
||||
'/setname [name]<br /> ' +
|
||||
'/commands'
|
||||
});
|
||||
} else {
|
||||
game.gui.chat.addMessage({
|
||||
type: 'server',
|
||||
message: 'Unrecognised command<br />' +
|
||||
'Type /commands for a list'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setName(name) {
|
||||
|
|
0
public/static/js/wingbase/gui/weapons.js
Normal file
0
public/static/js/wingbase/gui/weapons.js
Normal file
Loading…
Add table
Add a link
Reference in a new issue