From c16e689b8548bc0436afff6eb22b8ed25ce9256e Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Mon, 21 Dec 2020 22:15:32 +0100 Subject: [PATCH] possible facilities to pure dom --- src/005-passages/facilitiesPassages.js | 59 +++++++++++++++++++ .../bodyModification/bodyModification.tw | 5 -- src/facilities/incubator/incubator.tw | 3 - src/facilities/pit/pit.tw | 3 - src/facilities/salon/salon.tw | 5 -- src/facilities/wardrobe/wardrobe.tw | 5 -- src/npc/agent/agentSelect.tw | 11 ---- 7 files changed, 59 insertions(+), 32 deletions(-) create mode 100644 src/005-passages/facilitiesPassages.js delete mode 100644 src/facilities/bodyModification/bodyModification.tw delete mode 100644 src/facilities/incubator/incubator.tw delete mode 100644 src/facilities/pit/pit.tw delete mode 100644 src/facilities/salon/salon.tw delete mode 100644 src/facilities/wardrobe/wardrobe.tw delete mode 100644 src/npc/agent/agentSelect.tw diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js new file mode 100644 index 00000000000..135df2e1bbc --- /dev/null +++ b/src/005-passages/facilitiesPassages.js @@ -0,0 +1,59 @@ +new App.DomPassage("Wardrobe", + () => { + V.nextButton = "Back"; + V.nextLink = "Manage Penthouse"; + + return App.UI.WardrobeShopping("FS"); + }, ["jump-to-safe", "jump-from-safe"] +); + +new App.DomPassage("Pit", () => { return App.Facilities.Pit.pit(); }, ["jump-to-safe", "jump-from-safe"]); + +new App.DomPassage("Salon", + () => { + V.nextButton = "Confirm changes"; + V.nextLink = "Slave Interact"; + V.encyclopedia = "The Auto Salon"; + + return App.UI.salon(getSlave(V.AS)); + }, ["jump-to-safe", "jump-from-safe"] +); + +new App.DomPassage("Body Modification", + () => { + V.nextButton = "Confirm changes"; + V.nextLink = "Slave Interact"; + V.encyclopedia = "The Studio"; + + return App.UI.bodyModification(getSlave(V.AS)); + }, ["jump-to-safe", "jump-from-safe"] +); + +new App.DomPassage("Incubator", () => { return App.UI.incubator(); }, ["jump-to-safe", "jump-from-safe"]); + +new App.DomPassage("Agent Select", + () => { + V.nextButton = "Back"; + V.nextLink = "Neighbor Interact"; + V.encyclopedia = "Agents"; + + const f = document.createDocumentFragment(); + App.UI.DOM.appendNewElement("h2", f, "Appoint an Agent from your devoted slaves"); + + // TODO Logic should not be handled here. + f.append(App.UI.SlaveList.slaveSelectionList( + s => s.fuckdoll === 0 + && s.devotion > 20 + && s.intelligence + s.intelligenceImplant > 15 + && s.intelligenceImplant >= 15 + && canWalk(s) && canSee(s) && canHear(s) && canTalk(s) + && s.broodmother < 2 + && (s.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset"), + (slave) => App.UI.DOM.passageLink(SlaveFullName(slave), "Agent Workaround", + () => { V.i = V.slaves.findIndex((s) => s.ID === slave.ID); }), + s => App.Entity.facilities.arcologyAgent.manager.slaveHasExperience(s) + )); + + return f; + }, ["jump-from-safe"] +); diff --git a/src/facilities/bodyModification/bodyModification.tw b/src/facilities/bodyModification/bodyModification.tw deleted file mode 100644 index 74cbfe0d644..00000000000 --- a/src/facilities/bodyModification/bodyModification.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Body Modification [nobr jump-from-safe] - -<<set $nextButton = "Confirm changes", $nextLink = "Slave Interact", $encyclopedia = "The Studio">> - -<<includeDOM App.UI.bodyModification(getSlave($AS))>> \ No newline at end of file diff --git a/src/facilities/incubator/incubator.tw b/src/facilities/incubator/incubator.tw deleted file mode 100644 index 5c699aa7bde..00000000000 --- a/src/facilities/incubator/incubator.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Incubator [nobr jump-to-safe jump-from-safe] - -<<includeDOM App.UI.incubator()>> \ No newline at end of file diff --git a/src/facilities/pit/pit.tw b/src/facilities/pit/pit.tw deleted file mode 100644 index e0ebcece67d..00000000000 --- a/src/facilities/pit/pit.tw +++ /dev/null @@ -1,3 +0,0 @@ -:: Pit [nobr jump-to-safe jump-from-safe] - -<<includeDOM App.Facilities.Pit.pit()>> diff --git a/src/facilities/salon/salon.tw b/src/facilities/salon/salon.tw deleted file mode 100644 index 07bb6f37df7..00000000000 --- a/src/facilities/salon/salon.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Salon [nobr jump-from-safe] - -<<set $nextButton = "Confirm changes", $nextLink = "Slave Interact", $encyclopedia = "The Auto Salon">> - -<<includeDOM App.UI.salon(getSlave($AS))>> \ No newline at end of file diff --git a/src/facilities/wardrobe/wardrobe.tw b/src/facilities/wardrobe/wardrobe.tw deleted file mode 100644 index 56636db39ef..00000000000 --- a/src/facilities/wardrobe/wardrobe.tw +++ /dev/null @@ -1,5 +0,0 @@ -:: Wardrobe [nobr jump-to-safe jump-from-safe] - -<<set $nextButton = "Back", $nextLink = "Manage Penthouse">> - -<<includeDOM App.UI.WardrobeShopping("FS")>> diff --git a/src/npc/agent/agentSelect.tw b/src/npc/agent/agentSelect.tw deleted file mode 100644 index e337c0d0ba6..00000000000 --- a/src/npc/agent/agentSelect.tw +++ /dev/null @@ -1,11 +0,0 @@ -:: Agent Select [nobr jump-from-safe] - -<<set $nextButton = "Back", $nextLink = "Neighbor Interact", $encyclopedia = "Agents">> -''Appoint an Agent from your devoted slaves:'' - -<<includeDOM App.UI.SlaveList.slaveSelectionList( - s => (s.fuckdoll === 0 && s.devotion > 20 && s.intelligence + s.intelligenceImplant > 15 && s.intelligenceImplant >= 15 && canWalk(s) && canSee(s) && canHear(s) && canTalk(s) && s.broodmother < 2 && (s.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")), - (slave) => App.UI.DOM.passageLink(SlaveFullName(slave), 'Agent Workaround', - () => { V.i = V.slaves.findIndex((s) => s.ID === slave.ID); }), - s => App.Entity.facilities.arcologyAgent.manager.slaveHasExperience(s) - )>> -- GitLab