# economy_sl.cpp File Reference

Code handling saving and loading of economy data. More...

`#include "../stdafx.h"`
`#include "../economy_func.h"`
`#include "../economy_base.h"`
`#include "saveload.h"`

Go to the source code of this file.

## Functions
static void | SaveLoad_PRIC ()
| Prices.
static void | SaveLoad_CAPR ()
| Cargo payment rates.
static void | Save_ECMY ()
| Economy variables.
static void | Load_ECMY ()
| Economy variables.
static void | Save_CAPY ()
static void | Load_CAPY ()
## Variables
bool | _cargo_payment_savegame = false
| Whether this savegame is a savegame with cargo payment or not.
static const SaveLoad | _economy_desc []
static const SaveLoad | _cargopayment_desc []
const ChunkHandler | _economy_chunk_handlers []

## Detailed Description

Code handling saving and loading of economy data.

Definition in file economy_sl.cpp.

## Variable Documentation

bool _cargo_payment_savegame = false

Whether this savegame is a savegame with cargo payment or not.

This is important to know when loading a savegame.

Definition at line 11 of file economy_sl.cpp.

const SaveLoad _cargopayment_desc[]`[static]`

Initial value:

     {
      SLE_REF(CargoPayment, front,         REF_VEHICLE),
      SLE_VAR(CargoPayment, route_profit,  SLE_INT64),
      SLE_VAR(CargoPayment, visual_profit, SLE_INT64),

    }

Definition at line 57 of file economy_sl.cpp.

const ChunkHandler _economy_chunk_handlers[]

Initial value:

     {
      { 'CAPY', Save_CAPY,     Load_CAPY,     CH_ARRAY},
      { 'PRIC', SaveLoad_PRIC, SaveLoad_PRIC, CH_RIFF | CH_AUTO_LENGTH},
      { 'CAPR', SaveLoad_CAPR, SaveLoad_CAPR, CH_RIFF | CH_AUTO_LENGTH},
      { 'ECMY', Save_ECMY,     Load_ECMY,     CH_RIFF | CH_LAST},
    }

const SaveLoad _economy_desc[]`[static]`

Initial value:

     {
      SLE_CONDVAR(Economy, max_loan,                      SLE_FILE_I32 | SLE_VAR_I64,  0, 64),
      SLE_CONDVAR(Economy, max_loan,                      SLE_INT64,                  65, SL_MAX_VERSION),
      SLE_CONDVAR(Economy, max_loan_unround,              SLE_FILE_I32 | SLE_VAR_I64,  0, 64),
      SLE_CONDVAR(Economy, max_loan_unround,              SLE_INT64,                  65, SL_MAX_VERSION),
      SLE_CONDVAR(Economy, max_loan_unround_fract,        SLE_UINT16,                 70, SL_MAX_VERSION),
          SLE_VAR(Economy, fluct,                         SLE_INT16),
          SLE_VAR(Economy, interest_rate,                 SLE_UINT8),
          SLE_VAR(Economy, infl_amount,                   SLE_UINT8),
          SLE_VAR(Economy, infl_amount_pr,                SLE_UINT8),
      SLE_CONDVAR(Economy, industry_daily_change_counter, SLE_UINT32,                102, SL_MAX_VERSION),

    }

Definition at line 30 of file economy_sl.cpp.