aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_jack.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_jack.go')
-rw-r--r--internal/game/cmd_jack.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/game/cmd_jack.go b/internal/game/cmd_jack.go
index db157f3..8cb5062 100644
--- a/internal/game/cmd_jack.go
+++ b/internal/game/cmd_jack.go
@@ -5,12 +5,13 @@ import (
"strings"
"thehouseoficarus/internal/combat"
+ "thehouseoficarus/internal/game/hacking"
"thehouseoficarus/internal/net"
"thehouseoficarus/internal/player"
)
func (g *Game) doJack(sess *net.Session, target string) {
- p := sess.Player.(*player.Player)
+ p := sess.Player
if combat.GetCombat(p.Name) != nil {
sess.WriteLine("You can't do that during combat!")
@@ -32,7 +33,7 @@ func (g *Game) doJack(sess *net.Session, target string) {
}
defID := instances[0].DefID
- tDef, ok := terminalDefs[defID]
+ tDef, ok := hacking.Terminals[defID]
if !ok {
sess.WriteLine("You can't jack into that.")
return
@@ -44,13 +45,13 @@ func (g *Game) doJack(sess *net.Session, target string) {
return
}
- g.CancelAction(p)
- g.CancelBackgroundAction(p)
+ g.cancelAction(p)
+ g.cancelBackgroundAction(p)
minigame := tDef.Minigame()
display := minigame.Init(hackLevel)
- g.hackingStates[p.Name] = &HackingSession{
+ g.hackingStates[p.Name] = &hacking.Session{
Minigame: minigame,
TerminalID: defID,
Level: hackLevel,