Skip to content
Snippets Groups Projects
Commit 699f3e67 authored by Pregmodder's avatar Pregmodder
Browse files

Sugarcube.State stripping.

parent ff51c659
No related branches found
No related tags found
No related merge requests found
...@@ -2,10 +2,15 @@ ...@@ -2,10 +2,15 @@
0.10.7.0/1 0.10.7.0/1
3/09/2018
389
-various git fixes (brothel implant ads, custom slave voice, SF tweaks)
3/08/2018 3/08/2018
388 388
-fixed a very very unlikely case in sister indentifying -fixed a very very unlikely case in sister indentification
-fixed some improper pregnancy sets in the dairy -fixed some improper pregnancy sets in the dairy
-fixed more improper preg sets in saLongTermEffects -fixed more improper preg sets in saLongTermEffects
-barred random impreg in dairies with preg settings on -barred random impreg in dairies with preg settings on
...@@ -35,6 +40,7 @@ ...@@ -35,6 +40,7 @@
384 384
-various git merges -various git merges
-devoted virgin event
3/04/18 3/04/18
......
...@@ -191,7 +191,7 @@ if (typeof SlaveStatsChecker == "undefined") { ...@@ -191,7 +191,7 @@ if (typeof SlaveStatsChecker == "undefined") {
var SlaveStatsChecker = { var SlaveStatsChecker = {
checkForLisp: function (slave) { checkForLisp: function (slave) {
/* Begin mod section: toggle whether slaves lisp. */ /* Begin mod section: toggle whether slaves lisp. */
if (SugarCube.State && SugarCube.State.variables.disableLisping == 1) { if (State && State.variables.disableLisping == 1) {
return false; return false;
} }
/* End mod section: toggle whether slaves lisp. */ /* End mod section: toggle whether slaves lisp. */
...@@ -1111,7 +1111,7 @@ window.bodyguardSuccessorEligible = function(slave) { ...@@ -1111,7 +1111,7 @@ window.bodyguardSuccessorEligible = function(slave) {
}; };
   
window.ngUpdateGenePool = function(genePool) { window.ngUpdateGenePool = function(genePool) {
var transferredSlaveIds = (SugarCube.State.variables.slaves || []) var transferredSlaveIds = (State.variables.slaves || [])
.filter(function(s) { return s.ID >= 1200000; }) .filter(function(s) { return s.ID >= 1200000; })
.map(function(s) { return s.ID - 1200000; }); .map(function(s) { return s.ID - 1200000; });
return (genePool || []) return (genePool || [])
...@@ -1304,7 +1304,7 @@ window.isSlaveAvailable = function(slave) { ...@@ -1304,7 +1304,7 @@ window.isSlaveAvailable = function(slave) {
return false; return false;
} else if (slave.assignment == "be confined in the arcade") { } else if (slave.assignment == "be confined in the arcade") {
return false; return false;
} else if (slave.assignment == "work in the dairy" && SugarCube.State.variables.DairyRestraintsSetting >= 2) { } else if (slave.assignment == "work in the dairy" && State.variables.DairyRestraintsSetting >= 2) {
return false; return false;
} else { } else {
return true; return true;
...@@ -1326,7 +1326,7 @@ if (typeof DairyRestraintsSetting == "undefined") { ...@@ -1326,7 +1326,7 @@ if (typeof DairyRestraintsSetting == "undefined") {
window.randomRelatedSlave = function(slave, filterFunction) { window.randomRelatedSlave = function(slave, filterFunction) {
if(!slave || !SugarCube) { return undefined; } if(!slave || !SugarCube) { return undefined; }
if(typeof filterFunction !== 'function') { filterFunction = function(s, index, array) { return true; }; } if(typeof filterFunction !== 'function') { filterFunction = function(s, index, array) { return true; }; }
return SugarCube.State.variables.slaves.filter(filterFunction).shuffle().find(function(s, index, array) {return areSisters(slave, s) || s.mother == slave.ID || s.father == slave.ID || slave.ID == s.mother || slave.ID == s.father; }) return State.variables.slaves.filter(filterFunction).shuffle().find(function(s, index, array) {return areSisters(slave, s) || s.mother == slave.ID || s.father == slave.ID || slave.ID == s.mother || slave.ID == s.father; })
} }
*/ */
   
...@@ -1335,7 +1335,7 @@ window.randomRelatedSlave = function(slave, filterFunction) { ...@@ -1335,7 +1335,7 @@ window.randomRelatedSlave = function(slave, filterFunction) {
if(typeof filterFunction !== 'function') { if(typeof filterFunction !== 'function') {
filterFunction = function(s, index, array) { return true; }; filterFunction = function(s, index, array) { return true; };
} }
var arr = SugarCube.State.variables.slaves.filter(filterFunction) var arr = State.variables.slaves.filter(filterFunction)
arr.shuffle() arr.shuffle()
return arr.find(function(s, index, array) { return arr.find(function(s, index, array) {
return areSisters(slave, s) return areSisters(slave, s)
...@@ -8052,7 +8052,7 @@ window.renderFamilyTree = function(slaves, filterID) { ...@@ -8052,7 +8052,7 @@ window.renderFamilyTree = function(slaves, filterID) {
} }
}; };
   
window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, filterID) { window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
var family_graph = { var family_graph = {
nodes: [], nodes: [],
links: [] links: []
...@@ -8070,20 +8070,20 @@ window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, fil ...@@ -8070,20 +8070,20 @@ window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, fil
var kids = {}; var kids = {};
   
var fake_pc = { var fake_pc = {
slaveName: SugarCube.State.variables.PC.name + '(You)', slaveName: State.variables.PC.name + '(You)',
mother: SugarCube.State.variables.PC.mother, mother: State.variables.PC.mother,
father: SugarCube.State.variables.PC.father, father: State.variables.PC.father,
dick: SugarCube.State.variables.PC.dick, dick: State.variables.PC.dick,
vagina: SugarCube.State.variables.PC.vagina, vagina: State.variables.PC.vagina,
ID: SugarCube.State.variables.PC.ID ID: State.variables.PC.ID
}; };
var charList = [fake_pc]; var charList = [fake_pc];
charList.push.apply(charList, slaves); charList.push.apply(charList, slaves);
charList.push.apply(charList, SugarCube.State.variables.tanks); charList.push.apply(charList, State.variables.tanks);
   
var unborn = {}; var unborn = {};
for(var i = 0; i < SugarCube.State.variables.tanks.length; i++) { for(var i = 0; i < State.variables.tanks.length; i++) {
unborn[SugarCube.State.variables.tanks[i].ID] = true; unborn[State.variables.tanks[i].ID] = true;
} }
   
for(var i = 0; i < charList.length; i++) { for(var i = 0; i < charList.length; i++) {
......
...@@ -133,7 +133,7 @@ window.isSlaveAvailable = function(slave) { ...@@ -133,7 +133,7 @@ window.isSlaveAvailable = function(slave) {
return false; return false;
} else if (slave.assignment == "be confined in the arcade") { } else if (slave.assignment == "be confined in the arcade") {
return false; return false;
} else if (slave.assignment == "work in the dairy" && SugarCube.State.variables.DairyRestraintsSetting >= 2) { } else if (slave.assignment == "work in the dairy" && State.variables.DairyRestraintsSetting >= 2) {
return false; return false;
} else { } else {
return true; return true;
...@@ -155,7 +155,7 @@ if (typeof DairyRestraintsSetting == "undefined") { ...@@ -155,7 +155,7 @@ if (typeof DairyRestraintsSetting == "undefined") {
window.randomRelatedSlave = function(slave, filterFunction) { window.randomRelatedSlave = function(slave, filterFunction) {
if(!slave || !SugarCube) { return undefined; } if(!slave || !SugarCube) { return undefined; }
if(typeof filterFunction !== 'function') { filterFunction = function(s, index, array) { return true; }; } if(typeof filterFunction !== 'function') { filterFunction = function(s, index, array) { return true; }; }
return SugarCube.State.variables.slaves.filter(filterFunction).shuffle().find(function(s, index, array) {return areSisters(slave, s) || s.mother == slave.ID || s.father == slave.ID || slave.ID == s.mother || slave.ID == s.father; }) return State.variables.slaves.filter(filterFunction).shuffle().find(function(s, index, array) {return areSisters(slave, s) || s.mother == slave.ID || s.father == slave.ID || slave.ID == s.mother || slave.ID == s.father; })
} }
*/ */
...@@ -164,7 +164,7 @@ window.randomRelatedSlave = function(slave, filterFunction) { ...@@ -164,7 +164,7 @@ window.randomRelatedSlave = function(slave, filterFunction) {
if(typeof filterFunction !== 'function') { if(typeof filterFunction !== 'function') {
filterFunction = function(s, index, array) { return true; }; filterFunction = function(s, index, array) { return true; };
} }
var arr = SugarCube.State.variables.slaves.filter(filterFunction) var arr = State.variables.slaves.filter(filterFunction)
arr.shuffle() arr.shuffle()
return arr.find(function(s, index, array) { return arr.find(function(s, index, array) {
return areSisters(slave, s) return areSisters(slave, s)
......
...@@ -200,7 +200,7 @@ window.renderFamilyTree = function(slaves, filterID) { ...@@ -200,7 +200,7 @@ window.renderFamilyTree = function(slaves, filterID) {
} }
}; };
window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, filterID) { window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
var family_graph = { var family_graph = {
nodes: [], nodes: [],
links: [] links: []
...@@ -218,20 +218,20 @@ window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, fil ...@@ -218,20 +218,20 @@ window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, fil
var kids = {}; var kids = {};
var fake_pc = { var fake_pc = {
slaveName: SugarCube.State.variables.PC.name + '(You)', slaveName: State.variables.PC.name + '(You)',
mother: SugarCube.State.variables.PC.mother, mother: State.variables.PC.mother,
father: SugarCube.State.variables.PC.father, father: State.variables.PC.father,
dick: SugarCube.State.variables.PC.dick, dick: State.variables.PC.dick,
vagina: SugarCube.State.variables.PC.vagina, vagina: State.variables.PC.vagina,
ID: SugarCube.State.variables.PC.ID ID: State.variables.PC.ID
}; };
var charList = [fake_pc]; var charList = [fake_pc];
charList.push.apply(charList, slaves); charList.push.apply(charList, slaves);
charList.push.apply(charList, SugarCube.State.variables.tanks); charList.push.apply(charList, State.variables.tanks);
var unborn = {}; var unborn = {};
for(var i = 0; i < SugarCube.State.variables.tanks.length; i++) { for(var i = 0; i < State.variables.tanks.length; i++) {
unborn[SugarCube.State.variables.tanks[i].ID] = true; unborn[State.variables.tanks[i].ID] = true;
} }
for(var i = 0; i < charList.length; i++) { for(var i = 0; i < charList.length; i++) {
......
...@@ -191,7 +191,7 @@ if (typeof SlaveStatsChecker == "undefined") { ...@@ -191,7 +191,7 @@ if (typeof SlaveStatsChecker == "undefined") {
var SlaveStatsChecker = { var SlaveStatsChecker = {
checkForLisp: function (slave) { checkForLisp: function (slave) {
/* Begin mod section: toggle whether slaves lisp. */ /* Begin mod section: toggle whether slaves lisp. */
if (SugarCube.State && SugarCube.State.variables.disableLisping == 1) { if (State && State.variables.disableLisping == 1) {
return false; return false;
} }
/* End mod section: toggle whether slaves lisp. */ /* End mod section: toggle whether slaves lisp. */
...@@ -1111,7 +1111,7 @@ window.bodyguardSuccessorEligible = function(slave) { ...@@ -1111,7 +1111,7 @@ window.bodyguardSuccessorEligible = function(slave) {
}; };
window.ngUpdateGenePool = function(genePool) { window.ngUpdateGenePool = function(genePool) {
var transferredSlaveIds = (SugarCube.State.variables.slaves || []) var transferredSlaveIds = (State.variables.slaves || [])
.filter(function(s) { return s.ID >= 1200000; }) .filter(function(s) { return s.ID >= 1200000; })
.map(function(s) { return s.ID - 1200000; }); .map(function(s) { return s.ID - 1200000; });
return (genePool || []) return (genePool || [])
......
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