示例#1
0
        public static bool TestVanillaAltShopItem(DefaultShopItems shopItems, ShopItemStats stats)
        {
            switch (stats.specialType)
            {
            // sly mask shards
            case 1 when(shopItems & DefaultShopItems.SlyMaskShards) == DefaultShopItems.SlyMaskShards:
            // sly charms
            case 2 when stats.requiredPlayerDataBool != nameof(PlayerData.gaveSlykey) && (shopItems & DefaultShopItems.SlyCharms) == DefaultShopItems.SlyCharms:
            // sly key charms
            case 2 when stats.requiredPlayerDataBool == nameof(PlayerData.gaveSlykey) && (shopItems & DefaultShopItems.SlyKeyCharms) == DefaultShopItems.SlyKeyCharms:
            // sly vessel fragments
            case 3 when(shopItems & DefaultShopItems.SlyVesselFragments) == DefaultShopItems.SlyVesselFragments:
            // sly simple key
            case 10 when(shopItems & DefaultShopItems.SlySimpleKey) == DefaultShopItems.SlySimpleKey:
            // sly rancid egg
            case 11 when(shopItems & DefaultShopItems.SlyRancidEgg) == DefaultShopItems.SlyRancidEgg:
            // sly lantern
            case 0 when stats.playerDataBoolName == nameof(PlayerData.hasLantern) && (shopItems & DefaultShopItems.SlyLantern) == DefaultShopItems.SlyLantern:
            // sly key elegant key
            case 0 when stats.playerDataBoolName == nameof(PlayerData.hasWhiteKey) && (shopItems & DefaultShopItems.SlyKeyElegantKey) == DefaultShopItems.SlyKeyElegantKey:
                return(true);

            default:
                return(false);
            }
        }
示例#2
0
        // Variables that actually get used

        public ChangeShopContents(string sceneName, string objectName, ShopItemDef[] items, DefaultShopItems defaultShopItems)
        {
            SceneName         = sceneName;
            ObjectName        = objectName;
            _items            = items;
            _defaultShopItems = defaultShopItems;
        }
示例#3
0
        public static bool TestVanillaShopItem(DefaultShopItems shopItems, string shopScene, ShopItemStats stats)
        {
            switch (shopScene)
            {
            case SceneNames.Room_mapper:
                switch (stats.specialType)
                {
                // Map marker
                case 17 when(shopItems & DefaultShopItems.IseldaMapMarkers) == DefaultShopItems.IseldaMapMarkers:
                // Map pin
                case 16 when(shopItems & DefaultShopItems.IseldaMapPins) == DefaultShopItems.IseldaMapPins:
                // Quill
                case 0 when stats.playerDataBoolName == nameof(PlayerData.hasQuill) && (shopItems & DefaultShopItems.IseldaQuill) == DefaultShopItems.IseldaQuill:
                // Map
                case 9 when(shopItems & DefaultShopItems.IseldaMaps) == DefaultShopItems.IseldaMaps:
                    return(true);

                default:
                    return(false);
                }

            case SceneNames.Room_shop:
                switch (stats.specialType)
                {
                // sly mask shards
                case 1 when(shopItems & DefaultShopItems.SlyMaskShards) == DefaultShopItems.SlyMaskShards:
                // sly charms
                case 2 when(shopItems & DefaultShopItems.SlyCharms) == DefaultShopItems.SlyCharms:
                // sly vessel fragments
                case 3 when(shopItems & DefaultShopItems.SlyVesselFragments) == DefaultShopItems.SlyVesselFragments:
                // sly simple key
                case 10 when(shopItems & DefaultShopItems.SlySimpleKey) == DefaultShopItems.SlySimpleKey:
                // sly rancid egg
                case 11 when(shopItems & DefaultShopItems.SlyRancidEgg) == DefaultShopItems.SlyRancidEgg:
                // sly lantern
                case 0 when stats.playerDataBoolName == nameof(PlayerData.hasLantern) && (shopItems & DefaultShopItems.SlyLantern) == DefaultShopItems.SlyLantern:
                    return(true);

                default:
                    return(false);
                }

            case SceneNames.Room_Charm_Shop:
                switch (stats.specialType)
                {
                case 2 when(shopItems & DefaultShopItems.SalubraCharms) == DefaultShopItems.SalubraCharms:
                case 8 when(shopItems & DefaultShopItems.SalubraNotches) == DefaultShopItems.SalubraNotches:
                    return(true);

                default:
                    return(false);
                }

            case SceneNames.Fungus2_26:
                switch (stats.specialType)
                {
                // fragile charms
                case 2 when(shopItems & DefaultShopItems.LegEaterCharms) == DefaultShopItems.LegEaterCharms:
                // fragile repair
                case 12 when(shopItems & DefaultShopItems.LegEaterRepair) == DefaultShopItems.LegEaterRepair:
                case 13 when(shopItems & DefaultShopItems.LegEaterRepair) == DefaultShopItems.LegEaterRepair:
                case 14 when(shopItems & DefaultShopItems.LegEaterRepair) == DefaultShopItems.LegEaterRepair:
                    return(true);

                default:
                    return(false);
                }

            default:
                return(false);
            }
        }