Пример #1
0
        static CIEnumerable Transpiler(CIEnumerable cins)
        {
            int ld = 0;

            return(cins.ciInsert(ci => (ci.isOp(OpCodes.Ldarg_2) && ++ld == 2) || ci.isLDC(0.1f), +1, 2,
                                 CIUtils.speed, OpCodes.Mul));
        }
Пример #2
0
 static CIEnumerable Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isOp(OpCodes.Ldarg_S, (byte)5), CIUtils.speedClamped01, OpCodes.Mul);
Пример #3
0
 static CIEnumerable Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isLDC(500f), CIUtils.speedClamped01, OpCodes.Div);
Пример #4
0
 static CIEnumerable Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isLDC(100f),
               CIUtils.speed, OpCodes.Mul,
               _codeForCfgVar(nameof(ModConfig.speedStillsuitWater)), OpCodes.Mul);
Пример #5
0
        static CIEnumerable Transpiler(CIEnumerable cins) =>
#if GAME_SN
        cins.ciInsert(ci => ci.isOp(OpCodes.Call), CIUtils.speedClamped01, OpCodes.Mul);
Пример #6
0
 static CIEnumerable Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isLDC(100f), +1, 2,
               CIUtils.speed, OpCodes.Mul,
               _codeForCfgVar(nameof(ModConfig.auxSpeedHungerThirst)), OpCodes.Mul);
Пример #7
0
 // transpiler for correcting time if daynightspeed < 1 (with additional multiplier)
 static CIEnumerable transpiler_dnsClamped01(CIEnumerable cins, string multCfgVarName) =>
 cins.ciInsert(ci => ci.isOp(OpCodes.Callvirt, deltaTime) || ci.isOp(OpCodes.Callvirt, dayNightSpeed), +1, 0,
               CIUtils.speedClamped01, OpCodes.Div,
               CIHelper._codeForCfgVar(multCfgVarName), OpCodes.Mul);
Пример #8
0
 static CIEnumerable Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isOp(OpCodes.Sub), CIUtils.speed, OpCodes.Div);
Пример #9
0
 static CIEnumerable FiltrationMachine_Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isLDC(420f) || ci.isLDC(840f), +1, 0, _codeForCfgVar(nameof(ModConfig.speedFiltrationMachine)), OpCodes.Div);
Пример #10
0
 static CIEnumerable Eatable_GetFoodWaterValue_Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isOp(OpCodes.Mul), _codeForCfgVar(nameof(ModConfig.speedFoodDecay)), OpCodes.Mul);
Пример #11
0
 static CIEnumerable GrowingPlant_GetGrowthDuration_Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isLDC(1f), _codeForCfgVar(nameof(ModConfig.speedPlantsGrow)), OpCodes.Div);
Пример #12
0
        static CIEnumerable WaterParkCreature_Transpiler(CIEnumerable cins)
        {
            string growingPeriod = $"{(Mod.Consts.isGameSN? "": "get_")}growingPeriod";

            return(cins.ciInsert(new MemberMatch(growingPeriod), +1, 0, _codeForCfgVar(nameof(ModConfig.speedCreaturesGrow)), OpCodes.Div));
        }
Пример #13
0
 static CIEnumerable Transpiler(CIEnumerable cins) =>
 cins.ciInsert(ci => ci.isLDC(1f), _codeForCfgVar(nameof(ModConfig.speedEggsHatching)), OpCodes.Div);