aboutsummaryrefslogtreecommitdiff
path: root/internal/game/sys_technology.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-25 15:40:48 -0400
committerhistoria <[not public]>2026-06-25 15:40:48 -0400
commitabd612c15799f604e671e83dc7c410ed2b44185f (patch)
tree0597ca92350de73aac2a7cf26b2f2d6595dac0cc /internal/game/sys_technology.go
parent2725e2927a1595c7b100d942d1f14146252adeb7 (diff)
downloadthehouseoficarus-abd612c15799f604e671e83dc7c410ed2b44185f.tar.gz
slop refactor
Diffstat (limited to 'internal/game/sys_technology.go')
-rw-r--r--internal/game/sys_technology.go20
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
}
}