Testhostplaycanvasmobile / 543.bundle.js
kwabs22
Added latest updates
3463977
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[543],{543:(e,t,i)=>{i.r(t),i.d(t,{default:()=>o});var s=i(96);const o={id:"systems_testing_lab",title:"Systems Testing Laboratory",type:"scene",async build(e,t,i){console.log("[SystemsTestingLab] Building comprehensive systems testing environment...");const o=new s.n(e,e.systems?.core);o.sceneBuilder=t,o.entityFactory=i,this.testingData={playerStats:{health:85,maxHealth:100,stamina:65,maxStamina:100,experience:150,level:2,skillPoints:3},resources:{water:75,power:60,fuel:30,materials:45},inventoryItems:["test_tool_1","test_consumable_1","test_equipment_1","test_resource_water","test_resource_power","test_material_steel","test_stat_booster","test_health_potion","test_stamina_booster","test_attribute_tome"]},o.createRoom("main_lab",{size:[24,5,20],lighting:"laboratory",position:[0,0,0],buildFunction:n,objectives:[{id:"lab_orientation",name:"Laboratory Orientation",description:"Welcome to the Systems Testing Lab! Click on the Information Terminal to begin",type:"simple",autoStart:!0,rewards:{experience:25}},{id:"test_ui_systems",name:"Test Player Stats UI",description:"Click on Stats Testing Console to test health, stamina, and attribute displays",type:"simple",rewards:{experience:50}},{id:"test_inventory_systems",name:"Test Inventory System",description:"Use Inventory Testing Station to test item management and UI interactions",type:"simple",rewards:{experience:50}}]}),o.createRoom("resource_lab",{size:[18,4,16],lighting:"industrial",position:[0,0,0],buildFunction:a,objectives:[{id:"test_water_system",name:"Test Water Management",description:"Interact with Water Tap and Sink to test resource flow mechanics",type:"simple",rewards:{experience:40}},{id:"test_power_system",name:"Test Power Grid",description:"Use Power Generator and Electrical Panel to test energy distribution",type:"simple",rewards:{experience:40}},{id:"test_resource_monitoring",name:"Test Resource Monitoring",description:"Check Resource Monitor Display to verify all systems are tracking properly",type:"simple",rewards:{experience:60}}]}),o.createRoom("equipment_lab",{size:[20,4,18],lighting:"workshop",position:[0,0,0],buildFunction:r,objectives:[{id:"test_equipment_slots",name:"Test Equipment Slots",description:"Use Equipment Testing Bench to test item equipping and stat bonuses",type:"counter",target:3,progress:0,rewards:{experience:75}},{id:"test_item_durability",name:"Test Item Durability",description:"Use Durability Testing Machine to test item condition tracking",type:"simple",rewards:{experience:50}},{id:"test_item_combinations",name:"Test Item Combinations",description:"Use Crafting Workbench to test item combination and creation systems",type:"counter",target:2,progress:0,rewards:{experience:100}}]}),o.createRoom("feedback_center",{size:[16,4,14],lighting:"office",position:[0,0,0],buildFunction:c,objectives:[{id:"provide_feedback",name:"Provide System Feedback",description:"Use Feedback Terminal to document your testing experience and suggestions",type:"simple",rewards:{experience:75,skillPoints:1}},{id:"review_test_results",name:"Review Test Results",description:"Check Test Results Display to see overall system performance metrics",type:"simple",rewards:{experience:50}}]}),o.createDoor("main_lab","resource_lab",{type:"none",position:[8,0,-8]},{playerSpawnPosition:[-6,0,0]}),o.createDoor("resource_lab","equipment_lab",{type:"objective",id:"test_resource_monitoring"},{playerSpawnPosition:[0,0,-6]}),o.createDoor("equipment_lab","feedback_center",{type:"objective",id:"test_item_combinations"},{playerSpawnPosition:[4,0,0]}),o.createDoor("main_lab","feedback_center",{type:"none",position:[-8,0,8]},{playerSpawnPosition:[0,0,4]});const l=await o.build(e,t,i);return l.multiRoom=o,l.testingData=this.testingData,l},onLoad(e,t){console.log("[SystemsTestingLab] Systems testing laboratory initiated...");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.testingData=i.testingData,this.interactionHandler=i=>{this.handleTestingInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler),this.initializeTestingEnvironment(e,t)),e.fire("ui:notification",{text:"SYSTEMS TESTING LAB: Environment ready for comprehensive system evaluation",type:"info",duration:5e3}),console.log("[SystemsTestingLab] Testing environment loaded, all systems ready for evaluation")},initializeTestingEnvironment(e,t){const i=t.getSystem("statsmanager");i&&(i.modifyStat("health",this.testingData.playerStats.health,!1),i.modifyStat("maxHealth",this.testingData.playerStats.maxHealth,!1),i.modifyStat("stamina",this.testingData.playerStats.stamina,!1),i.modifyStat("maxStamina",this.testingData.playerStats.maxStamina,!1),i.modifyStat("experience",this.testingData.playerStats.experience,!1),i.modifyStat("level",this.testingData.playerStats.level,!1),i.modifyStat("skillPoints",this.testingData.playerStats.skillPoints,!1),console.log("[SystemsTestingLab] Stats initialized for testing"));const s=t.getSystem("inventorymanager");s&&(this.testingData.inventoryItems.forEach(e=>{s.hasItem(e)||s.pickupItem(e,1)}),console.log("[SystemsTestingLab] Test inventory initialized")),this.setupInventoryUsage(e,t),e.fire("resources:changed",this.testingData.resources),console.log("[SystemsTestingLab] Resource testing data prepared and UI updated")},handleTestingInteraction(e,t,i){console.log("[SystemsTestingLab] Testing interaction:",e);const s=i.getSystem("objectivemanager"),o=this.multiRoom.currentRoom;if("InformationTerminal"===e&&"main_lab"===o)s.isObjectiveActive("lab_orientation")&&(s.completeObjective("lab_orientation"),s.startObjective("test_ui_systems"),s.startObjective("test_inventory_systems"),t.fire("ui:notification",{text:"SYSTEMS TESTING LAB: Multi-system evaluation environment for UI, resources, and inventory",type:"info",duration:4e3}),this.checkGuidanceObjectives(t,i));else if("StatsTestingConsole"===e&&"main_lab"===o)s.isObjectiveActive("test_ui_systems")&&(this.testStatsUISystem(t,i),s.completeObjective("test_ui_systems"),t.fire("ui:notification",{text:"STATS UI TEST: Health, stamina, and attribute displays evaluated",type:"success",duration:3500}),this.checkGuidanceObjectives(t,i));else if("InventoryTestingStation"===e&&"main_lab"===o)s.isObjectiveActive("test_inventory_systems")&&(this.testInventorySystem(t,i),s.completeObjective("test_inventory_systems"),t.fire("ui:notification",{text:"INVENTORY TEST: Item management and UI interactions evaluated",type:"success",duration:3500}),this.checkGuidanceObjectives(t,i));else if(["HealthPotion","StaminaPotion","TestKeycard","ToolKit","DataChip"].includes(e)&&"main_lab"===o)this.handleCollectiblePickup(e,t,i);else if(["WaterTap","WaterSink"].includes(e)&&"resource_lab"===o)this.testResourceFlow(e,"water",t,i),s.isObjectiveActive("test_water_system")&&(s.completeObjective("test_water_system"),s.startObjective("test_power_system"),t.fire("ui:notification",{text:"WATER SYSTEM TEST: Resource flow and sink mechanics evaluated",type:"success",duration:3e3}),this.checkGuidanceObjectives(t,i));else if(["PowerGenerator","ElectricalPanel"].includes(e)&&"resource_lab"===o)this.testResourceFlow(e,"power",t,i),s.isObjectiveActive("test_power_system")&&(s.completeObjective("test_power_system"),s.startObjective("test_resource_monitoring"),t.fire("ui:notification",{text:"POWER SYSTEM TEST: Energy generation and distribution evaluated",type:"success",duration:3e3}),this.checkGuidanceObjectives(t,i));else if("ResourceMonitorDisplay"===e&&"resource_lab"===o)s.isObjectiveActive("test_resource_monitoring")&&(this.testResourceMonitoring(t,i),s.completeObjective("test_resource_monitoring"),t.fire("ui:notification",{text:"RESOURCE MONITORING TEST: All resource tracking systems evaluated",type:"success",duration:4e3}),this.checkGuidanceObjectives(t,i));else if("EquipmentTestingBench"===e&&"equipment_lab"===o){if(s.isObjectiveActive("test_equipment_slots")){this.testEquipmentSlots(t,i);const e=s.objectives.get("test_equipment_slots")?.progress||0;s.updateObjective("test_equipment_slots",e+1),s.isComplete("test_equipment_slots")&&(s.startObjective("test_item_durability"),t.fire("ui:notification",{text:"EQUIPMENT SLOTS TEST: Item equipping and stat bonuses evaluated",type:"success",duration:3500}),this.checkGuidanceObjectives(t,i))}}else if("DurabilityTestingMachine"===e&&"equipment_lab"===o)s.isObjectiveActive("test_item_durability")&&(this.testItemDurability(t,i),s.completeObjective("test_item_durability"),s.startObjective("test_item_combinations"),t.fire("ui:notification",{text:"DURABILITY TEST: Item condition tracking evaluated",type:"success",duration:3e3}),this.checkGuidanceObjectives(t,i));else if("CraftingWorkbench"===e&&"equipment_lab"===o){if(s.isObjectiveActive("test_item_combinations")){this.testItemCombinations(t,i);const e=s.objectives.get("test_item_combinations")?.progress||0;s.updateObjective("test_item_combinations",e+1),s.isComplete("test_item_combinations")&&(t.fire("ui:notification",{text:"CRAFTING TEST: Item combination and creation systems evaluated",type:"success",duration:4e3}),this.checkGuidanceObjectives(t,i))}}else"FeedbackTerminal"===e&&"feedback_center"===o?s.isObjectiveActive("provide_feedback")&&(this.collectFeedback(t,i),s.completeObjective("provide_feedback"),s.startObjective("review_test_results"),t.fire("ui:notification",{text:"FEEDBACK COLLECTED: System evaluation feedback recorded for analysis",type:"success",duration:4e3}),this.checkGuidanceObjectives(t,i)):"TestResultsDisplay"===e&&"feedback_center"===o&&s.isObjectiveActive("review_test_results")&&(this.displayTestResults(t,i),s.completeObjective("review_test_results"),t.fire("ui:notification",{text:"TEST COMPLETE: All system evaluations completed successfully",type:"success",duration:5e3}),this.checkGuidanceObjectives(t,i))},checkGuidanceObjectives(e,t){this.multiRoom&&this.multiRoom.currentRoom&&setTimeout(()=>{this.multiRoom.checkAndActivateGuidanceObjectives(this.multiRoom.currentRoom)},50)},testStatsUISystem(e,t){const i=t.getSystem("statsmanager");i&&(e.fire("ui:notification",{text:"STATS UI TEST: Testing health, stamina, and experience changes...",type:"info",duration:2e3}),i.modifyStat("health",-10,!0),setTimeout(()=>{i.modifyStat("health",15,!0),e.fire("ui:notification",{text:"HEALTH TEST: Health decreased then increased - UI should update",type:"success",duration:2e3})},1e3),setTimeout(()=>{i.modifyStat("stamina",-15,!0),e.fire("ui:notification",{text:"STAMINA TEST: Stamina decreased - bar should update",type:"info",duration:2e3})},2e3),setTimeout(()=>{i.modifyStat("experience",25,!0),e.fire("ui:notification",{text:"EXPERIENCE TEST: XP gained - stats display should update",type:"success",duration:2e3})},3e3),setTimeout(()=>{i.modifyStat("strength",2,!0),e.fire("ui:notification",{text:"ATTRIBUTE TEST: Strength increased - attributes display should update",type:"success",duration:2e3})},4e3),console.log("[SystemsTestingLab] Comprehensive stats UI system tested - health, stamina, experience, and attributes"))},testInventorySystem(e,t){const i=t.getSystem("inventorymanager");i&&(i.pickupItem("test_feedback_item",1),setTimeout(()=>{i.hasItem("test_consumable_1")&&i.removeItem("test_consumable_1",1)},500),console.log("[SystemsTestingLab] Inventory system tested - item addition and removal"))},handleCollectiblePickup(e,t,i){const s=i.getSystem("inventorymanager");if(!s)return;const o={HealthPotion:"health_potion",StaminaPotion:"stamina_potion",TestKeycard:"test_keycard",ToolKit:"test_toolkit",DataChip:"test_data_chip"}[e];if(o)if(s.pickupItem(o,1)){const i=t.root.findByName(e);i&&i.destroy(),t.fire("ui:notification",{text:`COLLECTED: ${e.replace(/([A-Z])/g," $1").trim()}`,type:"success",duration:2e3}),console.log(`[SystemsTestingLab] Collected ${e} -> ${o}`)}else t.fire("ui:notification",{text:"Inventory full - cannot pickup item",type:"warning",duration:2e3})},testResourceFlow(e,t,i,s){console.log(`[SystemsTestingLab] Testing ${t} flow via ${e}`);const o=s.getSystem("statsmanager");let n=0,a=0;if("WaterTap"===e?(this.testingData.resources.water=Math.max(0,this.testingData.resources.water-10),n=3,i.fire("ui:notification",{text:`WATER TAP: Water usage detected - level decreased to ${Math.floor(this.testingData.resources.water)}% (Stamina -${n})`,type:"info",duration:3e3})):"WaterSink"===e?(this.testingData.resources.water=Math.max(0,this.testingData.resources.water-5),n=2,i.fire("ui:notification",{text:`WATER SINK: Water processing - level decreased to ${Math.floor(this.testingData.resources.water)}% (Stamina -${n})`,type:"info",duration:3e3})):"PowerGenerator"===e?(this.testingData.resources.power=Math.min(100,this.testingData.resources.power+15),n=8,i.fire("ui:notification",{text:`POWER GENERATOR: Energy generation - level increased to ${Math.floor(this.testingData.resources.power)}% (Stamina -${n})`,type:"success",duration:3e3})):"ElectricalPanel"===e&&(this.testingData.resources.power=Math.max(0,this.testingData.resources.power-8),n=4,this.testingData.resources.power<30?(a=-2,i.fire("ui:notification",{text:`ELECTRICAL PANEL: Power consumption - level decreased to ${Math.floor(this.testingData.resources.power)}% (Stamina -${n}, Health -2 due to low power stress)`,type:"warning",duration:4e3})):i.fire("ui:notification",{text:`ELECTRICAL PANEL: Power consumption - level decreased to ${Math.floor(this.testingData.resources.power)}% (Stamina -${n})`,type:"info",duration:3e3})),o&&n>0){const e=o.getStat("stamina");if(e<n){const s=e/n;this.testingData.resources[t]=Math.max(0,this.testingData.resources[t]-10*(1-s)),a-=3,i.fire("ui:notification",{text:"LOW STAMINA: Reduced efficiency due to fatigue - additional health impact!",type:"error",duration:3e3})}o.modifyStat("stamina",-n,!0),console.log(`[SystemsTestingLab] Applied stamina cost: ${n}, new stamina: ${o.getStat("stamina")}`)}o&&0!==a&&(o.modifyStat("health",a,!0),console.log(`[SystemsTestingLab] Applied health impact: ${a}, new health: ${o.getStat("health")}`)),i.fire("resources:changed",this.testingData.resources),setTimeout(()=>{if(o){const e=o.getStat("health"),t=o.getStat("maxHealth"),s=o.getStat("stamina"),a=o.getStat("maxStamina");i.fire("player:healthChanged",{current:e,max:t}),i.fire("stats:changed","stamina",s+n,s),console.log(`[SystemsTestingLab] Forced UI update - Health: ${e}/${t}, Stamina: ${s}/${a}`)}},50),console.log(`[SystemsTestingLab] Resource interaction complete - Stamina cost: ${n}, Health impact: ${a}`)},testResourceMonitoring(e,t){console.log("[SystemsTestingLab] Testing resource monitoring systems");const i=this.testingData.resources.water,s=this.testingData.resources.power,o=this.testingData.resources.fuel;this.testingData.resources.materials,e.fire("ui:notification",{text:`RESOURCE STATUS: Water ${i}%, Power ${s}%, Fuel ${o}%`,type:"info",duration:4e3})},testEquipmentSlots(e,t){console.log("[SystemsTestingLab] Testing equipment slot system"),e.fire("ui:notification",{text:"EQUIPMENT SLOTS: Head, Body, Hands, Feet, Weapon slots ready for implementation",type:"info",duration:3e3})},testItemDurability(e,t){console.log("[SystemsTestingLab] Testing item durability system"),e.fire("ui:notification",{text:"ITEM DURABILITY: Condition tracking and degradation systems evaluated",type:"info",duration:3e3})},testItemCombinations(e,t){console.log("[SystemsTestingLab] Testing item combination system"),e.fire("ui:notification",{text:"ITEM CRAFTING: Combination recipes and creation mechanics evaluated",type:"info",duration:3e3})},collectFeedback(e,t){console.log("[SystemsTestingLab] Collecting system feedback");const i={timestamp:(new Date).toISOString(),systems_tested:["stats_ui","inventory","resources","equipment"],overall_rating:"positive",suggestions:["implement_visual_inventory","add_resource_meters","enhance_stat_displays"]};console.log("[SystemsTestingLab] Feedback collected:",i),e.fire("ui:notification",{text:"FEEDBACK: System evaluation data recorded - thank you for testing!",type:"success",duration:3500})},displayTestResults(e,t){console.log("[SystemsTestingLab] Displaying comprehensive test results"),e.fire("ui:notification",{text:"TEST RESULTS: UI Stats (Ready), Inventory (Needs Work), Resources (Not Implemented)",type:"info",duration:6e3}),console.log("[SystemsTestingLab] Test results summary:",{stats_ui:"READY - Minor enhancements needed",inventory:"NEEDS_WORK - Visual overhaul required",resources:"NOT_IMPLEMENTED - System design complete",equipment:"PLANNING - Architecture defined"})},setupInventoryUsage(e,t){e.keyboard&&(this.keyboardHandler=i=>{if(i.key>=pc.KEY_1&&i.key<=pc.KEY_9){const s=i.key-pc.KEY_1;this.useInventoryItem(s,e,t)}},e.keyboard.on(pc.EVENT_KEYDOWN,this.keyboardHandler),e.fire("ui:notification",{text:"INVENTORY USAGE: Press 1-9 to use items in inventory slots",type:"info",duration:4e3}))},useInventoryItem(e,t,i){const s=i.getSystem("inventorymanager");if(!s)return void console.warn("[SystemsTestingLab] No inventory manager found");const o=s.getItemAt(e);if(!o)return void t.fire("ui:notification",{text:`No item in slot ${e+1}`,type:"warning",duration:2e3});const n=s.getItemInfo(o.id);n?n.onUse||n.reusable?this.handleTestItemUsage(o,n,t,i)||s.useItem(e)&&(t.fire("ui:notification",{text:`Used ${n.name}`,type:"success",duration:2e3}),console.log(`[SystemsTestingLab] Used item: ${n.name} from slot ${e}`)):t.fire("ui:notification",{text:`${n.name} cannot be used in this context`,type:"warning",duration:2e3}):t.fire("ui:notification",{text:"Unknown item - cannot use",type:"error",duration:2e3})},handleTestItemUsage(e,t,i,s){const o=s.getSystem("statsmanager");switch(e.id){case"test_tool_1":return i.fire("ui:notification",{text:"TEST TOOL: Performing diagnostic scan... Systems nominal!",type:"success",duration:3e3}),o&&o.modifyStat("experience",10,!0),!0;case"test_consumable_1":return i.fire("ui:notification",{text:"TEST CONSUMABLE: Emergency rations consumed - health restored!",type:"success",duration:3e3}),o&&o.modifyStat("health",25,!0),!1;case"test_equipment_1":return i.fire("ui:notification",{text:"TEST EQUIPMENT: Environmental suit activated - protection enhanced!",type:"success",duration:3e3}),o&&(o.modifyStat("strength",2,!0),setTimeout(()=>{o.modifyStat("strength",-2,!0),i.fire("ui:notification",{text:"Equipment effect wore off",type:"info",duration:2e3})},3e4)),!0;case"test_resource_water":return this.testingData.resources.water=Math.min(100,this.testingData.resources.water+20),i.fire("resources:changed",this.testingData.resources),i.fire("ui:notification",{text:"WATER RESOURCE: Added 20% to water reserves",type:"success",duration:3e3}),!1;case"test_resource_power":return this.testingData.resources.power=Math.min(100,this.testingData.resources.power+25),i.fire("resources:changed",this.testingData.resources),i.fire("ui:notification",{text:"POWER RESOURCE: Added 25% to power grid",type:"success",duration:3e3}),!1;case"test_material_steel":return this.testingData.resources.materials=Math.min(100,this.testingData.resources.materials+15),i.fire("resources:changed",this.testingData.resources),i.fire("ui:notification",{text:"MATERIAL RESOURCE: Added 15% to material stockpile",type:"success",duration:3e3}),!1;case"test_stat_booster":return o&&(o.modifyStat("strength",1,!0),o.modifyStat("agility",1,!0),o.modifyStat("intelligence",1,!0),o.modifyStat("charisma",1,!0),i.fire("ui:notification",{text:"STAT BOOSTER: All attributes increased by 1!",type:"success",duration:3e3})),!1;case"test_health_potion":return o&&(o.setStat("health",o.getMaxStat("health")),i.fire("ui:notification",{text:"HEALTH POTION: Full health restored!",type:"success",duration:3e3})),!1;case"test_stamina_booster":return o&&(o.modifyStat("maxStamina",10,!0),o.setStat("stamina",o.getMaxStat("stamina")),i.fire("ui:notification",{text:"STAMINA BOOSTER: Max stamina +10, stamina restored!",type:"success",duration:3e3})),!1;case"test_attribute_tome":return o&&(o.modifyStat("experience",200,!0),o.modifyStat("skillPoints",5,!0),i.fire("ui:notification",{text:"ATTRIBUTE TOME: +200 XP, +5 Skill Points gained!",type:"success",duration:3e3})),!1;default:return!1}},onUnload(e,t){console.log("[SystemsTestingLab] Systems testing laboratory concluded"),this.keyboardHandler&&e.keyboard&&(e.keyboard.off(pc.EVENT_KEYDOWN,this.keyboardHandler),this.keyboardHandler=null),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function n(e,t,i,s){console.log("[SystemsTestingLab] Building main testing laboratory...");const o=i.create("InformationTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1.5,.5]},rigidbody:{type:"static"}},position:[0,1.5,-8],scale:[2,3,1],tags:["interactive","terminal"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.4,.8),e.emissive=new pc.Color(.1,.2,.4),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(o,"main_lab");const n=i.create("StatsTestingConsole",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,1]},rigidbody:{type:"static"}},position:[-6,1,-4],scale:[3,2,2],tags:["interactive","testing_console"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.2,.2),e.emissive=new pc.Color(.3,.1,.1),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(n,"main_lab");const a=i.create("InventoryTestingStation",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,1]},rigidbody:{type:"static"}},position:[6,1,-4],scale:[3,2,2],tags:["interactive","testing_station"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.8,.2),e.emissive=new pc.Color(.1,.3,.1),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(a,"main_lab");const r=i.create("CentralPlatform",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[4,.2,4]}},position:[0,.2,2],scale:[8,.4,8],tags:["platform"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.7,.8),e.metalness=.6,e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r),[{pos:[0,4.5,0],color:new pc.Color(1,1,1)},{pos:[-6,4,-4],color:new pc.Color(.9,.7,.7)},{pos:[6,4,-4],color:new pc.Color(.7,.9,.7)},{pos:[0,4,-8],color:new pc.Color(.7,.8,1)}].forEach(t=>{const s=i.createLight("point",{color:t.color,intensity:2.5,range:12,position:t.pos});e.addChild(s)}),[{name:"HealthPotion",position:[-8,.5,2],itemId:"health_potion",color:new pc.Color(1,.2,.2),emissive:new pc.Color(.3,.05,.05)},{name:"StaminaPotion",position:[8,.5,2],itemId:"stamina_potion",color:new pc.Color(.2,.8,.2),emissive:new pc.Color(.05,.2,.05)},{name:"TestKeycard",position:[0,.5,6],itemId:"test_keycard",color:new pc.Color(.8,.8,.2),emissive:new pc.Color(.2,.2,.05)},{name:"ToolKit",position:[-4,.5,6],itemId:"test_toolkit",color:new pc.Color(.6,.4,.2),emissive:new pc.Color(.15,.1,.05)},{name:"DataChip",position:[4,.5,6],itemId:"test_data_chip",color:new pc.Color(.2,.4,.8),emissive:new pc.Color(.05,.1,.2)}].forEach(e=>{const t=i.create(e.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.3,.3]},rigidbody:{type:"static"}},position:e.position,scale:[.6,.6,.6],tags:["interactive","collectible"]});if(t.itemId=e.itemId,t.model){const i=new pc.StandardMaterial;i.diffuse=e.color,i.emissive=e.emissive,i.update(),t.model.meshInstances.forEach(e=>e.material=i)}s.addEntityToRoom(t,"main_lab")})}async function a(e,t,i,s){console.log("[SystemsTestingLab] Building resource testing laboratory...");const o=i.create("WaterTap",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.5,height:2},rigidbody:{type:"static"}},position:[-6,1,-4],scale:[1,2,1],tags:["interactive","water_source"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.6,.9),e.metalness=.7,e.update(),o.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(o,"resource_lab");const n=i.create("WaterSink",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.8,1]},rigidbody:{type:"static"}},position:[-6,.8,0],scale:[2,1.6,2],tags:["interactive","water_sink"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.7,.9),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(n,"resource_lab");const a=i.create("PowerGenerator",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1.5,1]},rigidbody:{type:"static"}},position:[6,1.5,-4],scale:[3,3,2],tags:["interactive","power_source"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.9,.7,.2),e.emissive=new pc.Color(.3,.2,0),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(a,"resource_lab");const r=i.create("ElectricalPanel",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1.5,.3]},rigidbody:{type:"static"}},position:[6,1.5,2],scale:[2,3,.6],tags:["interactive","electrical_panel"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.emissive=new pc.Color(.1,.4,.1),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(r,"resource_lab");const c=i.create("ResourceMonitorDisplay",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,.2]},rigidbody:{type:"static"}},position:[0,1.5,6],scale:[4,3,.4],tags:["interactive","monitor_display"]});if(c.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.2),e.emissive=new pc.Color(0,.3,.6),e.update(),c.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(c,"resource_lab"),[{pos:[0,3.5,0],color:new pc.Color(.9,.9,1)},{pos:[-6,3,-2],color:new pc.Color(.8,.9,1)},{pos:[6,3,-2],color:new pc.Color(1,.9,.8)}].forEach(t=>{const s=i.createLight("point",{color:t.color,intensity:2.2,range:10,position:t.pos});e.addChild(s)})}async function r(e,t,i,s){console.log("[SystemsTestingLab] Building equipment testing laboratory...");const o=i.create("EquipmentTestingBench",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,1.5]},rigidbody:{type:"static"}},position:[-6,1,0],scale:[4,2,3],tags:["interactive","equipment_bench"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(o,"equipment_lab");const n=i.create("DurabilityTestingMachine",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,2,1.5]},rigidbody:{type:"static"}},position:[0,2,-6],scale:[3,4,3],tags:["interactive","durability_machine"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.4),e.emissive=new pc.Color(.2,0,0),e.metalness=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(n,"equipment_lab");const a=i.create("CraftingWorkbench",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,2]},rigidbody:{type:"static"}},position:[6,1,2],scale:[4,2,4],tags:["interactive","crafting_bench"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.3,.1),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(a,"equipment_lab"),[{pos:[0,3.5,0],color:new pc.Color(1,.95,.8)},{pos:[-6,3,0],color:new pc.Color(.9,.9,.8)},{pos:[6,3,2],color:new pc.Color(.95,.9,.7)},{pos:[0,3.5,-6],color:new pc.Color(1,.8,.8)}].forEach(t=>{const s=i.createLight("point",{color:t.color,intensity:2.3,range:9,position:t.pos});e.addChild(s)})}async function c(e,t,i,s){console.log("[SystemsTestingLab] Building feedback collection center...");const o=i.create("FeedbackTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.2,1.5,.8]},rigidbody:{type:"static"}},position:[-4,1.5,0],scale:[2.4,3,1.6],tags:["interactive","feedback_terminal"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.7,.3),e.emissive=new pc.Color(.1,.3,.1),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(o,"feedback_center");const n=i.create("TestResultsDisplay",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2.5,2,.3]},rigidbody:{type:"static"}},position:[4,2,-4],scale:[5,4,.6],tags:["interactive","results_display"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.2,.1),e.emissive=new pc.Color(0,.4,.2),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}s.addEntityToRoom(n,"feedback_center");const a=i.create("OfficeDeck",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,.8,1]}},position:[0,.8,4],scale:[3,1.6,2],tags:["furniture"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.5,.4),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}e.addChild(a),[{pos:[0,3.5,0],color:new pc.Color(.95,.95,1)},{pos:[-4,3,0],color:new pc.Color(.9,1,.9)},{pos:[4,3,-4],color:new pc.Color(.9,.95,.9)}].forEach(t=>{const s=i.createLight("point",{color:t.color,intensity:2,range:8,position:t.pos});e.addChild(s)})}}}]);