From 673306524bddf59c276219ccc37110e38aafa176 Mon Sep 17 00:00:00 2001 From: ezsh <ezsh.junk@gmail.com> Date: Wed, 6 May 2020 04:39:05 +0200 Subject: [PATCH] Move JobDesc classes declarations to FC.d.ts The classes are used only to set up data scheme, thus they need no JS implementation. --- devTools/FC.d.ts | 24 ++++++++++++++++++++++++ src/004-base/facility.js | 37 +------------------------------------ 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/devTools/FC.d.ts b/devTools/FC.d.ts index b8d69ff070b..b56f04aed81 100644 --- a/devTools/FC.d.ts +++ b/devTools/FC.d.ts @@ -40,6 +40,30 @@ declare namespace App { } } } + + class JobDesc { + position: string; + assignment: string; + publicSexUse: boolean = false; + fuckdollAccepted: boolean = false; + broodmotherAccepted?: boolean; + /** workers can take part time jobs in addition to their main (full-time) one */ + partTime?:boolean = false; + } + + class ManagerJobDesc extends JobDesc { + shouldWalk: boolean = true; + shouldHold: boolean = true; + shouldSee: boolean = true; + shouldHear: boolean = true; + shouldTalk: boolean = true; + shouldThink: boolean = true; + requiredDevotion:number = 50; + /** Applicable careers */ + careers:string[] = []; + /** Applicable skill name */ + skill:string = null; + } } namespace Debug {} diff --git a/src/004-base/facility.js b/src/004-base/facility.js index ae0b4fe9fd2..2bed02162c3 100644 --- a/src/004-base/facility.js +++ b/src/004-base/facility.js @@ -1,45 +1,10 @@ - -App.Data.JobDesc = class { - constructor() { - this.position = ""; - this.assignment = ""; - this.publicSexUse = false; - this.fuckdollAccepted = false; - /** @type {boolean|undefined} */ - this.broodmotherAccepted = false; - /** workers can take part time jobs in addition to their main (full-time) one */ - this.partTime = false; - } -}; - -App.Data.ManagerJobDesc = class extends App.Data.JobDesc { - constructor() { - super(); - this.shouldWalk = true; - this.shouldHold = true; - this.shouldSee = true; - this.shouldHear = true; - this.shouldTalk = true; - this.shouldThink = true; - this.requiredDevotion = 50; - /** - * Applicable careers - * @type {string[]} */ - this.careers = []; - /** - * Applicable skill name - * @type {string} */ - this.skill = null; - } -}; - App.Data.FacilityDesc = class { constructor() { /** Base name for state variables */ this.baseName = ""; /** Generic name for UI (Brothel, Club, etc.) * If null, baseName is used instead - */ + */ this.genericName = ""; /** @type {Object.<string, App.Data.JobDesc>} */ this.jobs = {}; -- GitLab