From f3017bbe6b1c1295a90ca3d30ef2ec2f62adfcfb Mon Sep 17 00:00:00 2001 From: TonyFox <the_tonyfox@yahoo.com> Date: Sun, 27 Feb 2022 14:41:47 -0500 Subject: [PATCH] Show mask integ in bar, cheats for mask integ --- game/03-JavaScript/base.js | 5 +++++ game/base-clothing/captiontext.twee | 2 +- game/base-system/cheats.twee | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/game/03-JavaScript/base.js b/game/03-JavaScript/base.js index 087ddb5b1f..0026517fec 100644 --- a/game/03-JavaScript/base.js +++ b/game/03-JavaScript/base.js @@ -307,6 +307,11 @@ function genitalsintegrity() { } DefineMacroS("genitalsintegrity", genitalsintegrity); +function faceintegrity() { + return integrityWord(V.worn.face,'face'); +} +DefineMacroS("faceintegrity", faceintegrity); + /** * @param worn clothing article, State.variables.worn.XXXX * @return {string} printable clothing colour diff --git a/game/base-clothing/captiontext.twee b/game/base-clothing/captiontext.twee index c4ad6fc133..afae572f2c 100644 --- a/game/base-clothing/captiontext.twee +++ b/game/base-clothing/captiontext.twee @@ -151,7 +151,7 @@ <</widget>> <<widget "clothingCaptionTextMask">> - <<if $worn.face.type.includes("mask")>><br>Your identity is concealed by your $worn.face.name.<</if>> + <<if $worn.face.type.includes("mask")>><br>Your identity is concealed by your <<faceintegrity>> $worn.face.name.<</if>> <</widget>> <<widget "clothingCaptionTextNothing">><<silently>> diff --git a/game/base-system/cheats.twee b/game/base-system/cheats.twee index 8f01c349b2..196bfc50db 100644 --- a/game/base-system/cheats.twee +++ b/game/base-system/cheats.twee @@ -721,6 +721,20 @@ Milk volume: <span id="statsmilk_volume"><<print Math.trunc($milk_volume)>></spa <br> <</if>> +<<if $worn.face.integrity gte 1>> + <<link "<<<">><<set $worn.face.integrity -= 100>><<clamp>><<replace "#statsfaceintegrity">><<print Math.trunc($worn.face.integrity)>><</replace>> <<updatesidebarimg>><</link>> | + <<link "<<">><<set $worn.face.integrity -= 10>><<clamp>><<replace "#statsfaceintegrity">><<print Math.trunc($worn.face.integrity)>><</replace>> <<updatesidebarimg>><</link>> | + <<link "<">><<set $worn.face.integrity -= 1>><<clamp>><<replace "#statsfaceintegrity">><<print Math.trunc($worn.face.integrity)>><</replace>> <<updatesidebarimg>><</link>> | + Mask integrity: <span id="statsfaceintegrity"><<print Math.trunc($worn.face.integrity)>></span> + | <<link ">">><<set $worn.face.integrity += 1>><<clamp>><<replace "#statsfaceintegrity">><<print Math.trunc($worn.face.integrity)>><</replace>> <<updatesidebarimg>><</link>> + | <<link ">>">><<set $worn.face.integrity += 10>><<clamp>><<replace "#statsfaceintegrity">><<print Math.trunc($worn.face.integrity)>><</replace>> <<updatesidebarimg>><</link>> + | <<link ">>>">><<set $worn.face.integrity += 100>><<clamp>><<replace "#statsfaceintegrity">><<print Math.trunc($worn.face.integrity)>><</replace>> <<updatesidebarimg>><</link>> (<<print clothingData('face',$worn.face,'integrity_max')>> is default maximum) + <br> +<<else>> + <i>You are not wearing a mask.</i> + <br> +<</if>> + <br> <u>Skills</u> -- GitLab