-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove failed localization experiment as a feature
- Loading branch information
1 parent
ab408bd
commit ca16dda
Showing
111 changed files
with
948 additions
and
3,706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
'use strict'; | ||
const sprintf = require('sprintf').sprintf; | ||
exports.command = (rooms, items, players, npcs, Commands) => { | ||
return (args, player) => { | ||
let commands = []; | ||
let maxlength = 0; | ||
for (let command in Commands.player_commands) { | ||
if (command.length > maxlength) maxlength = command.length; | ||
commands.push(command); | ||
} | ||
return (args, player) => { | ||
let commands = []; | ||
let maxlength = 0; | ||
for (const command in Commands.player_commands) { | ||
if(command[0] === '_') { | ||
continue; | ||
} | ||
if (command.length > maxlength) { | ||
maxlength = command.length; | ||
} | ||
commands.push(command); | ||
} | ||
|
||
commands.sort(); | ||
commands.sort(); | ||
|
||
let len = commands.length + 1; | ||
for (let i = 1; i < len; i++) { | ||
let endOfColumn = i % 5 === 0; | ||
player[endOfColumn ? 'say' : 'write'](sprintf('%-' + (maxlength + 1) + 's', commands[i-1])); | ||
} | ||
}; | ||
let len = commands.length + 1; | ||
for (let i = 1; i < len; i++) { | ||
let endOfColumn = i % 5 === 0; | ||
player[endOfColumn ? 'say' : 'write'](sprintf('%-' + (maxlength + 1) + 's', commands[i-1])); | ||
} | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.