portrait now available again on player load; still not on the equippedview

This commit is contained in:
minjaesong
2022-03-25 15:06:14 +09:00
parent 4b6a878601
commit af542e43a9
2 changed files with 34 additions and 23 deletions

View File

@@ -112,7 +112,7 @@ class AssembledSpriteAnimation(
if (flipHorizontal) bodypartPos = bodypartPos.invertX()
bodypartPos += ADPropertyObject.Vector2i(1,0)
if (name == "HELD_ITEM") { // inject item's image
if (name in jointNameToEquipPos) {
ItemCodex[(parentActor as? Pocketed)?.inventory?.itemEquipped?.get(jointNameToEquipPos[name]!!)]?.let { item ->
ItemCodex.getItemImage(item)?.let { image ->
val drawPos = adp.origin + bodypartPos // imgCentre for held items are (0,0)