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.go36
1 files changed, 26 insertions, 10 deletions
diff --git a/internal/game/game.go b/internal/game/game.go
index 33dd0d1..9d07ead 100644
--- a/internal/game/game.go
+++ b/internal/game/game.go
@@ -7,14 +7,14 @@ import (
"sync"
"time"
- "thirdcollapse/internal/action"
- "thirdcollapse/internal/combat"
- "thirdcollapse/internal/config"
- "thirdcollapse/internal/engine"
- "thirdcollapse/internal/net"
- "thirdcollapse/internal/object"
- "thirdcollapse/internal/player"
- "thirdcollapse/internal/world"
+ "thehouseoficarus/internal/action"
+ "thehouseoficarus/internal/combat"
+ "thehouseoficarus/internal/config"
+ "thehouseoficarus/internal/engine"
+ "thehouseoficarus/internal/net"
+ "thehouseoficarus/internal/object"
+ "thehouseoficarus/internal/player"
+ "thehouseoficarus/internal/world"
)
type CommandClass int
@@ -124,6 +124,8 @@ func (g *Game) HandleSession(sess *net.Session, input string) {
g.handleDropAllConfirm(sess, input)
case net.StateCookRecipe:
g.handleCookRecipe(sess, input)
+ case net.StateColorChoice:
+ g.handleColorChoice(sess, input)
}
}
@@ -132,9 +134,10 @@ func classifyCommand(cmd string) CommandClass {
case "say", "score", "sc", "inventory", "i", "inv",
"equipment", "eq", "look", "l", "exits", "help",
"map", "option", "options", "alias", "unalias",
- "description", "desc", "queued", "color", "colors":
+ "description", "desc", "queued", "color", "colors",
+ "colortable", "prompt", "style":
return ClassInstant
- case "wear", "wield", "remove", "unwear", "unwield", "style":
+ case "wear", "wield", "remove", "unwear", "unwield":
return ClassFree
case "get", "take", "grab", "pick", "drop",
"attack", "kill",
@@ -310,6 +313,19 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI
g.doOption(sess, strings.Join(args, " "))
case "color", "colors":
g.doColor(sess, strings.Join(args, " "))
+ case "colortable":
+ g.doColortable(sess)
+ case "prompt":
+ if len(args) == 0 {
+ g.doPrompt(sess, "")
+ } else {
+ msgStart := strings.Index(strings.ToLower(rawInput), "prompt ") + 7
+ if msgStart >= 7 && msgStart < len(rawInput) {
+ g.doPrompt(sess, rawInput[msgStart:])
+ } else {
+ g.doPrompt(sess, strings.Join(args, " "))
+ }
+ }
case "exits":
g.doExits(sess)
case "map":