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
|
||||
}
|
||||
|
10
engine/items/consumable.go
Normal file
10
engine/items/consumable.go
Normal 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
|
||||
}
|
@ -3,5 +3,5 @@ package itemprops
|
||||
type DamageProfile struct {
|
||||
Pierce int
|
||||
Bash int
|
||||
Cleave int
|
||||
Crush int
|
||||
}
|
||||
|
Reference in New Issue
Block a user