From de79bde776346616b68bdb5cd854ae25cefb986f Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 28 May 2019 22:34:54 -0700 Subject: [PATCH] Add silly cheat codes to make Play Mode editable --- pkg/commands.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/commands.go b/pkg/commands.go index 2e91f15..8eef50a 100644 --- a/pkg/commands.go +++ b/pkg/commands.go @@ -32,6 +32,22 @@ func (c Command) Run(d *Doodle) error { } fpsDoNotCap = !fpsDoNotCap return nil + } else if c.Raw == "don't edit and drive" { + if playScene, ok := d.Scene.(*PlayScene); ok { + playScene.drawing.Editable = true + d.Flash("Level canvas is now editable. Don't edit and drive!") + } else { + d.Flash("Use this cheat in Play Mode to make the level canvas editable.") + } + return nil + } else if c.Raw == "scroll scroll scroll your boat" { + if playScene, ok := d.Scene.(*PlayScene); ok { + playScene.drawing.Scrollable = true + d.Flash("Level canvas is now scrollable with the arrow keys.") + } else { + d.Flash("Use this cheat in Play Mode to make the level scrollable.") + } + return nil } switch c.Command {