Skip to content
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

Fix: Access to persistent storage of towns #173

Open
wants to merge 4 commits into
base: master
from

Conversation

@frosch123
Copy link
Member

@frosch123 frosch123 commented Dec 3, 2020

This PR adds a distinction between 'features' and 'scopes' (defined by feature+self/parent), instead of identifying both with interchangeable integers.
This fixes access to persistent storage to towns. (see #26, #28, https://www.tt-forums.net/viewtopic.php?p=1220012#p1220012 )

@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Dec 3, 2020

\o/

@frosch123 frosch123 force-pushed the frosch123:features branch from 043ed03 to 225bc7a Dec 4, 2020
@frosch123 frosch123 force-pushed the frosch123:features branch from 225bc7a to 8ecb615 Feb 22, 2021
@frosch123 frosch123 marked this pull request as ready for review Feb 22, 2021
frosch123 added 3 commits Feb 22, 2021
Identify variable-scopes using a dedicated class instead of feature numbers.
The later fails for towns, which have no feature number.
@frosch123 frosch123 force-pushed the frosch123:features branch from 8ecb615 to 7c05d8b Feb 22, 2021
@Andrew350
Copy link

@Andrew350 Andrew350 commented Feb 26, 2021

I'm not sure what it's worth, but I just tested this PR with my NewGRF, and I'm now able to successfully store a value via an industry and then read that value from a house to conditionally allow/disallow construction. So it seems to work for me 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants