diff options
Diffstat (limited to 'internal/game/sys_technology.go')
| -rw-r--r-- | internal/game/sys_technology.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/game/sys_technology.go b/internal/game/sys_technology.go index fa0301f..7df68d4 100644 --- a/internal/game/sys_technology.go +++ b/internal/game/sys_technology.go @@ -7,7 +7,7 @@ import ( "gopkg.in/yaml.v3" - "thehouseoficarus/internal/action" + "thehouseoficarus/internal/behavior" "thehouseoficarus/internal/net" "thehouseoficarus/internal/player" "thehouseoficarus/internal/world" @@ -45,7 +45,7 @@ func (g *Game) LoadTechs() error { dir := filepath.Join(g.DataDir, "techs") AllTechs = nil techByID = make(map[string]*TechDef) - action.WalkYAMLDir(dir, func(path, id string, data []byte) error { + behavior.WalkYAMLDir(dir, func(path, id string, data []byte) error { var t TechDef if err := yaml.Unmarshal(data, &t); err != nil { return nil @@ -185,14 +185,14 @@ func (g *Game) tryRecharge(sess *net.Session, p *player.Player, input string) bo instances := g.World.FindObjInstances(p.RoomID, lower) for _, st := range instances { if st.DefID == "charging_station" || st.DefID == "power_conduit" { - if p.Battery >= p.MaxBattery() { - sess.WriteLine("Your battery is already full.") - } else { - p.Battery = p.MaxBattery() - g.AccountStore.SaveCharacter(p) - sess.WriteLine(g.colorize(sess, "battery", - "You connect to the charging station. Your battery is fully recharged.")) - } + if p.Battery >= p.MaxBattery() { + sess.WriteLine("Your battery is already full.") + } else { + p.Battery = p.MaxBattery() + g.AccountStore.SaveCharacter(p) + sess.WriteLine(g.colorize(sess, "battery", + "You connect to the charging station. Your battery is fully recharged.")) + } return true } } |
