UNPKG

kraft

Version:

A mysterious command line game with lots of secrets

20 lines (16 loc) 769 B
/** * Created by vanraar on 22/09/16. */ const Player = require(__base+'model/player/PlayerHandler'); const Output = require(__base+'helpers/Output'); exports.init = (Kraft) => { Kraft.command('info', (subcommand, subject) => { if (subcommand === 'item') Player.getItemInfo(subject); else if (subcommand === 'items') Player.getAllItems(); else if (subcommand === 'exists') Player.exists(subject); else if (subcommand === 'locations') Player.getAllLocations(subject); else if (subcommand === 'buildings') Player.getAllBuildings(subject); else if (!subcommand) Output.show('Which information should we give you?'); else Output.show('We can not give you any information about ', subcommand.red); }); };