Get character stats (kind of) displaying in-scenario
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package scenario
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"code.ur.gs/lupine/ordoor/internal/maps"
|
||||
)
|
||||
|
||||
@@ -10,8 +12,23 @@ type CellPoint struct {
|
||||
}
|
||||
|
||||
func (s *Scenario) CellAtCursor() (*maps.Cell, CellPoint) {
|
||||
cell := s.area.Cell(int(s.selectedCell.X), int(s.selectedCell.Y), 0)
|
||||
return cell, CellPoint{IsoPt: s.selectedCell, Z: 0}
|
||||
cell := s.area.Cell(int(s.highlightedCell.X), int(s.highlightedCell.Y), 0)
|
||||
return cell, CellPoint{IsoPt: s.highlightedCell, Z: 0}
|
||||
}
|
||||
|
||||
func (s *Scenario) HighlightedCharacter() *maps.Character {
|
||||
// FIXME: characters are always at zIdx 0 right now
|
||||
return s.area.CharacterAt(int(s.highlightedCell.X), int(s.highlightedCell.Y), 0)
|
||||
}
|
||||
|
||||
func (s *Scenario) SelectedCharacter() *maps.Character {
|
||||
return s.selectedCharacter
|
||||
}
|
||||
|
||||
func (s *Scenario) SelectHighlightedCharacter() {
|
||||
chr := s.HighlightedCharacter()
|
||||
log.Printf("Selected character %s", chr)
|
||||
s.selectedCharacter = chr
|
||||
}
|
||||
|
||||
func (s *Scenario) ChangeZIdx(by int) {
|
||||
|
Reference in New Issue
Block a user