Exemplo n.º 1
0
        // debugging

        /*
         * public static void TicksPerMove_PostFix(Pawn __instance, ref float __result, bool diagonal) {
         *  if ( __instance.IsColonist )  {
         *      float num = __instance.GetStatValue(StatDefOf.MoveSpeed, true);
         *      Log.Message("move speed : "+__instance.Name+ " : (GetStatValue of MoveSpeed:" +num+") (TicksPerMove:"+__result+")");
         *  }
         * } */

        //try to extend this
        public static void StatOffsetFromGear_PostFix(ref float __result, Thing gear, StatDef stat)
        {
            var retValue = 0.0f;

            try
            {
                retValue = SlotLoadableUtility.CheckThingSlotsForStatAugment(gear, stat);
            }
            catch (Exception e)
            {
                Log.Warning("Failed to add stats for " + gear.Label + "\n" + e.ToString());
            }
            __result += retValue;
        }
Exemplo n.º 2
0
        public static void GetStatValue_PostFix(ref float __result, Thing thing, StatDef stat, bool applyPostProcess)
        {
            var retValue = 0.0f;

            try
            {
                retValue = SlotLoadableUtility.CheckThingSlotsForStatAugment(thing, stat);
            }
            catch (Exception e)
            {
                Log.Warning("Failed to add stats for " + thing.Label + "\n" + e.ToString());
            }
            __result += retValue;
        }
Exemplo n.º 3
0
 public static void StatOffsetFromGear_PostFix(ref float __result, Thing gear, StatDef stat)
 {
     __result += SlotLoadableUtility.CheckThingSlotsForStatAugment(gear, stat);
 }
Exemplo n.º 4
0
 public static void StatWorker_GetValue_PostFix(ref float __result, Thing thing, StatDef ___stat)
 {
     __result += SlotLoadableUtility.CheckThingSlotsForStatAugment(thing, ___stat);
 }