diff options
| author | historia <[not public]> | 2026-06-10 01:48:28 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-10 01:48:28 -0400 |
| commit | a226d72e51eecb768b13600303f73483118d9104 (patch) | |
| tree | 458d15ef049732c15dacc591a830d3beddbedfde /internal/game/cmd_ticktest.go | |
| parent | 6a0f3d7a252de4b1741cfe5e1c561412c602becc (diff) | |
| download | thehouseoficarus-a226d72e51eecb768b13600303f73483118d9104.tar.gz | |
feat: implemented janky object interaction model
Diffstat (limited to 'internal/game/cmd_ticktest.go')
| -rw-r--r-- | internal/game/cmd_ticktest.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/game/cmd_ticktest.go b/internal/game/cmd_ticktest.go new file mode 100644 index 0000000..6cadab7 --- /dev/null +++ b/internal/game/cmd_ticktest.go @@ -0,0 +1,21 @@ +package game + +import ( + "fmt" + + "thirdcollapse/internal/net" +) + +func (g *Game) doTickTest(sess *net.Session) { + count := 0 + g.Ticks.Subscribe(5, func() bool { + count++ + sess.WriteLine(fmt.Sprintf("[Tick #%d] 600ms heartbeat is working.", count)) + if count >= 3 { + sess.WriteLine("[Tick test complete.]") + return false + } + return true + }) + sess.WriteLine("Tick test started — you'll see 3 messages at 5-tick intervals while commands still work.") +} |
