diff options
| -rw-r--r-- | data/.admin_history.json | 1 | ||||
| -rw-r--r-- | internal/admin/undo.go | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/data/.admin_history.json b/data/.admin_history.json deleted file mode 100644 index 7198539..0000000 --- a/data/.admin_history.json +++ /dev/null @@ -1 +0,0 @@ -{"history":[{"time":"2026-07-09T17:47:14-04:00","description":"unlink 2006 east 2005","file_path":"data/rooms/intro/2006.yaml","old_content":"block_transport: false\ndescription:\n - text: It's a test room\nexits:\n east:\n room: 2005\n north:\n room: 2001\nname: Test Room\n","new_content":"id: 2006\nname: Test Room\ncolor: \"\"\ndescription:\n - text: It's a test room\nexits:\n north:\n room: 2001\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T17:47:15-04:00","description":"unlink 2001 southeast 2005","file_path":"data/rooms/intro/2001.yaml","old_content":"id: 2001\nname: Test Room\ncolor: \"\"\ndescription:\n - text: It's a test room\nexits:\n east:\n room: 1005\n south:\n room: 2006\n southeast:\n room: 2005\n west:\n room: 1001\nobjects:\n - name: hidden guy\n hidden: true\n description:\n - text: YOU FOUND HIM\n - id: tree\nitem_spawns:\n - id: bronze_axe\n quantity: 1\n respawn_ticks: 1\n - id: pot_of_flour\n quantity: 1\n respawn_ticks: 1\n - id: bucket_of_water\n quantity: 1\n respawn_ticks: 1\nmobs:\n - id: man\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"id: 2001\nname: Test Room\ncolor: \"\"\ndescription:\n - text: It's a test room\nexits:\n east:\n room: 1005\n south:\n room: 2006\n west:\n room: 1001\nobjects:\n - name: hidden guy\n hidden: true\n description:\n - text: YOU FOUND HIM\n - id: tree\nitem_spawns:\n - id: bronze_axe\n quantity: 1\n respawn_ticks: 1\n - id: pot_of_flour\n quantity: 1\n respawn_ticks: 1\n - id: bucket_of_water\n quantity: 1\n respawn_ticks: 1\nmobs:\n - id: man\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","is_delete":false,"is_create":false}],"redo":null}
\ No newline at end of file diff --git a/internal/admin/undo.go b/internal/admin/undo.go index 53af942..5e1e6a3 100644 --- a/internal/admin/undo.go +++ b/internal/admin/undo.go @@ -66,14 +66,11 @@ type UndoStack struct { } func NewUndoStack(dataDir string) *UndoStack { - us := &UndoStack{ + return &UndoStack{ dataDir: dataDir, maxSize: 100, filePath: filepath.Join(dataDir, ".admin_history.json"), } - us.load() - us.redo = nil - return us } func (us *UndoStack) Push(desc ChangeDesc) { |
