From c2fa96ec4207a311b9b218b197e84129650dc131 Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Mon, 21 Sep 2020 13:43:49 -0400 Subject: [PATCH] Added Pit interface --- devTools/types/FC.d.ts | 18 ++++++++++++++++++ js/003-data/gameVariableData.js | 1 + src/arcologyBuilding/markets.js | 5 +++-- .../backwardsCompatibility.js | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/devTools/types/FC.d.ts b/devTools/types/FC.d.ts index 4c7d40bd891..f404b124e27 100644 --- a/devTools/types/FC.d.ts +++ b/devTools/types/FC.d.ts @@ -1,3 +1,5 @@ +import { namespace } from "d3"; + declare global { namespace App { namespace Art {} @@ -601,6 +603,22 @@ declare global { commissars: number } } + + namespace Facilities { + interface Pit { + name: string; + + animalFights: boolean; + animalType: string; + audience: string; + bodyguardFights: boolean; + fighterIDs: number[]; + fought: boolean; + lethal: boolean; + slaveFightingBodyguard: number | null + virginities: "neither" | "vaginal" | "anal"; + } + } } const V: FC.GameVariables; diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 468899d3947..9f35a70c6e6 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -768,6 +768,7 @@ App.Data.resetOnNGPlus = { HGSuiteEquality: 0, HGSuiteName: "the Head Girl Suite", + /** @type {FC.Facilities.Pit} */ pit: null, dojo: 0, diff --git a/src/arcologyBuilding/markets.js b/src/arcologyBuilding/markets.js index a71d8f85ebe..375c0e772b3 100644 --- a/src/arcologyBuilding/markets.js +++ b/src/arcologyBuilding/markets.js @@ -106,15 +106,16 @@ App.Arcology.Cell.Market = class extends App.Arcology.Cell.BaseCell { "Build a pit to host proper slave fights", () => { this.type = "Pit"; + /** @type {FC.Facilities.Pit} */ V.pit = { name: "the Pit", - animal: false, + animalFights: false, animalType: null, audience: "none", bodyguardFights: false, fighterIDs: [], - fought: 0, + fought: false, lethal: false, slaveFightingBodyguard: null, virginities: "neither", diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 9ba71a6b7b1..87b52840602 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -783,7 +783,7 @@ App.Update.globalVariables = function(node) { V.arcologies[0].FSNeoImperialist = V.FSNeoImperialist; } else if (typeof V.arcologies[0].FSNeoImperialist === "undefined") { V.arcologies[0].FSNeoImperialist = "unset"; - } + } if ((typeof V.FSNeoImperialistLaw1 !== "undefined") && V.FSNeoImperialistLaw1 !== 0) { V.arcologies[0].FSNeoImperialistLaw1 = V.FSNeoImperialistLaw1; } else if (typeof V.arcologies[0].FSNeoImperialistLaw1 === "undefined") { -- GitLab