Open ParodyKnaveBob opened 9 months ago
Yet another alternative is to repurpose existing function room_set_persistent and make it work so that:
true
value it changes nothing, and given the false
value it clears the room from memory and sets its future persistence state to false
I reported from the IDE to more easily attach a project, but since there was no way to call the "bug" report a feature request, I'd hoped I could simply edit it after it was submitted. I see no way to do that. Please view this as a desired feature and not a misguided claim of a bug -- and (YYG please) edit accordingly, of course. Tyvm.
Description
So many threads on the GMC boil down to the inability to reset persistent rooms without first visiting them. How many confused users don't even ask us?
Good news: I have just tested and discovered that one can visit multiple rooms in a single code block...
...and thus reset a room in the blink of an eye, (and I'm attaching said test project,) but beyond a mere test where a real game might have more than one (ha) persistent room to reset, one might be better off convolutedly saving a few things to a temporary file, using
game_restart()
, reloading the temp values, and deleting the file.I suggest allowing the GM user to reset a persistent room while outside the persistent room. Three options came to mind while I was responding to another one of these threads:
Where
_rm
is the room to reset and_is_pers
is the optional Boolean to set that room's persistent flag at the same time:room_restart()
room_restart(_rm)
room_restart(_rm, _is_pers)
which I believe is my favorite optionroom_reset(_rm)
room_reset(_rm, _is_pers)
room_get_start(_rm)
androom_set_start(_rm)
room_set_start(_rm, _is_pers)
which I don't favor, but would get whether or not a room is not in memory and (set) remove a room from memoryIf one wants to toggle the
_is_pers
flag while resetting for whatever reason, one can of course use something like...!(room_get_info(_rm, false, false, false, false, false)).persistent
6554e06c-557c-4086-8bf0-6c83faaca0de