inkgd icon indicating copy to clipboard operation
inkgd copied to clipboard

Persistance of lists does not work

Open shrnjad opened this issue 4 years ago • 6 comments

Describe the bug When adding an entry to a list, the change will not be persisted.

To Reproduce Start the attached project. Click on 'Add entry to list' -> Click on 'Save Ink' -> Close program and reopen -> Click on 'Load Ink' and observe the text in the label.

Expected behavior After the steps outline above, the label should say that the entry is contained in the list.

Ink files test.ink in attached project

Environment:

  • OS: Windows, also observed in web-browsers on Windows, mobile devices and Mac
  • Godot version: 3.2.3
  • Inklecate version: 0.9.0 (I think)
  • inkgd version: 0.2.1

Additional context It can be fixed by _story._get_runtime().dont_save_default_values = false

Attached Godot project inkgd_issue.zip

shrnjad avatar Apr 22 '21 15:04 shrnjad

@shrnjad thank you so much for reporting the issue and attaching a project.

Sorry it took so long to tackle this. I believe the issue is fixed in 0.4.0, would you be able to double check? The attached project seems to behave properly.

ephread avatar Dec 22 '21 12:12 ephread

@ephread So sorry for the late reply. We are currently in the early stage of our current project (Hauma again). I would test it a bit later when I get around to implementing persistance if that is ok and we are not in a hurry.

shrnjad avatar Jan 11 '22 08:01 shrnjad

So I tried to test with version 0.4.2 but could not get the test project to run. (I downloaded it from the link in this issue)

It is also not obvious what the problem is while debugging. The problem happens at this line:

grafik

It runs into some recursive error that happens at this place in ink_list.gd: grafik

Has the interface for lists changed? Or what could be broken?

shrnjad avatar Jan 25 '22 17:01 shrnjad

It's my fault, types are broken, I was overzealous in adding them. Thanks for uncovering the issue! I wish GDscript would support optionals.

It runs into some recursive error that happens

The recursive error is misleading, it happens because the debugger keeps retrieving the value from the getter to display it in the inspector. I consider this a bug in Godot, but I've been too lazy to report it.

I'll fix it, publish a new version and keep you posted. Sorry for the inconvenience 😞

ephread avatar Jan 25 '22 19:01 ephread

No worries, I am happy to support you! 💪

shrnjad avatar Jan 26 '22 16:01 shrnjad

Thanks!

Note to self, the recursive problem with the debugger is fixed in Godot 4 alpha 1!

SuccessKid

ephread avatar Jan 26 '22 22:01 ephread