diff options
author | rubidium <rubidium@openttd.org> | 2007-09-22 13:56:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-22 13:56:38 +0000 |
commit | 60f1eb21fa31d64c9b2651a09193a62472174a20 (patch) | |
tree | 1f92395e697eada656f8d47222f9f227028ec271 /src/newgrf_industries.cpp | |
parent | c68c83dffa2edbf854935effedeac0c4697d5db7 (diff) | |
download | openttd-60f1eb21fa31d64c9b2651a09193a62472174a20.tar.xz |
(svn r11139) -Codechange: add support for persistent storage for NewGRFs.
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r-- | src/newgrf_industries.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 608b7ff05..5574673a6 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -243,6 +243,9 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par case 0x67: case 0x68: return GetCountAndDistanceOfClosestInstance(parameter, variable == 0x68 ? GB(GetRegister(0x101), 0, 8) : 0, industry); + /* Get a variable from the persistent storage */ + case 0x7C: return industry->psa.Get(parameter); + /* Industry structure access*/ case 0x80: return industry->xy; case 0x81: return GB(industry->xy, 8, 8); @@ -323,6 +326,7 @@ static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *i res->GetVariable = IndustryGetVariable; res->ResolveReal = IndustryResolveReal; + res->psa = &indus->psa; res->u.industry.tile = tile; res->u.industry.ind = indus; res->u.industry.gfx = INVALID_INDUSTRYTILE; |