Skip to content
Snippets Groups Projects
Commit ab3e74ff authored by lowercasedonkey's avatar lowercasedonkey
Browse files

strip old heroslave vars and add custom

parent 224bd091
No related branches found
No related tags found
1 merge request!6283They say that a hero could save us
......@@ -3880,16 +3880,11 @@ How to set up your own hero slave.
-The default slave template used is defined in src/js/SlaveState.js
Making your slave; add their name to the following, then go down the documentation adding in your changes.
-each variable must be separated from the last by a comma followed by a space
-each variable must be assigned to _HS
-each variable must be separated from the last by a comma
-if your slave's variable matches the default, you do not have to list it
-strings MUST be in " or your slave will not compile properly
<<set _HS = App.Entity.SlaveState.makeSkeleton()>>
<<set _HS.slaveName = "STANDARD", _HS.birthName = "STANDARD", _HS.ID = _i++>>
<<set $heroSlaves.push(_HS)>>
Once finished, add it into "customSlavesDatabase".
Once finished, add it into "src/npc/databases/customSlavesDatabase.js".
To test if your slave is functioning, start up a normal game, swap to cheat mode, max your rep, and view other slaveowner's stock in the slave market. If you cannot find your slave in the list, and you didn't start the game with your slave, you should double check your slave for errors. If a slave named "Blank" is present, then you likely messed up. Once you find your slave, check their description to make sure it is correct. If it is not, you messed up somewhere in setting them up.
......
......@@ -898,21 +898,8 @@
/* SET HEROES */
<<set $heroSlaves = []>>
<<set $activeSlave = BaseSlave()>>
<<set $baseHeroSlave = clone($activeSlave)>>
<<if ($seeDicks > 0) && ($seeDicks < 100)>>
<<include "D Slaves Database">>
<<include "DD Slaves Database">>
<<include "DF Slaves Database">>
<<elseif $seeDicks == 100>>
<<include "DD Slaves Database">>
<<else>>
<<include "D Slaves Database">>
<<include "DF Slaves Database">>
<</if>>
<<include "custom Slaves Database">>
<<= App.Update.HeroSlavesCleanup()>>
<<set $activeSlave = 0>>
......
......@@ -6,12 +6,14 @@ App.Utils.buildHeroArray = function() {
App.Data.HeroSlaves.DF,
App.Data.HeroSlaves.Dextreme,
App.Data.HeroSlaves.DDextreme,
App.Data.HeroSlaves.DFextreme
App.Data.HeroSlaves.DFextreme,
App.Data.HeroSlaves.custom
);
} else {
array = App.Data.HeroSlaves.D.concat(
App.Data.HeroSlaves.DD,
App.Data.HeroSlaves.DF,
App.Data.HeroSlaves.custom
);
}
if (V.seePreg !== 1 || V.familyTesting !== 1) {
......
......@@ -214,7 +214,7 @@ the new owner of $arcologies[0].name. I will offer useful information whenever p
<br><br>
The previous owner seems to have left in something of a hurry.
<<set _valueGiven = 0>>
<<set $heroSlaves = $heroSlaves.shuffle()>>
<<set _heroSlaves = App.Utils.buildHeroArray().shuffle()>>
<<if $cheatMode == 1>>
Since you've elected to take over an arcology with special advantages, you've acquired a very special group of slaves.
<<include [[Cheatmode Database]]>>
......@@ -757,12 +757,12 @@ The previous owner seems to have left in something of a hurry.
<</switch>>
<<else>>
They could not get all of their personal effects away. Since they <<if $targetArcology.type == "Multiculturalist">>tried to sample different kinds of sexual slavery<<else>>did not have the time in control of the arcology to develop a specific stable of sex slaves<</if>>, their slaves were quite varied.
<<for $j = 0; $j < $heroSlaves.length; $j++>>
<<for $j = 0; $j < _heroSlaves.length; $j++>>
<<if _valueOwed - _valueGiven <= 5000>>
<<break>>
<</if>>
<<set $activeSlave = App.Utils.getHeroSlave($heroSlaves[$j], $baseHeroSlave)>>
<<run $heroSlaves.splice($j,1)>>
<<set $activeSlave = App.Utils.getHeroSlave(_heroSlaves[$j], $baseHeroSlave)>>
<<run _heroSlaves.splice($j,1)>>
<<set _slaveCost = slaveCost($activeSlave)>>
<<if _valueGiven + _slaveCost < _valueOwed*2>>
<<run nationalityToAccent($activeSlave)>>
......
App.Data.HeroSlaves.custom = [
];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment