summaryrefslogtreecommitdiff
path: root/src/saveload/town_sl.cpp
AgeCommit message (Collapse)Author
2021-06-15Change: store length of SL_STRUCTLIST in the savegamePatric Stout
This wasn't consistently done, and often variables were used that were read by an earlier blob. By moving it next to the struct itself, the code becomes a bit more self-contained and easier to read. Additionally, this allows for external tooling to know how many structs to expect, instead of having to know where to find the length-field or a hard-coded value that can change at any moment.
2021-06-14Codechange: use SLE_STRUCT(LIST) for Town chunksPatric Stout
2021-06-10Codechange: rename SL_LST to SL_REFLIST to highlight the "reference" partPatric Stout
You can easily mistake SlList / SL_LST to be a list of SL_VAR, but it is a list of SL_REF. With this rename, it hopefully saves a few people from "wtf?" moments.
2021-06-06Codechange: Remove FOR_ALL_CHUNK_HANDLERSglx22
Co-Authored-By: Patric Stout <truebrain@openttd.org>
2021-05-31Codechange: C++-ify lists for SaveLoad (#9323)Patric Stout
Basically, this changes "SaveLoad *" to either: 1) "SaveLoadTable" if a list of SaveLoads was meant 2) "SaveLoad &" if a single entry was meant As added bonus, this removes SL_END / SLE_END / SLEG_END. This also adds core/span.hpp, a "std::span"-lite.
2020-07-27Codechange #8258: Remove unused town cargo caches from the savegamedP
2020-06-28Change #8159: Remove now unused town cargo caches without bumping the ↵dP
savegame version
2020-06-28Revert #8157: Redundant changedP
2020-06-28Fix: Incorrect save/load array size of Town::cargo_acceptedJonathan G Rennison
In 11ab3c4e the number of cargo types was changed from 32 to 64. The save/load of Town::cargo_accepted was not updated, such that only half of the data structure is saved/loaded in savegame versions 199 to 218. Discard and regenerate data from all savegame versions prior to 219.
2020-05-21Codechange: Use std::string for most of the user-settable custom names.Michael Lutz
2019-12-21Codechange: Replace FOR_ALL_TOWNS with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-13Cleanup: Fix alignment after NULL -> nullptr change.peter1138
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-09Codechange: Make a k-d tree index of townsNiels Martin Hansen
2019-02-02Codechange: Change from numeric to descriptive SLV enum labels for last entries.Peter Nelson
2019-02-02Codechange: Convert saveload numbers to enum values.Peter Nelson
(This was mostly achieved with a few in-place regexes)
2019-02-02Codechange: Make saveload version upper bound exclusive, i.e. version object ↵Peter Nelson
was removed instead of version object last appeared.
2018-06-26Change: Increase cargo type limit to 64.PeterN
2018-05-21Change: Add CargoTypes type for cargo masks. (#6790)PeterN
2017-02-26(svn r27756) -Codechange: Add StringTab enumfrosch
2017-02-26(svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and ↵frosch
MakeStringID() to access the structure of StringIDs.
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-01-08(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by ↵planetmaker
Eagle_rainbow)
2012-08-18(svn r24482) -Fix [FS#5232] (r24180): Do not call ↵frosch
RebuildSubsidisedSourceAndDestinationCache() before subsidy savegame conversion is finished.
2012-04-26(svn r24182) -Fix [FS#5169-ish]: The population of a town was computed ↵frosch
incorrectly for overridden houses when loading a game.
2012-04-25(svn r24180) -Codechange/feature-ish: add cache checker for the town's cacherubidium
2012-04-25(svn r24179) -Codechange: move some variables of Town to TownCacherubidium
2011-12-22(svn r23657) -Fix (r22958): loading of very old savegames with custom town ↵yexo
names failed
2011-12-19(svn r23636) -Add: introduce ScriptText in parameters where it can be usedtruebrain
2011-12-19(svn r23626) -Add: ScriptTown::SetText, which adds custom text to the Town GUItruebrain
2011-12-15(svn r23526) -Codechange: unify cargos vs cargoesrubidium
2011-12-04(svn r23418) -Fix [FS#4866] (r22958): saves made with the Catalan town name ↵rubidium
generator would trigger a "savegame corrupt" exception
2011-12-03(svn r23407) -Codechange: Keep a bitmap of all cargos accepted by towns.terkhen
2011-12-03(svn r23405) -Codechange: Keep a matrix of cargos accepted by houses for ↵terkhen
each town (michi_cc).
2011-11-23(svn r23300) -Add: show on the GUI when a town grows and make a general ↵truebrain
framework to store goals of a town
2011-11-23(svn r23298) -Add: track statistics of all incoming and outgoing goods. ↵truebrain
Incoming based on TownEffect, outgoing based on CargoType (based on patch by Terkhen)
2011-11-15(svn r23233) -Codechange: Refactor maximum and actually transported cargo ↵michi_cc
amount of towns into a reusable struct.
2011-09-23(svn r22958) -Fix [FS#4778]: the savegame description and loading of ↵rubidium
savegames would crash with savegames from a patched stable (which didn't bump the savegame version)
2011-09-11(svn r22920) -Cleanup: replace two very old town variables taht were rarely ↵yexo
used by small functions that compute there value on-the-fly when necessary
2011-06-12(svn r22568) -Change: Add a list of persistent storages to the Town class.terkhen
2010-08-24(svn r20610) -Fix (r20609): X and Y got swapped.frosch
2010-08-24(svn r20609) -Fix [FS#3702]: crash when a NewGRF defined an invalid ↵yexo
substitute type for a house and the NewGRF was removed during the game
2010-08-11(svn r20449) -Codechange: unduplicate saving/loading of NewGRF ID + local id ↵rubidium
-> OpenTTD spec mappings
2010-06-13(svn r19973) -Codechange: Add another procedure to chunk handlers for ↵frosch
checking savegames (empty for now).
2010-03-16(svn r19435) -Fix: when loading a savegame created with a house newgrf ↵yexo
without that newgrf available all houses became tall office blocks
2009-10-04(svn r17693) -Cleanup: remove some unneeded includesrubidium
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-06-26(svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide ↵smatz
_house_specs[]
2009-06-26(svn r16665) -Codechange: replace GetTownByTile() by Town::GetByTile()smatz