Testhostplaycanvasmobile / 205.bundle.js
kwabs22
puzzle scene and label fix attempts
8dcf070
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[205],{205:(e,t,i)=>{i.r(t),i.d(t,{default:()=>o});var a=i(96);const o={id:"medical_complex",title:"Medical Complex",type:"scene",async build(e,t,i){console.log("[MedicalComplex] Building medical complex...");const o=new a.n(e,e.systems?.core||{});o.sceneBuilder=t,o.entityFactory=i,o.createRoom("reception",{size:[15,3,12],lighting:"bright",position:[0,0,0],buildFunction:n,objectives:[{id:"reception_arrival",name:"Medical Complex Arrival",description:"Check in at the reception desk",type:"simple",autoStart:!0,rewards:{experience:20}},{id:"get_keycard",name:"Obtain Access Card",description:"Find the emergency keycard in the reception desk",type:"simple",rewards:{experience:30,items:[{id:"emergency_keycard",quantity:1}]}}]}),o.createRoom("emergency_ward",{size:[20,4,15],lighting:"clinical",position:[0,0,0],buildFunction:s,objectives:[{id:"assess_patients",name:"Patient Assessment",description:"Examine all patients in the emergency ward",type:"counter",target:6,progress:0,rewards:{experience:80},nextObjective:"collect_medical_data"},{id:"collect_medical_data",name:"Collect Medical Data",description:"Gather patient information for surgery prep",type:"simple",prerequisites:["assess_patients"],rewards:{experience:50,items:[{id:"patient_data",quantity:1}]}}]}),o.createRoom("surgery_suite",{size:[12,4,10],lighting:"surgical",position:[0,0,0],buildFunction:r,objectives:[{id:"prepare_surgery",name:"Surgical Preparation",description:"Set up surgical equipment and verify patient data",type:"simple",rewards:{experience:100}},{id:"complete_procedure",name:"Emergency Surgery",description:"Perform the life-saving surgical procedure",type:"simple",prerequisites:["prepare_surgery"],rewards:{experience:200,skillPoints:2,items:[{id:"surgical_certificate",quantity:1}]}}]}),o.createDoor("reception","emergency_ward",{type:"objective",id:"get_keycard"},{playerSpawnPosition:[0,0,6]}),o.createDoor("emergency_ward","surgery_suite",{type:"objective",id:"collect_medical_data"},{playerSpawnPosition:[0,0,4]}),o.createDoor("surgery_suite","reception",{type:"none"},{playerSpawnPosition:[0,0,5]});const c=await o.build(e,t,i);return c.multiRoom=o,c},onLoad(e,t){console.log("[MedicalComplex] Complex loaded");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.interactionHandler=i=>{this.handleComplexInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler)),e.fire("ui:notification",{text:"Welcome to the Medical Complex - Multiple Emergency Situations Detected",type:"warning",duration:5e3})},handleComplexInteraction(e,t,i){console.log(`[MedicalComplex] Interaction with: ${e}`);const a=i.getSystem("objectivemanager");if("ReceptionDesk"===e){if(console.log("[MedicalComplex] Reception desk interaction - objManager:",!!a),a){const e=a.isObjectiveActive("reception_arrival");console.log("[MedicalComplex] reception_arrival active:",e),e&&(a.completeObjective("reception_arrival"),a.startObjective("get_keycard"),console.log("[MedicalComplex] Completed reception_arrival, started get_keycard"))}t.fire("ui:notification",{text:"Reception: Multiple critical patients need immediate attention!",type:"warning",duration:4e3})}else if("KeycardDrawer"===e)a&&a.isObjectiveActive("get_keycard")?(this.multiRoom.addItem("emergency_keycard"),a.completeObjective("get_keycard"),t.fire("ui:notification",{text:"Emergency keycard acquired - Access to emergency ward granted",type:"success",duration:3e3})):a&&a.isComplete("get_keycard")&&t.fire("ui:notification",{text:"Keycard already obtained - Focus on current medical objectives",type:"info",duration:2e3});else if(e.startsWith("Patient_")){if("emergency_ward"===this.multiRoom.currentRoom&&a&&a.isObjectiveActive("assess_patients")&&(this.assessedPatients||(this.assessedPatients=new Set),!this.assessedPatients.has(e))){this.assessedPatients.add(e);const i=e.split("_")[1],o=["Critical - requires immediate surgery","Stable - monitoring required","Minor injuries - treatment scheduled","Serious - needs specialist consultation","Emergency - prep for surgery","Recovering - post-op care needed"];t.fire("ui:notification",{text:`Patient ${parseInt(i)+1}: ${o[parseInt(i)]}`,type:"info",duration:3e3}),a.updateObjective("assess_patients",this.assessedPatients.size),console.log(`[MedicalComplex] Assessed patient ${e}, total: ${this.assessedPatients.size}/6`)}}else"MedicalWorkstation"===e?a&&a.isComplete("assess_patients")&&a.isObjectiveActive("collect_medical_data")?(a.completeObjective("collect_medical_data"),this.multiRoom.addItem("patient_data"),t.fire("ui:notification",{text:"Medical data compiled - Surgery suite access granted",type:"success",duration:3e3})):a&&a.isComplete("collect_medical_data")&&t.fire("ui:notification",{text:"Medical data already compiled",type:"info",duration:2e3}):"SurgicalTable"===e?"surgery_suite"===this.multiRoom.currentRoom&&a&&(a.isObjectiveActive("prepare_surgery")?(a.completeObjective("prepare_surgery"),a.startObjective("complete_procedure"),t.fire("ui:notification",{text:"Surgical table prepared - Beginning emergency procedure...",type:"info",duration:3e3})):a.isObjectiveActive("complete_procedure")?(a.completeObjective("complete_procedure"),t.fire("ui:notification",{text:"SURGERY SUCCESSFUL! Lives saved through expert medical intervention!",type:"success",duration:6e3}),setTimeout(()=>{t.fire("ui:notification",{text:"MEDICAL COMPLEX COMPLETED! All objectives achieved - Excellence in emergency medical response!",type:"success",duration:8e3})},3e3)):a&&a.isComplete("complete_procedure")&&t.fire("ui:notification",{text:"Emergency surgery completed successfully - All medical objectives achieved",type:"info",duration:3e3})):"receptionist_sara"===e?t.fire("ui:notification",{text:'Receptionist Sara: "Emergency keycard is in my desk drawer - help our medical team!"',type:"info",duration:4e3}):"doctor_martinez"===e?t.fire("ui:notification",{text:'Dr. Martinez: "Six critical patients need assessment. Check each bed carefully."',type:"info",duration:4e3}):"surgeon_chen"===e&&t.fire("ui:notification",{text:'Chief Surgeon Chen: "Prep the surgical table - we have a life to save!"',type:"info",duration:4e3})},onUnload(e,t){console.log("[MedicalComplex] Cleaning up complex..."),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function n(e,t,i,a){console.log("[MedicalComplex] Building reception room...");const o=i.create("ReceptionDesk",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,.5,1]},rigidbody:{type:"static"}},position:[0,.5,-4],scale:[4,1,2],tags:["interactive","reception"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.9,1),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}e.addChild(o);const n=i.create("KeycardDrawer",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.2,.2]},rigidbody:{type:"static"}},position:[1.5,.8,-3.5],scale:[.6,.4,.4],tags:["interactive","drawer"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.7,.7),e.emissive=new pc.Color(.1,.3,.1),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}a.addEntityToRoom(n,"reception");const s=i.createNPC("receptionist_sara",{position:[-1,0,-3],displayName:"Receptionist Sara",dialogue:{greeting:"Medical emergency! We need immediate assistance with multiple critical patients!",topics:{emergency:"Six patients arrived from a major accident. Ward access requires emergency keycard.",keycard:"Emergency keycard is in my desk drawer - take it and help our medical team!",patients:"Dr. Martinez is overwhelmed in the emergency ward. Please assist with patient assessment."}}});e.addChild(s),[[3,0,2],[3,0,0],[3,0,-2]].forEach((t,a)=>{const o=i.create(`Chair_${a}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.4,.4,.4]}},position:t,scale:[.8,.8,.8],tags:["furniture"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.6,.8),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}e.addChild(o)});const r=i.createLight("point",{color:new pc.Color(1,1,1),intensity:2,range:12,position:[0,2.5,0]});e.addChild(r)}async function s(e,t,i,a){console.log("[MedicalComplex] Building emergency ward..."),[[-7,.5,-5],[-7,.5,0],[-7,.5,5],[7,.5,-5],[7,.5,0],[7,.5,5]].forEach((e,t)=>{const o=i.create(`Patient_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.2,.4,2]},rigidbody:{type:"static"}},position:e,scale:[2.4,.8,4],tags:["interactive","patient_bed"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.95,.95,.95),e.emissive=t<3?new pc.Color(.3,.1,.1):new pc.Color(.1,.3,.1),e.emissiveIntensity=.2,e.update(),o.model.meshInstances.forEach(t=>t.material=e)}a.addEntityToRoom(o,"emergency_ward")});const o=i.create("MedicalWorkstation",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,.5]},rigidbody:{type:"static"}},position:[0,1,6],scale:[3,2,1],tags:["interactive","workstation"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.5,.8),e.emissive=new pc.Color(.1,.2,.3),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}a.addEntityToRoom(o,"emergency_ward");const n=i.createNPC("doctor_martinez",{position:[0,0,3],displayName:"Dr. Martinez",dialogue:{greeting:"Thank you for coming! We have a mass casualty situation here.",topics:{patients:"Six patients, varying conditions. I need you to assess each one systematically.",priority:"Check the beds - some patients need immediate surgery, others can wait.",data:"Once you've assessed everyone, compile the data at the workstation."}}});e.addChild(n),[{pos:[-5,3,0],color:new pc.Color(1,1,1)},{pos:[5,3,0],color:new pc.Color(1,1,1)},{pos:[0,3,6],color:new pc.Color(.9,.9,1)}].forEach((t,a)=>{const o=i.createLight("point",{color:t.color,intensity:1.5,range:8,position:t.pos});e.addChild(o)})}async function r(e,t,i,a){console.log("[MedicalComplex] Building surgery suite...");const o=i.create("SurgicalTable",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.5,2]},rigidbody:{type:"static"}},position:[0,.5,0],scale:[2,1,4],tags:["interactive","surgical_table"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.9,.9,.9),e.metalness=.8,e.update(),o.model.meshInstances.forEach(t=>t.material=e)}a.addEntityToRoom(o,"surgery_suite"),[[-3,0,-2],[3,0,-2],[-3,0,2],[3,0,2]].forEach((t,a)=>{const o=i.create(`SurgicalEquipment_${a}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.3,height:1.5}},position:t,scale:[.6,1.5,.6],tags:["medical_equipment"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.8,.8),e.metalness=.9,e.update(),o.model.meshInstances.forEach(t=>t.material=e)}e.addChild(o)});const n=i.createLight("spot",{color:new pc.Color(1,1,1),intensity:3,range:8,innerConeAngle:20,outerConeAngle:30,position:[0,3.5,0],rotation:[90,0,0]});e.addChild(n);const s=i.createNPC("surgeon_chen",{position:[-2,0,0],displayName:"Chief Surgeon Chen",dialogue:{greeting:"Excellent timing! We have a critical patient requiring immediate surgery.",topics:{procedure:"Life-threatening internal injuries. Prep the table and verify patient data.",equipment:"All surgical instruments are sterile and ready. Let's save a life.",success:"Outstanding work! Your quick response saved multiple lives today."}}});e.addChild(s)}}}]);