As you are aware, deleting an object that was src when an input() was called kills the proc and the input box.
However, if the input is killed at the same moment the user selects an option, no subsequent input dialogs will open.
Numbered Steps to Reproduce Problem:
Run supplied code, press Start Test. As the countdown for deleting the prompt reaches 0, hit OK. It may take a couple tries to get the timing right. If done right, no further dialogs will open.
Code Snippet (if applicable) to Reproduce Problem:
mob
var/prompt/inp
verb
Start_Test()
while (1)
src << "Spawning new prompt in 3"
sleep(10)
src << "2"
sleep(10)
src << "1"
sleep(10)
inp = new
spawn()
src << "Deleting prompt in 3"
sleep(10)
src << "2"
sleep(10)
src << "1"
sleep(10)
if (inp)
del inp
world << "Deleted"
var/ret = inp.get(src, "Select OK or Cancel.", "Test", "Ok", list("Ok", "Cancel"))
if (ret == "Cancel") break
world << "Ret = [ret]"
Normal_Input()
world << input(src, "Select OK or Cancel", "Test", "Ok") in list("Ok", "Cancel")
Say(msg as text)
world << msg
prompt
proc/get(mob/U, Message = "", Title = "", Default = "", list/List)
return input(U, Message, Title, Default) in List
Expected Results:
Dream Seeker should continue to open input dialogs when requested.
Actual Results:
No further inputs will open. Verbs like the 'Say' verb do not seem to work either.
Does the problem occur:
Every time? Or how often? Any time the prompt is deleted and the user chooses an option at the same time.
In other games? Presumably.
In other user accounts? Yes.
On other computers? Yes.
When does the problem NOT occur?
When the prompt is deleted cleanly or the user chooses an option before it is to be deleted.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Unknown. Issue has occurred since 3.5 at least.
Workarounds:
Avoid choosing an option too late or avoid using timed deletion.