Example #1
0
 public static void Draw_Postfix(Object __instance, SpriteBatch spriteBatch, int x, int y, float alpha)
 {
     try
     {
         //  Draw the augmentors that are attached to this machine, if any
         if (PlacedAugmentorsManager.Instance != null)
         {
             if (PlacedAugmentorsManager.Instance.TryFindAugmentedTile(__instance, x, y, out AugmentedTile AT))
             {
                 List <AugmentorType> Types = AT.GetAugmentorQuantities().Where(KVP => KVP.Value > 0).Select(KVP => KVP.Key).ToList();
                 Augmentor.DrawIconsOnTile(spriteBatch, Types, x, y, 0.6f);
             }
         }
     }
     catch (Exception ex)
     {
         MachineAugmentorsMod.ModInstance.Monitor.Log(string.Format("Unhandled Error in {0}:\n{1}", nameof(Draw_Postfix), ex), LogLevel.Error);
     }
 }