isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
73 lines • 3.31 kB
TypeScript
import { Feature } from "../../private/Feature";
/**
* When you enable this feature, many custom commands will be added to the in-game console. See the
* [dedicated command list](/isaacscript-common/features/ExtraConsoleCommandsList) for more
* information about them.
*
* Note that in order to avoid conflicts, if two or more mods enable this feature, then the first
* loaded one will control all of the command logic. When this occurs, a global variable of
* `__ISAACSCRIPT_COMMON_EXTRA_CONSOLE_COMMANDS_FEATURE` will be created and will automatically be
* used by the non-main instances. For this reason, if you use multiple mods with
* `isaacscript-common` and a custom command from the standard library is not working properly, then
* you might need to get another mod author to update their version of `isaacscript-common`.
*/
export declare class ExtraConsoleCommands extends Feature {
private readonly isMainFeature;
private readonly commandFunctionMap;
private readonly postUpdate;
private readonly evaluateCacheDamage;
private readonly evaluateCacheFireDelay;
private readonly evaluateCacheSpeed;
private readonly evaluateCacheFlying;
private readonly postCurseEval;
private readonly executeCmd;
private readonly postFireTear;
private readonly entityTakeDmgPlayer;
/**
* Helper function to add a custom console command.
*
* The standard library comes with [many existing console
* commands](/isaacscript-common/features/ExtraConsoleCommandsList) that are useful for debugging,
* but you can also add your own commands that are useful for your particular mod. It's easier to
* add commands to the existing command system than to add your own logic manually to the
* `EXECUTE_CMD` callback.
*
* This function is intended to be called when your mod is first loading.
*
* In order to use this function, you must upgrade your mod with
* `ISCFeature.EXTRA_CONSOLE_COMMANDS`.
*
* @public
*/
addConsoleCommand(commandName: string, commandFunction: (params: string) => void): void;
/**
* Helper function to remove a custom console command.
*
* The standard library comes with [many existing console
* commands](/isaacscript-common/features/ExtraConsoleCommandsList) that are useful for debugging.
* If you want to disable one of them, use this function.
*
* This function is intended to be called when your mod is first loading.
*
* In order to use this function, you must upgrade your mod with
* `ISCFeature.EXTRA_CONSOLE_COMMANDS`.
*
* @public
*/
removeConsoleCommand(commandName: string): void;
/**
* Helper function to remove all custom console commands.
*
* The standard library comes with [many existing console
* commands](/isaacscript-common/features/ExtraConsoleCommandsList) that are useful for debugging.
* If you want to disable all of them after this feature has already been initialized, use this
* function.
*
* In order to use this function, you must upgrade your mod with
* `ISCFeature.EXTRA_CONSOLE_COMMANDS`.
*
* @public
*/
removeAllConsoleCommands(): void;
}
//# sourceMappingURL=ExtraConsoleCommands.d.ts.map