UNPKG

tf2-currency

Version:

Set of tools that manage operations with tf2 currency.

48 lines 2.23 kB
import { ICurrency, IWeaponizedCurrency } from './currency.interface'; export declare class Currency implements ICurrency, IWeaponizedCurrency { keys: number; get metal(): number; metalInWeapons: number; constructor(currency?: Partial<ICurrency | IWeaponizedCurrency>); static fromScrap(scrap: number, conversion?: number): Currency; static fromWeapons(weapons: number, conversion?: number): Currency; static fromKeys(value: number, conversion?: number): Currency; clone(): Currency; isEmpty(): boolean; toWeapons(conversion?: number): number; toScrap(conversion?: number): number; toKeys(conversion?: number): number; toString(): string; toJSON(): { keys: number; metal: number; }; /** * Returns a JSON representation of the currency with weapons instead of metal. * @returns JSON representation with keys and weapons. */ toWeaponizedJSON(): IWeaponizedCurrency; addWeapons(value: number, conversion?: number): this; addScrap(value: number, conversion?: number): this; addMetal(value: number, conversion?: number): this; addKeys(value: number, conversion: number): this; addCurrency(currency: ICurrency, conversion?: number): this; removeWeapons(value: number, conversion?: number): this; removeScrap(value: number, conversion?: number): this; removeMetal(value: number, conversion?: number): this; removeKeys(value: number, conversion: number): this; removeCurrency(currency: ICurrency, conversion?: number): this; isEqual(currency: ICurrency): boolean; isBigger(currency: ICurrency): boolean; isSmaller(currency: ICurrency): boolean; isBiggerOrEqual(currency: ICurrency): boolean; isSmallerOrEqual(currency: ICurrency): boolean; compareTo(value: ICurrency): 1 | 0 | -1; wIsEqual(currency: IWeaponizedCurrency): boolean; wIsBigger(currency: IWeaponizedCurrency): boolean; wIsSmaller(currency: IWeaponizedCurrency): boolean; wIsBiggerOrEqual(currency: IWeaponizedCurrency): boolean; wIsSmallerOrEqual(currency: IWeaponizedCurrency): boolean; wCompareTo(value: IWeaponizedCurrency): 1 | 0 | -1; } //# sourceMappingURL=currency.class.d.ts.map