Exemple #1
0
 private void Terminal_DropPickup(On.RoR2.ShopTerminalBehavior.orig_DropPickup o, ShopTerminalBehavior s)
 {
     o(s);
     terminalsUsed++;
     //if(s.)
     UpdateTextArea(StageStatsTextAreaName);
 }
Exemple #2
0
        private static void OnPurchaseDrop(On.RoR2.ShopTerminalBehavior.orig_DropPickup orig, ShopTerminalBehavior self)
        {
            if (!NetworkServer.active)
            {
                orig(self);
                return;
            }

            var costType = self.GetComponent <PurchaseInteraction>().costType;

            //If is valid drop and dupe fix not enabled, true -> we want the item to pop
            //if is valid drop and dupe fix is enabled, false -> item IS shared, we don't want the item to pop, PrinterCauldronFix should deal with this
            //if is not valid drop and dupe fix is not enabled, true -> item ISN'T shared, and dupe fix isn't enabled, we want to pop
            //if is not valid drop and dupe fix is enabled, false -> item ISN'T shared, dupe fix should catch, we don't want to pop

            if (!GeneralHooks.IsMultiplayer() || // is not multiplayer
                (!IsValidItemPickup(self.CurrentPickupIndex()) && !ShareSuite.PrinterCauldronFixEnabled.Value)
                //if it's not a valid drop AND the dupe fix isn't enabled
                || self.itemTier == ItemTier.Lunar ||
                costType == CostTypeIndex.Money ||
                costType == CostTypeIndex.None)
            {
                orig(self);
            }
            else if (!ShareSuite.PrinterCauldronFixEnabled.Value && printerCosts.Contains(costType))
            {
                orig(self);
            }
        }
Exemple #3
0
        private static void OnPurchaseDrop(On.RoR2.ShopTerminalBehavior.orig_DropPickup orig, ShopTerminalBehavior self)
        {
            if (!NetworkServer.active)
            {
                orig(self);
                return;
            }

            var costType = self.GetComponent <PurchaseInteraction>().costType;

            if (!GeneralHooks.IsMultiplayer() || // is not multiplayer
                !IsValidItemPickup(self.CurrentPickupIndex()) || // item is not shared
                !ShareSuite.PrinterCauldronFixEnabled.Value || // dupe fix isn't enabled
                self.itemTier == ItemTier.Lunar ||
                costType == CostTypeIndex.Money)
            {
                orig(self);
            }
        }