Added shrines (#31)

* Added shrines, i think

* Fixed shrines

* Fix for actually determining a shrine the correct way

* Updated to use a Shrine object instead of a boring ID

* After deliberation, removed extra position thingamajigger
This commit is contained in:
Farmith
2024-08-15 19:38:14 +02:00
committed by GitHub
parent 8e67284940
commit 52b0de329f
4 changed files with 106 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ type Object struct {
IsHovered bool
Selectable bool
InteractType object.InteractType
Shrine object.ShrineData
Position Position
Owner string
}
@@ -34,6 +35,35 @@ func (o Objects) FindByID(id UnitID) (Object, bool) {
return Object{}, false
}
func (o Object) IsShrine() bool {
switch o.Shrine.ShrineType {
case object.RefillShrine,
object.HealthShrine,
object.ManaShrine,
object.HPXChangeShrine,
object.ManaXChangeShrine,
object.ArmorShrine,
object.CombatShrine,
object.ResistFireShrine,
object.ResistColdShrine,
object.ResistLightningShrine,
object.ResistPoisonShrine,
object.SkillShrine,
object.ManaRegenShrine,
object.StaminaShrine,
object.ExperienceShrine,
object.UnknownShrine,
object.PortalShrine,
object.GemShrine,
object.FireShrine,
object.MonsterShrine,
object.ExplosiveShrine,
object.PoisonShrine:
return true
}
return false
}
func (o Object) IsWaypoint() bool {
switch o.Name {
case object.WaypointPortal,