private static bool IsPark(ref DistrictPark park)
 {
     return(DistrictPark.IsParkType(park.m_parkType) ||
            DistrictPark.IsCampusType(park.m_parkType) ||
            DistrictPark.IsAirportType(park.m_parkType) ||
            DistrictPark.IsIndustryType(park.m_parkType));
 }
Exemplo n.º 2
0
        public static void Prefix(byte parkID)
        {
            //Mod.DebugLine($"DPIP-Pre: {__instance.m_parkProperties.m_industryLevelInfo[1].m_workerLevelupRequirement}");

            DistrictManager dm    = Singleton <DistrictManager> .instance;
            DistrictPark    dp    = dm.m_parks.m_buffer[parkID];
            uint            level = (uint)dp.m_parkLevel;

            //Debug.Log($"DPIP-Pre - Inst:{__instance}, IsPark:{__instance.IsPark} IsInd:{__instance.IsIndustry}, {(uint)__instance.m_parkLevel}({__instance.m_parkLevel}), Type:{__instance.m_parkType}  -  ";
            //Debug.Log($"DPIP-Pre - Inst:{dp}, IsInd:{dp.IsIndustry}, {level}({dp.m_parkLevel}), Type:{dp.m_parkType}");

            if (DistrictPark.IsIndustryType(dp.m_parkType))
            {
                if (initialised[level])
                {
                    return;
                }
                initialised[level] = true;
                //Debug.Log($"DPIP-Pre: {dm.m_properties.m_parkProperties.m_industryLevelInfo[level].m_workerLevelupRequirement}");
                dm.m_properties.m_parkProperties.m_industryLevelInfo[level].m_workerLevelupRequirement = RI_Data.GetMilestone(level);
            }
        }