Called when data is loaded from persistence (on server side).
{
if ( !super.OnStoreLoad(ctx, version) )
return false;
int a;
return false;
float b;
return false;
return true;
}
bool OnStoreLoad(ParamsReadContext ctx, int version)
Called when data is loaded from persistence (on server side).
proto bool Read(void value_in)
Serializer ParamsReadContext
2979 {
2981 if (version >= 143 && constructionComponent)
2982 {
2984 }
2985
2986
2988 {
2989
2990 float f_energy = 0;
2991 if ( !ctx.
Read( f_energy ) )
2992 f_energy = 0;
2993 m_EM.SetEnergy(f_energy);
2994
2995
2996 bool b_is_passive = false;
2997 if ( !ctx.
Read( b_is_passive ) )
2998 return false;
2999 m_EM.SetPassiveState(b_is_passive);
3000
3001
3002 bool b_is_on = false;
3003 if ( !ctx.
Read( b_is_on ) )
3004 {
3006 return false;
3007 }
3008
3009
3010 bool b_is_plugged = false;
3011 if ( !ctx.
Read( b_is_plugged ) )
3012 return false;
3013
3014
3015 if ( version <= 103 )
3016 {
3017
3018 int i_energy_source_ID_low = 0;
3019 if ( !ctx.
Read( i_energy_source_ID_low ) )
3020 return false;
3021
3022
3023 int i_energy_source_ID_high = 0;
3024 if ( !ctx.
Read( i_energy_source_ID_high ) )
3025 return false;
3026 }
3027 else
3028 {
3029 int b1 = 0;
3030 int b2 = 0;
3031 int b3 = 0;
3032 int b4 = 0;
3033
3034 if ( !ctx.
Read(b1) )
return false;
3035 if ( !ctx.
Read(b2) )
return false;
3036 if ( !ctx.
Read(b3) )
return false;
3037 if ( !ctx.
Read(b4) )
return false;
3038
3039 if ( b_is_plugged )
3040 {
3041
3042 m_EM.StoreEnergySourceIDs( b1, b2, b3, b4 );
3043 m_EM.RestorePlugState(
true);
3044 }
3045 }
3046
3047 if (b_is_on)
3048 {
3050 }
3051 }
3052
3053 if (version >= 140)
3054 {
3055
3057 return false;
3058 }
3059
3060 return true;
3061 }
void HandleStoreLoad(ParamsReadContext ctx, int version)
ComponentEnergyManager m_EM
bool LoadVariables(ParamsReadContext ctx, int version=-1)
ConstructionBasic GetConstructionBasic()
Construction itself is defined on module 4. Workaround. Don't forget to cast!