From: Christian Heller Date: Tue, 27 Oct 2020 05:29:56 +0000 (+0100) Subject: Start new players in middle of map instead of topleft corner. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Bdb.prefix%7D%7D/bar%20baz.html?a=commitdiff_plain;h=859f7be1bcd0313d0ed5dd5510968cbb18c9b343;p=plomrogue2-experiments Start new players in middle of map instead of topleft corner. --- diff --git a/new2/plomrogue/commands.py b/new2/plomrogue/commands.py index 28b7600..4daf0ba 100644 --- a/new2/plomrogue/commands.py +++ b/new2/plomrogue/commands.py @@ -1,5 +1,6 @@ from plomrogue.misc import quote from plomrogue.errors import GameError +from plomrogue.mapping import YX @@ -19,6 +20,7 @@ def cmd_LOGIN(game, nick, connection_id): game.io.send('META ' + quote('you rename yourself to: ' + nick), connection_id) else: t = game.thing_types['player'](game) + t.position = YX(game.map.size.y // 2, game.map.size.x // 2) game.things += [t] # TODO refactor into Thing.__init__? game.sessions[connection_id] = t.id_ game.io.send('META ' + quote('you are now: ' + nick), connection_id) diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index 512b835..eaa180d 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -215,21 +215,22 @@ let tui = { log_help: function() { tui.log_msg(""); tui.log_msg("HELP"); - tui.log_msg("chat mode commands:"); tui.log_msg(""); + tui.log_msg("chat mode commands:"); tui.log_msg("/login USER - register as USER"); tui.log_msg("/msg USER TEXT - send TEXT to USER"); tui.log_msg("/help - show this help"); tui.log_msg("/play - switch to play mode"); + tui.log_msg("/study - switch to study mode"); tui.log_msg(""); tui.log_msg("play mode commands:"); tui.log_msg("w, a, s, d - move avatar"); tui.log_msg("f - flatten surroundings"); tui.log_msg("e - write following ASCII character"); tui.log_msg("c - switch to chat mode"); - tui.log_msg("? - switch to investigation mode"); + tui.log_msg("? - switch to study mode"); tui.log_msg(""); - tui.log_msg("investigation mode commands:"); + tui.log_msg("study mode commands:"); tui.log_msg("w, a, s, d - move question mark"); tui.log_msg("A - annotate terrain"); tui.log_msg("c - switch to chat mode");