UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

18 lines (17 loc) 792 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isVanillaConsoleCommand = isVanillaConsoleCommand; exports.printEnabled = printEnabled; const consoleCommandsSet_1 = require("../sets/consoleCommandsSet"); /** * Helper function to see if a particular command is a vanilla console command. This is useful * because the `EXECUTE_CMD` callback will not fire for any vanilla commands. */ function isVanillaConsoleCommand(commandName) { return consoleCommandsSet_1.CONSOLE_COMMANDS_SET.has(commandName); } /** Helper function to print whether something was enabled or disabled to the in-game console. */ function printEnabled(enabled, description) { const enabledText = enabled ? "Enabled" : "Disabled"; print(`${enabledText} ${description}.`); }