UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

23 lines (22 loc) 856 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DebugDisplaySlot = void 0; const ModCallbackCustom_1 = require("../../../../enums/ModCallbackCustom"); const render_1 = require("../../../../functions/render"); const Feature_1 = require("../../../private/Feature"); const utils_1 = require("./utils"); class DebugDisplaySlot extends Feature_1.Feature { textCallback = utils_1.defaultEntityDisplayCallback; constructor() { super(); this.customCallbacksUsed = [ [ModCallbackCustom_1.ModCallbackCustom.POST_SLOT_RENDER, this.postSlotRender], ]; } // ModCallbackCustom.POST_SLOT_RENDER postSlotRender = (slot) => { const text = this.textCallback(slot); (0, render_1.renderTextOnEntity)(slot, text); }; } exports.DebugDisplaySlot = DebugDisplaySlot;