diff --git a/mods/betterMenuScreens.js b/mods/betterMenuScreens.js index 1c0509f1..dc18861c 100644 --- a/mods/betterMenuScreens.js +++ b/mods/betterMenuScreens.js @@ -106,7 +106,7 @@ const inject = () => { /** * - * @param {string} menu Menu do be opened + * @param {string} menu Menu to be opened * @param {boolean} [closeCurrent] Whether it should forcefully close the current screen */ const openMenu = (menu, closeCurrent = false) => { @@ -130,6 +130,7 @@ class MenuScreen { this.showCloseButton = true; this.closeButtonText = "-"; this.closeButtonClass = "XButton"; + this.titleId = null; } /** @@ -141,6 +142,15 @@ class MenuScreen { return this; } + /** + * Sets screen title ID + * @param {string} [id] Screen title element ID + */ + setTitleId(id) { + this.titleId = id; + return this; + } + /** * Sets close button visibility. When false the close button will not be added to the menu screen * @param {boolean} show Visibility of the close button @@ -253,7 +263,7 @@ class MenuScreen { const inner = document.createElement("div"); inner.className = this.innerDivClass ?? "menuScreen"; inner.innerHTML = `${this.showCloseButton ? ` - ${this.title ?? "Menu Screen"}

"; + ${this.title ?? "Menu Screen"}

"; this.nodes.forEach(n => inner.querySelector(".menuText").appendChild(n)); parent.appendChild(inner); document.getElementById(id).appendChild(parent); diff --git a/mods/nastystuff.js b/mods/nastystuff.js new file mode 100644 index 00000000..92e4c9f0 --- /dev/null +++ b/mods/nastystuff.js @@ -0,0 +1,57 @@ +elements.poop = { + color: "#411900", + density: 200, + state: "solid", + burn: 5, + tempHigh: 400, + burnTime: 200, + burnInto: ["driedPoop"], + category: "gross stuff", +} + +elements.driedPoop = { + behavior: behaviors.POWDER, + color: '#181100', + state: 'powder', + category: "gross stuff", + reactions: { + "water": { elem1: null, elem2: "wetPoop" }, + "milk": { elem1: null, elem2: "poopyMilk" }, + + }, + density: 10 +} + +elements.wetPoop = { + behavior: behaviors.LIQUID, + color: "#A9844F", + state: 'liquid', + category: 'gross stuff', + density: '25' +} + +elements.poopyMilk = { + behavior: behaviors.LIQUID, + color: '#BEB2AD', + state: 'liquid', + category: "gross stuff", + density: 10 +} + +elements.peePee = { + behavior: behaviors.LIQUID, + color: '#f1ed00', + state: 'liquid', + category: "gross stuff", + tempHigh: 100, + stateHigh: ["ammonia", "fragrance"], + density: 25 +} + +elements.ammonia = { + behavior: behaviors.GAS, + color: '#E5E4E2', + category: 'gross stuff', + density: .86, + state: 'gas', +} \ No newline at end of file