kwabs22
commited on
Commit
Β·
0bc2025
1
Parent(s):
493e68b
First commit after mobile control creation
Browse files- 205.bundle.js +1 -0
- 208.bundle.js +1 -0
- 260.bundle.js +1 -0
- 364.bundle.js +1 -0
- 386.bundle.js +1 -0
- 392.bundle.js +1 -0
- 41.bundle.js +1 -0
- 420.bundle.js +1 -0
- 507.bundle.js +1 -0
- 576.bundle.js +1 -0
- 585.bundle.js +1 -0
- 614.bundle.js +1 -0
- 664.bundle.js +1 -0
- 713.bundle.js +1 -0
- 826.bundle.js +1 -0
- 881.bundle.js +1 -0
- 942.bundle.js +1 -0
- 96.bundle.js +1 -0
- 961.bundle.js +1 -0
- 99.bundle.js +1 -0
- assets/data/catalog.json +433 -0
- bundle.js +0 -0
- index.html +33 -19
205.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"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.sceneRoot.addChild(n);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.sceneRoot.addChild(o)});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.sceneRoot.addChild(o);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.sceneRoot.addChild(o),[[-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)}}}]);
|
208.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[208],{208:(e,t,i)=>{i.r(t),i.d(t,{default:()=>o});const o={id:"nightshift_horror",title:"Nightshift Horror",type:"mission",async build(e,t,i){console.log("[NightshiftHorror] Building security office...");const o=t.createRoom({size:[15,3.5,12],position:[0,0,0],lighting:"dim"});o.name="SecurityOffice",e.root.addChild(o);const a=i.create("SecurityDesk",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,.4,1]},rigidbody:{type:"static"}},position:[0,.8,-3],scale:[4,.8,2]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.2,.1),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.addChild(a),[[-1.5,.7,0],[0,.7,0],[1.5,.7,0]].forEach((e,t)=>{const o=i.create(`Monitor_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.4,.3,.1]},rigidbody:{type:"static"}},position:e,scale:[.8,.6,.2],tags:["interactive","monitor","security_camera"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.1),e.emissive=new pc.Color(0,.3,.5),e.emissiveIntensity=.5,e.update(),o.model.meshInstances.forEach(t=>t.material=e)}a.addChild(o)}),[{pos:[-7,1.5,0],name:"DoorLeft"},{pos:[7,1.5,0],name:"DoorRight"}].forEach(e=>{const t=i.create(e.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.1,1.5,1]},rigidbody:{type:"kinematic"}},position:e.pos,scale:[.2,3,2],tags:["door"]});if(t.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.5,.5),e.metalness=.8,e.update(),t.model.meshInstances.forEach(t=>t.material=e)}o.addChild(t)}),[{pos:[-5.5,2.5,-4],rotation:[0,45,0],name:"SecurityCamera_0"},{pos:[0,2.8,4.5],rotation:[0,180,0],name:"SecurityCamera_1"},{pos:[5.5,2.5,-4],rotation:[0,-45,0],name:"SecurityCamera_2"}].forEach(e=>{const t=i.create(`${e.name}_Mount`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.1,height:.3}},position:e.pos,scale:[.2,.3,.2],tags:["camera_mount"]});if(t.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.metalness=.9,e.update(),t.model.meshInstances.forEach(t=>t.material=e)}const a=i.create(e.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.15,.1,.2]}},position:[0,.2,0],rotation:e.rotation,scale:[.3,.2,.4],tags:["security_camera","interactive"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.2),e.metalness=.8,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}const s=i.create(`${e.name}_Lens`,{components:{model:{type:"sphere"}},position:[0,0,.15],scale:[.3,.3,.3],tags:["camera_lens"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.1),e.emissive=new pc.Color(.2,.8,.2),e.emissiveIntensity=.3,e.update(),s.model.meshInstances.forEach(t=>t.material=e)}a.addChild(s),t.addChild(a),o.addChild(t)});const s=i.create("Flashlight",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.1,height:.3}},position:[1,1.2,-2.5],rotation:[0,0,90],scale:[.2,.3,.2],tags:["interactive","pickup","flashlight"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.8,.2),e.update(),s.model.meshInstances.forEach(t=>t.material=e)}o.addChild(s);const n=i.createLight("spot",{color:new pc.Color(1,.9,.7),intensity:.5,range:5,innerConeAngle:30,outerConeAngle:45,position:[0,2,-2],rotation:[45,0,0]});o.addChild(n);const r=i.create("AmbientSound",{position:[0,0,0],tags:["audio","ambient"]});o.addChild(r);const l=i.create("SpawnPoint",{position:[0,0,3]});return o.addChild(l),o},objectives:[{id:"find_flashlight",name:"Find a Light Source",description:"The power is failing. Find the flashlight on the desk.",type:"simple",rewards:{items:[{id:"flashlight",quantity:1}],experience:50}},{id:"survive_night",name:"Survive Until Dawn",description:"Monitor the security cameras and keep the doors closed",type:"timer",timeLimit:60,rewards:{experience:300,items:[{id:"security_badge",quantity:1}]}},{id:"check_cameras",name:"Monitor Activity",description:"Check all three security cameras (use monitors or interact directly with cameras)",type:"counter",target:3,progress:0,rewards:{experience:75}}],state:{powerLevel:100,flashlightActive:!1,doorsLocked:{left:!0,right:!0},threatsActive:[],camerasChecked:new Set,nightProgress:0,nightCompleted:!1},onLoad(e,t){console.log("[NightshiftHorror] Horror mission started");const i=t.getSystem("objectivemanager");i&&(i.clearAllObjectives(),this.objectives.forEach(e=>{i.defineObjective(e.id,e)}),i.startObjective("find_flashlight")),this.setupInteractions(e,t),this.startPowerDrain(e,t),this.initializePersistentStats(e),e.fire("ui:notification",{text:"Night shift begins... Something feels wrong.",type:"warning",duration:4e3})},setupInteractions(e,t){this.entityInteractHandler=i=>{if("Flashlight"===i&&!this.state.flashlightActive){const i=e.root.findByName("Flashlight");if(i){i.enabled=!1,this.state.flashlightActive=!0;const o=t.getSystem("objectivemanager");o&&(o.completeObjective("find_flashlight"),o.startObjective("survive_night"),o.startObjective("check_cameras")),this.attachFlashlight(e),e.fire("ui:notification",{text:"Flashlight acquired. Use F to toggle.",type:"success"})}}if(i.includes("Monitor_")||i.includes("SecurityCamera_")){let o;if(console.log(`[NightshiftHorror] Interacting with ${i}`),(i.includes("Monitor_")||i.includes("SecurityCamera_"))&&(o=i.split("_")[1]),console.log(`[NightshiftHorror] Camera ID: ${o}, Already checked:`,this.state.camerasChecked.has(o)),this.state.camerasChecked.has(o)){const t=i.includes("Monitor_")?"Monitor":"Camera";e.fire("ui:notification",{text:`${t} ${parseInt(o)+1}: Already monitored`,type:"info",duration:1500})}else{this.state.camerasChecked.add(o);const i=t.getSystem("objectivemanager");i&&(i.updateObjective("check_cameras",this.state.camerasChecked.size),console.log(`[NightshiftHorror] Updated camera objective progress: ${this.state.camerasChecked.size}/3`));const a={0:"West Camera: Movement detected in west corridor...",1:"Center Camera: Static interference... something moved!",2:"East Camera: Shadow passed by the east entrance!"}[o]||`Camera ${parseInt(o)+1}: Feed active`,s=e.root.findByName(`SecurityCamera_${o}`);if(s){const e=s.findByName(`SecurityCamera_${o}_Lens`);e&&this.blinkCameraLens(e)}e.fire("ui:notification",{text:a,type:"warning",duration:3e3})}}},this.updateHandler=()=>{this.state.flashlightActive&&e.keyboard?.wasPressed(pc.KEY_F)&&this.toggleFlashlight(e)},this.doorToggleHandler=t=>{const i=e.root.findByName(t);if(i){const e=this.state.doorsLocked[t.toLowerCase().replace("door","")];e?i.translateLocal(0,3,0):i.translateLocal(0,-3,0),this.state.doorsLocked[t.toLowerCase().replace("door","")]=!e}},e.on("entity:interact",this.entityInteractHandler),e.on("update",this.updateHandler),e.on("door:toggle",this.doorToggleHandler)},attachFlashlight(e){const t=e.root.findByTag("player")[0];if(!t)return;const i=new pc.Entity("PlayerFlashlight");i.addComponent("light",{type:"spot",color:new pc.Color(1,.95,.8),intensity:2,range:15,innerConeAngle:20,outerConeAngle:30,castShadows:!0}),i.setLocalPosition(.3,1.5,.5),i.enabled=!1,t.addChild(i),this.playerFlashlight=i},blinkCameraLens(e){if(!e||!e.model)return;const t=e.model.meshInstances[0].material,i=new pc.StandardMaterial;i.diffuse=new pc.Color(.1,.1,.1),i.emissive=new pc.Color(.8,.2,.2),i.emissiveIntensity=1,i.update(),e.model.meshInstances.forEach(e=>e.material=i),setTimeout(()=>{e&&e.model&&e.model.meshInstances.forEach(e=>e.material=t)},300)},toggleFlashlight(e){this.playerFlashlight&&(this.playerFlashlight.enabled=!this.playerFlashlight.enabled,this.playerFlashlight.enabled&&(this.state.powerLevel-=2),e.fire("ui:notification",{text:"Flashlight: "+(this.playerFlashlight.enabled?"ON":"OFF"),type:"info",duration:1e3}))},initializePersistentStats(e){e.fire("ui:persistent",{id:"nightshift_power",text:`Power: ${this.state.powerLevel}%`,type:"warning",color:new pc.Color(1,.8,.2)}),e.fire("ui:persistent",{id:"nightshift_time",text:"Time: 12:00 AM",type:"info",color:new pc.Color(.7,.9,1)})},startPowerDrain(e,t){this.powerInterval=setInterval(()=>{this.state.powerLevel=Math.max(0,this.state.powerLevel-1),this.state.nightProgress+=1,Math.random()<.1&&this.triggerRandomEvent(e),this.state.nightProgress>=60&&this.completeNight(e,t),this.state.powerLevel<=0&&this.powerFailure(e),this.updatePersistentStats(e)},1e3)},updatePersistentStats(e){let t;t=this.state.powerLevel>50?new pc.Color(.2,.8,.2):this.state.powerLevel>25?new pc.Color(1,.8,.2):new pc.Color(.8,.2,.2),e.fire("ui:persistent",{id:"nightshift_power",text:`Power: ${this.state.powerLevel}%`,type:"warning",color:t});const i=Math.floor(this.state.nightProgress/10),o=0===i?"12:00 AM":`${i}:00 AM`;e.fire("ui:persistent",{id:"nightshift_time",text:`Time: ${o}`,type:"info",color:new pc.Color(.7,.9,1)})},triggerRandomEvent(e){const t=[()=>{e.fire("ui:notification",{text:"You hear footsteps outside...",type:"warning"})},()=>{e.fire("ui:notification",{text:"Something bangs on the left door!",type:"error"})},()=>{const t=e.root.findByName("Light");t&&(t.enabled=!1,setTimeout(()=>t.enabled=!0,200))}];(0,t[Math.floor(Math.random()*t.length)])()},powerFailure(e){e.root.findByTag("light").forEach(e=>{"PlayerFlashlight"!==e.name&&(e.enabled=!1)}),e.fire("ui:notification",{text:"POWER FAILURE! Emergency lighting only!",type:"error",duration:3e3})},completeNight(e,t){this.state.nightCompleted||(this.state.nightCompleted=!0,clearInterval(this.powerInterval),e.fire("ui:notification",{text:"6:00 AM - You survived the night shift!",type:"success",duration:5e3}),e.root.findByTag("light").forEach(e=>{e.enabled=!0}))},onUnload(e,t){console.log("[NightshiftHorror] Mission ended"),this.powerInterval&&(clearInterval(this.powerInterval),this.powerInterval=null),this.entityInteractHandler&&e.off("entity:interact",this.entityInteractHandler),this.updateHandler&&e.off("update",this.updateHandler),this.doorToggleHandler&&e.off("door:toggle",this.doorToggleHandler),e.fire("ui:persistent:remove",{id:"nightshift_power"}),e.fire("ui:persistent:remove",{id:"nightshift_time"}),this.state.nightCompleted=!1,this.state.flashlightActive=!1,this.state.nightProgress=0,this.state.powerLevel=100,this.state.camerasChecked.clear()}}}}]);
|
260.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[260],{260:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});var o=i(96);const n={id:"research_facility",title:"Research Facility",type:"scene",async build(e,t,i){console.log("[ResearchFacility] Building research facility...");const n=new o.n(e,e.systems?.core||{});n.sceneBuilder=t,n.entityFactory=i,this.contaminationTimer=6e5,this.startTime=null,n.createRoom("decontamination",{size:[14,4,10],lighting:"clinical",position:[0,0,0],buildFunction:a,objectives:[{id:"facility_breach",name:"Containment Breach",description:"Respond to biological containment failure",type:"simple",autoStart:!0,rewards:{experience:25}},{id:"get_lab_access",name:"Laboratory Access",description:"Obtain research lab keycard from emergency locker",type:"simple",rewards:{experience:40,items:[{id:"research_keycard",quantity:1}]}}]}),n.createRoom("main_laboratory",{size:[25,5,20],lighting:"research",position:[0,0,0],buildFunction:c,objectives:[{id:"specimen_analysis",name:"Specimen Analysis",description:"Analyze all contaminated specimen containers",type:"counter",target:8,progress:0,rewards:{experience:80},nextObjective:"synthesize_antidote"},{id:"synthesize_antidote",name:"Emergency Antidote",description:"Create antidote using research equipment",type:"simple",prerequisites:["specimen_analysis"],rewards:{experience:100,skillPoints:2,items:[{id:"antidote_sample",quantity:1}]}}]}),n.createRoom("containment_vault",{size:[18,6,15],lighting:"emergency",position:[0,0,0],buildFunction:s,objectives:[{id:"secure_outbreak",name:"Outbreak Containment",description:"Activate emergency containment protocol",type:"sequence",target:["bio_scanner","containment_field","emergency_seal"],progress:0,rewards:{experience:150,skillPoints:3}}]}),n.createRoom("data_archive",{size:[16,4,12],lighting:"archive",position:[0,0,0],buildFunction:r,objectives:[{id:"data_recovery",name:"Critical Data Recovery",description:"Download research data before facility lockdown",type:"simple",rewards:{experience:120,skillPoints:2,items:[{id:"research_data",quantity:1}]}}]}),n.createDoor("decontamination","main_laboratory",{type:"keycard",item:"research_keycard"},{playerSpawnPosition:[-10,0,0]}),n.createDoor("main_laboratory","containment_vault",{type:"objective",id:"specimen_analysis"},{playerSpawnPosition:[0,0,6]}),n.createDoor("main_laboratory","data_archive",{type:"objective",id:"synthesize_antidote"},{playerSpawnPosition:[6,0,0]});const l=await n.build(e,t,i);return l.multiRoom=n,l},onLoad(e,t){console.log("[ResearchFacility] Containment breach protocols active");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.analyzedSpecimens=new Set,this.startTime=Date.now(),this.setupContaminationTimer(e),this.interactionHandler=i=>{this.handleResearchInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler)),e.fire("ui:notification",{text:"BIOHAZARD ALERT: Containment failure - Decontamination protocols active",type:"error",duration:5e3})},setupContaminationTimer(e){this.timerInterval=setInterval(()=>{if(!this.startTime)return;const t=Date.now()-this.startTime,i=Math.max(0,this.contaminationTimer-t),o=Math.floor(i/6e4),n=Math.floor(i%6e4/1e3);i>0?e.fire("ui:notification",{text:`Containment Timer: ${o}:${n.toString().padStart(2,"0")} until facility lockdown`,type:"warning",duration:1e3}):this.onContaminationSpread(e)},15e3)},onContaminationSpread(e){clearInterval(this.timerInterval),e.fire("ui:notification",{text:"FACILITY LOCKDOWN: Contamination has spread beyond containment!",type:"error",duration:8e3})},handleResearchInteraction(e,t,i){console.log("[ResearchFacility] Interaction triggered with:",e);const o=i.getSystem("objectivemanager");if("EmergencyAlert"===e)o&&o.isObjectiveActive("facility_breach")&&(o.completeObjective("facility_breach"),o.startObjective("get_lab_access")),t.fire("ui:notification",{text:"BREACH CONFIRMED: Multiple containment failures in Research Wing",type:"error",duration:4e3});else if("KeycardLocker"===e)o&&o.isObjectiveActive("get_lab_access")&&(this.multiRoom.addItem("research_keycard"),o.completeObjective("get_lab_access"),t.fire("ui:notification",{text:"Research keycard obtained - Laboratory access granted",type:"success",duration:3e3}));else if(e.startsWith("Specimen_")){if("main_laboratory"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("specimen_analysis")){const i=parseInt(e.split("_")[1]);if(!this.analyzedSpecimens.has(e)){this.analyzedSpecimens.add(e);const n=["Class-A pathogen detected","Viral mutation identified","Cellular breakdown observed","Toxic compound isolated","Bacterial resistance confirmed","Enzyme inhibition noted","DNA corruption detected","Critical pathogen strain found"];t.fire("ui:notification",{text:`Analysis ${i+1}: ${n[i]}`,type:"warning",duration:3e3}),o.updateObjective("specimen_analysis",this.analyzedSpecimens.size),console.log(`[ResearchFacility] Analyzed specimen ${e}, total: ${this.analyzedSpecimens.size}/8`)}}}else if("SynthesisEquipment"===e)o&&o.isComplete("specimen_analysis")&&o.isObjectiveActive("synthesize_antidote")?(this.multiRoom.addItem("antidote_sample"),o.completeObjective("synthesize_antidote"),t.fire("ui:notification",{text:"ANTIDOTE SYNTHESIZED: Emergency treatment ready for deployment",type:"success",duration:4e3})):o&&o.isComplete("synthesize_antidote")&&t.fire("ui:notification",{text:"Antidote already synthesized - Focus on containment protocols",type:"info",duration:2e3});else if(["BioScanner","ContainmentField","EmergencySeal"].includes(e)){if("containment_vault"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("secure_outbreak")){const i={BioScanner:"bio_scanner",ContainmentField:"containment_field",EmergencySeal:"emergency_seal"}[e];t.fire("ui:notification",{text:`${i.replace("_"," ")} activated`,type:"info",duration:2e3}),o.updateObjective("secure_outbreak",i)}}else"DataTerminal"===e&&"data_archive"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("data_recovery")&&(this.multiRoom.addItem("research_data"),o.completeObjective("data_recovery"),t.fire("ui:notification",{text:"Critical research data downloaded - Facility knowledge preserved",type:"success",duration:4e3}))},onUnload(e,t){console.log("[ResearchFacility] Decontamination sequence initiated..."),this.timerInterval&&clearInterval(this.timerInterval),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function a(e,t,i,o){console.log("[ResearchFacility] Building decontamination chamber...");const n=i.create("EmergencyAlert",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,.2]},rigidbody:{type:"static"}},position:[0,2,-4],scale:[2,2,.4],tags:["interactive","alert"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.2,.2),e.emissive=new pc.Color(.4,.1,.1),e.emissiveIntensity=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n);const a=i.create("KeycardLocker",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.4,.8,.3]},rigidbody:{type:"static"}},position:[4,1.5,-3],scale:[.8,1.6,.6],tags:["interactive","locker"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.4,.6),e.emissive=new pc.Color(.1,.2,.3),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a),[[-3,1.5,0],[0,1.5,0],[3,1.5,0]].forEach((t,o)=>{const n=i.create(`DeconShower_${o}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.5,height:3}},position:t,scale:[1,3,1],tags:["decon_equipment"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.8,.9),e.metalness=.7,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)});const c=i.createNPC("safety_officer_chen",{position:[-2,0,-2],displayName:"Safety Officer Chen",dialogue:{greeting:"Emergency protocols are in effect! We have a major containment breach in the research wing.",topics:{breach:"Multiple specimens have been compromised - this could be catastrophic.",keycard:"Emergency access codes are in the wall locker - you'll need them for the lab.",timer:"We have limited time before the contamination spreads beyond containment."}}});o.sceneRoot.addChild(c),[{pos:[0,3.5,0],color:new pc.Color(.9,.9,1)},{pos:[-3,3.5,0],color:new pc.Color(.9,.9,1)},{pos:[3,3.5,0],color:new pc.Color(.9,.9,1)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:2,range:8,position:t.pos});e.addChild(n)})}async function c(e,t,i,o){console.log("[ResearchFacility] Building main laboratory..."),[[-10,1,-8],[-4,1,-8],[4,1,-8],[10,1,-8],[-10,1,8],[-4,1,8],[4,1,8],[10,1,8]].forEach((e,t)=>{const n=i.create(`Specimen_${t}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.6,height:1.5},rigidbody:{type:"static"}},position:e,scale:[1.2,1.5,1.2],tags:["interactive","specimen"]});if(n.model){const e=new pc.StandardMaterial,i=t%2==0;e.diffuse=i?new pc.Color(.6,.8,.2):new pc.Color(.2,.6,.8),e.emissive=i?new pc.Color(.2,.3,.05):new pc.Color(.05,.2,.3),e.emissiveIntensity=.4,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n)});const n=i.create("SynthesisEquipment",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,1.5]},rigidbody:{type:"static"}},position:[0,1.5,0],scale:[4,3,3],tags:["interactive","equipment"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.4,.5),e.emissive=new pc.Color(.1,.3,.4),e.metalness=.6,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n),[[-8,.5,-4],[8,.5,-4],[-8,.5,4],[8,.5,4]].forEach((t,o)=>{const n=i.create(`ResearchBench_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,.5,1]}},position:t,scale:[6,1,2],tags:["equipment"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.7,.8),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)});const a=i.createNPC("dr_martinez",{position:[6,0,0],displayName:"Dr. Martinez",dialogue:{greeting:"Thank goodness you're here! The specimens are showing unprecedented mutation rates.",topics:{analysis:"We need to analyze every contaminated specimen to understand the pathogen.",antidote:"Once we have the full analysis, we can synthesize a broad-spectrum antidote.",containment:"The vault systems are failing - we need that antidote before total containment loss."}}});o.sceneRoot.addChild(a),[{pos:[0,4.5,0],color:new pc.Color(.9,.95,1)},{pos:[-8,4.5,0],color:new pc.Color(.9,.95,1)},{pos:[8,4.5,0],color:new pc.Color(.9,.95,1)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:2.2,range:12,position:t.pos});e.addChild(n)})}async function s(e,t,i,o){console.log("[ResearchFacility] Building containment vault...");const n=i.create("BioScanner",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.8,height:2},rigidbody:{type:"static"}},position:[-6,1,-4],scale:[1.6,2,1.6],tags:["interactive","scanner"]}),a=i.create("ContainmentField",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2,.5]},rigidbody:{type:"static"}},position:[0,2,-4],scale:[2,4,1],tags:["interactive","field_generator"]}),c=i.create("EmergencySeal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,.3]},rigidbody:{type:"static"}},position:[6,1,-4],scale:[3,2,.6],tags:["interactive","seal_control"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.7,.3),e.emissive=new pc.Color(.1,.3,.15),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.8),e.emissive=new pc.Color(.15,.15,.4),e.emissiveIntensity=.6,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}if(c.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.3,.2),e.emissive=new pc.Color(.4,.15,.1),e.update(),c.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n),o.sceneRoot.addChild(a),o.sceneRoot.addChild(c),[[-6,1.5,4],[-2,1.5,4],[2,1.5,4],[6,1.5,4]].forEach((t,o)=>{const n=i.create(`ContainmentCell_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1.5,1.5]}},position:t,scale:[3,3,3],tags:["containment"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.4),e.emissive=new pc.Color(.2,.1,.1),e.emissiveIntensity=.3,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)}),[{pos:[0,5.5,0],color:new pc.Color(1,.4,.4)},{pos:[-6,4.5,0],color:new pc.Color(1,.4,.4)},{pos:[6,4.5,0],color:new pc.Color(1,.4,.4)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:1.8,range:10,position:t.pos});e.addChild(n)})}async function r(e,t,i,o){console.log("[ResearchFacility] Building data archive...");const n=i.create("DataTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,1]},rigidbody:{type:"static"}},position:[0,1.5,-4],scale:[4,3,2],tags:["interactive","terminal"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.3,.4),e.emissive=new pc.Color(.1,.2,.3),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n),[[-6,1.5,0],[6,1.5,0],[-6,1.5,4],[6,1.5,4]].forEach((t,o)=>{const n=i.create(`ServerRack_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1.5,.5]}},position:t,scale:[2,3,1],tags:["server"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.15,.15,.15),e.emissive=new pc.Color(.05,.15,.1),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)});const a=i.createLight("point",{color:new pc.Color(.6,.8,1),intensity:1.5,range:12,position:[0,3.5,0]});e.addChild(a)}}}]);
|
364.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[364],{364:(e,t,o)=>{o.r(t),o.d(t,{default:()=>r});var i=o(96);const r={id:"security_complex",title:"Security Complex",type:"scene",async build(e,t,o){console.log("[SecurityComplex] Building security complex...");const r=new i.n(e,e.systems?.core||{});r.sceneBuilder=t,r.entityFactory=o,this.timeLimit=3e5,this.startTime=null,r.createRoom("security_office",{size:[15,3.5,12],lighting:"dim",position:[0,0,0],buildFunction:c,objectives:[{id:"security_breach",name:"Security Breach Response",description:"Investigate the security breach alert",type:"simple",autoStart:!0,rewards:{experience:30}},{id:"get_desk_keycard",name:"Emergency Access",description:"Find the emergency keycard in the security desk",type:"simple",rewards:{experience:40,items:[{id:"desk_keycard",quantity:1}]}}]}),r.createRoom("main_corridor",{size:[40,4,8],lighting:"corridor",position:[0,0,0],buildFunction:n,objectives:[{id:"patrol_corridor",name:"Security Patrol",description:"Check all access points in the corridor",type:"counter",target:6,progress:0,rewards:{experience:60},nextObjective:"find_emergency_key"},{id:"find_emergency_key",name:"Emergency Key Location",description:"Locate the emergency access key",type:"simple",prerequisites:["patrol_corridor"],rewards:{experience:50,items:[{id:"emergency_key",quantity:1}]}}]}),r.createRoom("camera_control",{size:[12,3,10],lighting:"control_room",position:[0,0,0],buildFunction:s,objectives:[{id:"security_clearance",name:"Security Clearance",description:"Obtain elevated security permissions",type:"simple",autoStart:!0,rewards:{experience:80,items:[{id:"security_clearance",quantity:1}]}}]}),r.createRoom("basement_storage",{size:[16,3,14],lighting:"storage",position:[0,0,0],buildFunction:a,objectives:[{id:"storage_search",name:"Storage Investigation",description:"Search storage crates for evidence",type:"counter",target:8,progress:0,rewards:{experience:90}}]}),r.createRoom("server_room",{size:[10,3,12],lighting:"server_room",position:[0,0,0],buildFunction:l,objectives:[{id:"access_mainframe",name:"Mainframe Access",description:"Access the master security terminal",type:"simple",rewards:{experience:150,skillPoints:3,items:[{id:"security_override",quantity:1}]}},{id:"lockdown_protocol",name:"Emergency Lockdown",description:"Execute facility-wide security lockdown",type:"sequence",target:["control_room_key","storage_access_key","master_override"],progress:0,rewards:{experience:200,skillPoints:5}}]}),r.createDoor("security_office","main_corridor",{type:"objective",id:"get_desk_keycard"},{playerSpawnPosition:[-15,0,0]}),r.createDoor("main_corridor","camera_control",{type:"objective",id:"find_emergency_key"},{playerSpawnPosition:[0,0,4]}),r.createDoor("main_corridor","basement_storage",{type:"objective",id:"find_emergency_key"},{playerSpawnPosition:[0,0,6]}),r.createDoor("camera_control","server_room",{type:"objective",id:"security_clearance"},{playerSpawnPosition:[0,0,5]}),r.createDoor("server_room","basement_storage",{type:"none"},{playerSpawnPosition:[6,0,0]});const d=await r.build(e,t,o);return d.multiRoom=r,d},onLoad(e,t){console.log("[SecurityComplex] Security protocols activated");const o=e.root.findByTag("scene_root")[0];o&&o.multiRoom&&(o.multiRoom.onLoad(e,t),this.multiRoom=o.multiRoom,this.startTime=Date.now(),this.setupTimer(e),this.interactionHandler=o=>{this.handleSecurityInteraction(o,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler)),e.fire("ui:notification",{text:"SECURITY ALERT: Unauthorized access detected - 5 minute response window",type:"error",duration:6e3})},setupTimer(e){this.timerInterval=setInterval(()=>{if(!this.startTime)return;const t=Date.now()-this.startTime,o=Math.max(0,this.timeLimit-t),i=Math.floor(o/6e4),r=Math.floor(o%6e4/1e3);o>0?e.fire("ui:notification",{text:`Security Response Timer: ${i}:${r.toString().padStart(2,"0")}`,type:"warning",duration:1e3}):this.onTimeExpired(e)},1e4)},onTimeExpired(e){clearInterval(this.timerInterval),e.fire("ui:notification",{text:"TIME EXPIRED: Security lockdown failed - Facility compromised!",type:"error",duration:8e3})},handleSecurityInteraction(e,t,o){console.log("[SecurityComplex] Interaction triggered with:",e);const i=o.getSystem("objectivemanager");if("SecurityDesk"===e)i&&i.isObjectiveActive("security_breach")&&(i.completeObjective("security_breach"),i.startObjective("get_desk_keycard")),t.fire("ui:notification",{text:"ALERT: Multiple breach points detected across facility",type:"error",duration:4e3});else if("DeskDrawer"===e)i&&i.isObjectiveActive("get_desk_keycard")&&(this.multiRoom.addItem("desk_keycard"),i.completeObjective("get_desk_keycard"),t.fire("ui:notification",{text:"Emergency keycard obtained - Corridor access granted",type:"success",duration:3e3}));else if(e.startsWith("AccessPoint_")){if("main_corridor"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("patrol_corridor")){const o=parseInt(e.split("_")[1]),r=["COMPROMISED","SECURE","BREACH ATTEMPT","OFFLINE","TAMPERED","CRITICAL"];t.fire("ui:notification",{text:`Access Point ${o+1}: ${r[o]}`,type:o%2==0?"error":"warning",duration:2e3}),i.updateObjective("patrol_corridor")}}else if("EmergencyKeyCabinet"===e)i&&i.isComplete("patrol_corridor")&&i.isObjectiveActive("find_emergency_key")&&(this.multiRoom.addItem("emergency_key"),i.completeObjective("find_emergency_key"),t.fire("ui:notification",{text:"Emergency access key acquired - Basement storage unlocked",type:"success",duration:3e3}));else if("MasterControlTerminal"===e)"camera_control"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("security_clearance")&&(this.multiRoom.addItem("security_clearance"),i.completeObjective("security_clearance"),t.fire("ui:notification",{text:"Security clearance obtained - Server room access granted",type:"success",duration:3e3}));else if(e.startsWith("StorageCrate_")){if("basement_storage"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("storage_search")){const o=parseInt(e.split("_")[1]),r=["Suspicious electronic devices","Unauthorized access cards","Data storage devices","Communication equipment","Security bypass tools","Encrypted documents","Network infiltration gear","Master override codes"];t.fire("ui:notification",{text:`Evidence found: ${r[o]}`,type:"info",duration:3e3}),i.updateObjective("storage_search")}}else if("MainframeTerminal"===e)"server_room"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("access_mainframe")&&(this.multiRoom.addItem("security_override"),i.completeObjective("access_mainframe"),i.startObjective("lockdown_protocol"),t.fire("ui:notification",{text:"MAINFRAME ACCESS GRANTED - Initiating emergency protocols",type:"success",duration:4e3}));else if(["ControlRoomKey","StorageAccessKey","MasterOverride"].includes(e)){if("server_room"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("lockdown_protocol")){const o={ControlRoomKey:"control_room_key",StorageAccessKey:"storage_access_key",MasterOverride:"master_override"}[e];t.fire("ui:notification",{text:`${o.replace("_"," ")} activated`,type:"success",duration:2e3}),i.updateObjective("lockdown_protocol",o)}}else"security_chief_williams"===e&&t.fire("ui:notification",{text:'Security Chief Williams: "Multiple breach points detected! Check the desk for emergency keycard!"',type:"error",duration:4e3})},onUnload(e,t){console.log("[SecurityComplex] Security systems shutting down..."),this.timerInterval&&clearInterval(this.timerInterval),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function c(e,t,o,i){console.log("[SecurityComplex] Building security office...");const r=o.create("SecurityDesk",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,.5,1]},rigidbody:{type:"static"}},position:[0,.5,-4],scale:[4,1,2],tags:["interactive","desk"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.4),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r);const c=o.create("DeskDrawer",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.2,.2]},rigidbody:{type:"static"}},position:[1.5,1.2,-3.5],scale:[.6,.4,.4],tags:["interactive","drawer"]});if(c.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.4),e.emissive=new pc.Color(.1,.1,.2),e.update(),c.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(c),console.log("[SecurityComplex] Created drawer:",c.name,"Position:",c.getPosition(),"Tags:",Array.from(c.tags._list||[])),[[-3,1.2,-3.5],[0,1.2,-3.5],[3,1.2,-3.5]].forEach((t,i)=>{const r=o.create(`SecurityMonitor_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,.5,.1]}},position:t,scale:[1.6,1,.2],tags:["monitor"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.1),e.emissive=new pc.Color(.1,.3,.1),e.emissiveIntensity=.5,e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r)});const n=o.createNPC("security_chief_williams",{position:[-2,0,-2],displayName:"Security Chief Williams",dialogue:{greeting:"Code Red situation! We've got multiple security breaches across the facility.",topics:{breach:"Someone's systematically compromising our access points. We need immediate action.",keycard:"Emergency protocols are active - get the keycard from my desk drawer.",corridor:"Start with the main corridor - check every access point for signs of tampering."}}});e.addChild(n),console.log("[SecurityComplex] Created NPC:",n.name,"Position:",n.getPosition(),"Tags:",Array.from(n.tags._list||[]));const s=o.createLight("point",{color:new pc.Color(.6,.6,.8),intensity:1.5,range:10,position:[0,3,0]});e.addChild(s)}async function n(e,t,o,i){console.log("[SecurityComplex] Building main corridor..."),[[-18,1.5,3],[-10,1.5,3],[-2,1.5,3],[2,1.5,3],[10,1.5,3],[18,1.5,3]].forEach((e,t)=>{const r=o.create(`AccessPoint_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.5,1,.2]},rigidbody:{type:"static"}},position:e,scale:[1,2,.4],tags:["interactive","access_point"]});if(r.model){const e=new pc.StandardMaterial,o=t%2==0;e.diffuse=o?new pc.Color(.6,.2,.2):new pc.Color(.2,.6,.2),e.emissive=o?new pc.Color(.2,.05,.05):new pc.Color(.05,.2,.05),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(r)});const r=o.create("EmergencyKeyCabinet",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.5,1,.3]},rigidbody:{type:"static"}},position:[0,1,-3],scale:[1,2,.6],tags:["interactive","key_cabinet"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.7,.2),e.emissive=new pc.Color(.2,.2,.05),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(r),[[-15,3.5,0],[-5,3.5,0],[5,3.5,0],[15,3.5,0]].forEach((t,i)=>{const r=o.create(`SecurityCamera_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.2,.3]}},position:t,scale:[.6,.4,.6],tags:["camera"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.2),e.emissive=new pc.Color(.1,.05,.05),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r)}),[{pos:[-15,3.5,0],color:new pc.Color(.8,.8,.9)},{pos:[-5,3.5,0],color:new pc.Color(.8,.8,.9)},{pos:[5,3.5,0],color:new pc.Color(.8,.8,.9)},{pos:[15,3.5,0],color:new pc.Color(.8,.8,.9)}].forEach((t,i)=>{const r=o.createLight("point",{color:t.color,intensity:1.2,range:8,position:t.pos});e.addChild(r)})}async function s(e,t,o,i){console.log("[SecurityComplex] Building camera control room...");const r=o.create("MasterControlTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,1]},rigidbody:{type:"static"}},position:[0,1,0],scale:[4,2,2],tags:["interactive","terminal"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.3,.4),e.emissive=new pc.Color(.1,.2,.3),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(r),[[-4,2,-3],[0,2,-3],[4,2,-3]].forEach((t,i)=>{const r=o.create(`CameraDisplay_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.8,.1]}},position:t,scale:[2,1.6,.2],tags:["display"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.1),e.emissive=new pc.Color(.2,.3,.2),e.emissiveIntensity=.3,e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r)});const c=o.createLight("point",{color:new pc.Color(.6,.8,1),intensity:2,range:10,position:[0,2.5,0]});e.addChild(c)}async function a(e,t,o,i){console.log("[SecurityComplex] Building basement storage..."),[[-6,.5,-5],[-2,.5,-5],[2,.5,-5],[6,.5,-5],[-6,.5,5],[-2,.5,5],[2,.5,5],[6,.5,5]].forEach((e,t)=>{const r=o.create(`StorageCrate_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,.8,.8]},rigidbody:{type:"static"}},position:e,scale:[1.6,1.6,1.6],tags:["interactive","crate"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(r)});const r=o.createLight("point",{color:new pc.Color(.7,.6,.5),intensity:1,range:12,position:[0,2.5,0]});e.addChild(r)}async function l(e,t,o,i){console.log("[SecurityComplex] Building server room..."),[[-3,1,-4],[3,1,-4],[-3,1,0],[3,1,0],[-3,1,4],[3,1,4]].forEach((t,i)=>{const r=o.create(`ServerRack_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,1.5,.4]}},position:t,scale:[1.6,3,.8],tags:["server"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.2),e.emissive=new pc.Color(.05,.1,.05),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r)});const r=o.create("MainframeTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,.5]},rigidbody:{type:"static"}},position:[0,1,5],scale:[3,2,1],tags:["interactive","mainframe"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.3,.5),e.emissive=new pc.Color(.05,.15,.25),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(r),[{name:"ControlRoomKey",pos:[-2,1,2],color:new pc.Color(.4,.2,.2)},{name:"StorageAccessKey",pos:[2,1,2],color:new pc.Color(.2,.4,.2)},{name:"MasterOverride",pos:[0,1,-2],color:new pc.Color(.2,.2,.4)}].forEach((e,t)=>{const r=o.create(e.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.5,.8,.3]},rigidbody:{type:"static"}},position:e.pos,scale:[1,1.6,.6],tags:["interactive","lockdown_terminal"]});if(r.model){const t=new pc.StandardMaterial;t.diffuse=e.color,t.emissive=new pc.Color(.3*e.color.r,.3*e.color.g,.3*e.color.b),t.update(),r.model.meshInstances.forEach(e=>e.material=t)}i.sceneRoot.addChild(r)});const c=o.createLight("point",{color:new pc.Color(.6,.7,1),intensity:1.8,range:10,position:[0,2.5,0]});e.addChild(c)}}}]);
|
386.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[386],{386:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});var o=i(96);const n={id:"industrial_facility",title:"Industrial Facility",type:"scene",async build(e,t,i){console.log("[IndustrialFacility] Building industrial facility...");const n=new o.n(e,e.systems?.core||{});n.sceneBuilder=t,n.entityFactory=i,n.createRoom("entry_hall",{size:[18,5,14],lighting:"industrial",position:[0,0,0],buildFunction:a,objectives:[{id:"facility_entry",name:"Facility Access",description:"Report to the security checkpoint",type:"simple",autoStart:!0,rewards:{experience:25}},{id:"get_facility_badge",name:"Obtain Access Badge",description:"Get security clearance from the checkpoint",type:"simple",rewards:{experience:40,items:[{id:"facility_badge",quantity:1}]}}]}),n.createRoom("control_room",{size:[16,4,12],lighting:"control_room",position:[0,0,0],buildFunction:r,objectives:[{id:"monitor_systems",name:"System Monitoring",description:"Check all facility monitoring stations",type:"counter",target:4,progress:0,rewards:{experience:60},nextObjective:"diagnose_problem"},{id:"diagnose_problem",name:"System Diagnosis",description:"Identify the generator malfunction",type:"simple",prerequisites:["monitor_systems"],rewards:{experience:80,skillPoints:1}}]}),n.createRoom("generator_bay",{size:[25,6,20],lighting:"emergency",position:[0,0,0],buildFunction:s,objectives:[{id:"repair_generator",name:"Generator Repair",description:"Restore primary power systems",type:"sequence",target:["cooling_system","electrical_panel","main_generator"],progress:0,rewards:{experience:120,skillPoints:2}}]}),n.createRoom("maintenance_tunnel",{size:[30,3,8],lighting:"dim",position:[0,0,0],buildFunction:c,objectives:[{id:"emergency_sequence",name:"Emergency Protocol",description:"Execute the facility emergency sequence",type:"sequence",target:["valve_1","valve_2","emergency_release"],progress:0,rewards:{experience:150,skillPoints:3,items:[{id:"facility_override_key",quantity:1}]}}]}),n.createDoor("entry_hall","control_room",{type:"none"},{playerSpawnPosition:[0,0,5]}),n.createDoor("control_room","generator_bay",{type:"none"},{playerSpawnPosition:[0,0,8]}),n.createDoor("generator_bay","maintenance_tunnel",{type:"none"},{playerSpawnPosition:[0,0,3]});const l=await n.build(e,t,i);return l.multiRoom=n,l},onLoad(e,t){console.log("[IndustrialFacility] Facility systems online");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.interactionHandler=i=>{this.handleFacilityInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler)),e.fire("ui:notification",{text:"Industrial Facility - Critical Systems Failure Detected",type:"error",duration:4e3})},handleFacilityInteraction(e,t,i){const o=i.getSystem("objectivemanager");if("SecurityCheckpoint"===e)o&&o.isObjectiveActive("facility_entry")&&(o.completeObjective("facility_entry"),o.startObjective("get_facility_badge")),t.fire("ui:notification",{text:"Security: Emergency protocols active - Generator failure imminent!",type:"warning",duration:4e3});else if("BadgeDispenser"===e)o&&o.isObjectiveActive("get_facility_badge")&&(this.multiRoom.addItem("facility_badge"),o.completeObjective("get_facility_badge"),t.fire("ui:notification",{text:"Access badge obtained - Control room access granted",type:"success",duration:3e3}));else if(e.startsWith("MonitorStation_")){if("control_room"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("monitor_systems")){const i=parseInt(e.split("_")[1]),n=["PRIMARY GENERATOR: Critical temperature warning","COOLING SYSTEM: Pump failure detected","ELECTRICAL GRID: Power fluctuations increasing","BACKUP SYSTEMS: Manual activation required"];t.fire("ui:notification",{text:n[i],type:"warning",duration:3e3}),o.updateObjective("monitor_systems")}}else if("DiagnosticConsole"===e)o&&o.isComplete("monitor_systems")&&o.isObjectiveActive("diagnose_problem")&&(o.completeObjective("diagnose_problem"),t.fire("ui:notification",{text:"DIAGNOSIS: Generator cooling failure - Manual repair required",type:"error",duration:4e3}));else if(["CoolingSystem","ElectricalPanel","MainGenerator"].includes(e)){if("generator_bay"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("repair_generator")){const i={CoolingSystem:"cooling_system",ElectricalPanel:"electrical_panel",MainGenerator:"main_generator"}[e];t.fire("ui:notification",{text:`${i.replace("_"," ")} repaired`,type:"success",duration:2e3}),o.updateObjective("repair_generator",i)}}else if(["Valve1","Valve2","EmergencyRelease"].includes(e)){if("maintenance_tunnel"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("emergency_sequence")){const i={Valve1:"valve_1",Valve2:"valve_2",EmergencyRelease:"emergency_release"}[e];t.fire("ui:notification",{text:`${i.replace("_"," ")} activated`,type:"info",duration:2e3}),o.updateObjective("emergency_sequence",i)}}else"guard_rodriguez"===e?t.fire("ui:notification",{text:'Guard Rodriguez: "Emergency protocols active - get your badge from the dispenser!"',type:"info",duration:4e3}):"engineer_johnson"===e&&t.fire("ui:notification",{text:'Chief Engineer Johnson: "Generator failure imminent! Check all monitoring stations!"',type:"warning",duration:4e3})},onUnload(e,t){console.log("[IndustrialFacility] Facility shutdown sequence initiated..."),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function a(e,t,i,o){console.log("[IndustrialFacility] Building entry hall...");const n=i.create("SecurityCheckpoint",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,1]},rigidbody:{type:"static"}},position:[0,1,-5],scale:[4,2,2],tags:["interactive","security"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.3),e.emissive=new pc.Color(.1,.1,.2),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n);const a=i.create("BadgeDispenser",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.5,.2]},rigidbody:{type:"static"}},position:[2,1,-4],scale:[.6,1,.4],tags:["interactive","dispenser"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.emissive=new pc.Color(.1,.2,.1),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a);const r=i.createNPC("guard_rodriguez",{position:[-2,0,-4],displayName:"Security Guard Rodriguez",dialogue:{greeting:"Emergency situation! Main generator is failing - we need immediate assistance.",topics:{emergency:"Power grid instability detected. Control room access requires clearance.",badge:"Get your facility badge from the dispenser - you'll need it for restricted areas.",generator:"Engineering team is overwhelmed. We need someone with technical skills."}}});e.addChild(r);const s=i.create("SafetyEquipment",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,.5]}},position:[6,1,0],scale:[2,2,1],tags:["equipment"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.6,.2),e.update(),s.model.meshInstances.forEach(t=>t.material=e)}e.addChild(s),[{pos:[0,4,0],color:new pc.Color(.9,.9,.8)},{pos:[-6,4,0],color:new pc.Color(.9,.9,.8)},{pos:[6,4,0],color:new pc.Color(.9,.9,.8)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:1.8,range:10,position:t.pos});e.addChild(n)})}async function r(e,t,i,o){console.log("[IndustrialFacility] Building control room..."),[[-6,1,-4],[6,1,-4],[-6,1,4],[6,1,4]].forEach((e,t)=>{const n=i.create(`MonitorStation_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,.5]},rigidbody:{type:"static"}},position:e,scale:[2,2,1],tags:["interactive","monitor"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.2,.3),e.emissive=new pc.Color(.1,.3,.5),e.emissiveIntensity=.5,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n)});const n=i.create("DiagnosticConsole",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,1]},rigidbody:{type:"static"}},position:[0,1,0],scale:[4,2,2],tags:["interactive","console"]});if(console.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.4),e.emissive=new pc.Color(.2,.4,.6),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n);const a=i.createNPC("engineer_johnson",{position:[0,0,3],displayName:"Chief Engineer Johnson",dialogue:{greeting:"Thank goodness you're here! Our monitoring systems are going crazy.",topics:{systems:"Check all four monitoring stations - we need a complete status report.",generator:"Primary generator is overheating. Cooling system failure imminent.",diagnosis:"Use the central console once you've gathered all the data."}}});e.addChild(a);const r=i.createLight("point",{color:new pc.Color(.7,.8,1),intensity:2,range:12,position:[0,3,0]});e.addChild(r)}async function s(e,t,i,o){console.log("[IndustrialFacility] Building generator bay...");const n=i.create("MainGenerator",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:3,height:4},rigidbody:{type:"static"}},position:[0,2,0],scale:[6,4,6],tags:["interactive","generator"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.5,.5),e.emissive=new pc.Color(.3,.1,.1),e.emissiveIntensity=.3,e.metalness=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n);const a=i.create("CoolingSystem",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,2,1]},rigidbody:{type:"static"}},position:[-8,2,0],scale:[4,4,2],tags:["interactive","cooling"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.5,.7),e.emissive=new pc.Color(.1,.2,.3),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a);const r=i.create("ElectricalPanel",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2,.2]},rigidbody:{type:"static"}},position:[8,2,-6],scale:[2,4,.4],tags:["interactive","panel"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.4),e.emissive=new pc.Color(.2,.2,.1),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(r),[{pos:[0,5,0],color:new pc.Color(1,.3,.3)},{pos:[-8,4,0],color:new pc.Color(1,.3,.3)},{pos:[8,4,0],color:new pc.Color(1,.3,.3)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:1.5,range:8,position:t.pos});e.addChild(n)})}async function c(e,t,i,o){console.log("[IndustrialFacility] Building maintenance tunnel...");const n=i.create("Valve1",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.5,height:.3},rigidbody:{type:"static"}},position:[-10,1.5,0],scale:[1,.6,1],tags:["interactive","valve"]}),a=i.create("Valve2",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.5,height:.3},rigidbody:{type:"static"}},position:[0,1.5,0],scale:[1,.6,1],tags:["interactive","valve"]}),r=i.create("EmergencyRelease",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.5,.5,.3]},rigidbody:{type:"static"}},position:[10,1.5,0],scale:[1,1,.6],tags:["interactive","release"]});if([n,a].forEach(e=>{if(e.model){const t=new pc.StandardMaterial;t.diffuse=new pc.Color(.6,.3,.1),t.metalness=.9,t.update(),e.model.meshInstances.forEach(e=>e.material=t)}o.sceneRoot.addChild(e)}),r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.2,.2),e.emissive=new pc.Color(.2,.05,.05),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(r),[[-12,2.5,0],[-8,2.5,0],[-4,2.5,0],[4,2.5,0],[8,2.5,0],[12,2.5,0]].forEach((t,o)=>{const n=i.create(`Pipe_${o}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.2,height:.5}},position:t,rotation:[0,0,90],scale:[.4,1,.4],tags:["pipe"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.4),e.metalness=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)}),[{pos:[-10,2.8,0],color:new pc.Color(.8,.8,.6)},{pos:[0,2.8,0],color:new pc.Color(.8,.8,.6)},{pos:[10,2.8,0],color:new pc.Color(.8,.8,.6)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:1,range:6,position:t.pos});e.addChild(n)})}}}]);
|
392.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[392],{392:(e,t,i)=>{i.r(t),i.d(t,{default:()=>a});const a={id:"supply_collection",title:"Supply Collection: Warehouse Operations",type:"mission",objectives:[{id:"warehouse_arrival",name:"Report to Warehouse",description:"Check in with the warehouse supervisor",type:"simple",rewards:{experience:10}},{id:"collect_supplies",name:"Collect Supply Items",description:"Gather items from storage crates around the warehouse",type:"counter",target:7,rewards:{experience:50}},{id:"repair_equipment",name:"Repair Equipment",description:"Use tools at the maintenance workbench",type:"simple",rewards:{experience:25}},{id:"deliver_package",name:"Final Delivery",description:"Deliver the special package to complete operations",type:"simple",rewards:{experience:75,items:[{id:"completion_badge",quantity:1}]}}],state:{cratesCollected:new Set,workbenchUsed:!1,packageDelivered:!1,supervisorSpoken:!1},async build(e,t,i){console.log("[SupplyCollection] Building warehouse operations mission...");const a=t.createRoom({size:[30,5,25],position:[0,0,0],lighting:"ambient"});a.name="WarehouseRoom",e.root.addChild(a);const o=i.createNPC("warehouse_supervisor",{position:[-12,0,-10],displayName:"Supervisor Chen",dialogue:{greeting:"Welcome to the warehouse! Ready for your supply collection duties?",topics:{duties:"Collect items from the storage crates and use the repair tools.",status:"How's the collection going? Don't forget the maintenance tasks!",completion:"Excellent work! The warehouse operations are running smoothly."}}});o.tags.add("warehouse_staff"),a.addChild(o);const s=i.createNPC("storage_clerk",{position:[12,0,8],displayName:"Storage Clerk Anna",dialogue:{greeting:"I manage all the storage operations here.",topics:{inventory:"Check all the crates - they contain various supplies we need.",package:"There's a special delivery package in the golden crate when you're ready.",help:"Need anything? I can guide you to the storage areas."}}});s.tags.add("warehouse_staff"),a.addChild(s);const n=["health_potion","stamina_potion","wrench","security_keycard","health_potion","medical_supplies","stamina_potion"];this.storageCrates=[],[[-10,0,-5],[10,0,-5],[0,0,10],[-8,0,5],[8,0,5],[-5,0,-2],[5,0,-2]].forEach((e,t)=>{const o=i.create(`StorageCrate_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,1]},rigidbody:{type:"static"}},position:[e[0],e[1]+1,e[2]],scale:[2,2,2],tags:["interactive","storage_crate"]});o._interactionData={type:"storage_crate",crateIndex:t,itemId:n[t],isEmpty:!1},setTimeout(()=>{if(o.model&&o.model.meshInstances){const e=new pc.StandardMaterial;switch(n[t]){case"health_potion":e.diffuse=new pc.Color(.8,.2,.2);break;case"stamina_potion":e.diffuse=new pc.Color(.2,.2,.8);break;case"wrench":e.diffuse=new pc.Color(.6,.6,.6);break;case"security_keycard":e.diffuse=new pc.Color(.8,.8,.2);break;default:e.diffuse=new pc.Color(.6,.4,.2)}e.update(),o.model.meshInstances.forEach(t=>t.material=e)}},100),a.addChild(o),this.storageCrates.push(o)});const r=i.create("MaintenanceWorkbench",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,.5,1]},rigidbody:{type:"static"}},position:[-5,.5,10],scale:[3,1,2],tags:["interactive","workbench"]});r._interactionData={type:"workbench",used:!1},setTimeout(()=>{if(r.model&&r.model.meshInstances){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.5),e.metalness=.8,e.update(),r.model.meshInstances.forEach(t=>t.material=e)}},100),a.addChild(r);const c=i.create("DeliveryBox",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,1]},rigidbody:{type:"static"}},position:[0,1,8],scale:[2,2,2],tags:["interactive","delivery_point"]});return c._interactionData={type:"delivery",completed:!1},setTimeout(()=>{if(c.model&&c.model.meshInstances){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.6,.2),e.emissive=new pc.Color(.2,.15,.05),e.emissiveIntensity=.3,e.metalness=.8,e.update(),c.model.meshInstances.forEach(t=>t.material=e)}},100),a.addChild(c),this.workbench=r,this.deliveryBox=c,console.log("[SupplyCollection] Warehouse operations mission built successfully"),a},onLoad(e,t){console.log("[SupplyCollection] Mission loaded, setting up objectives...");const i=t.getSystem("objectivemanager");i&&(i.clearAllObjectives(),this.objectives.forEach(e=>{i.defineObjective(e.id,e)}),i.startObjective("warehouse_arrival")),this.setupInteractions(e,t),e.fire("ui:notification",{text:"Supply Collection Mission: Report to warehouse supervisor",type:"info",duration:5e3})},setupInteractions(e,t){const i=t.getSystem("objectivemanager"),a=t.getSystem("inventorymanager"),o=t=>{console.log(`[SupplyCollection] Interacting with NPC: ${t}`),"warehouse_supervisor"!==t||this.state.supervisorSpoken||(this.state.supervisorSpoken=!0,i&&i.isObjectiveActive("warehouse_arrival")&&(i.completeObjective("warehouse_arrival"),i.startObjective("collect_supplies"),e.fire("ui:notification",{text:'Supervisor Chen: "Collect items from all storage crates around the warehouse."',type:"info",duration:4e3}))),"storage_clerk"===t&&e.fire("ui:notification",{text:'Anna: "Keep up the good work! Check all the colored crates for supplies."',type:"info",duration:3e3})};e.on("npc:interact",o),this.npcHandler=o;const s=t=>{const o=e.root.findByName(t);if(!o||!o._interactionData)return;const s=o._interactionData;if("storage_crate"!==s.type||s.isEmpty)"workbench"!==s.type||s.used||this.state.workbenchUsed?"delivery"!==s.type||s.completed||this.state.packageDelivered||(a&&a.hasItem("annas_package")?(this.state.packageDelivered=!0,s.completed=!0,a.removeItem("annas_package",1),i&&(i.isObjectiveActive("deliver_package")||i.startObjective("deliver_package"),i.completeObjective("deliver_package")),e.fire("ui:notification",{text:"Package delivered successfully! Mission Complete! (+75 XP)",type:"success",duration:5e3})):e.fire("ui:notification",{text:"Need the special package to make this delivery",type:"warning",duration:2e3})):a&&a.hasItem("wrench")?(this.state.workbenchUsed=!0,s.used=!0,i&&i.isObjectiveActive("repair_equipment")?i.completeObjective("repair_equipment"):i&&(i.startObjective("repair_equipment"),i.completeObjective("repair_equipment")),e.fire("ui:notification",{text:"Used wrench to repair equipment! (+25 XP)",type:"success",duration:3e3})):e.fire("ui:notification",{text:"Need a wrench to repair this equipment",type:"warning",duration:2e3});else if(a&&a.pickupItem(s.itemId,1)){if(this.state.cratesCollected.add(s.crateIndex),s.isEmpty=!0,o.model&&o.model.meshInstances){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.update(),o.model.meshInstances.forEach(t=>t.material=e)}i&&i.isObjectiveActive("collect_supplies")&&i.updateObjective("collect_supplies",this.state.cratesCollected.size),e.fire("ui:notification",{text:`Collected ${s.itemId}!`,type:"success",duration:2e3})}};e.on("interaction:triggered",s),this.interactionHandler=s},onUnload(e,t){console.log("[SupplyCollection] Cleaning up supply collection mission..."),this.npcHandler&&(e.off("npc:interact",this.npcHandler),this.npcHandler=null),this.interactionHandler&&(e.off("interaction:triggered",this.interactionHandler),this.interactionHandler=null),e.root.findByTag("npc").forEach(e=>{e.cleanupLabel&&e.cleanupLabel()}),this.state&&(this.state.cratesCollected.clear(),this.state.workbenchUsed=!1,this.state.packageDelivered=!1,this.state.supervisorSpoken=!1),this.storageCrates=null,this.workbench=null,this.deliveryBox=null}}}}]);
|
41.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[41],{41:(e,i,t)=>{t.r(i),t.d(i,{ObjectiveFactory:()=>a,ObjectiveSets:()=>n,ObjectiveTemplates:()=>r});const r={createCollectionObjective:(e,i,t=100)=>({type:"counter",target:i,description:`Collect ${i} ${e}`,rewards:{experience:t},autoTrigger:"item:pickup",triggerCondition:{itemType:e}}),createExplorationObjective:(e,i=150)=>({type:"counter",target:e.length,description:`Explore ${e.length} areas: ${e.join(", ")}`,rewards:{experience:i,skillPoints:1},autoTrigger:"player:proximity",triggerCondition:{areas:e}}),createTimeTrialObjective(e,i,t=null){const r={type:"simple",timeLimit:i,description:`${e} within ${Math.floor(i/60)} minutes`,rewards:{experience:200}};return t&&(r.requires={tool:t}),r},createSkillObjective(e,i=null,t=300){const r={type:"simple",description:`Complete advanced task requiring ${e}`,requires:{skill:e},rewards:{experience:t,skillPoints:2}};return i&&(r.requires.stat=i),r},createSocialObjective:(e,i=120)=>({type:"counter",target:e,description:`Interact with ${e} NPCs`,rewards:{experience:i,unlockSkills:["social"]},autoTrigger:"npc:interact"}),createSequentialObjective:(e,i=180)=>({type:"counter",target:e.length,description:`Complete tasks in order: ${e.join(" β ")}`,rewards:{experience:i},sequence:e,currentStep:0}),createSurvivalObjective:(e,i=250)=>({type:"simple",timeLimit:e,description:`Survive for ${Math.floor(e/60)} minutes`,rewards:{experience:i,unlockSkills:["survival"]},survivalMode:!0}),createPrecisionObjective:(e,i,t,r=150)=>({type:"simple",description:`Complete ${e} with high precision`,requires:{tool:i,skill:t},rewards:{experience:r,skillPoints:1},precisionRequired:!0}),createInvestigationObjective:(e,i=220)=>({type:"counter",target:e,description:`Find all ${e} investigation clues`,rewards:{experience:i,items:[{id:"investigation_report",quantity:1}]},autoTrigger:"clue:found"}),createMaintenanceObjective:(e,i=160)=>({type:"counter",target:e,description:`Perform maintenance on ${e} pieces of equipment`,requires:{tool:"maintenance_kit"},rewards:{experience:i,unlockSkills:["maintenance"]},autoTrigger:"equipment:maintained"})},n={medicalLabBeginner:[{id:"lab_orientation",name:"Laboratory Orientation",...r.createExplorationObjective(["reception","main_lab","storage"],100)},{id:"collect_basic_supplies",name:"Gather Basic Supplies",...r.createCollectionObjective("basic_supplies",3,80)},{id:"meet_supervisor",name:"Meet Your Supervisor",type:"simple",description:"Find and talk to the lab supervisor",rewards:{experience:60,unlockSkills:["communication"]},autoTrigger:"npc:interact",triggerCondition:{npcId:"supervisor"}}],medicalLabIntermediate:[{id:"emergency_training",name:"Emergency Response Training",...r.createTimeTrialObjective("Complete emergency protocol",300,"emergency_kit")},{id:"advanced_tests",name:"Advanced Laboratory Tests",...r.createSkillObjective("advanced_testing",{intelligence:10},250)},{id:"equipment_check",name:"Daily Equipment Check",...r.createMaintenanceObjective(5,140)}],sciFiEnvironment:[{id:"scan_alien_artifacts",name:"Scan Unknown Artifacts",...r.createCollectionObjective("alien_artifacts",4,200)},{id:"decode_alien_text",name:"Decode Alien Communication",...r.createSkillObjective("xenolinguistics",{intelligence:15},350)},{id:"survive_contamination",name:"Containment Breach Protocol",...r.createSurvivalObjective(600,300)}],socialInteraction:[{id:"team_introductions",name:"Meet the Team",...r.createSocialObjective(5,100)},{id:"conflict_resolution",name:"Resolve Team Conflict",type:"simple",description:"Help resolve the conflict between team members",requires:{skill:"diplomacy"},rewards:{experience:180,skillPoints:2}},{id:"team_building",name:"Team Building Exercise",type:"counter",target:3,description:"Complete all team building activities",rewards:{experience:150,unlockSkills:["leadership"]}}],tutorialSet:[{id:"learn_basic_controls",name:"Learn Basic Controls",type:"counter",target:4,description:"Practice movement: WASD, Mouse Look, F to Interact, Tab for Menu",rewards:{experience:50}},{id:"first_interaction",name:"First Interaction",type:"simple",description:"Interact with any object (look at it and press F)",rewards:{experience:30}},{id:"inventory_tutorial",name:"Using Your Inventory",type:"simple",description:"Pick up an item and check your inventory",rewards:{experience:40,unlockSkills:["inventory_management"]}}]},a={createForScene(e,i="beginner"){const t=[];switch(e){case"medical":t.push(...n.medicalLabBeginner),"beginner"!==i&&t.push(...n.medicalLabIntermediate);break;case"scifi":t.push(...n.sciFiEnvironment);break;case"tutorial":t.push(...n.tutorialSet);break;default:t.push({id:"explore_area",name:"Explore the Area",...r.createExplorationObjective(["area1","area2","area3"],120)})}return t},createProgressiveSet:(e,i=["easy","medium","hard"])=>i.map((t,r)=>({...e,id:`${e.id}_${t}`,name:`${e.name} (${t.toUpperCase()})`,target:e.target?e.target*(r+1):void 0,timeLimit:e.timeLimit?Math.max(60,e.timeLimit-60*r):void 0,rewards:{...e.rewards,experience:(e.rewards.experience||100)*(r+1)},prerequisites:r>0?[`${e.id}_${i[r-1]}`]:void 0})),createDailyObjectives:()=>[{id:"daily_maintenance",name:"Daily Equipment Maintenance",...r.createMaintenanceObjective(3,100),repeatable:!0,resetTime:864e5},{id:"daily_collection",name:"Daily Sample Collection",...r.createCollectionObjective("daily_samples",5,120),repeatable:!0,resetTime:864e5}]}}}]);
|
420.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[420],{420:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});var o=i(96);const n={id:"quantum_lab",title:"Quantum Research Laboratory",type:"scene",async build(e,t,i){console.log("[QuantumLab] Building quantum research laboratory...");const n=new o.n(e,e.systems?.core||{});n.sceneBuilder=t,n.entityFactory=i,this.powerLevel=100,this.startTime=null,n.createRoom("entrance_chamber",{size:[18,5,14],lighting:"quantum",position:[0,0,0],buildFunction:a,objectives:[{id:"quantum_breach",name:"Quantum Containment Breach",description:"Investigate quantum field containment failure",type:"simple",autoStart:!0,rewards:{experience:30}},{id:"power_analysis",name:"Power Grid Analysis",description:"Analyze quantum power distribution systems",type:"simple",rewards:{experience:50,items:[{id:"power_diagnostics",quantity:1}]}}]}),n.createRoom("laser_grid_hall",{size:[30,6,12],lighting:"laser_grid",position:[0,0,0],buildFunction:s,objectives:[{id:"disable_security_grid",name:"Security Grid Deactivation",description:"Disable laser security grid in correct sequence",type:"sequence",target:["laser_node_1","laser_node_2","laser_node_3","master_grid"],progress:0,rewards:{experience:120}}]}),n.createRoom("containment_lab",{size:[25,7,20],lighting:"containment",position:[0,0,0],buildFunction:r,objectives:[{id:"stabilize_experiments",name:"Quantum Stabilization",description:"Stabilize failing quantum containment fields",type:"counter",target:6,progress:0,rewards:{experience:150,skillPoints:3}}]}),n.createRoom("power_core",{size:[20,8,16],lighting:"power_core",position:[0,0,0],buildFunction:c,objectives:[{id:"electromagnetic_override",name:"Electromagnetic Override",description:"Override quantum field generators to restore containment",type:"sequence",target:["field_generator_1","field_generator_2","quantum_core","containment_matrix"],progress:0,rewards:{experience:250,skillPoints:5,items:[{id:"quantum_stabilizer",quantity:1}]}}]}),n.createDoor("entrance_chamber","laser_grid_hall",{type:"keycard",item:"power_diagnostics"},{playerSpawnPosition:[-12,0,0]}),n.createDoor("laser_grid_hall","containment_lab",{type:"objective",id:"disable_security_grid"},{playerSpawnPosition:[0,0,8]}),n.createDoor("containment_lab","power_core",{type:"objective",id:"stabilize_experiments"},{playerSpawnPosition:[0,0,6]});const l=await n.build(e,t,i);return l.multiRoom=n,l},onLoad(e,t){console.log("[QuantumLab] Quantum field generators online - Power fluctuations detected");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.interactionHandler=i=>{this.handleQuantumInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler),this.startTime=Date.now(),this.setupPowerSystem(e)),e.fire("ui:notification",{text:"QUANTUM BREACH: Containment field destabilization detected",type:"error",duration:4e3})},setupPowerSystem(e){this.powerInterval=setInterval(()=>{this.powerLevel=Math.max(20,this.powerLevel-2),this.powerLevel<=50&&e.fire("ui:notification",{text:`POWER CRITICAL: ${this.powerLevel}% - Barriers destabilizing`,type:"warning",duration:2e3})},1e4)},handleQuantumInteraction(e,t,i){console.log("[QuantumLab] Quantum interaction with:",e);const o=i.getSystem("objectivemanager");if("PowerDiagnostic"===e)o&&o.isObjectiveActive("quantum_breach")&&(o.completeObjective("quantum_breach"),o.startObjective("power_analysis")),t.fire("ui:notification",{text:"ANALYSIS: Quantum field resonance cascade detected",type:"warning",duration:4e3});else if("PowerGridAnalyzer"===e)o&&o.isObjectiveActive("power_analysis")&&(this.multiRoom.addItem("power_diagnostics"),o.completeObjective("power_analysis"),t.fire("ui:notification",{text:"Power diagnostics complete - Laser grid access enabled",type:"success",duration:3e3}));else if(e.startsWith("LaserNode_")){if("laser_grid_hall"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("disable_security_grid")){const i=parseInt(e.split("_")[2]),n=["laser_node_1","laser_node_2","laser_node_3"];this.createEnergyWall(i,!1),t.fire("ui:notification",{text:`Laser Node ${i+1} deactivated - Energy barrier offline`,type:"success",duration:2500}),o.updateObjective("disable_security_grid",n[i])}}else if("MasterGridControl"===e){if("laser_grid_hall"===this.multiRoom.currentRoom&&o){const e=o.getObjective("disable_security_grid");e&&3===e.progress&&(this.createEnergyWall("master",!1),t.fire("ui:notification",{text:"LASER GRID OFFLINE: Containment lab access granted",type:"success",duration:4e3}),o.updateObjective("disable_security_grid","master_grid"))}}else if(e.startsWith("ContainmentField_")){if("containment_lab"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("stabilize_experiments")){const i=parseInt(e.split("_")[2]),n=["Quantum entanglement matrix","Particle acceleration chamber","Dimensional fold generator","Temporal flux capacitor","Dark matter containment","Quantum foam stabilizer"];t.fire("ui:notification",{text:`${n[i]} stabilized`,type:"success",duration:2e3}),o.updateObjective("stabilize_experiments")}}else if(["FieldGenerator1","FieldGenerator2","QuantumCore","ContainmentMatrix"].includes(e)&&"power_core"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("electromagnetic_override")){const i={FieldGenerator1:"field_generator_1",FieldGenerator2:"field_generator_2",QuantumCore:"quantum_core",ContainmentMatrix:"containment_matrix"}[e];t.fire("ui:notification",{text:`${i.replace("_"," ")} synchronized`,type:"success",duration:2e3}),o.updateObjective("electromagnetic_override",i)}},createEnergyWall(e,t=!0){const i={0:[-8,1.5,0],1:[0,1.5,0],2:[8,1.5,0],master:[0,1.5,-5]}[e];if(!i)return;const o=this.app.root.findByName(`EnergyWall_${e}`);if(t){if(!o){const t=this.multiRoom.entityFactory.create(`EnergyWall_${e}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.2,3,4]},rigidbody:{type:"static"}},position:i,scale:[.4,6,8],tags:["energy_wall","impassable"]});if(t.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(1,.2,.2),e.emissive=new pc.Color(.8,.1,.1),e.emissiveIntensity=1,e.opacity=.7,e.blendType=pc.BLEND_NORMAL,e.update(),t.model.meshInstances.forEach(t=>t.material=e)}this.multiRoom.sceneRoot.addChild(t)}}else o&&o.destroy()},onUnload(e,t){console.log("[QuantumLab] Quantum systems shutting down..."),this.powerInterval&&clearInterval(this.powerInterval),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function a(e,t,i,o){console.log("[QuantumLab] Building entrance chamber...");const n=i.create("PowerDiagnostic",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,.8]},rigidbody:{type:"static"}},position:[0,1,-5],scale:[3,2,1.6],tags:["interactive","diagnostic"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.3,.6),e.emissive=new pc.Color(.1,.2,.4),e.emissiveIntensity=.6,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n);const a=i.create("PowerGridAnalyzer",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:1,height:2.5},rigidbody:{type:"static"}},position:[6,1.25,-2],scale:[2,2.5,2],tags:["interactive","analyzer"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.5,.3),e.emissive=new pc.Color(.05,.3,.2),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a);const s=i.createNPC("dr_quantum",{position:[-3,0,-3],displayName:"Dr. Helena Quantum",dialogue:{greeting:"The quantum containment fields are destabilizing! We're losing power across all systems.",topics:{breach:"Something triggered a cascade failure - all our experiments are going critical.",laser:"The security grid is still active - you'll need to disable each node in sequence.",power:"Power diagnostics will show you the system status - start there first."}}});o.sceneRoot.addChild(s),[{pos:[0,4.5,0],color:new pc.Color(.8,.9,1)},{pos:[-6,4.5,0],color:new pc.Color(.8,.9,1)},{pos:[6,4.5,0],color:new pc.Color(.8,.9,1)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:2,range:10,position:t.pos});e.addChild(n)});const r=i.create("SpawnPoint",{position:[0,1,3],tags:["spawn"]});e.addChild(r)}async function s(e,t,i,o){console.log("[QuantumLab] Building laser grid hall with IMPASSABLE BARRIERS..."),[[-8,1.5,-4],[0,1.5,-4],[8,1.5,-4]].forEach((e,t)=>{const n=i.create(`LaserNode_${t}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.8,height:2},rigidbody:{type:"static"}},position:e,scale:[1.6,2,1.6],tags:["interactive","laser_node"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(1,.3,.3),e.emissive=new pc.Color(.8,.2,.2),e.emissiveIntensity=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n);const a=i.create(`EnergyWall_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.2,3,4]},rigidbody:{type:"static"}},position:[e[0],1.5,0],scale:[.4,6,8],tags:["energy_wall","impassable"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(1,.2,.2),e.emissive=new pc.Color(.8,.1,.1),e.emissiveIntensity=1,e.opacity=.7,e.blendType=pc.BLEND_NORMAL,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a)});const n=i.create("MasterGridControl",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,1]},rigidbody:{type:"static"}},position:[0,1.5,4],scale:[4,3,2],tags:["interactive","master_control"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.2,.8),e.emissive=new pc.Color(.4,.1,.6),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n);const a=i.create("EnergyWall_master",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[12,3,.2]},rigidbody:{type:"static"}},position:[0,1.5,-5],scale:[24,6,.4],tags:["energy_wall","impassable","master_wall"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(1,.1,.1),e.emissive=new pc.Color(1,.05,.05),e.emissiveIntensity=1.2,e.opacity=.8,e.blendType=pc.BLEND_NORMAL,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a),[{pos:[0,5.5,0],color:new pc.Color(1,.3,.3)},{pos:[-12,5,0],color:new pc.Color(1,.3,.3)},{pos:[12,5,0],color:new pc.Color(1,.3,.3)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:2.2,range:15,position:t.pos});e.addChild(n)})}async function r(e,t,i,o){console.log("[QuantumLab] Building containment laboratory..."),[[-8,1.5,-6],[0,1.5,-6],[8,1.5,-6],[-8,1.5,6],[0,1.5,6],[8,1.5,6]].forEach((e,t)=>{const n=i.create(`ContainmentField_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,2.5,2]},rigidbody:{type:"static"}},position:e,scale:[4,5,4],tags:["interactive","containment"]});if(n.model){const e=new pc.StandardMaterial,i=[new pc.Color(.8,.2,.8),new pc.Color(.2,.8,.8),new pc.Color(.8,.8,.2),new pc.Color(.2,.8,.2),new pc.Color(.8,.2,.2),new pc.Color(.2,.2,.8)];e.diffuse=i[t],e.emissive=new pc.Color(.5*i[t].r,.5*i[t].g,.5*i[t].b),e.emissiveIntensity=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n)}),[{pos:[0,6.5,0],color:new pc.Color(.9,.8,1)},{pos:[-8,5.5,0],color:new pc.Color(.8,.9,1)},{pos:[8,5.5,0],color:new pc.Color(1,.8,.9)}].forEach((t,o)=>{const n=i.createLight("point",{color:t.color,intensity:2.5,range:12,position:t.pos});e.addChild(n)})}async function c(e,t,i,o){console.log("[QuantumLab] Building power core chamber...");const n=i.create("FieldGenerator1",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:2,height:4},rigidbody:{type:"static"}},position:[-6,2,-6],scale:[4,4,4],tags:["interactive","generator"]}),a=i.create("FieldGenerator2",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:2,height:4},rigidbody:{type:"static"}},position:[6,2,-6],scale:[4,4,4],tags:["interactive","generator"]}),s=i.create("QuantumCore",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:3,height:6},rigidbody:{type:"static"}},position:[0,3,0],scale:[6,6,6],tags:["interactive","core"]}),r=i.create("ContainmentMatrix",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[4,2,2]},rigidbody:{type:"static"}},position:[0,2,6],scale:[8,4,4],tags:["interactive","matrix"]});if([n,a].forEach(e=>{if(e.model){const t=new pc.StandardMaterial;t.diffuse=new pc.Color(.3,.6,.9),t.emissive=new pc.Color(.1,.3,.5),t.metalness=.8,t.update(),e.model.meshInstances.forEach(e=>e.material=t)}o.sceneRoot.addChild(e)}),s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.9,.3,.9),e.emissive=new pc.Color(.6,.2,.6),e.emissiveIntensity=1,e.update(),s.model.meshInstances.forEach(t=>t.material=e)}if(o.sceneRoot.addChild(s),r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.8,.3),e.emissive=new pc.Color(.1,.5,.2),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(r);const c=i.createLight("point",{color:new pc.Color(.9,.7,1),intensity:3,range:15,position:[0,7.5,0]});e.addChild(c)}}}]);
|
507.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[507],{507:(e,t,o)=>{o.r(t),o.d(t,{default:()=>i});const i={name:"Mobile Garage Scene",description:"A mobile-optimized garage practice area with strategic camera positioning",async build(e,t,o){console.log("[MobileGarageScene] Building mobile-optimized garage...");const i=o.create("MobileGarageRoot",{position:[0,0,0],tags:["scene_root"]}),a=t.createRoom({size:[24,5,20],position:[0,0,0],lighting:"workshop"});a.name="MobileGarageRoom",i.addChild(a),this.setupLighting(a,o),this.createWorkbenchZone(a,o),this.createPracticeObjectsZone(a,o),this.createStorageZone(a,o),this.createControlZone(a,o);const n=o.create("SpawnPoint",{position:[0,0,8],tags:["spawn"]});return i.addChild(n),console.log("[MobileGarageScene] Mobile garage built successfully"),i},setupLighting(e,t){const o=t.createLight("point",{color:new pc.Color(1,1,.95),intensity:3,range:20,position:[0,4,0]});e.addChild(o),[{pos:[-8,3,6],color:[1,1,.9],intensity:2.5},{pos:[-8,3,-6],color:[.9,1,1],intensity:2.5},{pos:[8,3,0],color:[1,.95,.9],intensity:2.5},{pos:[0,3,-8],color:[.8,.9,1],intensity:2}].forEach((o,i)=>{const a=t.createLight("point",{color:new pc.Color(o.color[0],o.color[1],o.color[2]),intensity:o.intensity,range:8,position:o.pos});e.addChild(a)})},createWorkbenchZone(e,t){const o=t.create("MainWorkbench",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,.4,1.5]},rigidbody:{type:"static"}},position:[-8,.8,6],scale:[6,.8,3],tags:["furniture","workbench","interactive","mobile_optimized"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.emissive=new pc.Color(.05,.02,.01),e.update(),o.model.material=e}e.addChild(o),[{name:"Hammer",pos:[-9,1.2,6],scale:[.4,.2,1.6],color:[.7,.7,.8]},{name:"Wrench",pos:[-8,1.2,5.5],scale:[.3,.15,1.2],color:[.8,.7,.6]},{name:"Screwdriver",pos:[-7,1.2,6.5],scale:[.2,.1,1],color:[.9,.8,.3]},{name:"Pliers",pos:[-8.5,1.2,7],scale:[.3,.2,.8],color:[.6,.6,.7]}].forEach(o=>{const i=t.create(o.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[o.scale[0]/2,o.scale[1]/2,o.scale[2]/2]},rigidbody:{type:"dynamic"}},position:o.pos,scale:o.scale,tags:["tool","interactive","mobile_optimized"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(o.color[0],o.color[1],o.color[2]),e.update(),i.model.material=e}e.addChild(i)});const i=t.create("ToolCabinet",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2,.5]},rigidbody:{type:"static"}},position:[-11,2,6],scale:[2,4,1],tags:["furniture","storage","interactive","mobile_optimized"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.4),e.emissive=new pc.Color(.02,.02,.03),e.update(),i.model.material=e}e.addChild(i)},createPracticeObjectsZone(e,t){[{name:"Practice_Cube",type:"box",pos:[-10,1,-4],scale:[2,2,2],color:[1,.3,.3]},{name:"Practice_Sphere",type:"sphere",pos:[-7,1,-4],scale:[1.5,1.5,1.5],color:[.3,1,.3]},{name:"Practice_Cylinder",type:"cylinder",pos:[-4,1.5,-4],scale:[1.5,3,1.5],color:[.3,.3,1]},{name:"Movable_Box",type:"box",pos:[-10,1,-7],scale:[1.5,1.5,1.5],color:[1,.6,0],movable:!0},{name:"Heavy_Block",type:"box",pos:[-7,1,-7],scale:[2,1,2],color:[.5,.5,.5],movable:!0},{name:"Light_Ball",type:"sphere",pos:[-4,1,-7],scale:[1,1,1],color:[1,1,.3],movable:!0},{name:"Gear_Large",type:"cylinder",pos:[-10,.3,-10],scale:[2.5,.6,2.5],color:[.8,.6,.2]},{name:"Gear_Medium",type:"cylinder",pos:[-7,.25,-10],scale:[2,.5,2],color:[.7,.5,.2]},{name:"Gear_Small",type:"cylinder",pos:[-4,.2,-10],scale:[1.5,.4,1.5],color:[.6,.4,.2]}].forEach(o=>{const i=t.create(o.name,{components:{model:{type:o.type},collision:{type:o.type},rigidbody:{type:o.movable?"dynamic":"static"}},position:o.pos,scale:o.scale,tags:["practice_object","interactive","mobile_optimized",o.movable?"movable":"static"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(o.color[0],o.color[1],o.color[2]),e.emissive=new pc.Color(.1,.1,.1),e.update(),i.model.material=e}o.name.includes("Gear")&&(i.rotationSpeed=.5+.5*Math.random(),i.script={update:function(e){this.entity.rotate(0,this.rotationSpeed*e*30,0)}.bind({entity:i,rotationSpeed:i.rotationSpeed})}),e.addChild(i)});const o=t.create("PracticeSign",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,.5,.1]},rigidbody:{type:"static"}},position:[-7,3,-2],scale:[3,1,.2],tags:["decoration","sign"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.3,.5),e.emissive=new pc.Color(.1,.1,.2),e.update(),o.model.material=e}e.addChild(o)},createStorageZone(e,t){[{pos:[10,2,-8],items:["Component_A","Component_B","Component_C"]},{pos:[10,2,-3],items:["Part_X","Part_Y","Part_Z"]},{pos:[10,2,2],items:["Module_1","Module_2","Module_3"]},{pos:[10,2,7],items:["Tool_Set_A","Tool_Set_B","Tool_Set_C"]}].forEach((o,i)=>{const a=t.create(`StorageShelf_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,2,.3]},rigidbody:{type:"static"}},position:o.pos,scale:[1.6,4,.6],tags:["furniture","shelf","interactive","mobile_optimized"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.3,.2),e.update(),a.model.material=e}e.addChild(a),o.items.forEach((a,n)=>{const s=t.create(a,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.25,.25,.25]},rigidbody:{type:"dynamic"}},position:[o.pos[0]-.5,o.pos[1]+.8*(n-1),o.pos[2]+.4],scale:[.5,.5,.5],tags:["component","interactive","mobile_optimized"]});if(s.model){const e=new pc.StandardMaterial,t=[[.8,.2,.2],[.2,.8,.2],[.2,.2,.8],[.8,.8,.2]],o=t[i%t.length];e.diffuse=new pc.Color(o[0],o[1],o[2]),e.emissive=new pc.Color(.05,.05,.05),e.update(),s.model.material=e}e.addChild(s)})}),[[8,.5,-8],[8,.5,-3],[8,.5,2],[8,.5,7]].forEach((o,i)=>{const a=t.create(`PartsBin_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.6,.4,.6]},rigidbody:{type:"static"}},position:o,scale:[1.2,.8,1.2],tags:["storage","interactive","mobile_optimized"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.6,.7),e.update(),a.model.material=e}e.addChild(a)})},createControlZone(e,t){const o=t.create("MainControlPanel",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,.3]},rigidbody:{type:"static"}},position:[0,2,-9],scale:[4,2,.6],tags:["interactive","control_panel","mobile_optimized"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.3),e.emissive=new pc.Color(.05,.1,.2),e.update(),o.model.material=e}e.addChild(o),[{name:"PowerButton",pos:[-1,2.5,-8.7],color:[0,1,0]},{name:"ResetSwitch",pos:[0,2.5,-8.7],color:[1,1,0]},{name:"EmergencyStop",pos:[1,2.5,-8.7],color:[1,0,0]}].forEach(o=>{const i=t.create(o.name,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.2,height:.2},rigidbody:{type:"static"}},position:o.pos,scale:[.4,.2,.4],tags:["interactive","control_element","mobile_optimized"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(o.color[0],o.color[1],o.color[2]),e.emissive=new pc.Color(.3*o.color[0],.3*o.color[1],.3*o.color[2]),e.update(),i.model.material=e}e.addChild(i)});const i=t.create("InfoScreen",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,.1]},rigidbody:{type:"static"}},position:[0,3.5,-8.9],scale:[3,2,.2],tags:["interactive","screen","mobile_optimized"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.2),e.emissive=new pc.Color(0,.2,.4),e.update(),i.model.material=e}e.addChild(i);const a=t.create("MobileInstructions",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.8,.05]},rigidbody:{type:"static"}},position:[3,1.5,-8.95],scale:[2,1.6,.1],tags:["interactive","instructions","mobile_optimized"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.9,.9,.8),e.emissive=new pc.Color(.1,.1,.05),e.update(),a.model.material=e}e.addChild(a)},objectives:[{id:"mobile_garage_intro",name:"Welcome to Mobile Garage",description:"Explore the mobile-optimized practice area",type:"simple",autoStart:!0,rewards:{experience:20}},{id:"explore_all_zones",name:"Visit All Zones",description:"Use camera angles to explore all 4 garage zones",type:"counter",target:4,progress:0,rewards:{experience:40}},{id:"mobile_object_interaction",name:"Touch Practice Objects",description:"Interact with 8 different practice objects",type:"counter",target:8,progress:0,rewards:{experience:60}},{id:"workbench_mastery",name:"Workbench Area",description:"Interact with workbench and all tools",type:"counter",target:5,progress:0,rewards:{experience:50}},{id:"storage_access",name:"Storage Management",description:"Access all storage areas and components",type:"counter",target:8,progress:0,rewards:{experience:50}},{id:"control_panel_master",name:"Control Panel Expert",description:"Master the mobile-optimized control systems",type:"simple",prerequisites:["explore_all_zones","mobile_object_interaction"],rewards:{experience:100,items:[{id:"mobile_garage_certificate",quantity:1}]}}],state:{zonesExplored:new Set,objectsInteracted:new Set,workbenchInteractions:new Set,storageAccessed:new Set,controlPanelUsed:!1,currentZone:"overview"},onLoad(e,t){console.log("[MobileGarageScene] Mobile garage loaded, setting up mobile-optimized experience...");const o=t.getSystem("objectivemanager");o&&(o.clearAllObjectives(),this.objectives.forEach(e=>{o.defineObjective(e.id,e)}),o.startObjective("mobile_garage_intro"),o.startObjective("explore_all_zones")),this.setupMobileInteractions(e,t),e.fire("ui:notification",{text:"Mobile Garage Ready! Swipe between camera angles to explore different zones. Tap objects to interact.",type:"info",duration:6e3}),setTimeout(()=>{o&&(o.completeObjective("mobile_garage_intro"),o.startObjective("mobile_object_interaction"),o.startObjective("workbench_mastery"),o.startObjective("storage_access"))},3e3)},setupMobileInteractions(e,t){const o=t.getSystem("objectivemanager"),i=t=>{const i=t.name||`zone_${t.index}`;this.state.zonesExplored.add(i),this.state.currentZone=i,o&&o.isObjectiveActive("explore_all_zones")&&o.updateObjective("explore_all_zones",this.state.zonesExplored.size);const a={Workbench:"Workbench Zone: Tools and crafting area","Practice Objects":"Practice Zone: Interactive 3D objects","Storage Shelves":"Storage Zone: Components and parts",Overview:"Overview: Complete garage perspective"};a[i]&&e.fire("ui:notification",{text:a[i],type:"info",duration:2e3})};e.on("camera:angleChanged",i),this.angleChangeHandler=i;const a=t=>{console.log(`[MobileGarageScene] Mobile interaction: ${t}`),this.state.objectsInteracted.has(t)||(this.state.objectsInteracted.add(t),e.fire("ui:notification",{text:`Examined: ${t.replace(/_/g," ")}`,type:"success",duration:1500}),o&&o.isObjectiveActive("mobile_object_interaction")&&o.updateObjective("mobile_object_interaction",this.state.objectsInteracted.size)),(t.includes("Workbench")||t.includes("Tool")||"ToolCabinet"===t)&&(this.state.workbenchInteractions.has(t)||(this.state.workbenchInteractions.add(t),o&&o.isObjectiveActive("workbench_mastery")&&o.updateObjective("workbench_mastery",this.state.workbenchInteractions.size))),(t.includes("Shelf")||t.includes("Bin")||t.includes("Component")||t.includes("Part")||t.includes("Module"))&&(this.state.storageAccessed.has(t)||(this.state.storageAccessed.add(t),o&&o.isObjectiveActive("storage_access")&&o.updateObjective("storage_access",this.state.storageAccessed.size))),(t.includes("Control")||t.includes("Button")||t.includes("Switch")||t.includes("Screen"))&&(this.state.controlPanelUsed||(this.state.controlPanelUsed=!0,e.fire("ui:notification",{text:"Mobile Control System Activated: All systems operational for touch interaction.",type:"success",duration:4e3}),this.state.zonesExplored.size>=4&&this.state.objectsInteracted.size>=8&&o&&(o.startObjective("control_panel_master"),setTimeout(()=>{o.completeObjective("control_panel_master"),e.fire("ui:notification",{text:"Mobile Garage Mastery Achieved! You've completed the mobile-optimized practice area.",type:"success",duration:6e3})},2e3))))};e.on("interaction:triggered",a),this.interactHandler=a},onUnload(e,t){console.log("[MobileGarageScene] Cleaning up mobile garage scene..."),this.angleChangeHandler&&(e.off("camera:angleChanged",this.angleChangeHandler),this.angleChangeHandler=null),this.interactHandler&&(e.off("interaction:triggered",this.interactHandler),this.interactHandler=null),this.state&&(this.state.zonesExplored?.clear(),this.state.objectsInteracted?.clear(),this.state.workbenchInteractions?.clear(),this.state.storageAccessed?.clear(),this.state.controlPanelUsed=!1,this.state.currentZone="overview")}}}}]);
|
576.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[576],{576:(e,t,a)=>{a.r(t),a.d(t,{default:()=>n});const n={name:"Tavern Scene",description:"A warm tavern where adventurers gather to share stories and find quests",async build(e,t,a){console.log("[TavernScene] Building tavern...");const n=a.create("TavernRoot",{position:[0,0,0],tags:["scene_root"]}),i=t.createRoom({size:[20,4,16],position:[0,0,0],lighting:"warm"});i.name="TavernRoom",n.addChild(i);const r=a.createLight("point",{color:new pc.Color(1,.6,.2),intensity:2,range:10,position:[-5,2,-5]});i.addChild(r);const o=a.create("BarCounter",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,.5,.75]},rigidbody:{type:"static"}},position:[-6,.5,0],scale:[6,1,1.5],tags:["furniture","bar"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.2,.1),e.update(),o.model.material=e}i.addChild(o),[[3,0,-4],[3,0,4],[-3,0,4]].forEach((e,t)=>{const n=a.create(`Table_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.4,1]},rigidbody:{type:"static"}},position:[e[0],.4,e[2]],scale:[2,.8,2],tags:["furniture","table"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.3,.2),e.update(),n.model.material=e}i.addChild(n)});const s=a.createNPC("bartender_grim",{position:[-4,0,0],displayName:"Grim the Bartender",dialogue:{greeting:"Welcome to the Rusty Tankard! What can I get you?",topics:{drink:"Our special today is Dragon's Breath Ale. Burns on the way down!",rumors:"Strange things happening at the old generator station...",quest:"Talk to the patron in the corner. He's been asking for help."}}});s.tags.add("bartender"),i.addChild(s);const c=a.createNPC("patron_mysterious",{position:[3,0,-4],displayName:"Mysterious Patron",dialogue:{greeting:"You look capable... I might have a job for you.",topics:{job:"The medical bay needs supplies delivered. Dangerous work.",payment:"100 gold pieces, plus whatever you find along the way.",accept:"Excellent! Head to the medical bay when you're ready."}}});c.tags.add("quest_giver"),i.addChild(c);const d=a.createNPC("bard_melody",{position:[0,0,6],displayName:"Melody the Bard",dialogue:{greeting:"βͺ Welcome, traveler! Care to hear a song? βͺ",topics:{song:"βͺ The generator failed one night... βͺ",tip:"A coin for your humble bard?",news:"I heard the nightshift at the station is cursed!"}}});d.tags.add("bard"),i.addChild(d);const l=a.create("QuestBoard",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,.1]},rigidbody:{type:"static"}},position:[7,2,0],scale:[2,2,.2],tags:["interactive","quest_board"]});if(l.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.emissive=new pc.Color(.1,.05,0),e.update(),l.model.material=e}i.addChild(l);const p=a.create("SpawnPoint",{position:[0,0,7],tags:["spawn"]});return n.addChild(p),console.log("[TavernScene] Tavern built successfully"),n},objectives:[{id:"tavern_introduction",name:"Welcome to the Tavern",description:"Talk to the bartender",type:"simple",autoStart:!0,rewards:{experience:10}},{id:"gather_information",name:"Gather Information",description:"Talk to all three NPCs in the tavern",type:"counter",target:3,progress:0,prerequisites:["tavern_introduction"],rewards:{experience:30,gold:10}},{id:"accept_quest",name:"Accept a Quest",description:"Accept a quest from the mysterious patron",type:"simple",prerequisites:["gather_information"],rewards:{experience:50,items:[{id:"quest_scroll",quantity:1}]}},{id:"check_quest_board",name:"Check the Quest Board",description:"Interact with the quest board to see available missions",type:"simple",rewards:{experience:20}}],state:{npcsInteracted:new Set,questAccepted:!1,questInProgress:!1,drinksOrdered:0},onLoad(e,t){console.log("[TavernScene] Scene loaded, setting up objectives...");const a=t.getSystem("objectivemanager");a&&(a.clearAllObjectives(),this.objectives.forEach(e=>{a.defineObjective(e.id,e)}),a.startObjective("tavern_introduction"),a.startObjective("check_quest_board")),this.setupInteractions(e,t),e.fire("ui:notification",{text:"Welcome to the Rusty Tankard Tavern!",type:"info",duration:5e3})},setupInteractions(e,t){const a=t.getSystem("objectivemanager"),n=t=>{if(console.log(`[TavernScene] Interacting with NPC: ${t}`),"bartender_grim"===t&&a&&a.isObjectiveActive("tavern_introduction")&&(a.completeObjective("tavern_introduction"),a.startObjective("gather_information")),this.state.npcsInteracted.has(t)||(this.state.npcsInteracted.add(t),a&&a.isObjectiveActive("gather_information")&&(a.updateObjective("gather_information",this.state.npcsInteracted.size),this.state.npcsInteracted.size>=3&&(a.completeObjective("gather_information"),a.startObjective("accept_quest")))),"patron_mysterious"===t&&!this.state.questAccepted){if(this.state.questInProgress)return void console.log("[TavernScene] Quest acceptance already in progress");this.state.questInProgress=!0,setTimeout(()=>{try{e.fire("ui:notification",{text:"Quest Accepted: Medical Supply Delivery",type:"success",duration:3e3}),this.state.questAccepted=!0,a&&a.isObjectiveActive("accept_quest")&&a.completeObjective("accept_quest")}catch(e){console.error("[TavernScene] Error during quest acceptance:",e)}finally{this.state.questInProgress=!1}},2e3)}};e.on("npc:interact",n),this.npcHandler=n;const i=t=>{"QuestBoard"===t&&(console.log("[TavernScene] Quest board accessed"),e.fire("ui:notification",{text:"Available Quests:\nβ’ Medical Supply Delivery\nβ’ Generator Crisis\nβ’ Nightshift Coverage",type:"info",duration:5e3}),a&&a.completeObjective("check_quest_board"))};e.on("interaction:triggered",i),this.interactHandler=i},onUnload(e,t){console.log("[TavernScene] Cleaning up tavern scene..."),this.npcHandler&&(e.off("npc:interact",this.npcHandler),this.npcHandler=null),this.interactHandler&&(e.off("interaction:triggered",this.interactHandler),this.interactHandler=null),e.root.findByTag("npc").forEach(e=>{e.cleanupLabel&&e.cleanupLabel()}),this.state&&(this.state.npcsInteracted?.clear(),this.state.questAccepted=!1,this.state.questInProgress=!1,this.state.drinksOrdered=0)}}}}]);
|
585.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[585],{585:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});const o={name:"Garage Scene",description:"A practice area for experimenting with 3D objects and configurations",async build(e,t,a){console.log("[GarageScene] Building garage practice area...");const o=a.create("GarageRoot",{position:[0,0,0],tags:["scene_root"]}),i=t.createRoom({size:[30,5,25],position:[0,0,0],lighting:"workshop"});i.name="GarageRoom",o.addChild(i);const c=a.createLight("point",{color:new pc.Color(1,1,.9),intensity:2.5,range:15,position:[-8,4,0]});i.addChild(c);const s=a.createLight("point",{color:new pc.Color(1,1,.9),intensity:2.5,range:15,position:[8,4,0]});i.addChild(s),this.createPracticeObjects(i,a),this.createWorkbench(i,a),this.createDisplayShelves(i,a),this.createToolStorage(i,a);const r=a.create("ControlPanel",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.8,.2]},rigidbody:{type:"static"}},position:[0,1.6,-12],scale:[2,1.6,.4],tags:["interactive","control_panel"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.3),e.emissive=new pc.Color(.05,.1,.2),e.update(),r.model.material=e}i.addChild(r);const n=a.create("SpawnPoint",{position:[0,0,10],tags:["spawn"]});return o.addChild(n),console.log("[GarageScene] Garage built successfully"),o},createPracticeObjects(e,t){[{name:"Cube_Practice",type:"box",pos:[-10,1,-5],scale:[2,2,2],color:[1,0,0]},{name:"Sphere_Practice",type:"sphere",pos:[-10,1,0],scale:[1.5,1.5,1.5],color:[0,1,0]},{name:"Cylinder_Practice",type:"cylinder",pos:[-10,1,5],scale:[1.5,3,1.5],color:[0,0,1]},{name:"Engine_Mock",type:"box",pos:[0,1.5,-8],scale:[3,3,4],color:[.5,.5,.6]},{name:"Gear_Large",type:"cylinder",pos:[5,1,-5],scale:[2,.5,2],color:[.8,.6,.2]},{name:"Gear_Small",type:"cylinder",pos:[8,1,-3],scale:[1,.3,1],color:[.8,.6,.2]},{name:"Movable_Block",type:"box",pos:[10,1,0],scale:[1.5,1.5,1.5],color:[1,.5,0],movable:!0},{name:"Rotating_Disc",type:"cylinder",pos:[5,.2,5],scale:[3,.4,3],color:[.7,.3,.9],rotating:!0}].forEach(a=>{const o=t.create(a.name,{components:{model:{type:a.type},collision:{type:a.type},rigidbody:{type:a.movable?"dynamic":"static"}},position:a.pos,scale:a.scale,tags:["practice_object","interactive",a.movable?"movable":"static"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(a.color[0],a.color[1],a.color[2]),e.update(),o.model.material=e}a.rotating&&(o.rotationSpeed=.5,o.script={update:function(e){this.entity.rotate(0,this.rotationSpeed*e*60,0)}.bind({entity:o,rotationSpeed:o.rotationSpeed})}),e.addChild(o)})},createWorkbench(e,t){const a=t.create("Workbench",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,.4,1.5]},rigidbody:{type:"static"}},position:[-5,.8,8],scale:[6,.8,3],tags:["furniture","workbench","interactive"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.update(),a.model.material=e}e.addChild(a),[[-6,1.2,8,"Hammer"],[-5,1.2,7,"Wrench"],[-4,1.2,8.5,"Screwdriver"]].forEach(([a,o,i,c])=>{const s=t.create(c,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.2,.1,.8]},rigidbody:{type:"dynamic"}},position:[a,o,i],scale:[.4,.2,1.6],tags:["tool","interactive"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.7,.8),e.update(),s.model.material=e}e.addChild(s)})},createDisplayShelves(e,t){[{pos:[12,2,-10],items:["Component_A","Component_B","Component_C"]},{pos:[12,2,0],items:["Part_X","Part_Y","Part_Z"]},{pos:[12,2,10],items:["Module_1","Module_2","Module_3"]}].forEach((a,o)=>{const i=t.create(`Shelf_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2,.2]},rigidbody:{type:"static"}},position:a.pos,scale:[2,4,.4],tags:["furniture","shelf"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.3,.2),e.update(),i.model.material=e}e.addChild(i),a.items.forEach((o,i)=>{const c=t.create(o,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.3,.3]},rigidbody:{type:"dynamic"}},position:[a.pos[0]-.8,a.pos[1]+(i-1),a.pos[2]+.5],scale:[.6,.6,.6],tags:["component","interactive"]});if(c.model){const e=new pc.StandardMaterial,t=[[.8,.2,.2],[.2,.8,.2],[.2,.2,.8]],a=t[i%t.length];e.diffuse=new pc.Color(a[0],a[1],a[2]),e.update(),c.model.material=e}e.addChild(c)})})},createToolStorage(e,t){const a=t.create("ToolCabinet",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2,.5]},rigidbody:{type:"static"}},position:[-12,2,8],scale:[2,4,1],tags:["furniture","storage","interactive"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.4),e.update(),a.model.material=e}e.addChild(a),[[-8,.5,10],[-6,.5,10],[-4,.5,10]].forEach((a,o)=>{const i=t.create(`PartsBin_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,.5,.8]},rigidbody:{type:"static"}},position:a,scale:[1.6,1,1.6],tags:["storage","interactive"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.6,.7),e.update(),i.model.material=e}e.addChild(i)})},objectives:[{id:"garage_familiarization",name:"Explore the Garage",description:"Familiarize yourself with the practice area",type:"simple",autoStart:!0,rewards:{experience:10}},{id:"interact_objects",name:"Test Object Interactions",description:"Interact with 5 different practice objects",type:"counter",target:5,progress:0,rewards:{experience:30}},{id:"use_workbench",name:"Use the Workbench",description:"Interact with the workbench area",type:"simple",rewards:{experience:20}},{id:"access_storage",name:"Check Storage Areas",description:"Access tool cabinet and parts bins",type:"counter",target:4,progress:0,rewards:{experience:25}},{id:"master_garage",name:"Garage Master",description:"Complete all garage practice activities",type:"simple",prerequisites:["interact_objects","use_workbench","access_storage"],rewards:{experience:100,items:[{id:"garage_key",quantity:1}]}}],state:{objectsInteracted:new Set,workbenchUsed:!1,storageAccessed:new Set,completionInProgress:!1},onLoad(e,t){console.log("[GarageScene] Scene loaded, setting up practice objectives...");const a=t.getSystem("objectivemanager");a&&(a.clearAllObjectives(),this.objectives.forEach(e=>{a.defineObjective(e.id,e)}),a.startObjective("garage_familiarization")),this.setupInteractions(e,t),this.setupObjectiveListeners(e,a),e.fire("ui:notification",{text:"Welcome to the Practice Garage! Experiment with 3D objects here.",type:"info",duration:5e3}),setTimeout(()=>{a&&(a.completeObjective("garage_familiarization"),a.startObjective("interact_objects"),a.startObjective("use_workbench"),a.startObjective("access_storage"))},3e3)},setupInteractions(e,t){const a=t.getSystem("objectivemanager"),o=t=>{console.log(`[GarageScene] Interacting with: ${t}`),(t.includes("Practice")||t.includes("Mock")||t.includes("Gear")||t.includes("Block")||t.includes("Disc"))&&(this.state.objectsInteracted.has(t)||(this.state.objectsInteracted.add(t),e.fire("ui:notification",{text:`Examined: ${t.replace(/_/g," ")}`,type:"info",duration:2e3}),a&&a.isObjectiveActive("interact_objects")&&a.updateObjective("interact_objects",this.state.objectsInteracted.size))),"Workbench"!==t||this.state.workbenchUsed||(this.state.workbenchUsed=!0,e.fire("ui:notification",{text:"Workbench accessed - Ready for projects!",type:"success",duration:3e3}),a&&a.completeObjective("use_workbench")),"ToolCabinet"!==t&&!t.startsWith("PartsBin_")||this.state.storageAccessed.has(t)||(this.state.storageAccessed.add(t),e.fire("ui:notification",{text:`Accessed: ${t.replace(/_/g," ")}`,type:"info",duration:2e3}),a&&a.isObjectiveActive("access_storage")&&a.updateObjective("access_storage",this.state.storageAccessed.size)),"ControlPanel"===t&&e.fire("ui:notification",{text:"Control Panel: All systems operational. Practice mode active.",type:"info",duration:4e3})};e.on("interaction:triggered",o),this.interactHandler=o},setupObjectiveListeners(e,t){if(!t)return;const a=a=>{console.log(`[GarageScene] Objective completed: ${a}`),["interact_objects","use_workbench","access_storage"].includes(a)&&this.checkMasterGaragePrerequisites(t,e)};e.on("objective:completed",a),this.objectiveCompleteHandler=a},checkMasterGaragePrerequisites(e,t){this.state.completionInProgress||["interact_objects","use_workbench","access_storage"].every(t=>{const a=e.objectives.get(t);return a&&"completed"===a.state})&&(console.log("[GarageScene] All prerequisites met, starting master_garage objective"),this.state.completionInProgress=!0,e.startObjective("master_garage"),setTimeout(()=>{e.completeObjective("master_garage"),t.fire("ui:notification",{text:"Garage Master Achievement Unlocked! You've mastered the practice area.",type:"success",duration:6e3}),this.state.completionInProgress=!1},2e3))},onUnload(e,t){console.log("[GarageScene] Cleaning up garage scene..."),this.interactHandler&&(e.off("interaction:triggered",this.interactHandler),this.interactHandler=null),this.objectiveCompleteHandler&&(e.off("objective:completed",this.objectiveCompleteHandler),this.objectiveCompleteHandler=null),this.state&&(this.state.objectsInteracted?.clear(),this.state.storageAccessed?.clear(),this.state.workbenchUsed=!1,this.state.completionInProgress=!1)}}}}]);
|
614.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[614],{614:(e,o,t)=>{t.r(o),t.d(o,{default:()=>s});var i=t(96);const s={id:"underground_bunker",title:"Underground Military Bunker",type:"scene",async build(e,o,t){console.log("[UndergroundBunker] Building underground military bunker...");const s=new i.n(e,e.systems?.core||{});s.sceneBuilder=o,s.entityFactory=t,this.pressureLevel=100,this.oxygenLevel=100,this.startTime=null,s.createRoom("entrance_tunnel",{size:[25,4,12],lighting:"bunker",position:[0,0,0],buildFunction:n,objectives:[{id:"bunker_breach",name:"Bunker Infiltration",description:"Investigate abandoned military bunker",type:"simple",autoStart:!0,rewards:{experience:25}},{id:"find_access_codes",name:"Security Access Codes",description:"Locate blast door access codes",type:"simple",rewards:{experience:60,items:[{id:"blast_door_codes",quantity:1}]}}]}),s.createRoom("blast_door_chamber",{size:[16,6,20],lighting:"blast_chamber",position:[0,0,0],buildFunction:a,objectives:[{id:"unlock_blast_doors",name:"Blast Door Override",description:"Enter keypad combinations to unlock blast doors",type:"sequence",target:["keypad_alpha","keypad_beta","keypad_gamma","blast_door_release"],progress:0,rewards:{experience:100}}]}),s.createRoom("pressure_chamber",{size:[18,5,16],lighting:"pressure",position:[0,0,0],buildFunction:r,objectives:[{id:"equip_pressure_suit",name:"Pressure Equipment",description:"Acquire pressure suit and breathing apparatus",type:"counter",target:3,progress:0,rewards:{experience:80}},{id:"navigate_airlock",name:"Airlock Navigation",description:"Navigate sequential airlock system with timing",type:"sequence",target:["airlock_1","airlock_2","airlock_3"],progress:0,rewards:{experience:150,skillPoints:2}}]}),s.createRoom("command_vault",{size:[22,7,18],lighting:"command_vault",position:[0,0,0],buildFunction:c,objectives:[{id:"bunker_override",name:"Command Override",description:"Override bunker lockdown and restore systems",type:"sequence",target:["life_support","communication_array","defense_systems","emergency_protocols"],progress:0,rewards:{experience:250,skillPoints:5,items:[{id:"bunker_command_access",quantity:1}]}}]}),s.createDoor("entrance_tunnel","blast_door_chamber",{type:"keycard",item:"blast_door_codes"},{playerSpawnPosition:[0,0,8]}),s.createDoor("blast_door_chamber","pressure_chamber",{type:"objective",id:"unlock_blast_doors"},{playerSpawnPosition:[0,0,6]}),s.createDoor("pressure_chamber","command_vault",{type:"objective",id:"navigate_airlock"},{playerSpawnPosition:[0,0,7]});const l=await s.build(e,o,t);return l.multiRoom=s,l},onLoad(e,o){console.log("[UndergroundBunker] Bunker systems initializing - Environmental hazards detected");const t=e.root.findByTag("scene_root")[0];t&&t.multiRoom&&(t.multiRoom.onLoad(e,o),this.multiRoom=t.multiRoom,this.interactionHandler=t=>{this.handleBunkerInteraction(t,e,o)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler),this.startTime=Date.now(),this.setupEnvironmentalSystems(e)),e.fire("ui:notification",{text:"BUNKER INFILTRATION: Environmental seals compromised - Pressure falling",type:"warning",duration:4e3})},setupEnvironmentalSystems(e){this.envInterval=setInterval(()=>{this.pressureLevel=Math.max(30,this.pressureLevel-1.5),this.oxygenLevel=Math.max(40,this.oxygenLevel-1),this.pressureLevel<=60&&e.fire("ui:notification",{text:`PRESSURE WARNING: ${this.pressureLevel}% - Seals failing`,type:"warning",duration:2e3})},8e3)},handleBunkerInteraction(e,o,t){console.log("[UndergroundBunker] Bunker interaction with:",e);const i=t.getSystem("objectivemanager");if("SecurityOffice"===e)i&&i.isObjectiveActive("bunker_breach")&&(i.completeObjective("bunker_breach"),i.startObjective("find_access_codes")),o.fire("ui:notification",{text:"ABANDONED: Security logs indicate emergency lockdown protocol activated",type:"info",duration:4e3});else if("CodeSafe"===e)i&&i.isObjectiveActive("find_access_codes")&&(this.multiRoom.addItem("blast_door_codes"),i.completeObjective("find_access_codes"),o.fire("ui:notification",{text:"Blast door access codes recovered - Heavy barriers can be unlocked",type:"success",duration:3e3}));else if(e.startsWith("Keypad_")){if("blast_door_chamber"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("unlock_blast_doors")){const t=e.split("_")[1],s={Alpha:"7734-DELTA",Beta:"2956-ECHO",Gamma:"1847-FOXTROT"};this.removeBlastDoor(t),o.fire("ui:notification",{text:`Keypad ${t} unlocked: ${s[t]}`,type:"success",duration:2500}),i.updateObjective("unlock_blast_doors",`keypad_${t.toLowerCase()}`)}}else if("BlastDoorRelease"===e){if("blast_door_chamber"===this.multiRoom.currentRoom&&i){const e=i.getObjective("unlock_blast_doors");e&&3===e.progress&&(this.removeBlastDoor("Master"),o.fire("ui:notification",{text:"BLAST DOORS UNSEALED: Pressure chamber access granted",type:"success",duration:4e3}),i.updateObjective("unlock_blast_doors","blast_door_release"))}}else if(["PressureSuit","BreathingApparatus","EnvironmentalScanner"].includes(e)){if("pressure_chamber"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("equip_pressure_suit")){const t={PressureSuit:"Environmental pressure suit",BreathingApparatus:"Oxygen breathing system",EnvironmentalScanner:"Atmospheric monitoring device"};o.fire("ui:notification",{text:`${t[e]} equipped`,type:"success",duration:2e3}),i.updateObjective("equip_pressure_suit"),i.getObjective("equip_pressure_suit").progress>=3&&i.startObjective("navigate_airlock")}}else if(e.startsWith("AirlockChamber_")){if("pressure_chamber"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("navigate_airlock")){const t=parseInt(e.split("_")[1]);this.activateAirlockSequence(t,o);const s=["airlock_1","airlock_2","airlock_3"];i.updateObjective("navigate_airlock",s[t-1])}}else if(["LifeSupportSystem","CommunicationArray","DefenseSystems","EmergencyProtocols"].includes(e)&&"command_vault"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("bunker_override")){const t={LifeSupportSystem:"life_support",CommunicationArray:"communication_array",DefenseSystems:"defense_systems",EmergencyProtocols:"emergency_protocols"}[e];o.fire("ui:notification",{text:`${t.replace("_"," ")} restored`,type:"success",duration:2e3}),i.updateObjective("bunker_override",t)}},removeBlastDoor(e){const o=this.app.root.findByName(`BlastDoor_${e}`);o&&(o.tween(o.getPosition()).to({x:o.getPosition().x,y:6,z:o.getPosition().z},2,pc.SineOut).start(),setTimeout(()=>{o.rigidbody&&(o.rigidbody.enabled=!1)},2e3))},activateAirlockSequence(e,o){o.fire("ui:notification",{text:`Airlock ${e} cycling - 10 seconds to pass through`,type:"warning",duration:2e3}),setTimeout(()=>{const o=this.app.root.findByName(`AirlockWall_${e}`);o&&o.rigidbody&&(o.rigidbody.enabled=!1)},1e3),setTimeout(()=>{const t=this.app.root.findByName(`AirlockWall_${e}`);t&&t.rigidbody&&(t.rigidbody.enabled=!0),o.fire("ui:notification",{text:`Airlock ${e} sealed`,type:"info",duration:1500})},1e4)},onUnload(e,o){console.log("[UndergroundBunker] Bunker systems shutting down..."),this.envInterval&&clearInterval(this.envInterval),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,o)}};async function n(e,o,t,i){console.log("[UndergroundBunker] Building entrance tunnel...");const s=t.create("SecurityOffice",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,1.5]},rigidbody:{type:"static"}},position:[-8,1.5,-4],scale:[4,3,3],tags:["interactive","office"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.3,.2),e.update(),s.model.meshInstances.forEach(o=>o.material=e)}e.addChild(s);const n=t.create("CodeSafe",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,1,.6]},rigidbody:{type:"static"}},position:[8,1,-3],scale:[1.6,2,1.2],tags:["interactive","safe"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.metalness=.9,e.update(),n.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(n),[{name:"AbandonedDesk",pos:[-4,.5,0]},{name:"BrokenRadio",pos:[4,.8,2]},{name:"EmptyLockers",pos:[0,1.5,4]}].forEach(o=>{const i=t.create(o.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,1]}},position:o.pos,scale:[2,2,2],tags:["scenery"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.4,.3),e.update(),i.model.meshInstances.forEach(o=>o.material=e)}e.addChild(i)});const a=t.createNPC("chief_anderson",{position:[-6,0,-2],displayName:"Chief Anderson (Recording)",dialogue:{greeting:"[AUDIO LOG] Day 1,247 of lockdown. Systems are failing. I'm sealing the blast doors.",topics:{codes:"Emergency codes are in the safe - Alpha, Beta, Gamma sequence required.",lockdown:"Pressure seals won't hold much longer. This place is becoming a tomb.",escape:"If anyone finds this... the airlock timing is critical. Don't get trapped."}}});i.sceneRoot.addChild(a),[{pos:[0,3.5,0],color:new pc.Color(.8,.6,.4)},{pos:[-10,3.5,0],color:new pc.Color(.8,.6,.4)},{pos:[10,3.5,0],color:new pc.Color(.8,.6,.4)}].forEach((o,i)=>{const s=t.createLight("point",{color:o.color,intensity:1.5,range:8,position:o.pos});e.addChild(s)});const r=t.create("SpawnPoint",{position:[0,1,4],tags:["spawn"]});e.addChild(r)}async function a(e,o,t,i){console.log("[UndergroundBunker] Building blast door chamber with MECHANICAL BARRIERS..."),[{id:"Alpha",pos:[-6,1.5,-6],wallPos:[0,1.5,-8]},{id:"Beta",pos:[-3,1.5,-2],wallPos:[-6,1.5,-4]},{id:"Gamma",pos:[3,1.5,-2],wallPos:[6,1.5,-4]}].forEach(e=>{const o=t.create(`Keypad_${e.id}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.5,.8,.2]},rigidbody:{type:"static"}},position:e.pos,scale:[1,1.6,.4],tags:["interactive","keypad"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.2),e.emissive=new pc.Color(.1,.3,.1),e.update(),o.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(o);const s=t.create(`BlastDoor_${e.id}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,3,.5]},rigidbody:{type:"static"}},position:e.wallPos,scale:[4,6,1],tags:["blast_door","impassable"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.4),e.metalness=.95,e.update(),s.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(s)});const s=t.create("BlastDoorRelease",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:1,height:2},rigidbody:{type:"static"}},position:[0,1,4],scale:[2,2,2],tags:["interactive","release"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.2,.2),e.emissive=new pc.Color(.3,.1,.1),e.update(),s.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(s);const n=t.create("BlastDoor_Master",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[6,3,1]},rigidbody:{type:"static"}},position:[0,1.5,8],scale:[12,6,2],tags:["blast_door","impassable","master"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.metalness=.98,e.update(),n.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(n),[{pos:[0,5.5,0],color:new pc.Color(.9,.9,.8)},{pos:[-6,4.5,0],color:new pc.Color(.9,.9,.8)},{pos:[6,4.5,0],color:new pc.Color(.9,.9,.8)}].forEach((o,i)=>{const s=t.createLight("point",{color:o.color,intensity:2,range:10,position:o.pos});e.addChild(s)})}async function r(e,o,t,i){console.log("[UndergroundBunker] Building pressure chamber with AIRLOCK BARRIERS..."),[t.create("PressureSuit",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2,.5]},rigidbody:{type:"static"}},position:[-6,2,-6],scale:[2,4,1],tags:["interactive","equipment"]}),t.create("BreathingApparatus",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.6,height:1.5},rigidbody:{type:"static"}},position:[6,.75,-6],scale:[1.2,1.5,1.2],tags:["interactive","equipment"]}),t.create("EnvironmentalScanner",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.5,.3,.8]},rigidbody:{type:"static"}},position:[0,1,-6],scale:[1,.6,1.6],tags:["interactive","equipment"]})].forEach(e=>{if(e.model){const o=new pc.StandardMaterial;o.diffuse=new pc.Color(.2,.4,.6),o.metalness=.7,o.update(),e.model.meshInstances.forEach(e=>e.material=o)}i.sceneRoot.addChild(e)}),[{id:1,pos:[-4,1.5,2],wallPos:[-4,1.5,4]},{id:2,pos:[0,1.5,2],wallPos:[0,1.5,4]},{id:3,pos:[4,1.5,2],wallPos:[4,1.5,4]}].forEach(e=>{const o=t.create(`AirlockChamber_${e.id}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:1.5,height:3},rigidbody:{type:"static"}},position:e.pos,scale:[3,3,3],tags:["interactive","airlock"]});if(o.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.5,.3),e.emissive=new pc.Color(.1,.2,.1),e.update(),o.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(o);const s=t.create(`AirlockWall_${e.id}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,2.5,.3]},rigidbody:{type:"static"}},position:e.wallPos,scale:[2,5,.6],tags:["airlock_wall","timed_barrier"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.5,.2),e.emissive=new pc.Color(.2,.2,.1),e.update(),s.model.meshInstances.forEach(o=>o.material=e)}i.sceneRoot.addChild(s)}),[{pos:[0,4.5,0],color:new pc.Color(1,.9,.6)},{pos:[-6,4,0],color:new pc.Color(1,.9,.6)},{pos:[6,4,0],color:new pc.Color(1,.9,.6)}].forEach((o,i)=>{const s=t.createLight("point",{color:o.color,intensity:1.8,range:9,position:o.pos});e.addChild(s)})}async function c(e,o,t,i){console.log("[UndergroundBunker] Building command vault...");const s=t.create("LifeSupportSystem",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,2,1]},rigidbody:{type:"static"}},position:[-8,2,-6],scale:[4,4,2],tags:["interactive","system"]}),n=t.create("CommunicationArray",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:1.5,height:4},rigidbody:{type:"static"}},position:[8,2,-6],scale:[3,4,3],tags:["interactive","system"]}),a=t.create("DefenseSystems",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,1.5,2]},rigidbody:{type:"static"}},position:[-8,1.5,6],scale:[6,3,4],tags:["interactive","system"]}),r=t.create("EmergencyProtocols",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[4,3,1]},rigidbody:{type:"static"}},position:[8,3,6],scale:[8,6,2],tags:["interactive","system"]});[{obj:s,color:new pc.Color(.2,.6,.3)},{obj:n,color:new pc.Color(.6,.3,.2)},{obj:a,color:new pc.Color(.3,.2,.6)},{obj:r,color:new pc.Color(.6,.6,.2)}].forEach(e=>{if(e.obj.model){const o=new pc.StandardMaterial;o.diffuse=e.color,o.emissive=new pc.Color(.3*e.color.r,.3*e.color.g,.3*e.color.b),o.update(),e.obj.model.meshInstances.forEach(e=>e.material=o)}i.sceneRoot.addChild(e.obj)});const c=t.create("CommandConsole",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:2,height:1.5}},position:[0,.75,0],scale:[4,1.5,4],tags:["command"]});if(c.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.5),e.metalness=.8,e.update(),c.model.meshInstances.forEach(o=>o.material=e)}e.addChild(c),[{pos:[0,6.5,0],color:new pc.Color(.9,.9,1)},{pos:[-8,5,0],color:new pc.Color(.9,.9,1)},{pos:[8,5,0],color:new pc.Color(.9,.9,1)}].forEach((o,i)=>{const s=t.createLight("point",{color:o.color,intensity:2.5,range:12,position:o.pos});e.addChild(s)})}}}]);
|
664.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[664],{664:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n={id:"generator_crisis",title:"Generator Crisis",type:"mission",async build(e,t,i){console.log("[GeneratorCrisis] Building generator room...");const n=t.createRoom({size:[25,5,20],position:[0,0,0],lighting:"emergency"});n.name="GeneratorRoom",e.root.addChild(n);const a=i.create("MainGenerator",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:2,height:4},rigidbody:{type:"static"}},position:[0,2,-5],scale:[4,4,4],tags:["interactive","mission_critical"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.emissive=new pc.Color(.8,.2,.2),e.emissiveIntensity=.5,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}n.addChild(a),[[-8,1,-5],[8,1,-5],[0,1,5]].forEach((e,t)=>{const a=i.create(`ControlPanel_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,.2]},rigidbody:{type:"static"}},position:e,scale:[2,2,.4],tags:["interactive","control_panel"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.3),e.emissive=0===t?new pc.Color(0,1,0):new pc.Color(1,0,0),e.emissiveIntensity=.3,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}n.addChild(a)});const o=i.createNPC("engineer_chen",{position:[5,0,0],displayName:"Engineer Chen",dialogue:{greeting:"The generator is failing! We need to fix it quickly!",topics:{generator:"The main power coupling has failed. Check the control panels.",help:"Activate all three control panels in the correct sequence.",sequence:"Green first, then the two red panels."}}});n.addChild(o);const s=i.createLight("point",{color:new pc.Color(1,0,0),intensity:1,range:15,position:[0,4,0]});let r=0;const c=e=>{s&&s.light&&(r+=10*e,s.light.intensity=.5+.5*Math.sin(r))};e.on("update",c),this.flickerHandler=c,n.addChild(s);const l=i.create("Sparks",{position:[0,3,-3]});n.addChild(l);const d=i.create("SpawnPoint",{position:[0,0,8]});return n.addChild(d),n},objectives:[{id:"talk_to_engineer",name:"Talk to the Engineer",description:"Find out what happened to the generator",type:"simple",rewards:{experience:30}},{id:"activate_panels",name:"Restore Power",description:"Activate control panels in correct sequence",type:"counter",target:3,progress:0,timeLimit:300,rewards:{experience:150,items:[{id:"tech_parts",quantity:5}]}},{id:"generator_fixed",name:"Crisis Averted",description:"The generator is back online!",type:"simple",prerequisites:["activate_panels"],rewards:{experience:200,skillPoints:1}}],state:{panelsActivated:[],correctSequence:["ControlPanel_0","ControlPanel_1","ControlPanel_2"],generatorFixed:!1},onLoad(e,t){console.log("[GeneratorCrisis] Mission started");const i=t.getSystem("objectivemanager");i&&(i.clearAllObjectives(),this.objectives.forEach(e=>{i.defineObjective(e.id,e)}),i.startObjective("talk_to_engineer")),this.setupPanelInteractions(e,t),e.fire("ui:notification",{text:"WARNING: Generator failure detected!",type:"error",duration:5e3})},setupPanelInteractions(e,t){const i=i=>{if(!i.includes("ControlPanel_"))return;const n=t.getSystem("objectivemanager");n&&!this.state.generatorFixed&&(this.state.panelsActivated.includes(i)?e.fire("ui:notification",{text:"Panel already activated",type:"warning"}):(this.state.panelsActivated.push(i),n.updateObjective("activate_panels",this.state.panelsActivated.length),this.state.panelsActivated.every((e,t)=>e===this.state.correctSequence[t])?(e.fire("ui:notification",{text:`Panel activated (${this.state.panelsActivated.length}/3)`,type:"success"}),3===this.state.panelsActivated.length&&this.fixGenerator(e,t)):(e.fire("ui:notification",{text:"Wrong sequence! Panels reset.",type:"error"}),this.state.panelsActivated=[],n.updateObjective("activate_panels",0),this.resetPanels(e))))};e.on("entity:interact",i),this.interactHandler=i},resetPanels(e){for(let t=0;t<3;t++){const i=e.root.findByName(`ControlPanel_${t}`);if(i&&i.model){const e=i.model.meshInstances[0].material;e.emissive=0===t?new pc.Color(0,1,0):new pc.Color(1,0,0),e.update()}}},fixGenerator(e,t){if(this.state.generatorFixed)return void console.log("[GeneratorCrisis] Generator already fixed, ignoring duplicate call");this.state.generatorFixed=!0;const i=e.root.findByName("MainGenerator");if(i&&i.model){const e=i.model.meshInstances[0].material;e.emissive=new pc.Color(0,.5,1),e.update()}const n=t.getSystem("objectivemanager");n&&(n.completeObjective("activate_panels"),n.startObjective("generator_fixed"),this.completionTimeout=setTimeout(()=>{n&&n.completeObjective("generator_fixed")},1e3)),e.fire("ui:notification",{text:"Generator restored! Crisis averted!",type:"success",duration:5e3});const a=e.root.findByName("Light");a&&(a.light.color=new pc.Color(1,1,1),a.light.intensity=1)},onUnload(e,t){console.log("[GeneratorCrisis] Cleaning up mission..."),this.flickerHandler&&(e.off("update",this.flickerHandler),this.flickerHandler=null),this.interactHandler&&(e.off("entity:interact",this.interactHandler),this.interactHandler=null),this.completionTimeout&&(clearTimeout(this.completionTimeout),this.completionTimeout=null),this.state.panelsActivated=[],this.state.generatorFixed=!1,console.log("[GeneratorCrisis] Mission cleanup complete")}}}}]);
|
713.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[713],{713:(e,t,o)=>{o.r(t),o.d(t,{default:()=>n});var i=o(96);const n={id:"data_center",title:"Corporate Data Center",type:"scene",async build(e,t,o){console.log("[DataCenter] Building corporate data center...");const n=new i.n(e,e.systems?.core||{});n.sceneBuilder=t,n.entityFactory=o,this.securityLevel="HIGH",this.detectionTimer=null,n.createRoom("reception_lobby",{size:[20,4,16],lighting:"corporate",position:[0,0,0],buildFunction:a,objectives:[{id:"infiltration_start",name:"Corporate Infiltration",description:"Gain access to the corporate data systems",type:"simple",autoStart:!0,rewards:{experience:30}},{id:"social_engineer",name:"Social Engineering",description:"Obtain security credentials from reception",type:"simple",rewards:{experience:50,items:[{id:"temp_badge",quantity:1}]}}]}),n.createRoom("technical_floor",{size:[35,5,25],lighting:"technical",position:[0,0,0],buildFunction:s,objectives:[{id:"network_mapping",name:"Network Reconnaissance",description:"Map the internal network infrastructure",type:"counter",target:6,progress:0,rewards:{experience:80},nextObjective:"bypass_firewall"},{id:"bypass_firewall",name:"Firewall Bypass",description:"Exploit network vulnerabilities to gain system access",type:"simple",prerequisites:["network_mapping"],rewards:{experience:120,skillPoints:2,items:[{id:"network_access",quantity:1}]}}]}),n.createRoom("server_core",{size:[30,8,20],lighting:"server_room",position:[0,0,0],buildFunction:c,objectives:[{id:"data_extraction",name:"Corporate Espionage",description:"Extract sensitive corporate intelligence",type:"sequence",target:["database_access","encryption_bypass","data_download"],progress:0,rewards:{experience:200,skillPoints:4}}]}),n.createRoom("executive_vault",{size:[18,6,14],lighting:"vault",position:[0,0,0],buildFunction:r,objectives:[{id:"executive_files",name:"Executive Intelligence",description:"Access the most classified corporate documents",type:"simple",rewards:{experience:300,skillPoints:5,items:[{id:"classified_docs",quantity:1}]}}]}),n.createDoor("reception_lobby","technical_floor",{type:"keycard",item:"temp_badge"},{playerSpawnPosition:[-12,0,0]}),n.createDoor("technical_floor","server_core",{type:"objective",id:"bypass_firewall"},{playerSpawnPosition:[0,0,8]}),n.createDoor("server_core","executive_vault",{type:"objective",id:"data_extraction"},{playerSpawnPosition:[0,0,5]});const l=await n.build(e,t,o);return l.multiRoom=n,l},onLoad(e,t){console.log("[DataCenter] Corporate systems online - Security Level: HIGH");const o=e.root.findByTag("scene_root")[0];o&&o.multiRoom&&(o.multiRoom.onLoad(e,t),this.multiRoom=o.multiRoom,this.interactionHandler=o=>{this.handleDataCenterInteraction(o,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler)),e.fire("ui:notification",{text:"INFILTRATION ACTIVE: Corporate espionage mission commenced",type:"info",duration:4e3})},handleDataCenterInteraction(e,t,o){console.log("[DataCenter] Interaction triggered with:",e);const i=o.getSystem("objectivemanager");if("ReceptionDesk"===e)i&&i.isObjectiveActive("infiltration_start")&&(i.completeObjective("infiltration_start"),i.startObjective("social_engineer")),t.fire("ui:notification",{text:'Receptionist: "Welcome to SecureCorp! Are you here for the IT consultation?"',type:"info",duration:4e3});else if("BadgePrinter"===e)i&&i.isObjectiveActive("social_engineer")&&(this.multiRoom.addItem("temp_badge"),i.completeObjective("social_engineer"),t.fire("ui:notification",{text:"Temporary security badge obtained - Technical floor access granted",type:"success",duration:3e3}));else if(e.startsWith("NetworkTerminal_")){if("technical_floor"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("network_mapping")){const o=parseInt(e.split("_")[1]),n=["Database cluster: 10.0.1.0/24","Executive subnet: 192.168.100.0/24","DMZ services: 172.16.0.0/16","Backup systems: 10.0.2.0/24","Security monitoring: 192.168.200.0/24","Administrative tools: 10.0.3.0/24"];t.fire("ui:notification",{text:`Network scan: ${n[o]}`,type:"info",duration:2500}),i.updateObjective("network_mapping")}}else if("FirewallConsole"===e)i&&i.isComplete("network_mapping")&&i.isObjectiveActive("bypass_firewall")&&(this.multiRoom.addItem("network_access"),i.completeObjective("bypass_firewall"),i.startObjective("data_extraction"),t.fire("ui:notification",{text:"FIREWALL COMPROMISED: Full network access obtained",type:"success",duration:4e3}));else if(["DatabaseServer","EncryptionModule","DownloadTerminal"].includes(e)){if("server_core"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("data_extraction")){const o={DatabaseServer:"database_access",EncryptionModule:"encryption_bypass",DownloadTerminal:"data_download"}[e],n={database_access:"Database access established",encryption_bypass:"Encryption protocols bypassed",data_download:"Corporate data extraction complete"};t.fire("ui:notification",{text:n[o],type:"success",duration:2500}),i.updateObjective("data_extraction",o)}}else"ExecutiveTerminal"===e&&"executive_vault"===this.multiRoom.currentRoom&&i&&i.isObjectiveActive("executive_files")&&(this.multiRoom.addItem("classified_docs"),i.completeObjective("executive_files"),t.fire("ui:notification",{text:"MISSION COMPLETE: Highest level corporate intelligence acquired",type:"success",duration:5e3}))},onUnload(e,t){console.log("[DataCenter] Disconnecting from corporate systems..."),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function a(e,t,o,i){console.log("[DataCenter] Building reception lobby...");const n=o.create("ReceptionDesk",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,.8,1.5]},rigidbody:{type:"static"}},position:[0,.8,-6],scale:[6,1.6,3],tags:["interactive","reception"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n);const a=o.create("BadgePrinter",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.4,.3,.3]},rigidbody:{type:"static"}},position:[2,1.6,-5.5],scale:[.8,.6,.6],tags:["interactive","printer"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.2),e.emissive=new pc.Color(0,.1,0),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(a),[[-6,.5,0],[-3,.5,0],[3,.5,0],[6,.5,0]].forEach((t,i)=>{const n=o.create(`CorporateChair_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,.8,.8]}},position:t,scale:[1.6,1.6,1.6],tags:["furniture"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.4),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)});const s=o.createNPC("receptionist_jenny",{position:[0,0,-5],displayName:"Jenny (Receptionist)",dialogue:{greeting:"Hi there! Welcome to SecureCorp Technologies. How can I help you today?",topics:{consultation:"Oh yes, the IT consultation! Let me print you a temporary access badge.",building:"Our technical teams work on the second floor - you'll need a badge for elevator access.",security:"Don't worry about security - our systems are state of the art. Completely impenetrable!"}}});i.sceneRoot.addChild(s),[{pos:[0,3.5,0],color:new pc.Color(.9,.9,.85)},{pos:[-8,3.5,0],color:new pc.Color(.9,.9,.85)},{pos:[8,3.5,0],color:new pc.Color(.9,.9,.85)}].forEach((t,i)=>{const n=o.createLight("point",{color:t.color,intensity:1.8,range:10,position:t.pos});e.addChild(n)})}async function s(e,t,o,i){console.log("[DataCenter] Building technical floor..."),[[-14,1,-10],[-7,1,-10],[7,1,-10],[14,1,-10],[-10,1,10],[10,1,10]].forEach((e,t)=>{const n=o.create(`NetworkTerminal_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1,.5]},rigidbody:{type:"static"}},position:e,scale:[2,2,1],tags:["interactive","terminal"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.1),e.emissive=new pc.Color(0,.2,.1),e.emissiveIntensity=.5,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(n)});const n=o.create("FirewallConsole",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,1]},rigidbody:{type:"static"}},position:[0,1.5,0],scale:[4,3,2],tags:["interactive","firewall"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.1,.1),e.emissive=new pc.Color(.4,.1,.1),e.emissiveIntensity=.6,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(n),[[-10,1.5,-5],[-10,1.5,5],[10,1.5,-5],[10,1.5,5]].forEach((t,i)=>{const n=o.create(`NetworkRack_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1.5,.5]}},position:t,scale:[2,3,1],tags:["equipment"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.2),e.emissive=new pc.Color(.1,.1,.05),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)});const a=o.createNPC("it_admin_david",{position:[5,0,-3],displayName:"David (IT Admin)",dialogue:{greeting:"Hey, you must be the new security consultant. Pretty impressive setup we have here.",topics:{network:"Our network spans multiple subnets - enterprise grade security throughout.",firewall:"That red console is our main firewall management system. Only senior admins have access.",servers:"The real magic happens in the server core - that's where all our critical data lives."}}});i.sceneRoot.addChild(a),[{pos:[0,4.5,0],color:new pc.Color(.8,.9,1)},{pos:[-12,4.5,0],color:new pc.Color(.8,.9,1)},{pos:[12,4.5,0],color:new pc.Color(.8,.9,1)}].forEach((t,i)=>{const n=o.createLight("point",{color:t.color,intensity:2,range:12,position:t.pos});e.addChild(n)})}async function c(e,t,o,i){console.log("[DataCenter] Building server core...");const n=o.create("DatabaseServer",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,2.5,1]},rigidbody:{type:"static"}},position:[-8,2.5,0],scale:[4,5,2],tags:["interactive","database"]}),a=o.create("EncryptionModule",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,2,1]},rigidbody:{type:"static"}},position:[0,2,0],scale:[3,4,2],tags:["interactive","encryption"]}),s=o.create("DownloadTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,.8]},rigidbody:{type:"static"}},position:[8,1.5,0],scale:[4,3,1.6],tags:["interactive","download"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.4,.6),e.emissive=new pc.Color(.1,.2,.3),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.3,.1),e.emissive=new pc.Color(.3,.15,.05),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.5,.2),e.emissive=new pc.Color(.05,.25,.1),e.update(),s.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(n),i.sceneRoot.addChild(a),i.sceneRoot.addChild(s),[[-12,2,-8],[-4,2,-8],[4,2,-8],[12,2,-8],[-12,2,8],[-4,2,8],[4,2,8],[12,2,8]].forEach((t,i)=>{const n=o.create(`ServerArray_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,2,1]}},position:t,scale:[4,4,2],tags:["server"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.1,.1,.1),e.emissive=new pc.Color(.05,.1,.05),e.emissiveIntensity=.3,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)}),[{pos:[0,7.5,0],color:new pc.Color(.6,.8,1)},{pos:[-10,6,0],color:new pc.Color(.6,.8,1)},{pos:[10,6,0],color:new pc.Color(.6,.8,1)}].forEach((t,i)=>{const n=o.createLight("point",{color:t.color,intensity:2.2,range:15,position:t.pos});e.addChild(n)})}async function r(e,t,o,i){console.log("[DataCenter] Building executive vault...");const n=o.create("ExecutiveTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2.5,2,1.5]},rigidbody:{type:"static"}},position:[0,2,-5],scale:[5,4,3],tags:["interactive","executive"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.2,.6),e.emissive=new pc.Color(.2,.1,.3),e.emissiveIntensity=.7,e.metalness=.8,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}i.sceneRoot.addChild(n),[[-6,1.5,0],[6,1.5,0],[-6,1.5,4],[6,1.5,4]].forEach((t,i)=>{const n=o.create(`SecureStorage_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1.5,1]}},position:t,scale:[3,3,2],tags:["storage"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.6,.7),e.metalness=.9,e.update(),n.model.meshInstances.forEach(t=>t.material=e)}e.addChild(n)}),[{pos:[0,5.5,0],color:new pc.Color(1,.9,.7)},{pos:[-6,4.5,0],color:new pc.Color(1,.9,.7)},{pos:[6,4.5,0],color:new pc.Color(1,.9,.7)}].forEach((t,i)=>{const n=o.createLight("point",{color:t.color,intensity:1.8,range:10,position:t.pos});e.addChild(n)})}}}]);
|
826.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[826],{826:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});const o={name:"Mobile Tavern Scene",description:"A mobile-optimized tavern with strategic camera angles for touch interaction",async build(e,t,a){console.log("[MobileTavernScene] Building mobile-optimized tavern...");const o=a.create("MobileTavernRoot",{position:[0,0,0],tags:["scene_root"]}),i=t.createRoom({size:[18,4,14],position:[0,0,0],lighting:"warm"});i.name="MobileTavernRoom",o.addChild(i);const n=a.createLight("point",{color:new pc.Color(1,.8,.4),intensity:3,range:12,position:[0,3,0]});i.addChild(n);const s=a.createLight("point",{color:new pc.Color(1,.6,.2),intensity:2.5,range:8,position:[-6,2.5,0]});i.addChild(s),this.createBarZone(i,a),this.createSeatingZone(i,a),this.createPerformanceZone(i,a),this.createQuestZone(i,a);const r=a.create("SpawnPoint",{position:[0,0,6],tags:["spawn"]});return o.addChild(r),console.log("[MobileTavernScene] Mobile tavern built successfully"),o},createBarZone(e,t){const a=t.create("BarCounter",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2.5,.5,.75]},rigidbody:{type:"static"}},position:[-5,.5,0],scale:[5,1,1.5],tags:["furniture","bar","interactive"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.3,.1),e.emissive=new pc.Color(.1,.05,0),e.update(),a.model.material=e}e.addChild(a);const o=t.createNPC("bartender_grim",{position:[-4,0,0],displayName:"Grim the Bartender",dialogue:{greeting:"Welcome to the Rusty Tankard! What can I get you?",topics:{drink:"Our special today is Dragon's Breath Ale. Burns on the way down!",rumors:"Strange things happening at the old generator station...",quest:"Talk to the patron in the corner. He's been asking for help."}}});o.tags.add("bartender"),o.tags.add("mobile_optimized"),e.addChild(o),[[-6,.3,1],[-5,.3,1],[-4,.3,1]].forEach((a,o)=>{const i=t.create(`BarStool_${o}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.3,height:.6},rigidbody:{type:"static"}},position:a,scale:[.6,.6,.6],tags:["furniture","stool"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.2,.1),e.update(),i.model.material=e}e.addChild(i)});const i=t.create("BeerTap",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.2,height:.8},rigidbody:{type:"static"}},position:[-5.5,1.2,-.3],scale:[.4,.8,.4],tags:["interactive","beer_tap"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.6,.3),e.emissive=new pc.Color(.1,.1,0),e.update(),i.model.material=e}e.addChild(i)},createSeatingZone(e,t){[{pos:[3,0,-3],name:"Table_Main",occupant:"patron_mysterious"},{pos:[2,0,3],name:"Table_Side",occupant:null},{pos:[-2,0,3],name:"Table_Corner",occupant:null}].forEach((a,o)=>{const i=t.create(a.name,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,.4,.8]},rigidbody:{type:"static"}},position:[a.pos[0],.4,a.pos[2]],scale:[1.6,.8,1.6],tags:["furniture","table","interactive"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.3,.2),e.update(),i.model.material=e}if(e.addChild(i),[[a.pos[0]+1.2,.3,a.pos[2]],[a.pos[0]-1.2,.3,a.pos[2]],[a.pos[0],.3,a.pos[2]+1.2],[a.pos[0],.3,a.pos[2]-1.2]].forEach((a,i)=>{const n=t.create(`Chair_${o}_${i}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,.4,.3]},rigidbody:{type:"static"}},position:a,scale:[.6,.8,.6],tags:["furniture","chair"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.25,.15),e.update(),n.model.material=e}e.addChild(n)}),a.occupant){const o=t.createNPC(a.occupant,{position:[a.pos[0],0,a.pos[2]-1.5],displayName:"Mysterious Patron",dialogue:{greeting:"You look capable... I might have a job for you.",topics:{job:"The medical bay needs supplies delivered. Dangerous work.",payment:"100 gold pieces, plus whatever you find along the way.",accept:"Excellent! Head to the medical bay when you're ready."}}});o.tags.add("quest_giver"),o.tags.add("mobile_optimized"),e.addChild(o)}})},createPerformanceZone(e,t){const a=t.create("Stage",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,.1,1.5]},rigidbody:{type:"static"}},position:[0,.1,-5],scale:[3,.2,3],tags:["furniture","stage"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.emissive=new pc.Color(.05,.03,.01),e.update(),a.model.material=e}e.addChild(a);const o=t.createNPC("bard_melody",{position:[0,.2,-5],displayName:"Melody the Bard",dialogue:{greeting:"βͺ Welcome, traveler! Care to hear a song? βͺ",topics:{song:"βͺ The generator failed one night... βͺ",tip:"A coin for your humble bard?",news:"I heard the nightshift at the station is cursed!"}}});o.tags.add("bard"),o.tags.add("mobile_optimized"),e.addChild(o);const i=t.createLight("spot",{color:new pc.Color(1,.9,.6),intensity:2,range:8,position:[0,3,-3],innerConeAngle:20,outerConeAngle:40});i.lookAt(new pc.Vec3(0,.2,-5)),e.addChild(i)},createQuestZone(e,t){const a=t.create("QuestBoard",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1.2,.1]},rigidbody:{type:"static"}},position:[7,2.4,0],scale:[2,2.4,.2],tags:["interactive","quest_board","mobile_optimized"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.4,.2),e.emissive=new pc.Color(.1,.05,0),e.update(),a.model.material=e}e.addChild(a);const o=t.createLight("spot",{color:new pc.Color(1,1,.8),intensity:1.5,range:6,position:[6,3.5,2],innerConeAngle:30,outerConeAngle:50});o.lookAt(new pc.Vec3(7,2.4,0)),e.addChild(o),[[6.5,3,.15],[7.5,3,.15],[7,2,.15]].forEach((a,o)=>{const i=t.create(`Notice_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.2,.3,.02]},rigidbody:{type:"static"}},position:a,scale:[.4,.6,.04],tags:["decoration","notice"]});if(i.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.9,.9,.8),e.update(),i.model.material=e}e.addChild(i)})},objectives:[{id:"mobile_tavern_entry",name:"Welcome to the Mobile Tavern",description:"Look around using camera angles",type:"simple",autoStart:!0,rewards:{experience:15}},{id:"explore_camera_angles",name:"Explore Different Views",description:"Use swipe or arrow buttons to view all 4 camera angles",type:"counter",target:4,progress:0,rewards:{experience:30}},{id:"mobile_npc_interactions",name:"Touch to Interact",description:"Touch to talk to all NPCs in the tavern",type:"counter",target:3,progress:0,prerequisites:["explore_camera_angles"],rewards:{experience:50,gold:20}},{id:"mobile_quest_board",name:"Check the Quest Board",description:"Touch the quest board to see available missions",type:"simple",rewards:{experience:25}}],state:{anglesViewed:new Set,npcsInteracted:new Set,questBoardAccessed:!1,currentCameraAngle:0},onLoad(e,t){console.log("[MobileTavernScene] Mobile tavern loaded, setting up mobile-optimized objectives...");const a=t.getSystem("objectivemanager");a&&(a.clearAllObjectives(),this.objectives.forEach(e=>{a.defineObjective(e.id,e)}),a.startObjective("mobile_tavern_entry"),a.startObjective("explore_camera_angles")),this.setupMobileInteractions(e,t),e.fire("ui:notification",{text:"Welcome to the Mobile Tavern! Swipe or use arrows to change camera angles, tap to interact.",type:"info",duration:6e3})},setupMobileInteractions(e,t){const a=t.getSystem("objectivemanager"),o=e=>{this.state.anglesViewed.add(e.index),this.state.currentCameraAngle=e.index,a&&a.isObjectiveActive("explore_camera_angles")&&(a.updateObjective("explore_camera_angles",this.state.anglesViewed.size),this.state.anglesViewed.size>=4&&(a.completeObjective("explore_camera_angles"),a.startObjective("mobile_npc_interactions"),a.startObjective("mobile_quest_board")))};e.on("camera:angleChanged",o),this.angleChangeHandler=o;const i=t=>{console.log(`[MobileTavernScene] Mobile NPC interaction: ${t}`),this.state.npcsInteracted.has(t)||(this.state.npcsInteracted.add(t),e.fire("ui:notification",{text:`Talked to ${t.replace("_"," ")}`,type:"success",duration:2e3}),a&&a.isObjectiveActive("mobile_npc_interactions")&&(a.updateObjective("mobile_npc_interactions",this.state.npcsInteracted.size),this.state.npcsInteracted.size>=3&&a.completeObjective("mobile_npc_interactions")))};e.on("npc:interact",i),this.npcHandler=i;const n=t=>{"QuestBoard"!==t||this.state.questBoardAccessed||(this.state.questBoardAccessed=!0,e.fire("ui:notification",{text:"Mobile Quest Board:\nβ’ Touch-Optimized Missions\nβ’ Swipe-Friendly Objectives\nβ’ Mobile Rewards",type:"info",duration:4e3}),a&&a.completeObjective("mobile_quest_board"))};e.on("interaction:triggered",n),this.interactHandler=n},onUnload(e,t){console.log("[MobileTavernScene] Cleaning up mobile tavern scene..."),this.angleChangeHandler&&(e.off("camera:angleChanged",this.angleChangeHandler),this.angleChangeHandler=null),this.npcHandler&&(e.off("npc:interact",this.npcHandler),this.npcHandler=null),this.interactHandler&&(e.off("interaction:triggered",this.interactHandler),this.interactHandler=null),e.root.findByTag("npc").forEach(e=>{e.cleanupLabel&&e.cleanupLabel()}),this.state&&(this.state.anglesViewed?.clear(),this.state.npcsInteracted?.clear(),this.state.questBoardAccessed=!1,this.state.currentCameraAngle=0)}}}}]);
|
881.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[881],{881:(e,t,i)=>{i.r(t),i.d(t,{default:()=>a});const a={id:"medical_bay",title:"Medical Bay",type:"scene",async build(e,t,i){console.log("[MedicalBayScene] Building medical bay scene...");const a=t.createRoom({size:[20,4,15],position:[0,0,0],lighting:"clinical"});a.name="MedicalBayRoom",e.root.addChild(a),[[-6,.5,-3],[-6,.5,3],[6,.5,-3],[6,.5,3]].forEach((e,t)=>{const s=i.create(`MedBed_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,.4,2]},rigidbody:{type:"static"}},position:e,scale:[2,.8,4]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.9,.9,.9),e.update(),s.model.meshInstances.forEach(t=>t.material=e)}s.tags.add("interactive","medical_bed"),a.addChild(s)});const s=i.create("MedicalCabinet",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,.5]},rigidbody:{type:"static"}},position:[0,1,-7],scale:[3,2,1],tags:["interactive"]});if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.7,.8,.9),e.update(),s.model.meshInstances.forEach(t=>t.material=e)}s.tags.add("interactive","supply_cabinet"),a.addChild(s);const n=i.createNPC("doctor_hayes",{position:[0,0,0],displayName:"Dr. Hayes",dialogue:{greeting:"Thank goodness you're here! We have an emergency situation.",topics:{emergency:"Multiple patients came in with unknown symptoms. We need help.",supplies:"The medical supplies are running low. Check the cabinet.",patients:"Please check on all the patients and report back to me.",status:"How are the examinations going? Any concerning findings?"}}});n.tags.add("medical_staff"),a.addChild(n);const o=i.createLight("point",{color:new pc.Color(1,1,1),intensity:2,range:10,position:[-5,3,0]});a.addChild(o);const c=i.createLight("point",{color:new pc.Color(1,1,1),intensity:2,range:10,position:[5,3,0]});a.addChild(c);const l=i.create("SpawnPoint",{position:[0,0,5]});return a.addChild(l),a},objectives:[{id:"medical_arrival",name:"Medical Bay Assessment",description:"Assess the medical emergency situation",type:"simple",autoStart:!0,rewards:{experience:15}},{id:"examine_patients",name:"Check on Patients",description:"Examine all 4 medical beds to assess patient conditions",type:"counter",target:4,progress:0,rewards:{experience:40,items:[{id:"medical_data",quantity:1}]}},{id:"find_medicine",name:"Collect Medical Supplies",description:"Search the medical cabinet for emergency supplies",type:"simple",rewards:{items:[{id:"health_potion",quantity:3},{id:"antibiotics",quantity:2}],experience:30}},{id:"talk_to_doctor",name:"Consult Dr. Hayes",description:"Speak with Dr. Hayes about the emergency situation",type:"simple",rewards:{experience:50,items:[{id:"medical_report",quantity:1}]}},{id:"emergency_complete",name:"Emergency Response Complete",description:"Successfully assist with the medical bay emergency",type:"simple",prerequisites:["examine_patients","find_medicine","talk_to_doctor"],rewards:{experience:100,skillPoints:1,items:[{id:"medical_badge",quantity:1}]}}],state:{bedsExamined:new Set,suppliesCollected:!1,doctorConsulted:!1,completionInProgress:!1},onLoad(e,t){console.log("[MedicalBayScene] Scene loaded, setting up medical objectives...");const i=t.getSystem("objectivemanager");i&&(i.clearAllObjectives(),this.objectives.forEach(e=>{i.defineObjective(e.id,e)}),i.startObjective("medical_arrival")),this.setupInteractions(e,t),e.fire("ui:notification",{text:"EMERGENCY: Medical bay requires immediate assistance!",type:"warning",duration:5e3}),this.startMainObjectivesTimer=setTimeout(()=>{try{const e=t.getSystem("objectivemanager");if(!e)return void console.warn("[MedicalBayScene] ObjectiveManager not available during auto-start");e.objectives.has("medical_arrival")&&e.completeObjective("medical_arrival"),e.objectives.has("examine_patients")&&e.startObjective("examine_patients"),e.objectives.has("find_medicine")&&e.startObjective("find_medicine"),e.objectives.has("talk_to_doctor")&&e.startObjective("talk_to_doctor")}catch(e){console.error("[MedicalBayScene] Error during auto-start objectives:",e)}},3e3)},setupInteractions(e,t){const i=t.getSystem("objectivemanager"),a=t=>{if(console.log(`[MedicalBayScene] Interacting with: ${t}`),t.startsWith("MedBed_")&&!this.state.bedsExamined.has(t)){this.state.bedsExamined.add(t);const a=t.split("_")[1],s=["stable","critical","recovering","needs medication"][parseInt(a)];if(e.fire("ui:notification",{text:`Patient ${parseInt(a)+1}: Status - ${s}`,type:"info",duration:3e3}),i){const t=i.objectives.get("examine_patients");t&&"active"===t.state&&(i.updateObjective("examine_patients",this.state.bedsExamined.size),this.state.bedsExamined.size>=4&&this.checkCompletionStatus(i,e))}}else"MedicalCabinet"!==t||this.state.suppliesCollected||(this.state.suppliesCollected=!0,e.fire("ui:notification",{text:"Found: Emergency medical supplies and medications",type:"success",duration:4e3}),i&&(i.completeObjective("find_medicine"),this.checkCompletionStatus(i,e)))};e.on("interaction:triggered",a),this.interactHandler=a;const s=t=>{"doctor_hayes"!==t||this.state.doctorConsulted||(this.state.doctorConsulted=!0,e.fire("ui:notification",{text:'Dr. Hayes: "Thank you for your assistance! The crisis is under control."',type:"info",duration:5e3}),i&&(i.completeObjective("talk_to_doctor"),this.checkCompletionStatus(i,e)))};e.on("npc:interact",s),this.npcHandler=s},checkCompletionStatus(e,t){this.state.completionInProgress?console.log("[MedicalBayScene] Completion already in progress, ignoring duplicate call"):this.state.bedsExamined.size>=4&&this.state.suppliesCollected&&this.state.doctorConsulted&&(console.log("[MedicalBayScene] All objectives complete, starting final sequence"),this.state.completionInProgress=!0,e.startObjective("emergency_complete"),this.completionTimer=setTimeout(()=>{try{e.completeObjective("emergency_complete"),t.fire("ui:notification",{text:"MISSION SUCCESS: Medical emergency successfully resolved!",type:"success",duration:6e3}),console.log("[MedicalBayScene] Mission completion sequence finished")}catch(e){console.error("[MedicalBayScene] Error during completion:",e)}finally{this.completionTimer=null,this.state.completionInProgress=!1}},2e3))},onUnload(e,t){console.log("[MedicalBayScene] Cleaning up medical bay scene..."),this.startMainObjectivesTimer&&(clearTimeout(this.startMainObjectivesTimer),this.startMainObjectivesTimer=null),this.completionTimer&&(clearTimeout(this.completionTimer),this.completionTimer=null),this.interactHandler&&(e.off("interaction:triggered",this.interactHandler),this.interactHandler=null),this.npcHandler&&(e.off("npc:interact",this.npcHandler),this.npcHandler=null),e.root.findByTag("npc").forEach(e=>{e.cleanupLabel&&e.cleanupLabel()}),this.state&&(this.state.bedsExamined?.clear(),this.state.suppliesCollected=!1,this.state.doctorConsulted=!1,this.state.completionInProgress=!1)}}}}]);
|
942.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[942],{942:(e,t,i)=>{i.r(t),i.d(t,{default:()=>a});var o=i(96);const a={id:"military_compound",title:"Military Compound",type:"scene",async build(e,t,i){console.log("[MilitaryCompound] Building military compound...");const a=new o.n(e,e.systems?.core||{});a.sceneBuilder=t,a.entityFactory=i,this.alertLevel="GREEN",this.infiltrationTimer=9e5,this.startTime=null,a.createRoom("perimeter_gate",{size:[22,4,18],lighting:"military",position:[0,0,0],buildFunction:n,objectives:[{id:"compound_entry",name:"Perimeter Breach",description:"Infiltrate the military compound perimeter",type:"simple",autoStart:!0,rewards:{experience:35}},{id:"get_patrol_schedule",name:"Intelligence Gathering",description:"Obtain guard patrol schedules from checkpoint",type:"simple",rewards:{experience:60,items:[{id:"patrol_intel",quantity:1}]}}]}),a.createRoom("barracks_complex",{size:[35,5,28],lighting:"barracks",position:[0,0,0],buildFunction:s,objectives:[{id:"equipment_acquisition",name:"Equipment Procurement",description:"Acquire military equipment from supply areas",type:"counter",target:5,progress:0,rewards:{experience:100},nextObjective:"disable_communications"},{id:"disable_communications",name:"Communication Blackout",description:"Sabotage compound communication systems",type:"simple",prerequisites:["equipment_acquisition"],rewards:{experience:150,skillPoints:3,items:[{id:"sabotage_kit",quantity:1}]}}]}),a.createRoom("command_center",{size:[25,6,20],lighting:"command",position:[0,0,0],buildFunction:r,objectives:[{id:"tactical_override",name:"Command Override",description:"Override tactical command systems",type:"sequence",target:["radar_disable","defense_grid","command_codes"],progress:0,rewards:{experience:200,skillPoints:4}}]}),a.createRoom("weapon_vault",{size:[20,7,16],lighting:"vault",position:[0,0,0],buildFunction:c,objectives:[{id:"secure_weapons",name:"Weapons Acquisition",description:"Secure advanced military hardware",type:"simple",rewards:{experience:300,skillPoints:5,items:[{id:"military_hardware",quantity:1}]}}]}),a.createDoor("perimeter_gate","barracks_complex",{type:"keycard",item:"patrol_intel"},{playerSpawnPosition:[-15,0,0]}),a.createDoor("barracks_complex","command_center",{type:"objective",id:"disable_communications"},{playerSpawnPosition:[0,0,8]}),a.createDoor("command_center","weapon_vault",{type:"objective",id:"tactical_override"},{playerSpawnPosition:[0,0,6]});const l=await a.build(e,t,i);return l.multiRoom=a,l},onLoad(e,t){console.log("[MilitaryCompound] Military systems online - Alert Level: GREEN");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.startTime=Date.now(),this.setupAlertSystem(e),this.interactionHandler=i=>{this.handleMilitaryInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler)),e.fire("ui:notification",{text:"INFILTRATION COMMENCED: Military compound breach - Maintain stealth",type:"warning",duration:4e3})},setupAlertSystem(e){this.alertInterval=setInterval(()=>{if(!this.startTime)return;const t=Date.now()-this.startTime,i=Math.max(0,this.infiltrationTimer-t);t>6e5&&"GREEN"===this.alertLevel?(this.alertLevel="YELLOW",e.fire("ui:notification",{text:"ALERT LEVEL: YELLOW - Increased security patrols detected",type:"warning",duration:4e3})):t>72e4&&"YELLOW"===this.alertLevel?(this.alertLevel="ORANGE",e.fire("ui:notification",{text:"ALERT LEVEL: ORANGE - Security lockdown protocols initiated",type:"error",duration:4e3})):i<=0&&"RED"!==this.alertLevel&&(this.alertLevel="RED",this.onFullAlert(e))},3e4)},onFullAlert(e){clearInterval(this.alertInterval),e.fire("ui:notification",{text:"ALERT LEVEL: RED - Full compound lockdown! Mission compromised!",type:"error",duration:8e3})},handleMilitaryInteraction(e,t,i){console.log("[MilitaryCompound] Interaction triggered with:",e);const o=i.getSystem("objectivemanager");if("SecurityCheckpoint"===e)o&&o.isObjectiveActive("compound_entry")&&(o.completeObjective("compound_entry"),o.startObjective("get_patrol_schedule")),t.fire("ui:notification",{text:"Guard post detected - Searching for intelligence",type:"info",duration:3e3});else if("GuardStation"===e)o&&o.isObjectiveActive("get_patrol_schedule")&&(this.multiRoom.addItem("patrol_intel"),o.completeObjective("get_patrol_schedule"),t.fire("ui:notification",{text:"Patrol schedules acquired - Compound access intelligence obtained",type:"success",duration:3e3}));else if(e.startsWith("EquipmentCache_")){if("barracks_complex"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("equipment_acquisition")){const i=parseInt(e.split("_")[1]),a=["Night vision goggles","Combat radio","Tactical vest","Electronic lock picks","Explosive charges"];t.fire("ui:notification",{text:`Equipment acquired: ${a[i]}`,type:"success",duration:2500}),o.updateObjective("equipment_acquisition")}}else if("CommunicationHub"===e)o&&o.isComplete("equipment_acquisition")&&o.isObjectiveActive("disable_communications")&&(this.multiRoom.addItem("sabotage_kit"),o.completeObjective("disable_communications"),o.startObjective("tactical_override"),t.fire("ui:notification",{text:"COMMUNICATIONS DISABLED: Compound is isolated from external support",type:"success",duration:4e3}));else if(["RadarSystem","DefenseGrid","CommandTerminal"].includes(e)){if("command_center"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("tactical_override")){const i={RadarSystem:"radar_disable",DefenseGrid:"defense_grid",CommandTerminal:"command_codes"}[e],a={radar_disable:"RADAR SYSTEMS DISABLED",defense_grid:"DEFENSE GRID COMPROMISED",command_codes:"COMMAND CODES EXTRACTED"};t.fire("ui:notification",{text:a[i],type:"success",duration:2500}),o.updateObjective("tactical_override",i)}}else"WeaponVault"===e&&"weapon_vault"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("secure_weapons")&&(this.multiRoom.addItem("military_hardware"),o.completeObjective("secure_weapons"),t.fire("ui:notification",{text:"MISSION SUCCESS: Advanced military hardware secured",type:"success",duration:5e3}))},onUnload(e,t){console.log("[MilitaryCompound] Military systems shutting down..."),this.alertInterval&&clearInterval(this.alertInterval),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function n(e,t,i,o){console.log("[MilitaryCompound] Building perimeter gate...");const a=i.create("SecurityCheckpoint",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1,1.5]},rigidbody:{type:"static"}},position:[0,1,-7],scale:[4,2,3],tags:["interactive","checkpoint"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.2),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}e.addChild(a);const n=i.create("GuardStation",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1,1.5,.8]},rigidbody:{type:"static"}},position:[4,1.5,-6],scale:[2,3,1.6],tags:["interactive","guard_post"]});if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.4,.3),e.emissive=new pc.Color(.1,.2,.1),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(n),[[-8,1.5,0],[-4,1.5,0],[4,1.5,0],[8,1.5,0],[-8,1.5,6],[8,1.5,6]].forEach((t,o)=>{const a=i.create(`PerimeterFence_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,1.5,.1]}},position:t,scale:[4,3,.2],tags:["obstacle"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.metalness=.8,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}e.addChild(a)});const s=i.createNPC("sergeant_harris",{position:[-2,0,-5],displayName:"Sergeant Harris",dialogue:{greeting:"Hold it right there! This is a restricted military facility.",topics:{patrol:"Standard protocol - all guard stations maintain updated patrol schedules.",security:"Perimeter is secure, but we've had reports of unusual activity lately.",compound:"Beyond this gate is classified - you don't have clearance for that area."}}});o.sceneRoot.addChild(s),[{pos:[0,3.5,0],color:new pc.Color(1,1,.9)},{pos:[-8,3.5,0],color:new pc.Color(1,1,.9)},{pos:[8,3.5,0],color:new pc.Color(1,1,.9)}].forEach((t,o)=>{const a=i.createLight("point",{color:t.color,intensity:2,range:10,position:t.pos});e.addChild(a)})}async function s(e,t,i,o){console.log("[MilitaryCompound] Building barracks complex..."),[[-12,.8,-10],[-6,.8,-10],[6,.8,-10],[12,.8,-10],[0,.8,10]].forEach((e,t)=>{const a=i.create(`EquipmentCache_${t}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.2,.8,.8]},rigidbody:{type:"static"}},position:e,scale:[2.4,1.6,1.6],tags:["interactive","equipment"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.3,.2),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a)});const a=i.create("CommunicationHub",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:1.5,height:4},rigidbody:{type:"static"}},position:[0,2,0],scale:[3,4,3],tags:["interactive","communications"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.2,.3),e.emissive=new pc.Color(.1,.1,.2),e.emissiveIntensity=.5,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a),[[-10,1.5,8],[10,1.5,8],[-10,1.5,-8],[10,1.5,-8]].forEach((t,o)=>{const a=i.create(`Barracks_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[4,1.5,3]}},position:t,scale:[8,3,6],tags:["building"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.4,.3),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}e.addChild(a)});const n=i.createNPC("supply_officer_jones",{position:[8,0,0],displayName:"Supply Officer Jones",dialogue:{greeting:"Equipment inventory is running smoothly. Everything accounted for.",topics:{equipment:"We keep tactical gear distributed across multiple cache points for security.",communications:"That comm tower handles all external contact - vital for operations.",security:"Standard procedure - equipment audits every 6 hours to prevent theft."}}});o.sceneRoot.addChild(n),[{pos:[0,4.5,0],color:new pc.Color(.9,.9,.8)},{pos:[-12,4,0],color:new pc.Color(.9,.9,.8)},{pos:[12,4,0],color:new pc.Color(.9,.9,.8)}].forEach((t,o)=>{const a=i.createLight("point",{color:t.color,intensity:1.8,range:12,position:t.pos});e.addChild(a)})}async function r(e,t,i,o){console.log("[MilitaryCompound] Building command center...");const a=i.create("RadarSystem",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:2,height:3},rigidbody:{type:"static"}},position:[-8,1.5,-6],scale:[4,3,4],tags:["interactive","radar"]}),n=i.create("DefenseGrid",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,2.5,1]},rigidbody:{type:"static"}},position:[0,2.5,-6],scale:[4,5,2],tags:["interactive","defense"]}),s=i.create("CommandTerminal",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,1.5,1.5]},rigidbody:{type:"static"}},position:[8,1.5,-6],scale:[6,3,3],tags:["interactive","command"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.2,.6,.3),e.emissive=new pc.Color(.1,.3,.15),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}if(n.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.3,.2),e.emissive=new pc.Color(.3,.15,.1),e.update(),n.model.meshInstances.forEach(t=>t.material=e)}if(s.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.6),e.emissive=new pc.Color(.15,.15,.3),e.emissiveIntensity=.6,e.update(),s.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a),o.sceneRoot.addChild(n),o.sceneRoot.addChild(s),[[-8,.8,4],[-4,.8,4],[4,.8,4],[8,.8,4]].forEach((t,o)=>{const a=i.create(`Workstation_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[2,.8,1]}},position:t,scale:[4,1.6,2],tags:["equipment"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.3,.3),e.emissive=new pc.Color(.1,.1,.15),e.update(),a.model.meshInstances.forEach(t=>t.material=e)}e.addChild(a)});const r=i.createNPC("commander_stone",{position:[0,0,2],displayName:"Commander Stone",dialogue:{greeting:"This is a restricted command center! How did you get past security?",topics:{radar:"Our radar array monitors all airspace within a 50-mile radius.",defense:"Defense grid controls automated perimeter weapons systems.",command:"Command terminal has access to all compound tactical systems."}}});o.sceneRoot.addChild(r),[{pos:[0,5.5,0],color:new pc.Color(.7,.8,1)},{pos:[-8,4.5,0],color:new pc.Color(.7,.8,1)},{pos:[8,4.5,0],color:new pc.Color(.7,.8,1)}].forEach((t,o)=>{const a=i.createLight("point",{color:t.color,intensity:2.2,range:12,position:t.pos});e.addChild(a)})}async function c(e,t,i,o){console.log("[MilitaryCompound] Building weapon vault...");const a=i.create("WeaponVault",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,3,2]},rigidbody:{type:"static"}},position:[0,3,-6],scale:[6,6,4],tags:["interactive","vault"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.4,.5),e.emissive=new pc.Color(.2,.2,.3),e.metalness=.9,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(a),[[-6,2,0],[6,2,0],[-6,2,4],[6,2,4]].forEach((t,o)=>{const a=i.create(`WeaponRack_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,2,.5]}},position:t,scale:[3,4,1],tags:["storage"]});if(a.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.5,.6),e.metalness=.8,e.update(),a.model.meshInstances.forEach(t=>t.material=e)}e.addChild(a)}),[{pos:[0,6.5,0],color:new pc.Color(1,.8,.8)},{pos:[-6,5,0],color:new pc.Color(1,.8,.8)},{pos:[6,5,0],color:new pc.Color(1,.8,.8)}].forEach((t,o)=>{const a=i.createLight("point",{color:t.color,intensity:2,range:12,position:t.pos});e.addChild(a)})}}}]);
|
96.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[96],{96:(t,e,o)=>{o.d(e,{n:()=>r});class i{constructor(t,e){this.app=t,this.id=e.id,this.state="locked",this.requirement=e.requirement||{type:"none"},this.fromRoom=e.fromRoom,this.toRoom=e.toRoom,this.animation=e.animation||"slide",this.entity=null,this.playerSpawnPosition=e.playerSpawnPosition||[0,0,0],this.onTransition=e.onTransition||null}createEntity(t,e,o=[0,0,0]){return this.entity=t.create(this.id,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.1,1.5,1]},rigidbody:{type:"kinematic"}},position:e,rotation:o,scale:[.2,3,2],tags:["door","interactive"]}),this.entity.name=this.id,this.updateDoorAppearance(),this.entity}updateDoorAppearance(){if(!this.entity||!this.entity.model)return;const t=new pc.StandardMaterial;switch(this.state){case"locked":t.diffuse=new pc.Color(.7,.3,.3),t.emissive=new pc.Color(.2,0,0);break;case"unlocked":case"open":t.diffuse=new pc.Color(.3,.7,.3),t.emissive=new pc.Color(0,.2,0);break;default:t.diffuse=new pc.Color(.5,.5,.5)}t.metalness=.8,t.update(),this.entity.model.meshInstances.forEach(e=>e.material=t)}canUnlock(t){if(!this.requirement||!t)return!0;switch(this.requirement.type){case"keycard":return t.inventory?.has(this.requirement.item)||!1;case"objective":try{const e=t.core?.getSystem("objectivemanager");return e?.isComplete(this.requirement.id)||!1}catch(t){return console.warn(`[DoorEntity] Error checking objective: ${t.message}`),!1}case"skill":return t.skills?.hasLevel?.(this.requirement.skill,this.requirement.level||1)||!1;case"sequence":return this.checkInteractionSequence(t.lastInteractions);case"none":return!0;default:return!1}}checkInteractionSequence(t){if(!this.requirement.sequence||!t)return!1;const e=this.requirement.sequence,o=t.slice(-e.length);return e.every((t,e)=>o[e]===t)}async unlock(t){if(!t)return console.error("[DoorEntity] No gameState provided to unlock()"),!1;if(!this.canUnlock(t)){const e=this.getUnlockFailureReason(t);return this.app.fire("ui:notification",{text:`Door locked: ${e}`,type:"warning",duration:3e3}),!1}return this.state="opening",this.updateDoorAppearance(),await this.playAnimation("open"),this.state="open",this.updateDoorAppearance(),this.app.fire("ui:notification",{text:`Access granted to ${this.toRoom.replace("_"," ")}`,type:"success",duration:2e3}),!0}getUnlockFailureReason(t){switch(this.requirement.type){case"keycard":return`Requires ${this.requirement.item.replace("_"," ")}`;case"objective":return`Complete "${this.requirement.id}" first`;case"skill":return`Requires ${this.requirement.skill} level ${this.requirement.level}`;case"sequence":return"Requires specific interaction sequence";default:return"Unknown requirement"}}async playAnimation(t){if(!this.entity)return;const e=this.entity.getLocalPosition().clone(),o=this.entity.getLocalScale().clone(),i=this.entity.getLocalEulerAngles().clone();let n,s;switch(this.createDoorEffects(t),this.animation){case"slide":n="open"===t?new pc.Vec3(e.x,e.y+3.2,e.z):new pc.Vec3(e.x,e.y-3.2,e.z),s=i.clone();break;case"swing":n=e.clone(),s="open"===t?new pc.Vec3(i.x,i.y+90,i.z):new pc.Vec3(i.x,i.y-90,i.z);break;default:n=e.clone(),s=i.clone()}return new Promise(r=>{const a=Date.now(),c=()=>{const l=Date.now()-a;let m=Math.min(l/1500,1);m=1-Math.pow(1-m,3);const h=new pc.Vec3;h.lerp(e,n,m),this.entity.setLocalPosition(h);const d=new pc.Vec3;if(d.lerp(i,s,m),this.entity.setLocalEulerAngles(d),"iris"===this.animation){const e="open"===t?1-.8*m:.2+.8*m;this.entity.setLocalScale(o.x*e,o.y,o.z*e)}if(m>.8){const t=(m-.8)/.2,e=.05*Math.sin(t*Math.PI*3)*(1-t);h.y+=e,this.entity.setLocalPosition(h)}m>=1?r():requestAnimationFrame(c)};c()})}createDoorEffects(t){this.playDoorSound(t),this.createLightFlash(),"slide"===this.animation&&this.createScreenShake()}playDoorSound(t){this.app.fire("audio:play",{sound:"open"===t?"door_open":"door_close",volume:.3,pitch:"slide"===this.animation?.8:1})}createLightFlash(){if(!this.entity)return;const t=new pc.Entity("door_flash");t.addComponent("light",{type:"point",color:new pc.Color(1,1,.8),intensity:2,range:8,castShadows:!1});const e=this.entity.getPosition();t.setPosition(e.x,e.y+1,e.z+1),this.entity.parent.addChild(t);let o=2;const i=()=>{o*=.9,t.light&&(t.light.intensity=o),o>.1?requestAnimationFrame(i):t.destroy()};setTimeout(i,100)}createScreenShake(){this.app.fire("camera:shake",{intensity:.5,duration:300})}async close(){"locked"!==this.state&&"closing"!==this.state&&(this.state="closing",await this.playAnimation("close"),this.state="locked",this.updateDoorAppearance())}async onInteract(t){"locked"===this.state?await this.unlock(t)&&this.onTransition&&setTimeout(()=>{this.onTransition(this.toRoom,this.playerSpawnPosition)},1e3):"open"===this.state&&this.onTransition&&this.onTransition(this.toRoom,this.playerSpawnPosition)}}class n{constructor(t,e){this.app=t,this.multiRoom=e,this.element=null,this.roomElements=new Map,this.doorElements=new Map,this.playerDot=null,this.scale=.15,this.init()}init(){this.element=document.createElement("div"),this.element.id="mini-map",this.element.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n width: 220px;\n height: 160px;\n background: rgba(0, 0, 0, 0.8);\n border: 2px solid #00ff88;\n border-radius: 8px;\n padding: 10px;\n z-index: 900;\n font-family: 'Courier New', monospace;\n color: #00ff88;\n box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);\n ";const t=document.createElement("div");t.textContent="FACILITY MAP",t.style.cssText="\n font-size: 10px;\n font-weight: bold;\n text-align: center;\n margin-bottom: 8px;\n color: #00ff88;\n border-bottom: 1px solid #00ff88;\n padding-bottom: 4px;\n ",this.element.appendChild(t),this.mapContainer=document.createElement("div"),this.mapContainer.style.cssText="\n position: relative;\n width: 200px;\n height: 120px;\n background: rgba(0, 20, 10, 0.5);\n border: 1px solid #004422;\n border-radius: 4px;\n overflow: hidden;\n ",this.element.appendChild(this.mapContainer),document.body.appendChild(this.element),this.buildMap(),this.app.on("room:changed",this.onRoomChanged,this)}buildMap(){if(!this.multiRoom||!this.multiRoom.rooms)return;const t=this.calculateRoomLayout();for(const[e,o]of this.multiRoom.rooms)this.createRoomElement(e,o,t[e]);for(const[e,o]of this.multiRoom.doors)this.createDoorElement(e,o,t);this.createPlayerDot(),this.updateCurrentRoom()}calculateRoomLayout(){const t={},e=Array.from(this.multiRoom.rooms.keys());return e.includes("reception")&&e.includes("emergency_ward")?(t.reception={x:30,y:60},t.emergency_ward={x:100,y:60},t.surgery_suite={x:170,y:60}):e.includes("entry_hall")&&e.includes("control_room")?(t.entry_hall={x:30,y:80},t.control_room={x:100,y:80},t.generator_bay={x:100,y:40},t.maintenance_tunnel={x:170,y:40}):e.includes("security_office")&&e.includes("main_corridor")?(t.security_office={x:30,y:90},t.main_corridor={x:100,y:90},t.camera_control={x:100,y:60},t.basement_storage={x:170,y:90},t.server_room={x:170,y:60}):e.forEach((e,o)=>{t[e]={x:30+50*o,y:60}}),t}createRoomElement(t,e,o){if(!o)return;const i=document.createElement("div");i.className="minimap-room",i.id=`minimap-${t}`,i.style.cssText=`\n position: absolute;\n left: ${o.x-15}px;\n top: ${o.y-10}px;\n width: 30px;\n height: 20px;\n border: 1px solid #006644;\n background: rgba(0, 100, 50, 0.3);\n border-radius: 3px;\n cursor: pointer;\n transition: all 0.3s ease;\n `;const n=document.createElement("div");n.textContent=t.replace("_"," ").substring(0,4).toUpperCase(),n.style.cssText="\n font-size: 7px;\n text-align: center;\n line-height: 20px;\n color: #00ff88;\n pointer-events: none;\n ",i.appendChild(n),i.onclick=()=>this.onRoomClick(t),this.mapContainer.appendChild(i),this.roomElements.set(t,i)}createDoorElement(t,e,o){const i=o[e.fromRoom],n=o[e.toRoom];if(!i||!n)return;const s=document.createElement("div");s.className="minimap-door",s.id=`minimap-${t}`;const r=(i.x+n.x)/2,a=(i.y+n.y)/2,c=180*Math.atan2(n.y-i.y,n.x-i.x)/Math.PI,l=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))-30;s.style.cssText=`\n position: absolute;\n left: ${r-l/2}px;\n top: ${a-1}px;\n width: ${l}px;\n height: 2px;\n background: #ff6600;\n transform: rotate(${c}deg);\n transform-origin: center;\n transition: all 0.3s ease;\n `;const m=document.createElement("div");m.style.cssText="\n position: absolute;\n left: 50%;\n top: -4px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #ff3333;\n transform: translateX(-50%);\n transition: background 0.3s ease;\n ",s.appendChild(m),this.mapContainer.appendChild(s),this.doorElements.set(t,{element:s,status:m,door:e})}createPlayerDot(){this.playerDot=document.createElement("div"),this.playerDot.style.cssText="\n position: absolute;\n width: 6px;\n height: 6px;\n background: #00ffff;\n border-radius: 50%;\n box-shadow: 0 0 8px #00ffff;\n transition: all 0.5s ease;\n z-index: 10;\n ",this.mapContainer.appendChild(this.playerDot)}updateCurrentRoom(){this.multiRoom.currentRoom&&(this.roomElements.forEach((t,e)=>{e===this.multiRoom.currentRoom?(t.style.background="rgba(0, 255, 136, 0.6)",t.style.borderColor="#00ff88",t.style.boxShadow="0 0 10px rgba(0, 255, 136, 0.5)",t.getBoundingClientRect(),this.mapContainer.getBoundingClientRect(),this.playerDot.style.left=t.offsetLeft+15-3+"px",this.playerDot.style.top=t.offsetTop+10-3+"px"):(t.style.background="rgba(0, 100, 50, 0.3)",t.style.borderColor="#006644",t.style.boxShadow="none")}),this.updateDoorStates())}updateDoorStates(){this.doorElements.forEach((t,e)=>{try{const{element:e,status:o,door:i}=t,n=!(!i.canUnlock||!this.multiRoom.gameState)&&i.canUnlock(this.multiRoom.gameState);"open"===i.state?(o.style.background="#00ff00",e.style.background="#00ff88"):n?(o.style.background="#ffff00",e.style.background="#ffaa00"):(o.style.background="#ff3333",e.style.background="#ff6600")}catch(t){console.warn(`[MiniMap] Error updating door state ${e}:`,t.message)}})}onRoomChanged(t){this.updateCurrentRoom()}onRoomClick(t){const e=this.multiRoom.currentRoom;if(t!==e){for(const[o,i]of this.multiRoom.doors)if(i.fromRoom===e&&i.toRoom===t)return void(i.canUnlock(this.multiRoom.gameState)?this.app.fire("ui:notification",{text:`Navigate to ${t.replace("_"," ")}`,type:"info",duration:2e3}):this.app.fire("ui:notification",{text:`${t.replace("_"," ")} is locked`,type:"warning",duration:2e3}));this.app.fire("ui:notification",{text:`No direct access to ${t.replace("_"," ")}`,type:"warning",duration:2e3})}}show(){this.element&&(this.element.style.display="block")}hide(){this.element&&(this.element.style.display="none")}destroy(){this.element&&(document.body.removeChild(this.element),this.element=null),this.app.off("room:changed",this.onRoomChanged,this),this.roomElements.clear(),this.doorElements.clear()}}class s{constructor(t,e){this.app=t,this.multiRoom=e,this.doorItems=new Map,this.setupDoorItems()}setupDoorItems(){this.itemConfigs={keycard:{model:"card",color:"#00ff88",emissive:"#004422",animation:"glow",scale:[.1,.05,.15],hoverOffset:.3,description:"Access Card Required"},objective:{model:"screen",color:"#ff8800",emissive:"#442200",animation:"pulse",scale:[.2,.3,.05],hoverOffset:.2,description:"Objective Completion Required"},skill:{model:"tool",color:"#8800ff",emissive:"#220044",animation:"rotate",scale:[.15,.15,.15],hoverOffset:.25,description:"Skill Level Required"},sequence:{model:"complex",color:"#ff0088",emissive:"#440022",animation:"complex",scale:[.12,.2,.12],hoverOffset:.4,description:"Sequence Completion Required"},none:{model:"simple",color:"#888888",emissive:"#222222",animation:"none",scale:[.08,.08,.08],hoverOffset:.1,description:"Access Granted"}}}createDoorItem(t,e,o){const i=this.itemConfigs[t.requirement?.type||"none"];if(!i)return null;const n=o.create(`${t.id}_item`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.1,.1,.1]}},position:[e[0]+.3,e[1]+1.5,e[2]],scale:i.scale,tags:["door_item","interactive"]});return this.applyDoorItemMaterial(n,i,t),this.addFloatingAnimation(n,i),this.doorItems.set(t.id,{entity:n,config:i,door:t,basePosition:n.getPosition().clone()}),n}applyDoorItemMaterial(t,e,o){if(!t.model)return;const i=new pc.StandardMaterial;i.diffuse=(new pc.Color).fromString(e.color),i.emissive=(new pc.Color).fromString(e.emissive),i.metalness=.7,i.shininess=80,"open"===o.state?(i.emissive=new pc.Color(.1,.8,.1),i.diffuse=new pc.Color(.3,1,.3)):o.canUnlock&&o.canUnlock(this.multiRoom.gameState)&&(i.emissive=(new pc.Color).fromString(e.emissive).mulScalar(2)),i.update(),t.model.meshInstances.forEach(t=>t.material=i)}addFloatingAnimation(t,e){const o=Date.now(),i=t.getPosition().clone();switch(e.animation){case"glow":this.addGlowAnimation(t,o);break;case"pulse":this.addPulseAnimation(t,o);break;case"rotate":this.addRotateAnimation(t,o);break;case"complex":this.addComplexAnimation(t,o);break;default:this.addFloatAnimation(t,i,e.hoverOffset)}}addFloatAnimation(t,e,o){const i=()=>{if(!t||!t.enabled)return;const n=.001*Date.now(),s=e.clone();s.y+=Math.sin(2*n)*o,t.setPosition(s),requestAnimationFrame(i)};i()}addGlowAnimation(t,e){const o=t.getPosition().clone(),i=()=>{if(!t||!t.enabled)return;const n=.001*(Date.now()-e),s=o.clone();s.y+=.2*Math.sin(1.5*n),t.setPosition(s);const r=1+.1*Math.sin(3*n),a=t.getLocalScale();t.setLocalScale(a.x*r,a.y*r,a.z*r),requestAnimationFrame(i)};i()}addPulseAnimation(t,e){const o=t.getPosition().clone(),i=t.getLocalScale().clone(),n=()=>{if(!t||!t.enabled)return;const s=.001*(Date.now()-e),r=1+.2*Math.sin(4*s);t.setLocalScale(i.x*r,i.y*r,i.z*r);const a=o.clone();a.y+=.15*Math.sin(2*s),t.setPosition(a),requestAnimationFrame(n)};n()}addRotateAnimation(t,e){const o=t.getPosition().clone(),i=()=>{if(!t||!t.enabled)return;const n=.001*(Date.now()-e);t.setEulerAngles(0,45*n,0);const s=o.clone();s.y+=.25*Math.sin(1.8*n),t.setPosition(s),requestAnimationFrame(i)};i()}addComplexAnimation(t,e){const o=t.getPosition().clone(),i=t.getLocalScale().clone(),n=()=>{if(!t||!t.enabled)return;const s=.001*(Date.now()-e),r=o.clone();r.y+=.3*Math.sin(2*s),r.x+=.1*Math.sin(1.5*s),r.z+=.1*Math.cos(1.2*s),t.setPosition(r),t.setEulerAngles(15*Math.sin(s),30*s,10*Math.cos(1.5*s));const a=1+.15*Math.sin(3*s);t.setLocalScale(i.x*a,i.y*a,i.z*a),requestAnimationFrame(n)};n()}updateDoorItemState(t){const e=this.doorItems.get(t);if(!e)return;const{entity:o,config:i,door:n}=e;this.applyDoorItemMaterial(o,i,n);try{n.canUnlock&&this.multiRoom.gameState&&n.canUnlock(this.multiRoom.gameState)?this.showInteractionPrompt(o,i.description):this.hideInteractionPrompt(o)}catch(e){console.warn(`[DoorItems] Error updating door item ${t}:`,e.message)}}showInteractionPrompt(t,e){let o=t.findByName("interaction_prompt");o||(o=new pc.Entity("interaction_prompt"),o.addComponent("element",{type:pc.ELEMENTTYPE_TEXT,text:`[F] ${e}`,fontSize:12,color:new pc.Color(1,1,1),outlineColor:new pc.Color(0,0,0),outlineThickness:.3,fontAsset:null,autoWidth:!0,autoHeight:!0,pivot:[.5,.5],anchor:[.5,.5]}),o.setLocalPosition(0,.8,0),o.setLocalEulerAngles(0,0,0),t.addChild(o));const i=this.app.root.findByTag("MainCamera")[0];i&&o.lookAt(i.getPosition())}hideInteractionPrompt(t){const e=t.findByName("interaction_prompt");e&&e.destroy()}onDoorInteraction(t){const e=this.doorItems.get(t);if(!e)return;const{entity:o,door:i,config:n}=e;this.playInteractionEffect(o),"locked"!==i.state||i.canUnlock(this.multiRoom.gameState)||this.showRequirementMessage(i,n)}playInteractionEffect(t){const e=t.getLocalScale().clone(),o=e.clone().mulScalar(1.3);t.setLocalScale(o),setTimeout(()=>{t&&t.enabled&&t.setLocalScale(e)},200)}showRequirementMessage(t,e){let o=e.description;switch(t.requirement?.type){case"keycard":o=`Requires: ${t.requirement.item.replace("_"," ")}`;break;case"objective":o=`Complete: ${t.requirement.id.replace("_"," ")}`;break;case"skill":o=`Requires: ${t.requirement.skill} level ${t.requirement.level}`;break;case"sequence":o="Complete interaction sequence first"}this.app.fire("ui:notification",{text:o,type:"warning",duration:3e3})}updateAllDoorItems(){this.doorItems.forEach((t,e)=>{this.updateDoorItemState(e)})}cleanup(){this.doorItems.forEach(t=>{t.entity&&t.entity.destroy()}),this.doorItems.clear()}}class r{constructor(t,e){this.app=t,this.core=e,this.rooms=new Map,this.doors=new Map,this.currentRoom=null,this.sceneRoot=null,this.miniMap=null,this.doorItems=null,this.gameState={inventory:new Set,lastInteractions:[],skills:new Map,core:e},this.gameState.skills.hasLevel=(t,e)=>(this.gameState.skills.get(t)||0)>=e,this.onDoorInteract=this.onDoorInteract.bind(this),this.transitionToRoom=this.transitionToRoom.bind(this)}async build(t,e,o){if(this.sceneRoot=o.create("MultiRoomRoot",{position:[0,0,0],tags:["scene_root"]}),this.rooms.size>0){const t=this.rooms.keys().next().value;this.currentRoom=t,await this.buildRoom(t,e,o),this.activateRoom(this.rooms.get(t))}return this.doorItems=new s(t,this),this.sceneRoot}deactivateRoom(t){console.log(`[MultiRoom] Deactivating room: ${t.entity.name}`),t.entity.enabled=!1,t.active=!1,this.disableEntityAndChildren(t.entity),setTimeout(()=>{this.enforceEntityVisibility(t.entity,!1)},0)}disableEntityAndChildren(t){t.enabled=!1,t.children.forEach(t=>{this.disableEntityAndChildren(t)})}enforceEntityVisibility(t,e){t.enabled=e,t.render&&(t.render.enabled=e),t.model&&(t.model.enabled=e),t.children.forEach(t=>{this.enforceEntityVisibility(t,e)})}activateRoom(t){console.log(`[MultiRoom] Activating room: ${t.entity.name}`),t.entity.enabled=!0,t.active=!0,this.enforceEntityVisibility(t.entity,!0)}createRoom(t,e){const o={id:t,entity:null,lighting:e.lighting||"normal",size:e.size||[20,4,15],position:e.position||[0,0,0],active:!1,buildFunction:e.buildFunction||null,npcs:e.npcs||[],interactables:e.interactables||[],objectives:e.objectives||[]};return this.rooms.set(t,o),o}createDoor(t,e,o,n={}){const s=`${t}_to_${e}`,r=new i(this.app,{id:s,fromRoom:t,toRoom:e,requirement:o,animation:n.animation||"slide",playerSpawnPosition:n.playerSpawnPosition||[0,0,5],onTransition:this.transitionToRoom});return this.doors.set(s,r),r}async buildRoom(t,e,o){const i=this.rooms.get(t);if(!i||i.entity)return;console.log(`[MultiRoom] Building room: ${t}`);const n=e.createRoom({size:i.size,position:i.position,lighting:i.lighting});n.name=`${t}_Room`,i.entity=n,i.buildFunction&&await i.buildFunction(n,e,o,this);for(const[e,s]of this.doors)if(s.fromRoom===t){const e=this.getDoorPosition(t,s.toRoom,i.size),r=s.createEntity(o,e);if(n.addChild(r),r.doorInstance=s,this.doorItems){const t=this.doorItems.createDoorItem(s,e,o);t&&n.addChild(t)}}return n.enabled=t===this.currentRoom,this.sceneRoot.addChild(n),n}getDoorPosition(t,e,o){const[i,n,s]=o;return[.3*i,.5*n,.35*s]}async transitionToRoom(t,e){if(!this.rooms.has(t))return console.error(`[MultiRoom] Room ${t} not found`),!1;if(t===this.currentRoom)return console.log(`[MultiRoom] Already in room ${t}`),!0;console.log(`[MultiRoom] Transitioning from ${this.currentRoom} to ${t}`),this.app.fire("ui:notification",{text:`Entering ${t.replace("_"," ")}...`,type:"info",duration:2e3});try{const o=this.rooms.get(t);if(!o.entity){if(!this.sceneBuilder||!this.entityFactory)return console.error("[MultiRoom] Missing sceneBuilder or entityFactory for room building"),!1;await this.buildRoom(t,this.sceneBuilder,this.entityFactory)}if(this.currentRoom){const t=this.rooms.get(this.currentRoom);t.entity&&this.deactivateRoom(t)}this.activateRoom(o),this.currentRoom=t;const i=this.app.root.findByTag("player")[0];return i&&e&&i.setPosition(e),this.updateRoomObjectives(t),this.app.fire("room:changed",{roomId:t,playerPosition:e,roomConfig:o}),console.log(`[MultiRoom] Successfully transitioned to ${t}`),!0}catch(e){return console.error(`[MultiRoom] Error transitioning to room ${t}:`,e),!1}}updateRoomObjectives(t){const e=this.rooms.get(t);if(!e||!e.objectives)return;const o=this.core.getSystem("objectivemanager");o&&(console.log(`[MultiRoom] Updating objectives for room: ${t}`),e.objectives.forEach(t=>{o.objectives.has(t.id)||(o.defineObjective(t.id,t),console.log(`[MultiRoom] Defined objective: ${t.id}`)),t.prerequisites&&0!==t.prerequisites.length?!t.prerequisites.every(t=>o.isComplete(t))||o.isObjectiveActive(t.id)||o.isComplete(t.id)||(o.startObjective(t.id),console.log(`[MultiRoom] Started prerequisite objective: ${t.id}`)):o.isObjectiveActive(t.id)||o.isComplete(t.id)||(o.startObjective(t.id),console.log(`[MultiRoom] Started room objective: ${t.id}`))}))}addItem(t){this.gameState.inventory.add(t);const e=this.core?this.core.getSystem("inventorymanager"):null;e?e.pickupItem(t,1):this.app.fire("ui:notification",{text:`Acquired: ${t.replace("_"," ")}`,type:"success"}),this.doorItems&&this.doorItems.updateAllDoorItems()}hasItem(t){if(this.gameState.inventory.has(t))return!0;const e=this.core?this.core.getSystem("inventorymanager"):null;return!!e&&e.hasItem(t)}recordInteraction(t){this.gameState.lastInteractions.push(t),this.gameState.lastInteractions.length>10&&this.gameState.lastInteractions.shift()}onDoorInteract(t){for(const[e,o]of this.doors)if(e===t||o.entity&&o.entity.name===t)return void o.onInteract(this.gameState);console.warn(`[MultiRoom] Door not found: ${t}`)}setupInteractions(t,e){this.interactionHandler=t=>{if(this.recordInteraction(t),t.includes("_to_")){if(this.onDoorInteract(t),this.doorItems){const e=Array.from(this.doors.values()).find(e=>e.id===t);e&&this.doorItems.onDoorInteraction(e.id)}}else this.handleRoomInteraction(t)},this.npcInteractionHandler=t=>{console.log(`[MultiRoom] NPC interaction with ${t}`),this.recordInteraction(t),this.sceneInteractionHandler?this.sceneInteractionHandler(t):console.log(`[MultiRoom] No scene interaction handler registered for NPC: ${t}`)},t.on("interaction:triggered",this.interactionHandler),t.on("npc:interact",this.npcInteractionHandler)}handleRoomInteraction(t){console.log(`[MultiRoom] Room interaction: ${t} in room ${this.currentRoom}`),this.sceneInteractionHandler?(console.log("[MultiRoom] Calling scene interaction handler"),this.sceneInteractionHandler(t)):console.log("[MultiRoom] No scene interaction handler registered")}setSceneInteractionHandler(t){this.sceneInteractionHandler=t}syncWithGlobalInventory(t){const e=t?t.getSystem("inventorymanager"):null;if(e){for(const[t,o]of e.items.entries())o&&o.id&&this.gameState.inventory.add(o.id);console.log(`[MultiRoom] Synced ${this.gameState.inventory.size} items from global inventory`)}else console.warn("[MultiRoom] No InventoryManager available for sync")}onLoad(t,e){this.setupInteractions(t,e),this.app=t,this.core=e,this.gameState&&e&&(this.gameState.core=e),this.syncWithGlobalInventory(e),this.setupObjectives(t,e),this.miniMap=new n(t,this),setTimeout(()=>{t.fire("ui:notification",{text:`Multi-room scene loaded: ${this.currentRoom}. All interactions available.`,type:"info",duration:3e3})},500),console.log(`[MultiRoom] Multi-room scene loaded, starting in ${this.currentRoom}`),console.log("[MultiRoom] GameState inventory:",this.gameState.inventory.size,"items"),setTimeout(()=>{const t=this.sceneRoot.find(t=>t.tags&&t.tags.has("interactive"));console.log(`[MultiRoom] Found ${t.length} interactive items:`),t.forEach(t=>{console.log(` - ${t.name}: enabled=${t.enabled}, position=${t.getPosition().toString()}`)})},1e3)}setupObjectives(t,e){const o=e.getSystem("objectivemanager");if(!o)return void console.warn("[MultiRoom] ObjectiveManager not available");console.log("[MultiRoom] Setting up objectives for multi-room scene"),o.clearAllObjectives();const i=[];for(const[t,e]of this.rooms)e.objectives&&Array.isArray(e.objectives)&&(console.log(`[MultiRoom] Found ${e.objectives.length} objectives in room ${t}`),i.push(...e.objectives));i.forEach(t=>{o.defineObjective(t.id,t),console.log(`[MultiRoom] Registered objective: ${t.id} - ${t.name}`)}),i.forEach(t=>{t.autoStart&&(o.startObjective(t.id),console.log(`[MultiRoom] Auto-started objective: ${t.id}`))}),this.currentRoom&&(console.log(`[MultiRoom] Starting objectives for initial room: ${this.currentRoom}`),this.updateRoomObjectives(this.currentRoom)),console.log(`[MultiRoom] Objective setup complete - ${i.length} objectives registered`)}onUnload(t,e){console.log("[MultiRoom] Cleaning up multi-room scene..."),this.interactionHandler&&(t.off("interaction:triggered",this.interactionHandler),this.interactionHandler=null),this.npcInteractionHandler&&(t.off("npc:interact",this.npcInteractionHandler),this.npcInteractionHandler=null),this.miniMap&&(this.miniMap.destroy(),this.miniMap=null),this.doorItems&&(this.doorItems.cleanup(),this.doorItems=null);for(const[t,e]of this.rooms)e.entity&&e.entity.findByTag("npc").forEach(t=>{t.cleanupLabel&&t.cleanupLabel()}),e.active=!1;this.gameState.inventory.clear(),this.gameState.lastInteractions=[],this.gameState.skills.clear(),this.currentRoom=null}}}}]);
|
961.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[41,961],{41:(e,i,t)=>{t.r(i),t.d(i,{ObjectiveFactory:()=>n,ObjectiveSets:()=>a,ObjectiveTemplates:()=>r});const r={createCollectionObjective:(e,i,t=100)=>({type:"counter",target:i,description:`Collect ${i} ${e}`,rewards:{experience:t},autoTrigger:"item:pickup",triggerCondition:{itemType:e}}),createExplorationObjective:(e,i=150)=>({type:"counter",target:e.length,description:`Explore ${e.length} areas: ${e.join(", ")}`,rewards:{experience:i,skillPoints:1},autoTrigger:"player:proximity",triggerCondition:{areas:e}}),createTimeTrialObjective(e,i,t=null){const r={type:"simple",timeLimit:i,description:`${e} within ${Math.floor(i/60)} minutes`,rewards:{experience:200}};return t&&(r.requires={tool:t}),r},createSkillObjective(e,i=null,t=300){const r={type:"simple",description:`Complete advanced task requiring ${e}`,requires:{skill:e},rewards:{experience:t,skillPoints:2}};return i&&(r.requires.stat=i),r},createSocialObjective:(e,i=120)=>({type:"counter",target:e,description:`Interact with ${e} NPCs`,rewards:{experience:i,unlockSkills:["social"]},autoTrigger:"npc:interact"}),createSequentialObjective:(e,i=180)=>({type:"counter",target:e.length,description:`Complete tasks in order: ${e.join(" β ")}`,rewards:{experience:i},sequence:e,currentStep:0}),createSurvivalObjective:(e,i=250)=>({type:"simple",timeLimit:e,description:`Survive for ${Math.floor(e/60)} minutes`,rewards:{experience:i,unlockSkills:["survival"]},survivalMode:!0}),createPrecisionObjective:(e,i,t,r=150)=>({type:"simple",description:`Complete ${e} with high precision`,requires:{tool:i,skill:t},rewards:{experience:r,skillPoints:1},precisionRequired:!0}),createInvestigationObjective:(e,i=220)=>({type:"counter",target:e,description:`Find all ${e} investigation clues`,rewards:{experience:i,items:[{id:"investigation_report",quantity:1}]},autoTrigger:"clue:found"}),createMaintenanceObjective:(e,i=160)=>({type:"counter",target:e,description:`Perform maintenance on ${e} pieces of equipment`,requires:{tool:"maintenance_kit"},rewards:{experience:i,unlockSkills:["maintenance"]},autoTrigger:"equipment:maintained"})},a={medicalLabBeginner:[{id:"lab_orientation",name:"Laboratory Orientation",...r.createExplorationObjective(["reception","main_lab","storage"],100)},{id:"collect_basic_supplies",name:"Gather Basic Supplies",...r.createCollectionObjective("basic_supplies",3,80)},{id:"meet_supervisor",name:"Meet Your Supervisor",type:"simple",description:"Find and talk to the lab supervisor",rewards:{experience:60,unlockSkills:["communication"]},autoTrigger:"npc:interact",triggerCondition:{npcId:"supervisor"}}],medicalLabIntermediate:[{id:"emergency_training",name:"Emergency Response Training",...r.createTimeTrialObjective("Complete emergency protocol",300,"emergency_kit")},{id:"advanced_tests",name:"Advanced Laboratory Tests",...r.createSkillObjective("advanced_testing",{intelligence:10},250)},{id:"equipment_check",name:"Daily Equipment Check",...r.createMaintenanceObjective(5,140)}],sciFiEnvironment:[{id:"scan_alien_artifacts",name:"Scan Unknown Artifacts",...r.createCollectionObjective("alien_artifacts",4,200)},{id:"decode_alien_text",name:"Decode Alien Communication",...r.createSkillObjective("xenolinguistics",{intelligence:15},350)},{id:"survive_contamination",name:"Containment Breach Protocol",...r.createSurvivalObjective(600,300)}],socialInteraction:[{id:"team_introductions",name:"Meet the Team",...r.createSocialObjective(5,100)},{id:"conflict_resolution",name:"Resolve Team Conflict",type:"simple",description:"Help resolve the conflict between team members",requires:{skill:"diplomacy"},rewards:{experience:180,skillPoints:2}},{id:"team_building",name:"Team Building Exercise",type:"counter",target:3,description:"Complete all team building activities",rewards:{experience:150,unlockSkills:["leadership"]}}],tutorialSet:[{id:"learn_basic_controls",name:"Learn Basic Controls",type:"counter",target:4,description:"Practice movement: WASD, Mouse Look, F to Interact, Tab for Menu",rewards:{experience:50}},{id:"first_interaction",name:"First Interaction",type:"simple",description:"Interact with any object (look at it and press F)",rewards:{experience:30}},{id:"inventory_tutorial",name:"Using Your Inventory",type:"simple",description:"Pick up an item and check your inventory",rewards:{experience:40,unlockSkills:["inventory_management"]}}]},n={createForScene(e,i="beginner"){const t=[];switch(e){case"medical":t.push(...a.medicalLabBeginner),"beginner"!==i&&t.push(...a.medicalLabIntermediate);break;case"scifi":t.push(...a.sciFiEnvironment);break;case"tutorial":t.push(...a.tutorialSet);break;default:t.push({id:"explore_area",name:"Explore the Area",...r.createExplorationObjective(["area1","area2","area3"],120)})}return t},createProgressiveSet:(e,i=["easy","medium","hard"])=>i.map((t,r)=>({...e,id:`${e.id}_${t}`,name:`${e.name} (${t.toUpperCase()})`,target:e.target?e.target*(r+1):void 0,timeLimit:e.timeLimit?Math.max(60,e.timeLimit-60*r):void 0,rewards:{...e.rewards,experience:(e.rewards.experience||100)*(r+1)},prerequisites:r>0?[`${e.id}_${i[r-1]}`]:void 0})),createDailyObjectives:()=>[{id:"daily_maintenance",name:"Daily Equipment Maintenance",...r.createMaintenanceObjective(3,100),repeatable:!0,resetTime:864e5},{id:"daily_collection",name:"Daily Sample Collection",...r.createCollectionObjective("daily_samples",5,120),repeatable:!0,resetTime:864e5}]}},961:(e,i,t)=>{t.r(i),t.d(i,{MedicalLabObjectives:()=>r,MedicalLabProgression:()=>a,setupMedicalLabObjectiveHandlers:()=>n}),t(41);const r={beginner:[{id:"lab_safety_briefing",name:"Safety First",type:"simple",description:"Complete the laboratory safety briefing",rewards:{experience:50,unlockSkills:["basic_safety"]},autoTrigger:"interaction:triggered",triggerCondition:{entityName:"SafetyPoster"}},{id:"find_equipment",name:"Equipment Familiarization",type:"counter",target:6,description:"Locate and examine all 6 pieces of lab equipment",rewards:{experience:100,items:[{id:"equipment_manual",quantity:1}]},equipment:["Microscope","Centrifuge","Incubator","Scale","Pipette","Autoclave"]},{id:"collect_protective_gear",name:"Personal Protection",type:"counter",target:3,description:"Collect safety goggles, lab coat, and gloves",rewards:{experience:75,unlockSkills:["personal_safety"]},items:["safety_goggles","lab_coat","safety_gloves"],nextObjective:"first_sample_prep"},{id:"first_sample_prep",name:"Sample Preparation Basics",type:"simple",description:"Prepare your first tissue sample for analysis",requires:{item:"tissue_sample",tool:"prep_kit"},rewards:{experience:120,items:[{id:"prepared_sample",quantity:1}]},prerequisites:["collect_protective_gear"]}],intermediate:[{id:"microscope_analysis",name:"Microscopic Analysis",type:"simple",description:"Complete a detailed microscopic analysis of tissue samples",requires:{tool:"microscope",skill:"microscopy",item:"prepared_sample"},rewards:{experience:200,skillPoints:1,items:[{id:"analysis_report",quantity:1}]},prerequisites:["first_sample_prep"]},{id:"emergency_containment",name:"Emergency Containment Protocol",type:"simple",timeLimit:240,description:"Respond to a containment breach and secure the lab",requires:{skill:"emergency_protocols"},rewards:{experience:300,unlockSkills:["advanced_containment"]},emergencyMode:!0},{id:"batch_processing",name:"Efficient Sample Processing",type:"counter",target:10,timeLimit:900,description:"Process 10 samples within 15 minutes",requires:{skill:"sample_processing",tool:"automated_processor"},rewards:{experience:250,items:[{id:"efficiency_certificate",quantity:1}]},prerequisites:["microscope_analysis"],nextObjective:"research_project"},{id:"quality_control",name:"Quality Control Check",type:"simple",description:"Identify contaminated samples in a batch",requires:{skill:"quality_control",stat:{perception:12}},rewards:{experience:180,skillPoints:1},accuracyRequired:90}],advanced:[{id:"research_project",name:"Independent Research Project",type:"counter",target:5,description:"Complete all phases of an independent research project",requires:{skill:"research_methodology",stat:{intelligence:15,experience:1e3}},rewards:{experience:500,skillPoints:3,unlockSkills:["senior_researcher"],items:[{id:"research_publication",quantity:1}]},prerequisites:["quality_control","batch_processing"],nextObjective:"lab_crisis_management",phases:["literature_review","hypothesis_formation","experimental_design","data_collection","analysis_and_conclusion"]},{id:"mentor_trainee",name:"Mentor New Researcher",type:"simple",description:"Successfully train a new lab researcher",requires:{skill:"teaching",stat:{charisma:10}},rewards:{experience:350,unlockSkills:["leadership"],items:[{id:"mentor_badge",quantity:1}]},teachingMode:!0},{id:"crisis_management",name:"Laboratory Crisis Management",type:"simple",timeLimit:600,description:"Handle a major lab crisis involving multiple systems",requires:{skill:"crisis_management",stat:{leadership:12,stress_resistance:10}},rewards:{experience:600,skillPoints:4,unlockSkills:["lab_director"],items:[{id:"crisis_management_award",quantity:1}]},prerequisites:["research_project"],crisisScenario:!0}],specialEvents:[{id:"annual_inspection",name:"Annual Safety Inspection",type:"counter",target:12,timeLimit:1800,description:"Prepare the lab for annual safety inspection",rewards:{experience:400,items:[{id:"inspection_certificate",quantity:1}]},eventObjective:!0,checklistItems:["safety_equipment_check","chemical_inventory","waste_disposal_audit","emergency_exit_clear","fire_extinguisher_check","eyewash_station_test","fume_hood_certification","biosafety_cabinet_test","spill_kit_inventory","personal_protective_equipment","documentation_review","staff_certification_check"]},{id:"contamination_outbreak",name:"Contamination Response",type:"simple",timeLimit:420,description:"Respond to a biological contamination outbreak",requires:{skill:"biohazard_response"},rewards:{experience:450,unlockSkills:["biohazard_expert"]},randomEvent:!0,emergencyProcedures:["isolate_contaminated_area","activate_emergency_ventilation","notify_emergency_team","begin_decontamination_protocol","document_incident"]}],daily:[{id:"daily_equipment_check",name:"Daily Equipment Maintenance",type:"counter",target:5,description:"Complete daily maintenance checks on lab equipment",rewards:{experience:80},repeatable:!0,resetTime:864e5,equipment:["Microscope","Centrifuge","Incubator","Autoclave","Scale"]},{id:"sample_inventory",name:"Sample Inventory Count",type:"simple",description:"Conduct daily sample inventory count",rewards:{experience:60},repeatable:!0,resetTime:864e5},{id:"chemical_safety_check",name:"Chemical Storage Safety Check",type:"counter",target:3,description:"Verify proper storage of all chemical categories",rewards:{experience:70},repeatable:!0,resetTime:864e5,categories:["acids","bases","solvents"]}]};class a{constructor(e){this.objectiveManager=e,this.currentLevel="beginner",this.completedObjectives=new Set}initializeForScene(){this.loadObjectiveSet(r.beginner),this.loadObjectiveSet(r.daily),console.log("[MedicalLab] Objectives initialized for medical lab scene")}loadObjectiveSet(e){e.forEach(e=>{this.objectiveManager.defineObjective(e.id,e),e.prerequisites&&0!==e.prerequisites.length||this.objectiveManager.startObjective(e.id)})}onObjectiveCompleted(e){this.completedObjectives.add(e),this.checkProgression(),this.checkDependentObjectives()}checkProgression(){r.beginner.filter(e=>this.completedObjectives.has(e.id)).length>=3&&"beginner"===this.currentLevel&&(this.currentLevel="intermediate",this.loadObjectiveSet(r.intermediate),console.log("[MedicalLab] Unlocked intermediate objectives")),r.intermediate.filter(e=>this.completedObjectives.has(e.id)).length>=r.intermediate.length&&"intermediate"===this.currentLevel&&(this.currentLevel="advanced",this.loadObjectiveSet(r.advanced),console.log("[MedicalLab] Unlocked advanced objectives"))}checkDependentObjectives(){[...r.beginner,...r.intermediate,...r.advanced].forEach(e=>{e.prerequisites&&e.prerequisites.every(e=>this.completedObjectives.has(e))&&!this.objectiveManager.hasObjective(e.id)&&this.objectiveManager.startObjective(e.id)})}triggerSpecialEvent(e){r.specialEvents.filter(e=>e.eventObjective||e.randomEvent).forEach(i=>{i.id.includes(e)&&(this.objectiveManager.defineObjective(i.id,i),this.objectiveManager.startObjective(i.id))})}}function n(e,i){e.on("interaction:triggered",t=>{["Microscope","Centrifuge","Incubator","Scale","Pipette","Autoclave"].includes(t)&&e.fire("objective:update","find_equipment",i.getEquipmentCount()),"SafetyPoster"===t&&e.fire("objective:attempt","lab_safety_briefing"),e.fire("objective:update","daily_equipment_check",i.getMaintenanceCount())}),e.on("item:pickup",t=>{["safety_goggles","lab_coat","safety_gloves"].includes(t)&&e.fire("objective:update","collect_protective_gear",i.getProtectiveGearCount())}),e.on("sample:processed",()=>{e.fire("objective:update","batch_processing",i.getProcessedSampleCount())}),e.on("emergency:containment_breach",()=>{i.triggerSpecialEvent("contamination_outbreak")}),e.on("objective:completed",e=>{i.onObjectiveCompleted(e)})}}}]);
|
99.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";(self.webpackChunkplaycanvas_game=self.webpackChunkplaycanvas_game||[]).push([[99],{99:(e,t,i)=>{i.r(t),i.d(t,{default:()=>r});var o=i(96);const r={id:"ancient_temple",title:"Ancient Temple of Elements",type:"scene",async build(e,t,i){console.log("[AncientTemple] Building ancient temple of elements...");const r=new o.n(e,e.systems?.core||{});r.sceneBuilder=t,r.entityFactory=i,this.curseLevel=0,this.ritualProgress={},this.startTime=null,r.createRoom("temple_entrance",{size:[20,6,16],lighting:"ancient",position:[0,0,0],buildFunction:n,objectives:[{id:"temple_discovery",name:"Ancient Discovery",description:"Investigate the mysterious ancient temple",type:"simple",autoStart:!0,rewards:{experience:30}},{id:"decipher_symbols",name:"Symbol Translation",description:"Decipher the ancient symbol sequence",type:"sequence",target:["symbol_earth","symbol_water","symbol_fire","symbol_air"],progress:0,rewards:{experience:80,items:[{id:"symbol_knowledge",quantity:1}]}}]}),r.createRoom("elemental_chamber",{size:[25,8,20],lighting:"elemental",position:[0,0,0],buildFunction:a,objectives:[{id:"collect_artifacts",name:"Elemental Artifacts",description:"Collect the four elemental artifacts",type:"counter",target:4,progress:0,rewards:{experience:120},nextObjective:"activate_barriers"},{id:"activate_barriers",name:"Elemental Barriers",description:"Use artifacts to activate elemental barrier sequence",type:"sequence",target:["earth_barrier","water_barrier","fire_barrier","air_barrier"],progress:0,prerequisites:["collect_artifacts"],rewards:{experience:180,skillPoints:3}}]}),r.createRoom("ritual_chamber",{size:[22,10,18],lighting:"ritual",position:[0,0,0],buildFunction:s,objectives:[{id:"coordinate_ritual",name:"Synchronized Ritual",description:"Perform coordinated actions at ritual stations within time limit",type:"sequence",target:["ritual_north","ritual_east","ritual_south","ritual_west","ritual_center"],progress:0,rewards:{experience:250,skillPoints:4}}]}),r.createRoom("inner_sanctum",{size:[18,12,14],lighting:"sanctum",position:[0,0,0],buildFunction:c,objectives:[{id:"ancient_guardian",name:"Guardian Challenge",description:"Face the ancient guardian and claim the temple's power",type:"simple",rewards:{experience:400,skillPoints:6,items:[{id:"temple_heart",quantity:1}]}}]}),r.createDoor("temple_entrance","elemental_chamber",{type:"keycard",item:"symbol_knowledge"},{playerSpawnPosition:[0,0,8]}),r.createDoor("elemental_chamber","ritual_chamber",{type:"objective",id:"activate_barriers"},{playerSpawnPosition:[0,0,7]}),r.createDoor("ritual_chamber","inner_sanctum",{type:"objective",id:"coordinate_ritual"},{playerSpawnPosition:[0,0,5]});const l=await r.build(e,t,i);return l.multiRoom=r,l},onLoad(e,t){console.log("[AncientTemple] Ancient temple awakening - Mystical energies detected");const i=e.root.findByTag("scene_root")[0];i&&i.multiRoom&&(i.multiRoom.onLoad(e,t),this.multiRoom=i.multiRoom,this.interactionHandler=i=>{this.handleTempleInteraction(i,e,t)},this.multiRoom.setSceneInteractionHandler(this.interactionHandler),this.ritualProgress={coordinatedActions:[],lastActionTime:0,timeWindow:3e4},this.startTime=Date.now(),this.setupMysticalSystems(e)),e.fire("ui:notification",{text:"ANCIENT POWER: Temple awakens to your presence - Proceed with reverence",type:"info",duration:4e3})},setupMysticalSystems(e){this.mysticalInterval=setInterval(()=>{this.curseLevel=Math.min(100,this.curseLevel+2),this.curseLevel>=60&&e.fire("ui:notification",{text:`ANCIENT CURSE: ${this.curseLevel}% - The temple's power grows restless`,type:"warning",duration:2e3})},15e3)},handleTempleInteraction(e,t,i){console.log("[AncientTemple] Ancient interaction with:",e);const o=i.getSystem("objectivemanager");if("AncientInscription"===e)o&&o.isObjectiveActive("temple_discovery")&&(o.completeObjective("temple_discovery"),o.startObjective("decipher_symbols")),t.fire("ui:notification",{text:'INSCRIPTION: "Only those who understand the elemental sequence may proceed"',type:"info",duration:5e3});else if(e.startsWith("Symbol_")){if("temple_entrance"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("decipher_symbols")){const i=e.split("_")[1];["earth","water","fire","air"][o.getObjective("decipher_symbols").progress]===i?(this.removeStoneBarrier(i),t.fire("ui:notification",{text:`${i.toUpperCase()} symbol activated - Ancient barrier recedes`,type:"success",duration:3e3}),o.updateObjective("decipher_symbols",`symbol_${i}`)):(this.curseLevel+=10,t.fire("ui:notification",{text:"CURSE PENALTY: Wrong symbol sequence! Ancient wrath increases",type:"error",duration:3e3}))}}else if(e.startsWith("Artifact_")){if("elemental_chamber"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("collect_artifacts")){const i=e.split("_")[1];t.fire("ui:notification",{text:`${i} artifact claimed - Elemental power flows through you`,type:"success",duration:2500}),o.updateObjective("collect_artifacts"),o.getObjective("collect_artifacts").progress>=4&&o.startObjective("activate_barriers")}}else if(e.startsWith("BarrierAltar_")){if("elemental_chamber"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("activate_barriers")){const i=e.split("_")[1];this.toggleElementalBarrier(i,!1),t.fire("ui:notification",{text:`${i.toUpperCase()} barrier dispelled - Path cleared`,type:"success",duration:2500}),o.updateObjective("activate_barriers",`${i}_barrier`)}}else if(e.startsWith("RitualStation_")){if("ritual_chamber"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("coordinate_ritual")){const i=e.split("_")[1],r=Date.now();r-this.ritualProgress.lastActionTime>this.ritualProgress.timeWindow&&(this.ritualProgress.coordinatedActions=[]),this.ritualProgress.coordinatedActions.push(i),this.ritualProgress.lastActionTime=r;const n=["north","east","south","west","center"],a=this.ritualProgress.coordinatedActions.length-1;n[a]===i?(t.fire("ui:notification",{text:`Ritual ${i.toUpperCase()} activated - ${5-a-1} steps remain`,type:"success",duration:2e3}),o.updateObjective("coordinate_ritual",`ritual_${i}`)):(this.ritualProgress.coordinatedActions=[],this.curseLevel+=15,t.fire("ui:notification",{text:"RITUAL FAILED: Wrong sequence! Ancient spirits are displeased",type:"error",duration:3e3}))}}else"AncientGuardian"===e&&"inner_sanctum"===this.multiRoom.currentRoom&&o&&o.isObjectiveActive("ancient_guardian")&&(this.multiRoom.addItem("temple_heart"),o.completeObjective("ancient_guardian"),t.fire("ui:notification",{text:"TEMPLE MASTERED: You have proven worthy - The ancient power is yours",type:"success",duration:6e3}))},removeStoneBarrier(e){const t=this.app.root.findByName(`StoneBarrier_${e}`);t&&(t.tween(t.getPosition()).to({x:t.getPosition().x,y:-2,z:t.getPosition().z},3,pc.SineOut).start(),setTimeout(()=>{t.rigidbody&&(t.rigidbody.enabled=!1)},3e3))},toggleElementalBarrier(e,t=!0){const i={earth:[-8,1.5,0],water:[8,1.5,0],fire:[0,1.5,-8],air:[0,1.5,8]}[e],o=this.app.root.findByName(`ElementalBarrier_${e}`);if(t&&!o){const t=this.multiRoom.entityFactory.create(`ElementalBarrier_${e}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,4,6]},rigidbody:{type:"static"}},position:i,scale:[.6,8,12],tags:["elemental_barrier","impassable"]});if(t.model){const i={earth:new pc.Color(.6,.4,.2),water:new pc.Color(.2,.4,.8),fire:new pc.Color(.8,.3,.2),air:new pc.Color(.8,.8,.9)},o=new pc.StandardMaterial;o.diffuse=i[e],o.emissive=new pc.Color(.6*i[e].r,.6*i[e].g,.6*i[e].b),o.emissiveIntensity=1.2,o.opacity=.8,o.blendType=pc.BLEND_NORMAL,o.update(),t.model.meshInstances.forEach(e=>e.material=o)}this.multiRoom.sceneRoot.addChild(t)}else!t&&o&&o.destroy()},onUnload(e,t){console.log("[AncientTemple] Ancient powers returning to slumber..."),this.mysticalInterval&&clearInterval(this.mysticalInterval),this.multiRoom&&this.multiRoom.setSceneInteractionHandler(null),this.interactionHandler=null,this.multiRoom&&this.multiRoom.onUnload(e,t)}};async function n(e,t,i,o){console.log("[AncientTemple] Building temple entrance...");const r=i.create("AncientInscription",{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,2,.5]},rigidbody:{type:"static"}},position:[0,2,-6],scale:[6,4,1],tags:["interactive","inscription"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.6,.5,.3),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r),[{element:"earth",pos:[-6,1,-2],barrierPos:[0,1.5,-6]},{element:"water",pos:[-2,1,2],barrierPos:[-6,1.5,0]},{element:"fire",pos:[2,1,2],barrierPos:[6,1.5,0]},{element:"air",pos:[6,1,-2],barrierPos:[0,1.5,6]}].forEach(e=>{const t=i.create(`Symbol_${e.element}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.8,height:1.5},rigidbody:{type:"static"}},position:e.pos,scale:[1.6,1.5,1.6],tags:["interactive","symbol"]});if(t.model){const i={earth:new pc.Color(.6,.4,.2),water:new pc.Color(.2,.4,.8),fire:new pc.Color(.8,.3,.2),air:new pc.Color(.8,.8,.9)},o=new pc.StandardMaterial;o.diffuse=i[e.element],o.emissive=new pc.Color(.4*i[e.element].r,.4*i[e.element].g,.4*i[e.element].b),o.update(),t.model.meshInstances.forEach(e=>e.material=o)}o.sceneRoot.addChild(t);const r=i.create(`StoneBarrier_${e.element}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[3,3,.8]},rigidbody:{type:"static"}},position:e.barrierPos,scale:[6,6,1.6],tags:["stone_barrier","impassable"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.5,.5,.4),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(r)});const n=i.createNPC("keeper_spirit",{position:[0,0,0],displayName:"Ancient Temple Keeper",dialogue:{greeting:"Mortal... you dare disturb our eternal rest? Prove your understanding of the elements.",topics:{elements:"Earth grounds, Water flows, Fire burns, Air lifts - this is the order of creation.",sequence:"Only those who activate the symbols in correct sequence may pass the stone barriers.",curse:"Each mistake strengthens the ancient curse - tread carefully, seeker."}}});o.sceneRoot.addChild(n),[{pos:[0,5.5,0],color:new pc.Color(1,.8,.6)},{pos:[-6,4.5,0],color:new pc.Color(1,.8,.6)},{pos:[6,4.5,0],color:new pc.Color(1,.8,.6)}].forEach((t,o)=>{const r=i.createLight("point",{color:t.color,intensity:1.8,range:9,position:t.pos});e.addChild(r)});const a=i.create("SpawnPoint",{position:[0,1,5],tags:["spawn"]});e.addChild(a)}async function a(e,t,i,o){console.log("[AncientTemple] Building elemental chamber with ELEMENTAL BARRIERS..."),[{element:"earth",pos:[-10,1,-8],altarPos:[-8,1.5,0]},{element:"water",pos:[10,1,-8],altarPos:[8,1.5,0]},{element:"fire",pos:[-10,1,8],altarPos:[0,1.5,-8]},{element:"air",pos:[10,1,8],altarPos:[0,1.5,8]}].forEach(e=>{const t=i.create(`Artifact_${e.element}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:.6,height:2},rigidbody:{type:"static"}},position:e.pos,scale:[1.2,2,1.2],tags:["interactive","artifact"]}),r={earth:new pc.Color(.6,.4,.2),water:new pc.Color(.2,.4,.8),fire:new pc.Color(.8,.3,.2),air:new pc.Color(.8,.8,.9)};if(t.model){const i=new pc.StandardMaterial;i.diffuse=r[e.element],i.emissive=new pc.Color(.8*r[e.element].r,.8*r[e.element].g,.8*r[e.element].b),i.emissiveIntensity=1,i.update(),t.model.meshInstances.forEach(e=>e.material=i)}o.sceneRoot.addChild(t);const n=i.create(`BarrierAltar_${e.element}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[1.5,1,1]},rigidbody:{type:"static"}},position:e.altarPos,scale:[3,2,2],tags:["interactive","altar"]});if(n.model){const t=new pc.StandardMaterial;t.diffuse=r[e.element],t.emissive=new pc.Color(.5*r[e.element].r,.5*r[e.element].g,.5*r[e.element].b),t.update(),n.model.meshInstances.forEach(e=>e.material=t)}o.sceneRoot.addChild(n);const a=i.create(`ElementalBarrier_${e.element}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.3,4,6]},rigidbody:{type:"static"}},position:e.altarPos,scale:[.6,8,12],tags:["elemental_barrier","impassable"]});if(a.model){const t=new pc.StandardMaterial;t.diffuse=r[e.element],t.emissive=new pc.Color(.6*r[e.element].r,.6*r[e.element].g,.6*r[e.element].b),t.emissiveIntensity=1.2,t.opacity=.8,t.blendType=pc.BLEND_NORMAL,t.update(),a.model.meshInstances.forEach(e=>e.material=t)}o.sceneRoot.addChild(a)}),[{pos:[0,7.5,0],color:new pc.Color(.9,.8,1)},{pos:[-10,6,0],color:new pc.Color(1,.6,.4)},{pos:[10,6,0],color:new pc.Color(.4,.6,1)}].forEach((t,o)=>{const r=i.createLight("point",{color:t.color,intensity:2.2,range:12,position:t.pos});e.addChild(r)})}async function s(e,t,i,o){console.log("[AncientTemple] Building ritual chamber with TIMED COORDINATION..."),[{direction:"north",pos:[0,1,-7]},{direction:"east",pos:[7,1,0]},{direction:"south",pos:[0,1,7]},{direction:"west",pos:[-7,1,0]},{direction:"center",pos:[0,1,0]}].forEach(e=>{const t=i.create(`RitualStation_${e.direction}`,{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:1.2,height:2.5},rigidbody:{type:"static"}},position:e.pos,scale:[2.4,2.5,2.4],tags:["interactive","ritual"]});if(t.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.4,.3,.6),e.emissive=new pc.Color(.2,.15,.4),e.emissiveIntensity=.8,e.update(),t.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(t)});const r=i.create("RitualCircle",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:9,height:.1}},position:[0,.05,0],scale:[18,.1,18],tags:["ritual_circle"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.3,.2,.4),e.emissive=new pc.Color(.2,.1,.3),e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r),[{pos:[0,9.5,0],color:new pc.Color(.8,.6,1)},{pos:[-7,7,0],color:new pc.Color(.8,.6,1)},{pos:[7,7,0],color:new pc.Color(.8,.6,1)},{pos:[0,7,-7],color:new pc.Color(.8,.6,1)},{pos:[0,7,7],color:new pc.Color(.8,.6,1)}].forEach((t,o)=>{const r=i.createLight("point",{color:t.color,intensity:2,range:8,position:t.pos});e.addChild(r)})}async function c(e,t,i,o){console.log("[AncientTemple] Building inner sanctum...");const r=i.create("AncientGuardian",{components:{model:{type:"cylinder"},collision:{type:"cylinder",radius:2,height:5},rigidbody:{type:"static"}},position:[0,2.5,0],scale:[4,5,4],tags:["interactive","guardian"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.7,.3),e.emissive=new pc.Color(.6,.5,.2),e.emissiveIntensity=1.5,e.metalness=.8,e.update(),r.model.meshInstances.forEach(t=>t.material=e)}o.sceneRoot.addChild(r),[[-6,1,-4],[6,1,-4],[-6,1,4],[6,1,4]].forEach((t,o)=>{const r=i.create(`Treasure_${o}`,{components:{model:{type:"box"},collision:{type:"box",halfExtents:[.8,.6,.6]}},position:t,scale:[1.6,1.2,1.2],tags:["treasure"]});if(r.model){const e=new pc.StandardMaterial;e.diffuse=new pc.Color(.8,.6,.2),e.emissive=new pc.Color(.4,.3,.1),e.metalness=.9,e.update(),r.model.meshInstances.forEach(t=>t.material=e)}e.addChild(r)});const n=i.createLight("point",{color:new pc.Color(1,.9,.6),intensity:3,range:15,position:[0,11.5,0]});e.addChild(n)}}}]);
|
assets/data/catalog.json
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"entries": [
|
| 3 |
+
{
|
| 4 |
+
"id": 0,
|
| 5 |
+
"title": "0 - Tavern: The Rusty Tankard",
|
| 6 |
+
"description": "Medieval social hub with NPCs, dialogue, and quest system",
|
| 7 |
+
"type": "scene",
|
| 8 |
+
"preview": "tavern_preview.jpg",
|
| 9 |
+
"script": "TavernScene",
|
| 10 |
+
"briefing": {
|
| 11 |
+
"setting": "Medieval tavern with NPCs and interactive elements",
|
| 12 |
+
"role": "Adventurer exploring social interactions",
|
| 13 |
+
"objectives": [
|
| 14 |
+
"Talk to the bartender to get oriented",
|
| 15 |
+
"Interact with patrons to gather information",
|
| 16 |
+
"Accept a quest from the mysterious patron"
|
| 17 |
+
],
|
| 18 |
+
"controls": [
|
| 19 |
+
"F - Interact with NPCs and objects",
|
| 20 |
+
"WASD - Move around the tavern",
|
| 21 |
+
"Mouse - Look around"
|
| 22 |
+
],
|
| 23 |
+
"tips": [
|
| 24 |
+
"Talk to all NPCs to complete information gathering",
|
| 25 |
+
"The bartender provides the tavern introduction",
|
| 26 |
+
"Check the quest board for additional context"
|
| 27 |
+
]
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"id": 1,
|
| 32 |
+
"title": "1 - Medical Bay: Emergency Response",
|
| 33 |
+
"description": "High-tech medical facility crisis scenario with multiple objectives",
|
| 34 |
+
"type": "scene",
|
| 35 |
+
"preview": "medical_preview.jpg",
|
| 36 |
+
"script": "MedicalBayScene",
|
| 37 |
+
"briefing": {
|
| 38 |
+
"setting": "Futuristic medical facility during an emergency situation",
|
| 39 |
+
"role": "Medical technician responding to crisis",
|
| 40 |
+
"objectives": [
|
| 41 |
+
"Examine all four medical station beds",
|
| 42 |
+
"Collect medical supplies from cabinet",
|
| 43 |
+
"Consult with Dr. Hayes for emergency coordination"
|
| 44 |
+
],
|
| 45 |
+
"controls": [
|
| 46 |
+
"F - Interact with medical stations and NPCs",
|
| 47 |
+
"Follow objective prompts in the UI",
|
| 48 |
+
"Complete tasks systematically"
|
| 49 |
+
],
|
| 50 |
+
"tips": [
|
| 51 |
+
"Check all medical workstations thoroughly",
|
| 52 |
+
"Medical supplies are in the locked cabinet",
|
| 53 |
+
"Dr. Hayes provides final mission briefing"
|
| 54 |
+
]
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"id": 2,
|
| 59 |
+
"title": "2 - Generator Crisis: Power Restoration",
|
| 60 |
+
"description": "Emergency technical mission to restore facility power",
|
| 61 |
+
"type": "mission",
|
| 62 |
+
"preview": "generator_preview.jpg",
|
| 63 |
+
"script": "GeneratorCrisis",
|
| 64 |
+
"briefing": {
|
| 65 |
+
"setting": "Industrial facility with failing power systems",
|
| 66 |
+
"role": "Emergency technician responding to power crisis",
|
| 67 |
+
"objectives": [
|
| 68 |
+
"Activate control panels in correct sequence",
|
| 69 |
+
"Repair the main generator system",
|
| 70 |
+
"Restore full facility power"
|
| 71 |
+
],
|
| 72 |
+
"controls": [
|
| 73 |
+
"F - Interact with control panels and equipment",
|
| 74 |
+
"Follow the correct activation sequence",
|
| 75 |
+
"Work systematically through repairs"
|
| 76 |
+
],
|
| 77 |
+
"tips": [
|
| 78 |
+
"Panel sequence must be followed precisely",
|
| 79 |
+
"Emergency lighting indicates system status",
|
| 80 |
+
"Generator repair requires all panels activated"
|
| 81 |
+
]
|
| 82 |
+
}
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"id": 3,
|
| 86 |
+
"title": "3 - Nightshift Horror: Security Watch",
|
| 87 |
+
"description": "Survival horror security monitoring with resource management",
|
| 88 |
+
"type": "mission",
|
| 89 |
+
"preview": "nightshift_preview.jpg",
|
| 90 |
+
"script": "NightshiftHorror",
|
| 91 |
+
"briefing": {
|
| 92 |
+
"setting": "Security office during night shift with limited power",
|
| 93 |
+
"role": "Security guard monitoring facility overnight",
|
| 94 |
+
"objectives": [
|
| 95 |
+
"Find emergency flashlight on the desk",
|
| 96 |
+
"Monitor security camera feeds effectively",
|
| 97 |
+
"Survive until dawn (60 seconds of monitoring)"
|
| 98 |
+
],
|
| 99 |
+
"controls": [
|
| 100 |
+
"F - Interact with objects and toggle flashlight",
|
| 101 |
+
"Look at monitors and press F to check cameras",
|
| 102 |
+
"Manage power consumption carefully"
|
| 103 |
+
],
|
| 104 |
+
"tips": [
|
| 105 |
+
"Check all three monitors for complete surveillance",
|
| 106 |
+
"Flashlight drains power faster when active",
|
| 107 |
+
"Watch power levels - running out means failure"
|
| 108 |
+
]
|
| 109 |
+
}
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"id": 4,
|
| 113 |
+
"title": "4 - Supply Collection: Warehouse Operations",
|
| 114 |
+
"description": "Inventory management mission with item collection and NPC interactions",
|
| 115 |
+
"type": "mission",
|
| 116 |
+
"preview": "inventory_preview.jpg",
|
| 117 |
+
"script": "InventoryTest",
|
| 118 |
+
"briefing": {
|
| 119 |
+
"setting": "Warehouse facility with storage crates and supply staff",
|
| 120 |
+
"role": "Supply officer managing inventory and logistics",
|
| 121 |
+
"objectives": [
|
| 122 |
+
"Collect items from storage crates throughout warehouse",
|
| 123 |
+
"Use repair tools at the maintenance workbench",
|
| 124 |
+
"Interact with warehouse staff for guidance",
|
| 125 |
+
"Deliver final package to complete operations"
|
| 126 |
+
],
|
| 127 |
+
"controls": [
|
| 128 |
+
"F - Interact with crates, NPCs, and equipment",
|
| 129 |
+
"Collected items appear in inventory display",
|
| 130 |
+
"Follow objective tracking for mission progress"
|
| 131 |
+
],
|
| 132 |
+
"tips": [
|
| 133 |
+
"Search all storage areas systematically",
|
| 134 |
+
"Talk to warehouse NPCs for operational guidance",
|
| 135 |
+
"Some items are consumable, others are reusable tools",
|
| 136 |
+
"Complete package delivery as final objective"
|
| 137 |
+
]
|
| 138 |
+
}
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"id": 5,
|
| 142 |
+
"title": "5 - Medical Complex: Multi-Room Emergency",
|
| 143 |
+
"description": "Multi-room medical facility with progressive unlocking and patient care",
|
| 144 |
+
"type": "scene",
|
| 145 |
+
"preview": "medical_complex_preview.jpg",
|
| 146 |
+
"script": "MedicalComplex",
|
| 147 |
+
"briefing": {
|
| 148 |
+
"setting": "Three-room medical complex during mass casualty event",
|
| 149 |
+
"role": "Emergency medical responder",
|
| 150 |
+
"objectives": [
|
| 151 |
+
"Check in at reception and obtain emergency keycard",
|
| 152 |
+
"Assess all patients in the emergency ward",
|
| 153 |
+
"Compile medical data and access surgery suite",
|
| 154 |
+
"Perform life-saving surgical procedure"
|
| 155 |
+
],
|
| 156 |
+
"controls": [
|
| 157 |
+
"F - Interact with doors, equipment, NPCs, and patients",
|
| 158 |
+
"Navigate between Reception β Emergency Ward β Surgery Suite",
|
| 159 |
+
"Follow progressive unlocking requirements"
|
| 160 |
+
],
|
| 161 |
+
"tips": [
|
| 162 |
+
"Emergency keycard required for ward access",
|
| 163 |
+
"Complete patient assessments before surgery prep",
|
| 164 |
+
"Multiple rooms require different objectives to unlock",
|
| 165 |
+
"Talk to medical staff for guidance and context"
|
| 166 |
+
]
|
| 167 |
+
}
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"id": 6,
|
| 171 |
+
"title": "6 - Industrial Facility: Power System Crisis",
|
| 172 |
+
"description": "Four-room industrial complex with generator failure and emergency protocols",
|
| 173 |
+
"type": "scene",
|
| 174 |
+
"preview": "industrial_facility_preview.jpg",
|
| 175 |
+
"script": "IndustrialFacility",
|
| 176 |
+
"briefing": {
|
| 177 |
+
"setting": "Industrial facility with critical power system failure",
|
| 178 |
+
"role": "Emergency engineering technician",
|
| 179 |
+
"objectives": [
|
| 180 |
+
"Obtain facility access badge from security checkpoint",
|
| 181 |
+
"Monitor all control room systems and diagnose problem",
|
| 182 |
+
"Repair generator cooling, electrical, and main systems",
|
| 183 |
+
"Execute emergency valve sequence in maintenance tunnel"
|
| 184 |
+
],
|
| 185 |
+
"controls": [
|
| 186 |
+
"F - Interact with security, monitoring, and repair equipment",
|
| 187 |
+
"Navigate Entry Hall β Control Room β Generator Bay β Maintenance Tunnel",
|
| 188 |
+
"Some rooms require engineering skills or sequence completion"
|
| 189 |
+
],
|
| 190 |
+
"tips": [
|
| 191 |
+
"Security clearance required for restricted areas",
|
| 192 |
+
"Check all monitoring stations for complete diagnosis",
|
| 193 |
+
"Generator repair requires specific component sequence",
|
| 194 |
+
"Emergency protocols must be executed in correct order"
|
| 195 |
+
]
|
| 196 |
+
}
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"id": 7,
|
| 200 |
+
"title": "7 - Security Complex: Breach Investigation",
|
| 201 |
+
"description": "Five-room security facility with time pressure and breach response",
|
| 202 |
+
"type": "scene",
|
| 203 |
+
"preview": "security_complex_preview.jpg",
|
| 204 |
+
"script": "SecurityComplex",
|
| 205 |
+
"briefing": {
|
| 206 |
+
"setting": "Security complex with active breach - 5 minute response window",
|
| 207 |
+
"role": "Security response specialist",
|
| 208 |
+
"objectives": [
|
| 209 |
+
"Investigate security breach and obtain emergency access",
|
| 210 |
+
"Patrol corridor and check all compromised access points",
|
| 211 |
+
"Obtain security clearance from camera control room",
|
| 212 |
+
"Search basement storage for evidence of infiltration",
|
| 213 |
+
"Execute emergency lockdown protocol from server room"
|
| 214 |
+
],
|
| 215 |
+
"controls": [
|
| 216 |
+
"F - Interact with security equipment, access points, and terminals",
|
| 217 |
+
"Navigate complex interconnected room network",
|
| 218 |
+
"Complete objectives under time pressure"
|
| 219 |
+
],
|
| 220 |
+
"tips": [
|
| 221 |
+
"5-minute countdown adds urgency to mission",
|
| 222 |
+
"Multiple pathways between rooms unlock progressively",
|
| 223 |
+
"Evidence collection required for full investigation",
|
| 224 |
+
"Final lockdown requires three-step security sequence",
|
| 225 |
+
"Time management is critical for mission success"
|
| 226 |
+
]
|
| 227 |
+
}
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"id": 8,
|
| 231 |
+
"title": "8 - Garage: 3D Object Practice Area",
|
| 232 |
+
"description": "Workshop environment for experimenting with 3D objects and configurations",
|
| 233 |
+
"type": "scene",
|
| 234 |
+
"preview": "garage_preview.jpg",
|
| 235 |
+
"script": "GarageScene",
|
| 236 |
+
"briefing": {
|
| 237 |
+
"setting": "Spacious workshop garage with practice objects and interactive elements",
|
| 238 |
+
"role": "Workshop operator experimenting with 3D objects",
|
| 239 |
+
"objectives": [
|
| 240 |
+
"Explore the garage practice area and familiarize yourself",
|
| 241 |
+
"Interact with 5 different practice objects",
|
| 242 |
+
"Use the workbench area for hands-on experimentation",
|
| 243 |
+
"Access all storage areas including tool cabinet and parts bins"
|
| 244 |
+
],
|
| 245 |
+
"controls": [
|
| 246 |
+
"F - Interact with practice objects, workbench, and storage",
|
| 247 |
+
"WASD - Move around the garage workspace",
|
| 248 |
+
"Mouse - Look around and examine objects"
|
| 249 |
+
],
|
| 250 |
+
"tips": [
|
| 251 |
+
"Practice objects include cubes, spheres, gears, and moving parts",
|
| 252 |
+
"The workbench area contains interactive tools",
|
| 253 |
+
"Storage areas provide access to components and parts",
|
| 254 |
+
"Control panel provides system status information"
|
| 255 |
+
]
|
| 256 |
+
}
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"id": 9,
|
| 260 |
+
"title": "9 - Research Facility: Biological Containment Breach",
|
| 261 |
+
"description": "Four-room research facility with biological contamination and time pressure",
|
| 262 |
+
"type": "scene",
|
| 263 |
+
"preview": "research_facility_preview.jpg",
|
| 264 |
+
"script": "ResearchFacility",
|
| 265 |
+
"briefing": {
|
| 266 |
+
"setting": "Research facility with active biological containment breach - 10 minute lockdown timer",
|
| 267 |
+
"role": "Emergency biohazard response specialist",
|
| 268 |
+
"objectives": [
|
| 269 |
+
"Respond to containment breach and obtain research access keycard",
|
| 270 |
+
"Analyze all contaminated specimen containers in main laboratory",
|
| 271 |
+
"Synthesize emergency antidote using research equipment",
|
| 272 |
+
"Execute containment protocol and recover critical research data"
|
| 273 |
+
],
|
| 274 |
+
"controls": [
|
| 275 |
+
"F - Interact with decontamination, analysis, and containment equipment",
|
| 276 |
+
"Navigate Decontamination β Laboratory β Containment Vault β Data Archive",
|
| 277 |
+
"Keycard and objective barriers control room access"
|
| 278 |
+
],
|
| 279 |
+
"tips": [
|
| 280 |
+
"10-minute contamination timer adds critical urgency",
|
| 281 |
+
"Specimen analysis required before antidote synthesis",
|
| 282 |
+
"Containment sequence must be executed in correct order",
|
| 283 |
+
"Data recovery preserves vital research before lockdown"
|
| 284 |
+
]
|
| 285 |
+
}
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"id": 10,
|
| 289 |
+
"title": "10 - Corporate Data Center: Digital Espionage",
|
| 290 |
+
"description": "Four-room corporate infiltration with skill-based hacking progression",
|
| 291 |
+
"type": "scene",
|
| 292 |
+
"preview": "data_center_preview.jpg",
|
| 293 |
+
"script": "DataCenter",
|
| 294 |
+
"briefing": {
|
| 295 |
+
"setting": "Corporate data center during high-security espionage operation",
|
| 296 |
+
"role": "Corporate infiltrator executing digital espionage mission",
|
| 297 |
+
"objectives": [
|
| 298 |
+
"Social engineer security credentials from reception staff",
|
| 299 |
+
"Map internal network infrastructure and bypass firewall systems",
|
| 300 |
+
"Extract sensitive corporate data through sequential server access",
|
| 301 |
+
"Access highest-level executive intelligence from secure vault"
|
| 302 |
+
],
|
| 303 |
+
"controls": [
|
| 304 |
+
"F - Interact with terminals, network equipment, and corporate staff",
|
| 305 |
+
"Navigate Reception β Technical Floor β Server Core β Executive Vault",
|
| 306 |
+
"Progressive skill barriers require network expertise"
|
| 307 |
+
],
|
| 308 |
+
"tips": [
|
| 309 |
+
"Social engineering at reception provides initial access",
|
| 310 |
+
"Network mapping required before firewall exploitation",
|
| 311 |
+
"Server access follows specific sequence: Database β Encryption β Download",
|
| 312 |
+
"Executive vault contains highest value intelligence"
|
| 313 |
+
]
|
| 314 |
+
}
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"id": 11,
|
| 318 |
+
"title": "11 - Military Compound: Tactical Infiltration",
|
| 319 |
+
"description": "Four-room military base with escalating alert levels and combination barriers",
|
| 320 |
+
"type": "scene",
|
| 321 |
+
"preview": "military_compound_preview.jpg",
|
| 322 |
+
"script": "MilitaryCompound",
|
| 323 |
+
"briefing": {
|
| 324 |
+
"setting": "Military compound with escalating alert system - 15 minute infiltration window",
|
| 325 |
+
"role": "Special operations infiltrator executing tactical mission",
|
| 326 |
+
"objectives": [
|
| 327 |
+
"Breach perimeter security and acquire patrol intelligence",
|
| 328 |
+
"Procure military equipment and disable communication systems",
|
| 329 |
+
"Override tactical command systems including radar and defense grid",
|
| 330 |
+
"Secure advanced military hardware from high-security weapon vault"
|
| 331 |
+
],
|
| 332 |
+
"controls": [
|
| 333 |
+
"F - Interact with security equipment, military hardware, and command systems",
|
| 334 |
+
"Navigate Perimeter β Barracks β Command Center β Weapon Vault",
|
| 335 |
+
"Alert levels escalate over time: GREEN β YELLOW β ORANGE β RED"
|
| 336 |
+
],
|
| 337 |
+
"tips": [
|
| 338 |
+
"15-minute timer escalates alert levels and security response",
|
| 339 |
+
"Intelligence gathering required for compound access",
|
| 340 |
+
"Equipment procurement and sabotage unlock command access",
|
| 341 |
+
"Tactical override requires three-system sequence completion"
|
| 342 |
+
]
|
| 343 |
+
}
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"id": 12,
|
| 347 |
+
"title": "12 - Quantum Lab: Energy Force Barriers",
|
| 348 |
+
"description": "Four-room quantum facility with energy barriers and laser security grids",
|
| 349 |
+
"type": "scene",
|
| 350 |
+
"preview": "quantum_lab_preview.jpg",
|
| 351 |
+
"script": "QuantumLab",
|
| 352 |
+
"briefing": {
|
| 353 |
+
"setting": "Quantum research facility with energy field containment failure and power fluctuations",
|
| 354 |
+
"role": "Quantum physicist responding to containment breach emergency",
|
| 355 |
+
"objectives": [
|
| 356 |
+
"Analyze quantum power distribution and obtain diagnostic access",
|
| 357 |
+
"Disable laser security grid in correct node sequence to remove energy walls",
|
| 358 |
+
"Stabilize failing quantum containment fields around experiments",
|
| 359 |
+
"Override electromagnetic field generators to restore containment matrix"
|
| 360 |
+
],
|
| 361 |
+
"controls": [
|
| 362 |
+
"F - Interact with quantum equipment, laser nodes, and field generators",
|
| 363 |
+
"Navigate Entrance β Laser Grid Hall β Containment Lab β Power Core",
|
| 364 |
+
"Energy walls physically block movement until deactivated"
|
| 365 |
+
],
|
| 366 |
+
"tips": [
|
| 367 |
+
"Laser nodes must be disabled in sequence to remove blocking energy walls",
|
| 368 |
+
"Power fluctuations affect barrier strength over time",
|
| 369 |
+
"Containment fields require stabilization before power core access",
|
| 370 |
+
"Electromagnetic override follows specific generator activation order"
|
| 371 |
+
]
|
| 372 |
+
}
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"id": 13,
|
| 376 |
+
"title": "13 - Underground Bunker: Mechanical Barriers",
|
| 377 |
+
"description": "Four-room military bunker with blast doors and pressure-sealed chambers",
|
| 378 |
+
"type": "scene",
|
| 379 |
+
"preview": "underground_bunker_preview.jpg",
|
| 380 |
+
"script": "UndergroundBunker",
|
| 381 |
+
"briefing": {
|
| 382 |
+
"setting": "Abandoned military bunker with failing pressure seals and mechanical barriers",
|
| 383 |
+
"role": "Military infiltrator navigating physical security systems",
|
| 384 |
+
"objectives": [
|
| 385 |
+
"Locate blast door access codes in abandoned security office",
|
| 386 |
+
"Enter keypad combinations to unlock massive steel blast doors",
|
| 387 |
+
"Acquire pressure equipment and navigate timed airlock sequences",
|
| 388 |
+
"Override bunker command systems to restore life support"
|
| 389 |
+
],
|
| 390 |
+
"controls": [
|
| 391 |
+
"F - Interact with keypads, blast doors, pressure equipment, and airlocks",
|
| 392 |
+
"Navigate Entrance β Blast Door Chamber β Pressure Chamber β Command Vault",
|
| 393 |
+
"Mechanical walls physically block passage until mechanisms activated"
|
| 394 |
+
],
|
| 395 |
+
"tips": [
|
| 396 |
+
"Blast door keypads require specific code sequences to remove steel barriers",
|
| 397 |
+
"Pressure equipment necessary for survival in later chambers",
|
| 398 |
+
"Airlock chambers have timed barriers - move quickly through openings",
|
| 399 |
+
"Environmental pressure decreases over time adding urgency"
|
| 400 |
+
]
|
| 401 |
+
}
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"id": 14,
|
| 405 |
+
"title": "14 - Ancient Temple: Puzzle Ritual Barriers",
|
| 406 |
+
"description": "Four-room mystical temple with stone barriers and elemental puzzles",
|
| 407 |
+
"type": "scene",
|
| 408 |
+
"preview": "ancient_temple_preview.jpg",
|
| 409 |
+
"script": "AncientTemple",
|
| 410 |
+
"briefing": {
|
| 411 |
+
"setting": "Ancient temple with mystical barriers controlled by elemental puzzles and ritual sequences",
|
| 412 |
+
"role": "Archaeological explorer mastering ancient magical barriers",
|
| 413 |
+
"objectives": [
|
| 414 |
+
"Decipher symbol sequence to lower stone barriers blocking passages",
|
| 415 |
+
"Collect elemental artifacts and activate barrier altars to dispel force fields",
|
| 416 |
+
"Perform synchronized ritual actions at timed stations within time window",
|
| 417 |
+
"Face the ancient guardian and claim the temple's mystical power"
|
| 418 |
+
],
|
| 419 |
+
"controls": [
|
| 420 |
+
"F - Interact with symbol pedestals, artifacts, ritual stations, and guardian",
|
| 421 |
+
"Navigate Temple Entrance β Elemental Chamber β Ritual Chamber β Inner Sanctum",
|
| 422 |
+
"Stone and elemental barriers physically block movement until puzzles solved"
|
| 423 |
+
],
|
| 424 |
+
"tips": [
|
| 425 |
+
"Symbol sequence must follow elemental order: Earth β Water β Fire β Air",
|
| 426 |
+
"Wrong symbols increase ancient curse level as penalty",
|
| 427 |
+
"Elemental artifacts required before barrier altars can be activated",
|
| 428 |
+
"Ritual coordination requires precise timing - actions must be synchronized"
|
| 429 |
+
]
|
| 430 |
+
}
|
| 431 |
+
}
|
| 432 |
+
]
|
| 433 |
+
}
|
bundle.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
index.html
CHANGED
|
@@ -1,19 +1,33 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
+
<title>PlayCanvas Game</title>
|
| 7 |
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
|
| 8 |
+
<style>
|
| 9 |
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
|
| 10 |
+
|
| 11 |
+
body {
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 0;
|
| 14 |
+
overflow: hidden;
|
| 15 |
+
font-family: 'Roboto', Arial, sans-serif;
|
| 16 |
+
}
|
| 17 |
+
#application-canvas {
|
| 18 |
+
display: block;
|
| 19 |
+
position: absolute;
|
| 20 |
+
top: 0;
|
| 21 |
+
left: 0;
|
| 22 |
+
right: 0;
|
| 23 |
+
bottom: 0;
|
| 24 |
+
}
|
| 25 |
+
</style>
|
| 26 |
+
<script src="https://code.playcanvas.com/playcanvas-stable.min.js"></script>
|
| 27 |
+
<script src="https://code.playcanvas.com/ammo.wasm.js"></script>
|
| 28 |
+
</head>
|
| 29 |
+
<body>
|
| 30 |
+
<canvas id="application-canvas"></canvas>
|
| 31 |
+
<script src="bundle.js"></script>
|
| 32 |
+
</body>
|
| 33 |
+
</html>
|