From 65afdefb7423ba72ff29b7ee723504361223eb28 Mon Sep 17 00:00:00 2001 From: frazazel Date: Mon, 2 May 2022 00:23:44 -0500 Subject: [PATCH] familiar brick renovation revised familiar brick to better display in more flexible sized bricks. Also added grey goose support. --- src/relay/chit.css | 42 +++++++++++++++++++++++----- src/relay/chit_brickFamiliar.ash | 47 +++++++++++++++++--------------- 2 files changed, 60 insertions(+), 29 deletions(-) diff --git a/src/relay/chit.css b/src/relay/chit.css index 6cee0be..c66371d 100644 --- a/src/relay/chit.css +++ b/src/relay/chit.css @@ -88,19 +88,22 @@ a.blue-link:hover { #chit_house { } + #chit_roof { overflow-y: hidden; } + #chit_walls { margin-top: -10px; margin-bottom: -6px; position: absolute; } + #chit_floor { position: absolute; } -.chit_chamber{ +.chit_chamber { width: 100%; overflow-x: hidden; overflow-y: auto; @@ -153,6 +156,7 @@ table.chit_brick { table.chit_brick:last-child { margin-bottom: 0px; } + table.chit_brick a { text-decoration: none; } @@ -169,7 +173,7 @@ div.chit_skeleton table.chit_brick { } table.chit_brick th { word-wrap: break-word; - max-width: 200px; + width: 100%; text-align: center; vertical-align: middle; background-color: #f0f0f0; @@ -506,15 +510,38 @@ div.progressbar { } /* Familiars Panel */ -#chit_familiar tr td.progress { + +#chit_familiar tbody{ + height: 100%; +} + +#chit_familiar tr:last-child { + display: table-cell; + vertical-align: middle; +} + +#chit_familiar tr:last-child td { + /*min-height: 90px;*/ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: center; + align-content: space-around; +} + +#chit_familiar tr:first-child th { + max-height: 16px; +} + +#chit_familiar tr .progress { border-top: 1px solid #dddddd; } -#chit_familiar tr td.progress div.progressbar { +#chit_familiar tr .progress .progressbar { height: 4px; } -#chit_familiar tr td.info { - border-left: 1px solid #f0f0f0; - border-right: 1px solid #f0f0f0; +#chit_familiar tr .info { + min-width: 50%; font-weight: bold; line-height: 1.4; } @@ -777,6 +804,7 @@ table.chit_picker tr.pickitem a:hover { /* chit_skeleton */ div.chit_skeleton { + text-align: -webkit-center; position: absolute; display: block; z-index: 10; diff --git a/src/relay/chit_brickFamiliar.ash b/src/relay/chit_brickFamiliar.ash index 96da3e1..d6a9eae 100644 --- a/src/relay/chit_brickFamiliar.ash +++ b/src/relay/chit_brickFamiliar.ash @@ -2109,6 +2109,12 @@ void bakeFamiliar() { boolean candyBagDropped = get_property("_bagOfCandy").to_boolean(); info += candyBagDropped ? "bag dropped today" : "can drop bag today"; break; + case $familiar[grey goose]: + int famweight = familiar_weight(myfam); + info += famweight + " lb"; + int target = max(famweight+1, 6); + if(famweight < 20) + info += " - " + (target**2 - myfam.experience) + " exp to " + target + " lb"; } //Get equipment info @@ -2197,25 +2203,23 @@ void bakeFamiliar() { buffer result; result.append(''); if (isFed) { - result.append(''); + result.append(''); + result.append(''); + result.append('' + famweight + ' lb '); if (protect) { - result.append(''); - if (charges == "") { - result.append(''); - } else { - result.append(''); + result.append(name_followup + ''); + if (charges != "") { + result.append('' + charges + ''); } - result.append(''); - result.append(''); - result.append(''); + result.append(''); if (myfam == $familiar[none]) { - result.append(''); + result.append('
'); } else { if (equiptype == "") { - result.append(''); + result.append(''); } - result.append(''); + result.append('
' + famname + '' + info + '
'); + result.append(''); //Add Progress bar if we have one matcher progMatcher = create_matcher("
'); } else { - result.append('
'); } - result.append('' + famweight + '' + famname); + result.append('' + famtype); } else { - result.append('' + famname + ''); + result.append('' + famtype + ''); } - result.append(name_followup + ' ' + charges + '
'); if (protect) { @@ -2225,24 +2229,22 @@ void bakeFamiliar() { result.addFamiliarIcon(myfam, false, false); result.append(''); } - result.append('' + famtype + '' + info + ''); - result.append(''); + result.append('
'); } else { - result.append('
'); + result.append('
'); } boolean lockable = string_modifier(famitem, "Modifiers").contains_text("Generic") && vars["chit.familiar.showlock"].to_boolean(); if(lockable) result.append('
'); result.append(''); - result.append(''); + result.append(''); if(lockable) { - result.append(''); else @@ -2251,9 +2253,10 @@ void bakeFamiliar() { result.append(''); if(lockable) result.append('
'); - result.append('