Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions src/relay/chit.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -153,6 +156,7 @@ table.chit_brick {
table.chit_brick:last-child {
margin-bottom: 0px;
}

table.chit_brick a {
text-decoration: none;
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
47 changes: 25 additions & 22 deletions src/relay/chit_brickFamiliar.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Comment on lines +2112 to +2117
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems of questionable value to me since all this information is already available, but at the same time it also seems harmless so I guess I'm cool with it. Not to mention it makes it available without having to mouse over anything, so I guess I can see how it would be useful after all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I couldn't figure out a way to get it to put the familiar and equipment on opposite sides when there is enough room, or I would have done that to make it more backwards compatible. But honestly, I actually like having the familiar and equipment side-by-side better. What do you like better about the previous view? Do you think that providing an updated default layout that doesn't have a full-width familiar brick would be a fix worth considering?

I don't have a Mumming Trunk, so I didn't even know that it shows an icon on your familiar brick. It's lucky that the changes were an unexpected improvement. It might be something in the CSS rather than in the HTML.

The Grey Goose showing unbuffed weight and exp to next lb was a big QoL thing when I was running Grey You runs. I think it will be valuable information-at-a-glance to many users.

}

//Get equipment info
Expand Down Expand Up @@ -2197,25 +2203,23 @@ void bakeFamiliar() {
buffer result;
result.append('<table id="chit_familiar" class="chit_brick nospace">');
if (isFed) {
result.append('<tr class="wellfed">');
result.append('<tr class="wellfed"><th>');
} else {
result.append('<tr>');
result.append('<tr><th>');
}
result.append('<th width="40" title="'+ weight_title +'" style="color:blue">' + famweight + '</th>');
result.append('<span title="'+ weight_title +'" style="color:blue">' + famweight + ' lb </span>');

if (protect) {
result.append('<th title="' + hover + '">' + famname);
result.append('<span title="' + hover + '">' + famtype);
} else {
result.append('<th><a target=mainpane href="familiar.php" class="familiarpick" title="' + hover + '">' + famname + '</a>');
result.append('<span><a target=mainpane href="familiar.php" class="familiarpick" title="' + hover + '">' + famtype + '</a>');
}
result.append(name_followup + '</th>');
if (charges == "") {
result.append('<th width="30">&nbsp;</th>');
} else {
result.append('<th width="30" title="' + chargeTitle + '">' + charges + '</th>');
result.append(name_followup + '</span>');
if (charges != "") {
result.append('<span title="' + chargeTitle + '">' + charges + '</span>');
}
result.append('</tr><tr>');
result.append('<td class="');
result.append('</th></tr><tr>');
result.append('<td><div class="');
if(myfam.isWeirdo()) result.append('weird');
result.append('icon" title="' + hover_famicon + '">');
if (protect) {
Expand All @@ -2225,24 +2229,22 @@ void bakeFamiliar() {
result.addFamiliarIcon(myfam, false, false);
result.append('</a>');
}
result.append('</td>');
result.append('<td class="info" style="' + famstyle + '"><a title="Familiar Haiku" class="hand" onclick="fam(' + to_int(myfam) + ')" origin-level="third-party"/>' + famtype + '</a>' + info + '</td>');
result.append('</div>');
if (myfam == $familiar[none]) {
result.append('<td class="icon">');
result.append('</td>');
result.append('<div class="icon"></div>');
} else {
if (equiptype == "") {
result.append('<td class="icon" title="Equip your familiar">');
result.append('<div class="icon" title="Equip your familiar">');
} else {
result.append('<td class="icon">');
result.append('<div class="icon">');
}
boolean lockable = string_modifier(famitem, "Modifiers").contains_text("Generic") && vars["chit.familiar.showlock"].to_boolean();
if(lockable)
result.append('<div id="fam_equip">');
result.append('<a class="chit_launcher" rel="chit_pickerfamgear" href="#">');
result.append('<img title="' + equiptype + '" src="/images/itemimages/' + equipimage + '">');
result.append('<img class="chit_icon" title="' + equiptype + '" src="/images/itemimages/' + equipimage + '">');
if(lockable) {
result.append('<a href="' + sideCommand("ashq lock_familiar_equipment("+ (!is_familiar_equipment_locked()) +")") +'"><img title="Equipment ');
result.append('<a href="' + sideCommand("ashq lock_familiar_equipment("+ (!is_familiar_equipment_locked()) +")") +'"><img class="chit_icon" title="Equipment ');
if(is_familiar_equipment_locked())
result.append('Locked" id="fam_lock" src="/images/itemimages/padlock.gif"></a>');
else
Expand All @@ -2251,9 +2253,10 @@ void bakeFamiliar() {
result.append('</a>');
if(lockable)
result.append('</div>');
result.append('</td>');
result.append('</div>');
}
result.append('</tr>');
result.append('<div class="info" style="' + famstyle + '"><a title="Familiar Haiku" class="hand" onclick="fam(' + to_int(myfam) + ')" origin-level="third-party"/>' + famname + '</a>' + info + '</div>');
result.append('</td></tr>');

//Add Progress bar if we have one
matcher progMatcher = create_matcher("<table title='(.*?)' cellpadding=0", source);
Expand Down