Summary: When selecting a wild animal, such as rabbit or fox, the animal’s portrait is not displayed in the unit frame.
Steps to reproduce:
- Find an animal in the wild
- Click on the animal
- Observe the unit frame in bottom left corner of screen
Expected Results:
The animal’s portrait to be shown along with its name and description.
Actual Results:
Only the name and description of the animal are shown.
Notes:
It looks like the problem is located in the function _hasPortrait()
in the file Stonehearth\mods\stonehearth\ui\game\unit_frame\unit_frame.js
There is no code path which is designed to return true
for wild animals:
_hasPortrait: function() {
if (this.get('model.stonehearth:job')) {
return true;
}
//Parties have icons too
if (this.get('model.stonehearth:party')) {
return true;
}
var isPet = this.get('model.stonehearth:pet');
if (isPet && isPet.is_pet) {
return true;
}
return false;
}
I hacked the above JS a bit and could get a wild rabbit to show a portrait ^.^
Attachments:
Version Number and Mods in use:
Alpha 20, release-693
System Information: