aboutsummaryrefslogtreecommitdiff
path: root/internal/game/game.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/game.go')
-rw-r--r--internal/game/game.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/game/game.go b/internal/game/game.go
index 8b5f924..15236f4 100644
--- a/internal/game/game.go
+++ b/internal/game/game.go
@@ -82,6 +82,7 @@ func (g *Game) SetHub(hub *net.Hub) {
g.Hub = hub
hub.OnRemove(func(sess *net.Session) {
if p, ok := sess.Player.(*player.Player); ok {
+ p.DeactivateAllTechs()
g.charsMu.Lock()
delete(g.loggedInChars, p.Name)
g.charsMu.Unlock()
@@ -139,7 +140,8 @@ func classifyCommand(cmd string) CommandClass {
"look", "l", "exits", "help",
"map", "option", "options", "alias", "unalias",
"description", "desc", "queued", "color", "colors",
- "colortable", "prompt", "style", "stats":
+ "colortable", "prompt", "style", "stats",
+ "tech", "t":
return ClassInstant
case "equip", "eq", "equipment", "wear", "wield", "remove", "unwear", "unwield":
return ClassFree
@@ -316,6 +318,8 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI
g.doScore(sess)
case "stats":
g.doStats(sess)
+ case "tech", "t":
+ g.doTech(sess, strings.Join(args, " "))
case "i", "inv", "inventory":
g.doInventory(sess)
case "quit":