tf2-currency
Version:
Set of tools that manage operations with tf2 currency.
53 lines • 2.66 kB
TypeScript
import { Currency } from './currency.class';
import { ICurrency, IWeaponizedCurrency } from './currency.interface';
/**
* Rounds a number
* @param n number we are rounding
* @param d number of decimals we round to
* @returns rounded number
*/
export declare function round(n: number, d?: number): number;
/**
* Convert refined to weapon value.
* Works the same as toScrap, but is result is multiplied by 2.
*
* @param value in scrap
* @returns value in weapons
*/
export declare function toWeapons(value: number): number;
/**
* Converts refined to scrap.
* @param value in refined
* @return value in scrap
*/
export declare function toScrap(value: number): number;
export declare function toRefined(value: number): number;
export declare function toRefinedFromWeapons(value: number): number;
export declare function fixMetal(metal: number): number;
export declare function fixCurrency(currency: Partial<ICurrency>): {
keys: number;
metal: number;
};
export declare function fromKeysToCurrency(value: number, conversion?: number): {
keys: number;
metal: number;
};
export declare function isEqual(currencyA: ICurrency, currencyB: ICurrency): boolean;
export declare function isBigger(currencyA: ICurrency, currencyB: ICurrency): boolean;
export declare function isSmaller(currencyA: ICurrency, currencyB: ICurrency): boolean;
export declare function isBiggerOrEqual(currencyA: ICurrency, currencyB: ICurrency): boolean;
export declare function isSmallerOrEqual(currencyA: ICurrency, currencyB: ICurrency): boolean;
export declare function compareTo(currencyA: ICurrency, currencyB: ICurrency): 1 | 0 | -1;
export declare function c(currency: Partial<ICurrency>): Currency;
export declare function pluralizeKeys(value: number): string;
export declare const w: {
isEqual(currencyA: IWeaponizedCurrency, currencyB: IWeaponizedCurrency): boolean;
isBigger(currencyA: IWeaponizedCurrency, currencyB: IWeaponizedCurrency): boolean;
isSmaller(currencyA: IWeaponizedCurrency, currencyB: IWeaponizedCurrency): boolean;
isBiggerOrEqual(currencyA: IWeaponizedCurrency, currencyB: IWeaponizedCurrency): boolean;
isSmallerOrEqual(currencyA: IWeaponizedCurrency, currencyB: IWeaponizedCurrency): boolean;
compareTo(currencyA: IWeaponizedCurrency, currencyB: IWeaponizedCurrency): 1 | 0 | -1;
};
export declare function isWeaponizedCurrency(currency: Partial<ICurrency | IWeaponizedCurrency>): currency is Partial<IWeaponizedCurrency>;
export declare function isClassicCurrency(currency: Partial<ICurrency | IWeaponizedCurrency>): currency is Partial<IWeaponizedCurrency>;
//# sourceMappingURL=currency.helper.d.ts.map