phase shifts, itemize
This commit is contained in:
14
engine/items/ammo.go
Normal file
14
engine/items/ammo.go
Normal file
@ -0,0 +1,14 @@
|
||||
package items
|
||||
|
||||
import (
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/items/itemprops"
|
||||
)
|
||||
|
||||
type Ammo struct {
|
||||
itemprops.DamageProfile
|
||||
}
|
||||
|
||||
func (a *Ammo) Type() string {
|
||||
return ecs.AmmoComponent
|
||||
}
|
11
engine/items/armor.go
Normal file
11
engine/items/armor.go
Normal file
@ -0,0 +1,11 @@
|
||||
package items
|
||||
|
||||
import "lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
|
||||
type Armor struct {
|
||||
DefenceProfile struct{}
|
||||
}
|
||||
|
||||
func (a *Armor) Type() string {
|
||||
return ecs.ArmorComponent
|
||||
}
|
14
engine/items/arms.go
Normal file
14
engine/items/arms.go
Normal file
@ -0,0 +1,14 @@
|
||||
package items
|
||||
|
||||
import (
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/items/itemprops"
|
||||
)
|
||||
|
||||
type Arms struct {
|
||||
itemprops.DamageProfile
|
||||
}
|
||||
|
||||
func (a Arms) Type() string {
|
||||
return ecs.ArmsComponent
|
||||
}
|
@ -2,8 +2,26 @@ package items
|
||||
|
||||
import "lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
|
||||
type Carried struct {}
|
||||
type CarriedFace interface {
|
||||
Drop()
|
||||
Pickup()
|
||||
}
|
||||
|
||||
type Carried struct {
|
||||
Mass int //масса в граммах
|
||||
Bulk int //внешний размер, см3
|
||||
}
|
||||
|
||||
func (c *Carried) Type() string {
|
||||
return ecs.CarriedComponent
|
||||
}
|
||||
|
||||
func (c *Carried) Pickup() {}
|
||||
func (c *Carried) Drop() {}
|
||||
|
||||
func (c *Carried) GetMass() int {
|
||||
return c.Mass
|
||||
}
|
||||
func (c *Carried) GetBulk() int {
|
||||
return c.Bulk
|
||||
}
|
7
engine/items/itemprops/damage.go
Normal file
7
engine/items/itemprops/damage.go
Normal file
@ -0,0 +1,7 @@
|
||||
package itemprops
|
||||
|
||||
type DamageProfile struct {
|
||||
Pierce int
|
||||
Bash int
|
||||
Cleave int
|
||||
}
|
11
engine/items/ranged.go
Normal file
11
engine/items/ranged.go
Normal file
@ -0,0 +1,11 @@
|
||||
package items
|
||||
|
||||
import "lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
|
||||
type Ranged struct {
|
||||
RangeProfile struct{} //это зависимость дальности-скорости от характеристик и атрибутов
|
||||
}
|
||||
|
||||
func (r *Ranged) Type() string {
|
||||
return ecs.RangedComponent
|
||||
}
|
@ -2,9 +2,16 @@ package items
|
||||
|
||||
import "lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
|
||||
type Useable struct {}
|
||||
type UsableFace interface {
|
||||
Use()
|
||||
}
|
||||
|
||||
type Usable struct {}
|
||||
|
||||
|
||||
func (u *Useable) Type() string {
|
||||
func (u *Usable) Type() string {
|
||||
return ecs.UsableComponent
|
||||
}
|
||||
|
||||
func (u *Usable) Use() {
|
||||
}
|
16
engine/items/wearable.go
Normal file
16
engine/items/wearable.go
Normal file
@ -0,0 +1,16 @@
|
||||
package items
|
||||
|
||||
import "lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
|
||||
type WearableFace interface {
|
||||
Wear()
|
||||
Takeoff()
|
||||
}
|
||||
|
||||
type Wearable struct {
|
||||
Bodypart int //куда собстно одевать
|
||||
}
|
||||
|
||||
func (w *Wearable) Type() string {
|
||||
return ecs.WearableComponent
|
||||
}
|
Reference in New Issue
Block a user