ProductionGame/frontend/js/data/products.js

591 lines
18 KiB
JavaScript

// Production - The Idle Game: Product Catalog & Supply Chain Definitions
// Scalable data-driven structure supporting multi-tier inputs, sectors, and facilities
export const SECTORS = [
{
id: 'agriculture',
name: 'Agriculture & Food',
icon: 'lucide:wheat',
color: '#16a34a', // Emerald Green
description: 'Primary crops, livestock, milling, and commercial foodstuffs.'
},
{
id: 'materials',
name: 'Forestry & Materials',
icon: 'lucide:trees',
color: '#ca8a04', // Amber/Wood
description: 'Timber harvesting, lumber mills, paper, and commercial furniture.'
},
{
id: 'mining',
name: 'Mining & Metallurgy',
icon: 'lucide:pickaxe',
color: '#475569', // Slate/Steel
description: 'Ore extraction, blast furnaces, alloy smelting, and heavy frames.'
},
{
id: 'chemicals',
name: 'Chemicals & Polymers',
icon: 'lucide:flask-conical',
color: '#0284c7', // Sky Blue
description: 'Crude oil refinement, plastics, polymers, and synthetic compounds.'
},
{
id: 'electronics',
name: 'High-Tech & Electronics',
icon: 'lucide:cpu',
color: '#7c3aed', // Purple
description: 'Purified silicon, microchips, circuit assemblies, and smart devices.'
},
{
id: 'heavy_industry',
name: 'Heavy Industry & Vehicles',
icon: 'lucide:truck',
color: '#ea580c', // Industrial Orange
description: 'Combustion engines, logistics fleets, industrial robotics, and transport.'
}
];
export const PRODUCTS = [
// --- SECTOR 1: AGRICULTURE & FOOD ---
{
id: 'wheat',
name: 'Grain (Wheat)',
sector: 'agriculture',
tier: 1,
icon: 'lucide:wheat',
color: '#65a30d',
unit: 'bushels',
inputs: [], // Raw extraction
outputAmount: 1,
baseCycleTime: 1.0,
unlockCost: 0,
unlockedDefault: true,
baseFacilityCost: 15,
baseManagerCost: 100,
baseLogisticsCost: 80,
basePrice: 1.50,
facilityName: 'Wheat Field',
managerName: 'Farm Overseer',
logisticsName: 'Grain Sifter',
description: 'Golden wheat harvested from fertile corporate acreage.'
},
{
id: 'flour',
name: 'Milled Flour',
sector: 'agriculture',
tier: 2,
icon: 'lucide:cookie',
color: '#84cc16',
unit: 'sacks',
inputs: [{ id: 'wheat', amount: 2 }],
outputAmount: 1,
baseCycleTime: 1.8,
unlockCost: 250,
unlockedDefault: false,
baseFacilityCost: 200,
baseManagerCost: 850,
baseLogisticsCost: 600,
basePrice: 6.20,
facilityName: 'Grain Mill',
managerName: 'Master Miller',
logisticsName: 'Flour Courier',
description: 'Fine milled wheat flour ready for commercial bakeries.'
},
{
id: 'sugar_beet',
name: 'Sugar Beet',
sector: 'agriculture',
tier: 1,
icon: 'lucide:sprout',
color: '#a3e635',
unit: 'crates',
inputs: [],
outputAmount: 1,
baseCycleTime: 1.5,
unlockCost: 650,
unlockedDefault: false,
baseFacilityCost: 550,
baseManagerCost: 1800,
baseLogisticsCost: 1200,
basePrice: 4.80,
facilityName: 'Sugar Plantation',
managerName: 'Field Director',
logisticsName: 'Beet Hauler',
description: 'Sweet root vegetables cultivated for industrial sweetener extraction.'
},
{
id: 'refined_sugar',
name: 'Refined Sugar',
sector: 'agriculture',
tier: 2,
icon: 'lucide:candy',
color: '#e2e8f0',
unit: 'bags',
inputs: [{ id: 'sugar_beet', amount: 3 }],
outputAmount: 1,
baseCycleTime: 2.2,
unlockCost: 2200,
unlockedDefault: false,
baseFacilityCost: 1800,
baseManagerCost: 4500,
baseLogisticsCost: 3200,
basePrice: 22.00,
facilityName: 'Refinery Plant',
managerName: 'Sugar Chemist',
logisticsName: 'Bulk Distributor',
description: 'Pure granulated sucrose ready for food production.'
},
{
id: 'fresh_bread',
name: 'Artisan Bread',
sector: 'agriculture',
tier: 3,
icon: 'lucide:croissant',
color: '#f59e0b',
unit: 'loaves',
inputs: [{ id: 'flour', amount: 2 }, { id: 'refined_sugar', amount: 1 }],
outputAmount: 2,
baseCycleTime: 3.0,
unlockCost: 9500,
unlockedDefault: false,
baseFacilityCost: 7500,
baseManagerCost: 18000,
baseLogisticsCost: 12500,
basePrice: 58.00,
facilityName: 'Industrial Bakery',
managerName: 'Head Baker',
logisticsName: 'Delivery Fleet',
description: 'Freshly baked wholesale bread dispatched to grocery chains.'
},
{
id: 'packaged_meals',
name: 'Packaged Meal Kits',
sector: 'agriculture',
tier: 4,
icon: 'lucide:utensils',
color: '#10b981',
unit: 'cases',
inputs: [{ id: 'fresh_bread', amount: 3 }],
outputAmount: 1,
baseCycleTime: 4.5,
unlockCost: 45000,
unlockedDefault: false,
baseFacilityCost: 36000,
baseManagerCost: 75000,
baseLogisticsCost: 55000,
basePrice: 260.00,
facilityName: 'Food Processing Line',
managerName: 'Operations Lead',
logisticsName: 'Refrigerated Transport',
description: 'Ready-to-eat branded meal kits with high retail margin.'
},
// --- SECTOR 2: FORESTRY & MATERIALS ---
{
id: 'timber',
name: 'Raw Timber',
sector: 'materials',
tier: 1,
icon: 'lucide:trees',
color: '#b45309',
unit: 'logs',
inputs: [],
outputAmount: 1,
baseCycleTime: 1.2,
unlockCost: 120,
unlockedDefault: false,
baseFacilityCost: 95,
baseManagerCost: 350,
baseLogisticsCost: 240,
basePrice: 2.80,
facilityName: 'Lumber Camp',
managerName: 'Forester Chief',
logisticsName: 'Log Carrier',
description: 'Mature softwood felled in managed timber estates.'
},
{
id: 'planks',
name: 'Milled Planks',
sector: 'materials',
tier: 2,
icon: 'lucide:boxes',
color: '#d97706',
unit: 'bundles',
inputs: [{ id: 'timber', amount: 2 }],
outputAmount: 1,
baseCycleTime: 2.0,
unlockCost: 1200,
unlockedDefault: false,
baseFacilityCost: 950,
baseManagerCost: 2800,
baseLogisticsCost: 2000,
basePrice: 11.50,
facilityName: 'Sawmill',
managerName: 'Sawyer Foreman',
logisticsName: 'Lumber Flatbed',
description: 'Standardized structural lumber for construction and joinery.'
},
{
id: 'paper',
name: 'Industrial Paper',
sector: 'materials',
tier: 2,
icon: 'lucide:file-text',
color: '#cbd5e1',
unit: 'rolls',
inputs: [{ id: 'timber', amount: 3 }],
outputAmount: 2,
baseCycleTime: 2.5,
unlockCost: 3500,
unlockedDefault: false,
baseFacilityCost: 2800,
baseManagerCost: 6500,
baseLogisticsCost: 4800,
basePrice: 16.00,
facilityName: 'Pulp Mill',
managerName: 'Chemical Pulpist',
logisticsName: 'Paper Dispatcher',
description: 'Heavy paper stock used for cardboard packaging and publishing.'
},
{
id: 'furniture',
name: 'Office Furniture',
sector: 'materials',
tier: 3,
icon: 'lucide:armchair',
color: '#92400e',
unit: 'sets',
inputs: [{ id: 'planks', amount: 3 }],
outputAmount: 1,
baseCycleTime: 3.8,
unlockCost: 18000,
unlockedDefault: false,
baseFacilityCost: 14000,
baseManagerCost: 35000,
baseLogisticsCost: 26000,
basePrice: 95.00,
facilityName: 'Joinery Workshop',
managerName: 'Master Carpenter',
logisticsName: 'Showroom Distributor',
description: 'Ergonomic executive desks, cabinetry, and boardroom chairs.'
},
// --- SECTOR 3: MINING & METALLURGY ---
{
id: 'iron_ore',
name: 'Iron Ore',
sector: 'mining',
tier: 1,
icon: 'lucide:mountain',
color: '#64748b',
unit: 'tons',
inputs: [],
outputAmount: 1,
baseCycleTime: 1.6,
unlockCost: 1500,
unlockedDefault: false,
baseFacilityCost: 1200,
baseManagerCost: 3500,
baseLogisticsCost: 2400,
basePrice: 12.00,
facilityName: 'Open-Pit Iron Mine',
managerName: 'Mining Superintendant',
logisticsName: 'Ore Hopper Train',
description: 'Dense hematite extracted from open-pit mineral deposits.'
},
{
id: 'coal',
name: 'Coking Coal',
sector: 'mining',
tier: 1,
icon: 'lucide:flame',
color: '#334155',
unit: 'tons',
inputs: [],
outputAmount: 1,
baseCycleTime: 1.8,
unlockCost: 2800,
unlockedDefault: false,
baseFacilityCost: 2200,
baseManagerCost: 5500,
baseLogisticsCost: 3800,
basePrice: 15.00,
facilityName: 'Coal Pit',
managerName: 'Pit Supervisor',
logisticsName: 'Coal Conveyor',
description: 'High-energy carbon fuel essential for blast furnace reduction.'
},
{
id: 'steel_ingots',
name: 'Structural Steel',
sector: 'mining',
tier: 2,
icon: 'lucide:anvil',
color: '#94a3b8',
unit: 'billets',
inputs: [{ id: 'iron_ore', amount: 2 }, { id: 'coal', amount: 1 }],
outputAmount: 1,
baseCycleTime: 3.2,
unlockCost: 12500,
unlockedDefault: false,
baseFacilityCost: 9800,
baseManagerCost: 24000,
baseLogisticsCost: 17000,
basePrice: 72.00,
facilityName: 'Blast Smelter',
managerName: 'Foundry Master',
logisticsName: 'Heavy Rail Freight',
description: 'High-tensile carbon steel alloys for industrial manufacturing.'
},
{
id: 'metal_frames',
name: 'Heavy Frameworks',
sector: 'mining',
tier: 3,
icon: 'lucide:construction',
color: '#475569',
unit: 'girders',
inputs: [{ id: 'steel_ingots', amount: 3 }],
outputAmount: 1,
baseCycleTime: 4.6,
unlockCost: 65000,
unlockedDefault: false,
baseFacilityCost: 52000,
baseManagerCost: 110000,
baseLogisticsCost: 80000,
basePrice: 320.00,
facilityName: 'Fabrication Plant',
managerName: 'Chief Fabricator',
logisticsName: 'Heavy Hauler',
description: 'Rigid reinforced metal chassis and skyscraper beams.'
},
// --- SECTOR 4: CHEMICALS & POLYMERS ---
{
id: 'crude_oil',
name: 'Crude Oil',
sector: 'chemicals',
tier: 1,
icon: 'lucide:droplet',
color: '#1e293b',
unit: 'barrels',
inputs: [],
outputAmount: 1,
baseCycleTime: 2.0,
unlockCost: 25000,
unlockedDefault: false,
baseFacilityCost: 20000,
baseManagerCost: 48000,
baseLogisticsCost: 35000,
basePrice: 55.00,
facilityName: 'Drilling Derrick',
managerName: 'Derrick Engineer',
logisticsName: 'Pipeline Station',
description: 'Black liquid gold pumped from deep continental wells.'
},
{
id: 'silica_sand',
name: 'Silica Quartz Sand',
sector: 'chemicals',
tier: 1,
icon: 'lucide:sparkles',
color: '#38bdf8',
unit: 'drums',
inputs: [],
outputAmount: 1,
baseCycleTime: 2.2,
unlockCost: 45000,
unlockedDefault: false,
baseFacilityCost: 36000,
baseManagerCost: 75000,
baseLogisticsCost: 52000,
basePrice: 85.00,
facilityName: 'Quartz Quarry',
managerName: 'Geological Analyst',
logisticsName: 'Quartz Transport',
description: 'High-purity quartz crystals mined for semiconductor refining.'
},
{
id: 'polymers',
name: 'Industrial Polymers',
sector: 'chemicals',
tier: 2,
icon: 'lucide:test-tube',
color: '#0ea5e9',
unit: 'pellets',
inputs: [{ id: 'crude_oil', amount: 2 }],
outputAmount: 1,
baseCycleTime: 3.5,
unlockCost: 110000,
unlockedDefault: false,
baseFacilityCost: 88000,
baseManagerCost: 175000,
baseLogisticsCost: 120000,
basePrice: 210.00,
facilityName: 'Cracking Facility',
managerName: 'Petrochemical Lead',
logisticsName: 'Chemical Tanker',
description: 'Versatile synthetic thermoplastic pellets for manufacturing.'
},
{
id: 'silicon',
name: 'Purified Silicon',
sector: 'chemicals',
tier: 2,
icon: 'lucide:gem',
color: '#06b6d4',
unit: 'ingots',
inputs: [{ id: 'silica_sand', amount: 2 }],
outputAmount: 1,
baseCycleTime: 4.0,
unlockCost: 220000,
unlockedDefault: false,
baseFacilityCost: 175000,
baseManagerCost: 350000,
baseLogisticsCost: 240000,
basePrice: 420.00,
facilityName: 'Silicon Smelter',
managerName: 'Materials Scientist',
logisticsName: 'Clean Ingot Carrier',
description: '99.999% pure electronic grade monocrystalline silicon.'
},
// --- SECTOR 5: HIGH-TECH & ELECTRONICS ---
{
id: 'microchips',
name: 'Silicon Microchips',
sector: 'electronics',
tier: 3,
icon: 'lucide:cpu',
color: '#8b5cf6',
unit: 'chips',
inputs: [{ id: 'silicon', amount: 1 }, { id: 'polymers', amount: 1 }],
outputAmount: 2,
baseCycleTime: 4.8,
unlockCost: 550000,
unlockedDefault: false,
baseFacilityCost: 440000,
baseManagerCost: 850000,
baseLogisticsCost: 600000,
basePrice: 650.00,
facilityName: 'Cleanroom Fab',
managerName: 'Lithography Director',
logisticsName: 'Precision Courier',
description: 'Nanometer-scale integrated circuits etched via photolithography.'
},
{
id: 'circuit_boards',
name: 'PCB Motherboards',
sector: 'electronics',
tier: 3,
icon: 'lucide:circuit-board',
color: '#a855f7',
unit: 'boards',
inputs: [{ id: 'microchips', amount: 2 }, { id: 'polymers', amount: 2 }],
outputAmount: 1,
baseCycleTime: 5.5,
unlockCost: 1500000,
unlockedDefault: false,
baseFacilityCost: 1200000,
baseManagerCost: 2400000,
baseLogisticsCost: 1600000,
basePrice: 2200.00,
facilityName: 'PCB Assembly Line',
managerName: 'SMT Chief',
logisticsName: 'Static-Safe Transport',
description: 'Multi-layer printed circuit boards populated with components.'
},
{
id: 'smartphones',
name: 'Consumer Smartphones',
sector: 'electronics',
tier: 4,
icon: 'lucide:smartphone',
color: '#ec4899',
unit: 'devices',
inputs: [{ id: 'circuit_boards', amount: 1 }, { id: 'polymers', amount: 2 }],
outputAmount: 1,
baseCycleTime: 6.5,
unlockCost: 5000000,
unlockedDefault: false,
baseFacilityCost: 4000000,
baseManagerCost: 8000000,
baseLogisticsCost: 5500000,
basePrice: 6800.00,
facilityName: 'Tech Assembly Plant',
managerName: 'VP of Electronics',
logisticsName: 'Global Freight Air',
description: 'Flagship handheld smartphones shipped to worldwide retail.'
},
// --- SECTOR 6: HEAVY INDUSTRY & VEHICLES ---
{
id: 'engines',
name: 'Industrial Engines',
sector: 'heavy_industry',
tier: 3,
icon: 'lucide:cog',
color: '#f97316',
unit: 'motors',
inputs: [{ id: 'steel_ingots', amount: 3 }, { id: 'metal_frames', amount: 1 }],
outputAmount: 1,
baseCycleTime: 6.0,
unlockCost: 3500000,
unlockedDefault: false,
baseFacilityCost: 2800000,
baseManagerCost: 5500000,
baseLogisticsCost: 3800000,
basePrice: 4200.00,
facilityName: 'Motor Foundry',
managerName: 'Engine Master',
logisticsName: 'Crated Transport',
description: 'High-torque turbodiesel and hybrid electric powerplants.'
},
{
id: 'commercial_trucks',
name: 'Commercial Trucks',
sector: 'heavy_industry',
tier: 4,
icon: 'lucide:truck',
color: '#dc2626',
unit: 'trucks',
inputs: [{ id: 'engines', amount: 1 }, { id: 'metal_frames', amount: 2 }, { id: 'circuit_boards', amount: 1 }],
outputAmount: 1,
baseCycleTime: 8.5,
unlockCost: 15000000,
unlockedDefault: false,
baseFacilityCost: 12000000,
baseManagerCost: 22000000,
baseLogisticsCost: 15000000,
basePrice: 26500.00,
facilityName: 'Vehicle Mega-Factory',
managerName: 'Plant General Manager',
logisticsName: 'Carrier Fleet',
description: 'Heavy duty articulated transport trucks for national logistics.'
}
];
// Helper to look up a product by ID
export function getProduct(id) {
return PRODUCTS.find(p => p.id === id);
}
// Milestone thresholds that grant a 2x throughput multiplier
export const UNIT_MILESTONES = [1, 10, 25, 50, 100, 200, 300, 400, 500, 750, 1000, 1500, 2000];
export function getUnitMilestoneMultiplier(count) {
let reached = 0;
for (const m of UNIT_MILESTONES) {
if (count >= m) reached++;
else break;
}
return Math.pow(2.0, reached);
}
export function getNextMilestone(count) {
for (const m of UNIT_MILESTONES) {
if (count < m) return m;
}
return count + 1000;
}