move to terrain render system
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user