Exemplo n.º 1
0
 private static void DestroyMe3_Prefix(ObjectReal __instance)
 {
     if (__instance is Stove stove)
     {
         StoveController.TriggerExplosion(stove);
     }
 }
Exemplo n.º 2
0
 private static void DestroyMe_Prefix(PlayfieldObject damagerObject, ObjectReal __instance)
 {
     logger.LogDebug($"{__instance.name}: {MethodBase.GetCurrentMethod().Name}");
     if (__instance is Stove stove)
     {
         StoveController.RegisterDamagedBy(stove, damagerObject);
     }
 }
Exemplo n.º 3
0
        private static void DetermineButtons_Postfix(ObjectReal __instance)
        {
            switch (__instance)
            {
            case FlamingBarrel barrel:
                FlamingBarrelController.AddButtons(barrel);
                break;

            case Stove stove:
                StoveController.AddButtons(stove);
                break;

            case TrashCan trashCan:
                // TODO if I ended up creating a TrashCanController class, move this there instead
                trashCan.AddButton(text: cButtonText.HideInContainer);
                trashCan.AddButton(text: cButtonText.OpenContainer);
                break;

            case VendorCart vendorCart:
                // TODO if I ended up creating a VendorCartController class, move this there instead
                vendorCart.AddButton(text: cButtonText.StealItem);
                break;
            }
        }
Exemplo n.º 4
0
 private void Start()
 {
     stove = GetComponentInParent <StoveController>();
 }