move to terrain render system

This commit is contained in:
2019-11-16 03:40:26 +03:00
parent 7b4a3c3200
commit 7e9f7686a9
17 changed files with 158 additions and 62 deletions

View File

@ -85,4 +85,16 @@ func (c Carried) GetMass(what ecs.Entity) int {
}
func (c *Carried) GetBulk(what ecs.Entity) int {
return c.Bulk
}
}
func FindCarriedOnTile(coords types.Coords) []ecs.Entity {
carrieds := Controller.GetEntitiesWithComponent(ecs.CarriedComponent)
result := make([]ecs.Entity, 0)
for _, ent := range carrieds {
car := Controller.GetComponent(ent, ecs.CarriedComponent)
if car == coords {
result = append(result, ent)
}
}
return result
}

View File

@ -0,0 +1,10 @@
package items
import "lab.zaar.be/thefish/alchemyst-go/engine/ecs"
type Consumable struct {
}
func (c Consumable) Type() string {
return ecs.ConsumableComponent
}

View File

@ -3,5 +3,5 @@ package itemprops
type DamageProfile struct {
Pierce int
Bash int
Cleave int
Crush int
}