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

notes

parent d433b3b0
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,13 @@
0.10.7.1-0.1.x
5/12/2018
94
-slaves may now birth identical twins
-anon's quick find slave index ui now works on tabbed penthouse and supports sort boxes
-fixes
5/10/2018
93
......
......@@ -406,3 +406,108 @@ button.accordion.active:before {
/* end extended family css */
config.history.tracking = false;
/*:: Quick List stylesheet [stylesheet]*/
.hidden
{
display:none;
}
div.quicklist.devotion button.mindbroken
{
background-color:red;
}
div.quicklist.devotion button.very-hateful
{
background-color:darkviolet;
}
div.quicklist.devotion button.hateful
{
background-color:darkviolet;
}
div.quicklist.devotion button.resistant
{
background-color:mediumorchid;
}
div.quicklist.devotion button.ambivalent
{
background-color: yellow;
color: #444444;
}
div.quicklist.devotion button.accepting
{
background-color: hotpink;
}
div.quicklist.devotion button.devoted
{
background-color: deeppink;
}
div.quicklist.devotion button.worshipful
{
background-color: magenta;
}
div.quicklist.trust button.mindbroken
{
background-color:red;
}
div.quicklist.trust button.extremely-terrified
{
background-color: darkgoldenrod;
}
div.quicklist.trust button.terrified
{
background-color: goldenrod;
}
div.quicklist.trust button.frightened
{
background-color: gold;
color: coral;
}
div.quicklist.trust button.fearful
{
background-color: yellow;
color: green;
}
div.quicklist.trust button.hate-careful
{
background-color: orange;
}
div.quicklist.trust button.careful
{
background-color: mediumaquamarine;
color: forestgreen;
}
div.quicklist.trust button.bold
{
background-color: orangered;
}
div.quicklist.trust button.trusting
{
background-color: mediumseagreen;
}
div.quicklist.trust button.defiant
{
background-color: darkred;
}
div.quicklist.trust button.profoundly-trusting
{
background-color: seagreen;
}
div.quicklist
{
table-layout: fixed;
text-align: center;
border-collapse: separate;
border-spacing: 2px;
border-style: hidden;
empty-cells: hide;
width: 70%;
}
div.quicklist button
{
margin-top: 15px;
margin-right: 20px;
white-space: nowrap;
}
......@@ -3692,6 +3692,79 @@ window.capFirstChar = function capFirstChar(string) {
return string.charAt(0).toUpperCase() + string.substr(1);
}
 
window.getSlaveDisplayName = function (slave)
{
if ( (!slave)
|| (!State)
)
{
return undefined;
}
var surnamesFirstCountries = [ "Cambodian", "Chinese", "Hungarian", "Japanese", "Korean",
"Mongolian", "Taiwanese", "Vietnamese"
]
, names = [ slave.slaveName, slave.slaveSurname || ""
];
;
if ( (1 != State.variables.surnameOrder)
&& (surnamesFirstCountries.includes(slave.nationality))
)
{
names.reverse();
}
return names.join(" ").trim();
}
window.getSlaveDevotionClass = function (slave)
{
if ( (!slave)
|| (!State)
)
{
return undefined;
}
if ('mindbroken' == slave.fetish) return 'mindbroken';
if (-95 > slave.devotion) return 'very-hateful';
else if (-50 > slave.devotion) return 'hateful';
else if (-20 > slave.devotion) return 'resistant';
else if (20 >= slave.devotion) return 'ambivelent';
else if (50 >= slave.devotion) return 'accepting';
else if (95 >= slave.devotion) return 'devoted';
else return 'worshipful';
}
window.getSlaveTrustClass = function (slave)
{
if ( (!slave)
|| (!State)
)
{
return undefined;
}
if ('mindbroken' == slave.fetish) return '';
if (-95 > slave.trust) return 'extremely-terrified';
else if (-50 > slave.trust) return 'terrified';
else if (-20 > slave.trust) return 'frightened';
else if (20 >= slave.trust) return 'fearful';
else if (50 >= slave.trust)
{
if (-20 > slave.devotion) return 'hate-careful';
else return 'careful';
}
else if (95 >= slave.trust)
{
if (-20 > slave.devotion) return 'bold';
else return 'trusting';
}
else
{
if (-20 > slave.devotion) return 'defiant';
else return 'profoundly-trusting';
}
}
/*:: Span Macro JS [script]*/
 
/*
......@@ -9394,29 +9467,39 @@ window.setColors = function(colorMap){
* Usage: <<htag atributes>>...<</htag>>
* Usage: <<htag atributes tag>>...<</htag>>
*/
Macro.add('htag', {
tags : null,
munge(val, key) { return key + '="' + val + '"'; },
handler() {
Macro
.add(
'htag',
{ tags : null
, handler()
{
const payload = this.payload[0].contents.replace(/(^\n+|\n+$)/, '');
let htag = 'div';
let attributes;
var munge = function (val, key)
{
return key + '="' + val + '"';
};
if (1 > this.args.length) {
return this.error('invalid syntax, format: <<htag [id [ tag ] | attributes [ tag ] >>');
}
if (1 < this.args.length) {
htag = String(this.args[1]).trim();
if (1 > this.args.length)
{
return
this.error(
'invalid syntax, format: <<htag [id [ tag ] | attributes [ tag ] >>'
);
}
if (1 < this.args.length)
{
htag = String(this.args[1]).trim();
}
if ("object" === typeof this.args[0])
{
attributes = $.map(this.args[0], munge).join(" ");
}
if (typeof this.args[0] === "object") {
attributes = //$.map(this.args[0], munge).join(" ");
$.map(
this.args[0],
function (val, key) { return key + '="' + val + '"'; })
.join(" ");
} else {
attributes = 'id="' + String(this.args[0]).trim() + '"';
else
{
attributes = 'id="' + String(this.args[0]).trim() + '"';
}
Config.debug && this.debugView.modes({block: true});
......@@ -9425,3 +9508,57 @@ Macro.add('htag', {
.appendTo(this.output);
}
});
/*:: Quick List [script]*/
window.sortDomObjects = function (objects, attrName)
{
var sortingByAttr = function (a, b)
{
var aVal = parseInt(a.getAttribute(attrName))
, bVal = parseInt(b.getAttribute(attrName))
;
return bVal - aVal;
};
return objects.toArray().sort(sortingByAttr);
};
window.sortButtonsByDevotion = function ()
{
var $sortedButtons = $('#qlWrapper button').remove();
$sortedButtons = sortDomObjects($sortedButtons, 'data-devotion');
$($sortedButtons).appendTo($('#qlWrapper'));
quickListBuildLinks();
};
window.sortButtonsByTrust = function ()
{
var $sortedButtons = $('#qlWrapper button').remove();
$sortedButtons = sortDomObjects($sortedButtons, 'data-trust');
$($sortedButtons).appendTo($('#qlWrapper'));
quickListBuildLinks();
};
window.quickListBuildLinks = function ()
{
$("[data-scroll-to]").click(function() {
var $this = $(this), $toElement = $this.attr('data-scroll-to'),
/*
* note the * 1 enforces $offset to be an integer, without
* it we scroll to True, which goes nowhere fast.
*/
$offset = $this.attr('data-scroll-offset') * 1 || 0,
$speed = $this.attr('data-scroll-speed') * 1 || 500
;
/*
* Use javascript scrollTop animation for in page navigation.
*/
$('html, body').animate({
scrollTop: $($toElement).offset().top + $offset
}, $speed);
});
};
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