You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 15:06:19 +00:00
feat: add builders club catalog and room flow
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
-- 15. 17032026_allow_underpass.sql
|
||||
-- 16. 19032026_hotel_timezone.sql
|
||||
-- 17. 21022026_user_prefixes.sql
|
||||
-- 18. 06042026_builders_club_catalog_offers.sql
|
||||
-- =============================================================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@@ -408,6 +409,109 @@ CREATE TABLE IF NOT EXISTS `user_prefixes` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
-- =============================================================================
|
||||
-- From: 06042026_builders_club_catalog_offers.sql
|
||||
-- =============================================================================
|
||||
ALTER TABLE `catalog_club_offers`
|
||||
MODIFY COLUMN `type` ENUM('HC','VIP','BUILDERS_CLUB','BUILDERS_CLUB_ADDON') NOT NULL DEFAULT 'HC';
|
||||
|
||||
ALTER TABLE `catalog_pages`
|
||||
MODIFY COLUMN `page_layout` ENUM(
|
||||
'default_3x3',
|
||||
'club_buy',
|
||||
'club_gift',
|
||||
'frontpage',
|
||||
'spaces',
|
||||
'recycler',
|
||||
'recycler_info',
|
||||
'recycler_prizes',
|
||||
'trophies',
|
||||
'plasto',
|
||||
'marketplace',
|
||||
'marketplace_own_items',
|
||||
'spaces_new',
|
||||
'soundmachine',
|
||||
'guilds',
|
||||
'guild_furni',
|
||||
'info_duckets',
|
||||
'info_rentables',
|
||||
'info_pets',
|
||||
'roomads',
|
||||
'single_bundle',
|
||||
'sold_ltd_items',
|
||||
'badge_display',
|
||||
'bots',
|
||||
'pets',
|
||||
'pets2',
|
||||
'pets3',
|
||||
'productpage1',
|
||||
'room_bundle',
|
||||
'recent_purchases',
|
||||
'default_3x3_color_grouping',
|
||||
'guild_forum',
|
||||
'vip_buy',
|
||||
'info_loyalty',
|
||||
'loyalty_vip_buy',
|
||||
'collectibles',
|
||||
'petcustomization',
|
||||
'frontpage_featured',
|
||||
'builders_club_frontpage',
|
||||
'builders_club_addons',
|
||||
'builders_club_loyalty'
|
||||
) NOT NULL DEFAULT 'default_3x3';
|
||||
|
||||
ALTER TABLE `catalog_pages`
|
||||
ADD COLUMN `catalog_mode` ENUM('NORMAL','BUILDER','BOTH') NOT NULL DEFAULT 'NORMAL' AFTER `club_only`;
|
||||
|
||||
ALTER TABLE `catalog_pages_bc`
|
||||
MODIFY COLUMN `page_layout` ENUM(
|
||||
'default_3x3',
|
||||
'club_buy',
|
||||
'club_gift',
|
||||
'frontpage',
|
||||
'spaces',
|
||||
'recycler',
|
||||
'recycler_info',
|
||||
'recycler_prizes',
|
||||
'trophies',
|
||||
'plasto',
|
||||
'marketplace',
|
||||
'marketplace_own_items',
|
||||
'spaces_new',
|
||||
'soundmachine',
|
||||
'guilds',
|
||||
'guild_furni',
|
||||
'info_duckets',
|
||||
'info_rentables',
|
||||
'info_pets',
|
||||
'roomads',
|
||||
'single_bundle',
|
||||
'sold_ltd_items',
|
||||
'badge_display',
|
||||
'bots',
|
||||
'pets',
|
||||
'pets2',
|
||||
'pets3',
|
||||
'productpage1',
|
||||
'room_bundle',
|
||||
'recent_purchases',
|
||||
'default_3x3_color_grouping',
|
||||
'guild_forum',
|
||||
'vip_buy',
|
||||
'info_loyalty',
|
||||
'loyalty_vip_buy',
|
||||
'collectibles',
|
||||
'petcustomization',
|
||||
'frontpage_featured',
|
||||
'builders_club_frontpage',
|
||||
'builders_club_addons',
|
||||
'builders_club_loyalty'
|
||||
) NOT NULL DEFAULT 'default_3x3';
|
||||
|
||||
ALTER TABLE `users_settings`
|
||||
ADD COLUMN IF NOT EXISTS `builders_club_bonus_furni` INT(11) NOT NULL DEFAULT 0 AFTER `hc_gifts_claimed`;
|
||||
|
||||
|
||||
-- =============================================================================
|
||||
-- Done
|
||||
-- =============================================================================
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `catalog_club_offers`
|
||||
MODIFY COLUMN `type` ENUM('HC', 'VIP', 'BUILDERS_CLUB', 'BUILDERS_CLUB_ADDON') NOT NULL DEFAULT 'HC';
|
||||
|
||||
ALTER TABLE `users_settings`
|
||||
ADD COLUMN `builders_club_bonus_furni` INT NOT NULL DEFAULT 0 AFTER `hc_gifts_claimed`;
|
||||
@@ -0,0 +1,47 @@
|
||||
ALTER TABLE `catalog_pages`
|
||||
MODIFY COLUMN `page_layout` ENUM(
|
||||
'default_3x3',
|
||||
'club_buy',
|
||||
'club_gift',
|
||||
'frontpage',
|
||||
'spaces',
|
||||
'recycler',
|
||||
'recycler_info',
|
||||
'recycler_prizes',
|
||||
'trophies',
|
||||
'plasto',
|
||||
'marketplace',
|
||||
'marketplace_own_items',
|
||||
'spaces_new',
|
||||
'soundmachine',
|
||||
'guilds',
|
||||
'guild_furni',
|
||||
'info_duckets',
|
||||
'info_rentables',
|
||||
'info_pets',
|
||||
'roomads',
|
||||
'single_bundle',
|
||||
'sold_ltd_items',
|
||||
'badge_display',
|
||||
'bots',
|
||||
'pets',
|
||||
'pets2',
|
||||
'pets3',
|
||||
'productpage1',
|
||||
'room_bundle',
|
||||
'recent_purchases',
|
||||
'default_3x3_color_grouping',
|
||||
'guild_forum',
|
||||
'vip_buy',
|
||||
'info_loyalty',
|
||||
'loyalty_vip_buy',
|
||||
'collectibles',
|
||||
'petcustomization',
|
||||
'frontpage_featured',
|
||||
'builders_club_frontpage',
|
||||
'builders_club_addons',
|
||||
'builders_club_loyalty'
|
||||
) NOT NULL DEFAULT 'default_3x3';
|
||||
|
||||
ALTER TABLE `catalog_pages`
|
||||
ADD COLUMN `catalog_mode` ENUM('NORMAL', 'BUILDER', 'BOTH') NOT NULL DEFAULT 'NORMAL' AFTER `club_only`;
|
||||
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE `rooms`
|
||||
ADD COLUMN `builders_club_trial_locked` TINYINT(1) NOT NULL DEFAULT 0 AFTER `allow_underpass`,
|
||||
ADD COLUMN `builders_club_original_state` VARCHAR(16) NOT NULL DEFAULT 'open' AFTER `builders_club_trial_locked`;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `builders_club_items` (
|
||||
`item_id` INT(11) NOT NULL,
|
||||
`user_id` INT(11) NOT NULL,
|
||||
`room_id` INT(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`item_id`),
|
||||
KEY `idx_builders_club_items_user_id` (`user_id`),
|
||||
KEY `idx_builders_club_items_room_id` (`room_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
|
||||
@@ -0,0 +1,44 @@
|
||||
ALTER TABLE `catalog_pages_bc`
|
||||
MODIFY COLUMN `page_layout` ENUM(
|
||||
'default_3x3',
|
||||
'club_buy',
|
||||
'club_gift',
|
||||
'frontpage',
|
||||
'spaces',
|
||||
'recycler',
|
||||
'recycler_info',
|
||||
'recycler_prizes',
|
||||
'trophies',
|
||||
'plasto',
|
||||
'marketplace',
|
||||
'marketplace_own_items',
|
||||
'spaces_new',
|
||||
'soundmachine',
|
||||
'guilds',
|
||||
'guild_furni',
|
||||
'info_duckets',
|
||||
'info_rentables',
|
||||
'info_pets',
|
||||
'roomads',
|
||||
'single_bundle',
|
||||
'sold_ltd_items',
|
||||
'badge_display',
|
||||
'bots',
|
||||
'pets',
|
||||
'pets2',
|
||||
'pets3',
|
||||
'productpage1',
|
||||
'room_bundle',
|
||||
'recent_purchases',
|
||||
'default_3x3_color_grouping',
|
||||
'guild_forum',
|
||||
'vip_buy',
|
||||
'info_loyalty',
|
||||
'loyalty_vip_buy',
|
||||
'collectibles',
|
||||
'petcustomization',
|
||||
'frontpage_featured',
|
||||
'builders_club_frontpage',
|
||||
'builders_club_addons',
|
||||
'builders_club_loyalty'
|
||||
) NOT NULL DEFAULT 'default_3x3';
|
||||
@@ -0,0 +1,171 @@
|
||||
-- Sample seed for Builders Club catalog pages/items
|
||||
-- Safe to run multiple times: it recreates the demo BC pages and their demo BC offers.
|
||||
-- After import, publish/reload the catalog.
|
||||
|
||||
SET @bc_demo_root_caption := 'BC Demo Root';
|
||||
SET @bc_demo_page_caption := 'BC Demo Furni';
|
||||
|
||||
DELETE FROM `catalog_items_bc`
|
||||
WHERE `page_id` IN (
|
||||
SELECT `id`
|
||||
FROM (
|
||||
SELECT `id`
|
||||
FROM `catalog_pages_bc`
|
||||
WHERE `caption` IN (@bc_demo_root_caption, @bc_demo_page_caption)
|
||||
) AS `bc_pages_to_clear`
|
||||
);
|
||||
|
||||
DELETE FROM `catalog_pages_bc`
|
||||
WHERE `caption` IN (@bc_demo_root_caption, @bc_demo_page_caption);
|
||||
|
||||
INSERT INTO `catalog_pages_bc`
|
||||
(
|
||||
`parent_id`,
|
||||
`caption`,
|
||||
`page_layout`,
|
||||
`icon_color`,
|
||||
`icon_image`,
|
||||
`order_num`,
|
||||
`visible`,
|
||||
`enabled`,
|
||||
`page_headline`,
|
||||
`page_teaser`,
|
||||
`page_special`,
|
||||
`page_text1`,
|
||||
`page_text2`,
|
||||
`page_text_details`,
|
||||
`page_text_teaser`
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
-1,
|
||||
@bc_demo_root_caption,
|
||||
'default_3x3',
|
||||
1,
|
||||
28,
|
||||
999,
|
||||
'1',
|
||||
'1',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'Builders Club Demo',
|
||||
'Pagina demo creata da seed SQL',
|
||||
'Root demo per il catalogo Builders Club.',
|
||||
''
|
||||
);
|
||||
|
||||
SET @bc_demo_root_id := LAST_INSERT_ID();
|
||||
|
||||
INSERT INTO `catalog_pages_bc`
|
||||
(
|
||||
`parent_id`,
|
||||
`caption`,
|
||||
`page_layout`,
|
||||
`icon_color`,
|
||||
`icon_image`,
|
||||
`order_num`,
|
||||
`visible`,
|
||||
`enabled`,
|
||||
`page_headline`,
|
||||
`page_teaser`,
|
||||
`page_special`,
|
||||
`page_text1`,
|
||||
`page_text2`,
|
||||
`page_text_details`,
|
||||
`page_text_teaser`
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@bc_demo_root_id,
|
||||
@bc_demo_page_caption,
|
||||
'default_3x3',
|
||||
1,
|
||||
28,
|
||||
1,
|
||||
'1',
|
||||
'1',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'Builders Club Furni',
|
||||
'Furni demo',
|
||||
'Questa pagina duplica alcuni furni del catalogo normale dentro al Builders Club.',
|
||||
''
|
||||
);
|
||||
|
||||
SET @bc_demo_page_id := LAST_INSERT_ID();
|
||||
|
||||
-- Source page from normal catalog: tries to use the "base" furni line.
|
||||
SET @source_normal_page_id := (
|
||||
SELECT `id`
|
||||
FROM `catalog_pages`
|
||||
WHERE `caption_save` = 'base'
|
||||
ORDER BY `id`
|
||||
LIMIT 1
|
||||
);
|
||||
|
||||
-- Copy only safe single-placeable demo furni:
|
||||
-- - one single numeric item id
|
||||
-- - floor furni only
|
||||
-- - size 1x1
|
||||
-- - default interaction only
|
||||
-- This avoids copying bundles, bots, effects, teleports, wall items and large furni that can fail placement during BC testing.
|
||||
INSERT INTO `catalog_items_bc`
|
||||
(
|
||||
`item_ids`,
|
||||
`page_id`,
|
||||
`catalog_name`,
|
||||
`order_number`,
|
||||
`extradata`
|
||||
)
|
||||
SELECT
|
||||
`ci`.`item_ids`,
|
||||
@bc_demo_page_id,
|
||||
CONCAT(`ci`.`catalog_name`, '_bc_demo'),
|
||||
`ci`.`order_number`,
|
||||
`ci`.`extradata`
|
||||
FROM `catalog_items` `ci`
|
||||
INNER JOIN `items_base` `ib`
|
||||
ON `ib`.`id` = CAST(`ci`.`item_ids` AS UNSIGNED)
|
||||
WHERE `ci`.`page_id` = @source_normal_page_id
|
||||
AND `ci`.`item_ids` REGEXP '^[0-9]+$'
|
||||
AND `ib`.`type` = 's'
|
||||
AND `ib`.`width` = 1
|
||||
AND `ib`.`length` = 1
|
||||
AND `ib`.`interaction_type` = 'default'
|
||||
ORDER BY `ci`.`order_number`, `ci`.`id`
|
||||
LIMIT 6;
|
||||
|
||||
-- Fallback: if page "base" is missing or empty, duplicate any 6 safe 1x1 floor offers.
|
||||
INSERT INTO `catalog_items_bc`
|
||||
(
|
||||
`item_ids`,
|
||||
`page_id`,
|
||||
`catalog_name`,
|
||||
`order_number`,
|
||||
`extradata`
|
||||
)
|
||||
SELECT
|
||||
`fallback_ci`.`item_ids`,
|
||||
@bc_demo_page_id,
|
||||
CONCAT(`fallback_ci`.`catalog_name`, '_bc_demo'),
|
||||
`fallback_ci`.`id`,
|
||||
`fallback_ci`.`extradata`
|
||||
FROM `catalog_items` `fallback_ci`
|
||||
INNER JOIN `items_base` `fallback_ib`
|
||||
ON `fallback_ib`.`id` = CAST(`fallback_ci`.`item_ids` AS UNSIGNED)
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM `catalog_items_bc`
|
||||
WHERE `page_id` = @bc_demo_page_id
|
||||
)
|
||||
AND `fallback_ci`.`item_ids` REGEXP '^[0-9]+$'
|
||||
AND `fallback_ib`.`type` = 's'
|
||||
AND `fallback_ib`.`width` = 1
|
||||
AND `fallback_ib`.`length` = 1
|
||||
AND `fallback_ib`.`interaction_type` = 'default'
|
||||
ORDER BY `fallback_ci`.`id`
|
||||
LIMIT 6;
|
||||
|
||||
SELECT @bc_demo_root_id AS `bc_root_page_id`, @bc_demo_page_id AS `bc_furni_page_id`;
|
||||
Reference in New Issue
Block a user