Newer
Older
/**
* @type {CanvasModelOptions<CloseOptions>}
*/
const combatCloseChest = {
name: "combatCloseChest",
width: 64,
height: 64,
frames: 6,
generatedOptions() {
return [];
},
defaultOptions() {
return { ...CloseCombatMapper.generateOptions(), ...this.metadata };
if (V.debug) {
// Save options for easy lookup
CombatRenderer.options[this.name] = options;
}
},
layers: {
chest: {
srcfn(options) {
return `${options.src}chest/${options.chest.base}.png`;
},
showfn(options) {
return !!options.showChest;
},
animationfn(options) {
return options.animKeyChest;
},
filters: ["body"],
},
breasts: {
srcfn(options) {
return `${options.src}chest/${options.chest.breasts}-job.png`;
},
showfn(options) {
return !!options.showChest && options.chest.base === "base-job" && V.player.breastsize > 0;
},
animationfn(options) {
return options.animKeyChest;
},
filters: ["body"],
},
npc: {
srcfn(options) {
return `${options.src}chest/npc/${options.chest.npc}.png`;
},
showfn(options) {
return !!options.showChest && ["penis", "tentacle"].includes(V.chestuse.toString());
},
animationfn(options) {
return options.animKeyChest;
},
filtersfn(options) {
return options.chest.npc === "tentacle" ? ["chestTentacle"] : ["chestNpc"];
},
alphafn(options) {
const isWraith = ["tentacles-wraith", "tentacles-wraith-penetrated"].includes(V.tentacleColour);
return options.chest.npc === "tentacle" && isWraith ? 0.8 : 1;
},
brightnessfn(options) {
const isWraith = ["tentacles-wraith", "tentacles-wraith-penetrated"].includes(V.tentacleColour);
return options.chest.npc === "tentacle" && isWraith ? 0.2 : 0;
},
},
npcCondom: {
srcfn(options) {
return `${options.src}chest/npc/penis-condom.png`;
},
showfn(options) {
return !!options.showChest && options.chest.npc === "penis" && !!options.chest.condom;
},
animationfn(options) {
return options.animKeyChest;
},
filters: ["chestCondom"],
alpha: 0.4,