Skip to content

Commit

Permalink
successfully fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
wsrvn committed Jan 21, 2024
1 parent 663f917 commit 6a30a77
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions config/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
voteOnPublicAdd: true,
/** Default amount of maps fetched from the TMX search API */
defaultTMXSearchLimit: 50,
/** Whether to reset Cup mode scores after restarting or skipping a map */
/** Whether to reset Cup mode scores after a map is skipped or restarted */
resetCupScoreOnSkipAndRestart: true,
/** Privilege levels for each of the administrative actions */
privileges: {
Expand All @@ -36,7 +36,7 @@ export default {
/** Whether the maplist gets reloaded on Match Settings updates.
* Enable this if you use external tools to modify the Match Settings */
updateMatchSettingsOnChange: false,
/** Point system for rounds and cup gamemode */
/** Point system for rounds and cup gamemodes */
roundsModePointSystem: [33, 29, 27, 25, 23, 21, 19, 17, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
/** Default time limit in TimeAttack mode (in miliseconds) */
defaultTimeAttackTimeLimit: 300000,
Expand Down
6 changes: 3 additions & 3 deletions plugins/donations/Donations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tm.addListener('PlayerDataUpdated', (info): void => {
/**
* Fetches donation info for the player
* @param login Player login
* @returns Donation object if successfull, undefined if player is not in the donators database
* @returns Donation object if successful, undefined if player is not in the donators database
*/
async function getFromDB(login: string): Promise<DonationInfo | undefined>
/**
Expand Down Expand Up @@ -127,7 +127,7 @@ tm.commands.add({
* @param payerLogin Login of the player
* @param payerNickname Nickname of the player
* @param amount Amount of coppers to donate
* @returns True if successfull, false if player refuses payment, Error if dedicated server call fails
* @returns True if successful, false if player refuses payment, Error if dedicated server call fails
*/
const donate = async (payerLogin: string, payerNickname: string, amount: number): Promise<boolean | Error> => {
if (amount < config.minimalAmount) {
Expand Down Expand Up @@ -171,7 +171,7 @@ const donate = async (payerLogin: string, payerNickname: string, amount: number)
/**
* Gets donation info for the player
* @param login Player login
* @returns Donation object if successfull, undefined if player is not in the donators database or is offline
* @returns Donation object if successful, undefined if player is not in the donators database or is offline
*/
function getDonation(login: string): DonationInfo | undefined
/**
Expand Down
2 changes: 1 addition & 1 deletion plugins/maniakarma/Maniakarma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export const maniakarma = {
* Adds a callback function to execute when maniakarma votes for new map get fetched
* @param callback Function to execute on event. It takes object of votes array and map vote ratio
*/
onMapFetch(callback: ((dedis: { votes: MKVote[], ratio: number, karma: MKMapVotes }) => void)) {
onMapFetch(callback: ((data: { votes: MKVote[], ratio: number, karma: MKMapVotes }) => void)) {
mapFetchListeners.push(callback)
},

Expand Down
6 changes: 3 additions & 3 deletions plugins/music/Music.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const music = {
* @param author Song author
* @param url Song url (link to an .ogg file)
* @param caller Caller player object
* @returns True if successfull, error message otherwise
* @returns True if successful, error message otherwise
*/
addSong(name: string, author: string, url: string, caller?: Caller): true | 'name taken' | 'invalid file extension' {
if (!(url.endsWith('.ogg') || url.endsWith('.mux'))) {
Expand Down Expand Up @@ -106,7 +106,7 @@ export const music = {
* Add a song to the song queue
* @param songName Song name
* @param caller Caller player object
* @returns Song object if it got added, error message if unsuccessfull
* @returns Song object if it got added, error message if unsuccessful
*/
addSongToQueue(songName: string, caller?: Caller):
Readonly<Song> | 'already queued' | 'not in songlist' | 'no privilege' {
Expand Down Expand Up @@ -314,7 +314,7 @@ function addToQueue(songName: string, emitEvents: boolean, caller?: Caller):
* Removes a song from the song queue
* @param songName Song name
* @param caller Caller player object
* @returns Song object if it got removed, error message if unsuccessfull
* @returns Song object if it got removed, error message if unsuccessful
*/
function removeFromQueue(name: string, caller?: Caller): Readonly<Song> | 'not queued' {
if (!queue.filter(a => a.isJuked === true).some(a => a.name === name)) { return 'not queued' }
Expand Down
8 changes: 4 additions & 4 deletions src/TMXFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ export abstract class TMXFetcher {
/**
* Fetches map file from TMX via its UID.
* @param mapId Map UID
* @returns Object containing map name and file content, or Error if unsuccessfull
* @returns Object containing map name and file content, or Error if unsuccessful
*/
static async fetchMapFile(mapId: string): Promise<{ name: string, content: Buffer } | Error>
/**
* Fetches map file from TMX via its TMX ID.
* @param tmxId Map TMX ID
* @param site Optional TMX site (TMNF by default)
* @returns Object containing map name and file content, or Error if unsuccessfull
* @returns Object containing map name and file content, or Error if unsuccessful
*/
static async fetchMapFile(tmxId: number, site?: tm.TMXSite): Promise<{ name: string, content: Buffer } | Error>
static async fetchMapFile(id: number | string, site: tm.TMXSite = 'TMNF'): Promise<{ name: string, content: Buffer } | Error> {
Expand Down Expand Up @@ -199,7 +199,7 @@ export abstract class TMXFetcher {
* @param author Map author to look for
* @param site TMX Site to fetch from
* @param count Number of maps to fetch
* @returns An array of searched map objects or Error if unsuccessfull
* @returns An array of searched map objects or Error if unsuccessful
*/
static async searchForMap(query?: string, author?: string, site: tm.TMXSite = 'TMNF',
count: number = config.defaultTMXSearchLimit): Promise<Error | tm.TMXSearchResult[]> {
Expand Down Expand Up @@ -268,7 +268,7 @@ export abstract class TMXFetcher {
/**
* Fetches a random map file from TMX.
* @param site Optional TMX site (TMNF by default)
* @returns Object containing map name and file content, or Error if unsuccessfull
* @returns Object containing map name and file content, or Error if unsuccessful
*/
static async fetchRandomMapFile(site: tm.TMXSite = 'TMNF'): Promise<{ name: string, content: Buffer } | Error> {
const prefix = this.siteToPrefix(site)
Expand Down
16 changes: 8 additions & 8 deletions src/services/AdministrationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export class AdministrationService {
* @param nickname Optional player nickname
* @param reason Optional ban reason
* @param expireDate Optional ban expire date
* @returns True if successfull, false if caller privilege is too low or if it's not higher than target privilege
* @returns True if successful, false if caller privilege is too low or if it's not higher than target privilege
*/
static async ban(ip: string, login: string, caller: { login: string, privilege: number, nickname: string },
nickname?: string, reason?: string, expireDate?: Date): Promise<boolean> {
Expand Down Expand Up @@ -386,7 +386,7 @@ export class AdministrationService {
* from banlist table
* @param login Player login
* @param caller Caller player object
* @returns True if successfull, false if caller privilege is too low
* @returns True if successful, false if caller privilege is too low
* 'Player not banned' if player was not banned, Error if dedicated server call fails
*/
static async unban(login: string, caller?: { login: string, privilege: number, nickname: string }):
Expand Down Expand Up @@ -426,7 +426,7 @@ export class AdministrationService {
* @param nickname Optional player nickname
* @param reason Optional blacklist reason
* @param expireDate Optional blacklist expire date
* @returns True if successfull, false if caller privilege is too low or if it's not higher than target privilege,
* @returns True if successful, false if caller privilege is too low or if it's not higher than target privilege,
* Error if dedicated server call fails
*/
static async addToBlacklist(login: string, caller: { login: string, privilege: number, nickname: string },
Expand Down Expand Up @@ -470,7 +470,7 @@ export class AdministrationService {
* Unblacklists a player if he is not banned and deletes him from blacklist table. Saves the server blacklist
* @param login Player login
* @param caller Caller player object
* @returns True if successfull, false if caller privilege is too low
* @returns True if successful, false if caller privilege is too low
* 'Player not blacklisted' if player was not blacklisted, Error if dedicated server call fails
*/
static async unblacklist(login: string, caller?: { login: string, privilege: number, nickname: string }):
Expand Down Expand Up @@ -502,7 +502,7 @@ export class AdministrationService {
* @param nickname Optional player nickname
* @param reason Optional mute reason
* @param expireDate Optional mute expire date
* @returns True if successfull, false if caller privilege is too low
* @returns True if successful, false if caller privilege is too low
*/
static async mute(login: string, caller: { login: string, privilege: number, nickname: string },
nickname?: string, reason?: string, expireDate?: Date): Promise<boolean> {
Expand Down Expand Up @@ -545,7 +545,7 @@ export class AdministrationService {
* Unmutes a player and deletes him from mutelist table
* @param login Player login
* @param caller Caller player object
* @returns True if successfull, false if caller privilege is too low
* @returns True if successful, false if caller privilege is too low
* 'Player not muted' if player was not muted, Error if dedicated server call fails
*/
static async unmute(login: string, caller?: { login: string, privilege: number, nickname: string }):
Expand Down Expand Up @@ -579,7 +579,7 @@ export class AdministrationService {
* @param login Player login
* @param caller Caller player object
* @param nickname Optional player nickname
* @returns True if successfull, false if caller privilege is too low,
* @returns True if successful, false if caller privilege is too low,
* 'Already guest' if player was already in the guestlist, Error if server call fails
*/
static async addGuest(login: string, caller: { login: string, privilege: number, nickname: string }, nickname?: string):
Expand All @@ -606,7 +606,7 @@ export class AdministrationService {
* Removes a player from server guestlist, saves it and deletes him from guestlist table
* @param login Player login
* @param caller Caller player object
* @returns True if successfull, false if caller privilege is too low
* @returns True if successful, false if caller privilege is too low
* 'Player not in guestlist' if player was not in the guestlist, Error if dedicated server call fails
*/
static async removeGuest(login: string, caller?: { login: string, privilege: number, nickname: string }):
Expand Down
6 changes: 3 additions & 3 deletions src/services/ChatService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ export abstract class ChatService {
break
case 'time':
const timeOrError = Utils.parseTimeString(params[i])
if(timeOrError instanceof RangeError) {
if (timeOrError instanceof RangeError) {
this.sendErrorMessage(Utils.strVar(messages.timeTooBig,
{ name: param.name }), info.login)
return
} else if(timeOrError instanceof TypeError) {
} else if (timeOrError instanceof TypeError) {
this.sendErrorMessage(Utils.strVar(messages.notTime,
{ name: param.name }), info.login)
return
Expand Down Expand Up @@ -192,7 +192,7 @@ export abstract class ChatService {
* Adds message to the database and runtime memory
* @param login Player login
* @param text Message text
* @returns Message object or Error if unsuccessfull
* @returns Message object or Error if unsuccessful
*/
static async add(login: string, text: string): Promise<tm.MessageInfo | Error> {
const player: tm.Player | undefined = PlayerService.get(login)
Expand Down
6 changes: 3 additions & 3 deletions src/services/GameService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class GameService {
}

/**
* Adds remaining race time. This method works only if
* Adds time to the timer. This method works only if
* dynamic timer is enabled and server is in 'race' state.
* @param milliseconds Amount of time to add in milliseconds
* @returns Boolean indicating whether the time got added
Expand All @@ -223,8 +223,8 @@ export class GameService {
}

/**
* Subtracts remaining race time. If the time is lower than
* "dynamicTimerSubtractionLimit" from config
* Subtracts time from the timer. If the time is lower than
* "dynamicTimerSubtractionLimit" from Config.js
* it will be set to it. This method works only if
* dynamic timer is enabled and server is in 'race' state.
* @param milliseconds Amount of time to subtract in milliseconds
Expand Down
8 changes: 4 additions & 4 deletions src/services/MapService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class MapService {
i--
}
}
if(addedMaps.length === 0 && removedMaps.length === 0) {
if (addedMaps.length === 0 && removedMaps.length === 0) {
return
}
const addedMapObjects = []
Expand Down Expand Up @@ -275,7 +275,7 @@ export class MapService {
* @option `dontJuke` - If true the map doesn't get enqueued, false by default
* @option `cancelIfAlreadyAdded` - If the map was already on the server returns from the function without searching for the map object.
* If that happens the map in returned object will be undefined.
* @returns Error if unsuccessfull, object containing map object and boolean indicating whether the map was already on the server
* @returns Error if unsuccessful, object containing map object and boolean indicating whether the map was already on the server
*/
static async writeFileAndAdd<T>(fileName: string, file: Buffer,
caller?: { nickname: string, login: string },
Expand Down Expand Up @@ -425,8 +425,8 @@ export class MapService {
* Remove a map from the queue
* @param mapId Map UID
* @param caller Object containing login and nickname of player removing the map
* @param jukebox report as removed from jukebox
* @returns The index of the removed map
* @param jukebox If true, only removes the map if it is in the jukebox
* @returns The boolean representing whether the map was removed
*/
static async removeFromQueue(mapId: string, caller?: { login: string, nickname: string }, jukebox: boolean = true): Promise<boolean> {
if (jukebox && !this._queue.filter(a => a.isForced).some(a => a.map.id === mapId)) { return false }
Expand Down
2 changes: 1 addition & 1 deletion src/services/PlayerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export class PlayerService {
/**
* Sets spectator status, player slot and team in the player object.
* @param info Player login
* @returns True if successfull, false if the player is not in the runtime memory
* @returns True if successful, false if the player is not in the runtime memory
*/
static setPlayerInfo(info: tm.InfoChangedInfo): boolean {
const player: tm.Player | undefined = this._players.find(a => a.login === info.login)
Expand Down

0 comments on commit 6a30a77

Please sign in to comment.