From ab90a87da082746ccb4660ed2d43cc9bcc04fcb3 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Tue, 3 Apr 2018 12:22:16 -0400 Subject: [PATCH] couple more --- src/pregmod/editGenetics.tw | 14 +++++++------- src/uncategorized/seCoursing.tw | 4 ---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/pregmod/editGenetics.tw b/src/pregmod/editGenetics.tw index 720f5113798..9d2575d5fdb 100644 --- a/src/pregmod/editGenetics.tw +++ b/src/pregmod/editGenetics.tw @@ -2,7 +2,7 @@ <html> <script type="text/x-template" id="birthFullNameTmpl"> - <% if(State.variables.surnameOrder != 1) { + <% if(SugarCube.State.variables.surnameOrder != 1) { %><% if(["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(s.nationality)) { %><% if(s.birthSurname || s.surname) { %><%- s.birthSurname || s.surname%> <% } %><b><u><%- s.birthName || s.name %></u></b><% } else { @@ -13,7 +13,7 @@ } %> </script> <script type="text/x-template" id="currentFullNameTmpl"> - <% if(State.variables.surnameOrder != 1) { + <% if(SugarCube.State.variables.surnameOrder != 1) { %><% if(["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(s.nationality)) { %><% if(s.slaveSurname) { %><%- s.slaveSurname %> <% } %><b><u><%- s.slaveName %></u></b><% } else { @@ -133,7 +133,7 @@ }[String(karyotype).toUpperCase()] || 'unknown/not viable'; }; tmpl.ageDesc = function(slave) { - var age = slave.actualAge + (slave.birthWeek + State.variables.week - slave.weekAcquired) / 52.0; + var age = slave.actualAge + (slave.birthWeek + SugarCube.State.variables.week - slave.weekAcquired) / 52.0; var years = Math.floor(age); var months = Math.floor((age - years) * 12); return (years > 0 ? years + 'y ' + months + 'm' : months + 'm'); @@ -200,9 +200,9 @@ if(id === 0) { return '<i>unknown</i>'; } if(id === -1) { /* The PC */ - return tmpl.birthFullName(State.variables.PC) + ' (PC)'; + return tmpl.birthFullName(SugarCube.State.variables.PC) + ' (PC)'; } else { - var parent = State.variables.genePool.find(function(s) { return s.ID === id; }); + var parent = SugarCube.State.variables.genePool.find(function(s) { return s.ID === id; }); return (parent ? tmpl.birthFullName(parent) : '<i>missing</i>') + ' (' + id + ')'; } }; @@ -229,7 +229,7 @@ table.slave-genetic-details td.editor select:hover { border: 1px solid #8cf; tra <<script>> jQuery(function() { var slaveList = jQuery('#slaveList'); - _(State.variables.genePool).sortBy(['birthName', 'birthSurname']).forEach(function(s) { + _(SugarCube.State.variables.genePool).sortBy(['birthName', 'birthSurname']).forEach(function(s) { slaveList.append(tmpl.nameButton(s)); }); jQuery(document).off('.edit-genetics'); @@ -264,7 +264,7 @@ table.slave-genetic-details td.editor select:hover { border: 1px solid #8cf; tra el.on('click', function() { jQuery('button.selectedslave').removeClass('selectedslave'); el.addClass('selectedslave'); - var slave = State.variables.genePool.find(function(s) { return s.ID === id; }); + var slave = SugarCube.State.variables.genePool.find(function(s) { return s.ID === id; }); geneDetails.html(tmpl.geneDetails(slave)); var numberEditorOpen = function() { diff --git a/src/uncategorized/seCoursing.tw b/src/uncategorized/seCoursing.tw index b3e8fc6dce5..c7d19392dd2 100644 --- a/src/uncategorized/seCoursing.tw +++ b/src/uncategorized/seCoursing.tw @@ -229,10 +229,6 @@ The rules have been explained to the hares: they're to be freed if they can reac Her balls are likely to hurt badly enough, running naked, to slow her down. <<set _hareSpeed -= 1>> <</if>> -<<if $activeSlave.preg >= 20>> - Her pregnant belly will probably stop her from running at all. - <<set _hareSpeed -= 5>> -<</if>> <<if $activeSlave.belly >= 60000>> She's so massively pregnant it'll be luck if she even makes it anywhere. <<set _hareSpeed -= 10>> -- GitLab