fix wu line iface, pending opacity

This commit is contained in:
2026-01-21 11:39:44 +03:00
parent 2be7717477
commit 378729616f
10 changed files with 108 additions and 51 deletions

View File

@@ -1,6 +1,7 @@
package movement
import (
"lab.zaar.be/thefish/alchemyst-go/effects"
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap"
"lab.zaar.be/thefish/alchemyst-go/engine/gamestate"
@@ -10,7 +11,7 @@ import (
type Moveable struct {
Controller *ecs.Controller
Level *gamemap.Level
Level *gamemap.Level
}
func (mov Moveable) Type() string {
@@ -21,12 +22,12 @@ func (mov Moveable) Walk() {
}
//fixme change it to WhatsOnTile
// fixme change it to WhatsOnTile
func (mov Moveable) IsBlocked(c types.Coords) bool {
if mov.Level.GetTile(c).BlocksPass {
return true
}
list := mov.Controller.GetEntitiesWithComponent(ecs.MobComponent)
list := mov.Controller.GetEntitiesWithComponent(ecs.MobComponent)
for idx := range list {
coords := mov.Controller.GetComponent(list[idx], ecs.CoordsComponent)
if coords == nil {
@@ -59,7 +60,7 @@ func Walk(entity ecs.Entity, state *gamestate.GameState, dx, dy int) {
return
}
if !movable.(Moveable).IsBlocked(newCoords) ||
controller.GetComponent(entity, "pass_wall") != nil {
controller.GetComponent(entity, effects.BuffPassWall) != nil {
controller.UpdateComponent(state.Player, ecs.CoordsComponent, newCoords)
}