-
Notifications
You must be signed in to change notification settings - Fork 9
Adding a New Filter
neitsa edited this page Jun 30, 2018
·
2 revisions
This page describes how to add a filter to PrepareLanding
code.
- Add a backing field in
PrepareLanding\src\GameData\UserData.cs
- Add the field in
UserData.AreAllFieldsInDefaultSate()
which is used to check if the filter is used or not. - Add the field initialization in
UserData.ResetAllFields()
which is used to reset the filter in its default state.
- Add the field in
- Add the filter code in
\PrepareLanding\src\Filters\TileFilters.cs
- Must inherit from
TileFilter
(in\PrepareLanding\src\Filters\TileFilter.cs
).
- Must inherit from
- Add the filter instanciation in
WorldTileFilter
class constructor (seePrepareLanding\src\WorldTileFilter.cs
).- See the
_allfilters
private variable.
- See the
- Add the GUI implementation of the filter in the right GUI tab
- Either
TabTerrain.cs
orTabTemperature.cs
.
- Either
- Add the field to preset (if needed), for both loading and saving:
- See
PrepareLanding\src\Presets\Preset.cs
. - Both functions are:
Preset.LoadPreset()
andPreset.SavePreset
.
- See