From 48a695d3b79f2a3328d87474322d733314cc7d7c Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Thu, 27 Aug 2020 17:49:47 -0700 Subject: [PATCH] Further simplify hero slave purchasing, eliminate $specialSlave and $heroSlaveID globals. --- src/markets/specialSlave.js | 2 +- src/npc/generate/heroCreator.js | 3 +-- src/uncategorized/newSlaveIntro.tw | 6 ------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/markets/specialSlave.js b/src/markets/specialSlave.js index 6122f265c5f..603c5724efe 100644 --- a/src/markets/specialSlave.js +++ b/src/markets/specialSlave.js @@ -101,7 +101,7 @@ App.Markets.specialSlave = function() { V.nextButton = "Continue"; V.nextLink = "AS Dump"; V.returnTo = "Main"; - V.specialSlave = 1; + V.heroSlavesPurchased.push(selectedID); cashX(forceNeg(slaveCost), "slaveTransfer", slave); V.activeSlave = slave; }, diff --git a/src/npc/generate/heroCreator.js b/src/npc/generate/heroCreator.js index 33ca1a146f5..0af91090c78 100644 --- a/src/npc/generate/heroCreator.js +++ b/src/npc/generate/heroCreator.js @@ -107,7 +107,6 @@ App.Utils.getHeroSlave = function(heroSlave) { // WombInit(heroSlave); const newSlave = BaseSlave(); deepAssign(newSlave, heroSlave); - V.heroSlaveID = heroSlave.ID; newSlave.ID = generateSlaveID(); repairLimbs(newSlave); generatePuberty(newSlave); @@ -139,7 +138,7 @@ App.Utils.getHeroSlave = function(heroSlave) { if (newSlave.override_Skin !== 1) { newSlave.skin = getGeneticSkinColor(newSlave); } - setHealth(newSlave, newSlave.health.condition, 0, 0, 0, newSlave.health.tired) + setHealth(newSlave, newSlave.health.condition, 0, 0, 0, newSlave.health.tired); SetBellySize(newSlave); diff --git a/src/uncategorized/newSlaveIntro.tw b/src/uncategorized/newSlaveIntro.tw index 55f704430e8..ff15013fe6b 100644 --- a/src/uncategorized/newSlaveIntro.tw +++ b/src/uncategorized/newSlaveIntro.tw @@ -88,12 +88,6 @@ <</if>> <</if>> -<<if $specialSlave == 1>> - <<run $heroSlavesPurchased.push($heroSlaveID)>> - <<unset $heroSlaveID>> - <<set $specialSlave = 0>> -<</if>> - <p> The legalities completed, <span class='slave-name'><<= SlaveFullName($activeSlave)>></span> <<if !hasAnyLegs($activeSlave)>><<if isAmputee($activeSlave)>>lies<<else>>rests<</if>> helplessly on your desk,<<elseif !canStand($activeSlave)>>kneels before your desk,<<else>>stands before your desk,<</if>> <<if $activeSlave.devotion < -50>> -- GitLab