-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a clearAllMapData() function #630
Comments
This can currently be accomplished with a lua command Note that an empty string is a special case that loads the most recent profile saved map so does not work here. |
That sounds like a dangerous bug in that function actually, that if you give it an invalid filename the sideeffect is unintended data destruction! |
Well, the intended effect is to replace the current map with a new one and part of that process must be the removal of the old one - should that fail a repeated use with no/an empty string will reload the last saved one which does seem a reasonable recovery path even if that is not ideal behaviour. At present we can only hold one map in the system at a time! {A multi-map capable Mudlet is somewhere on, but nowhere near the top of my wish-list with an ability to copy rooms and exits from one to the other - as sharing maps and importing modifications from collaborators does not currently seem easy...!} |
Even updating from IREs maps presents a challenge as that wipes all custom work. |
We don't have to use just last saved one - we can save right before loading into a temporary location. That way data loss would be minimised. |
I think you can add an alias with this lua code : for id,name in pairs(getAreaTableSwap()) do
if id > 0 then
display("now delete area "..name)
deleteArea(id)
end
end no more function needed~ |
This adds a `QPushButton` to allow the currently loaded/created map to be completely removed. As a little protection against accident activation a separate `QCheckBox` along side it must be checked first to enable it - a bit like a guard over a physical toggle switch, a.k.a. a: http://catb.org/~esr/jargon/html/M/molly-guard.html It also adds a `deleteMap()` function (which takes no arguments) to the Lua API - which returns `true` on success - or `nil` and an error message on error. This should close Mudlet#5436 and Mudlet#630, and thus: https://bugs.launchpad.net/bugs/782843 from 2011. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
This adds a `QPushButton` to allow the currently loaded/created map to be completely removed. As a little protection against accident activation a separate `QCheckBox` along side it must be checked first to enable it - a bit like a guard over a physical toggle switch, a.k.a. a: http://catb.org/~esr/jargon/html/M/molly-guard.html It also adds a `deleteMap()` function (which takes no arguments) to the Lua API - which returns `true` on success - or `nil` and an error message on error. This should close #5436 and #630, and thus: https://bugs.launchpad.net/bugs/782843 from 2011. Originally using the Lua function was going to produce an "[ OK ] - Xxx" type message on the main console but this was removed following peer-review. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
This adds a `QPushButton` to allow the currently loaded/created map to be completely removed. As a little protection against accident activation a separate `QCheckBox` along side it must be checked first to enable it - a bit like a guard over a physical toggle switch, a.k.a. a: http://catb.org/~esr/jargon/html/M/molly-guard.html It also adds a `deleteMap()` function (which takes no arguments) to the Lua API - which returns `true` on success - or `nil` and an error message on error. This should close Mudlet#5436 and Mudlet#630, and thus: https://bugs.launchpad.net/bugs/782843 from 2011. Originally using the Lua function was going to produce an "[ OK ] - Xxx" type message on the main console but this was removed following peer-review. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Need a way to clear all of the map data so people can start with a blank map if they wish.
Launchpad Details: #LP782843 Vadim Peretokin - 2011-05-15 00:32:18 +0000
The text was updated successfully, but these errors were encountered: