From dacdfcbb1f399c3c249765fee8ca3e50e4f7f37a Mon Sep 17 00:00:00 2001 From: loop <126372784+tribes2@users.noreply.github.com> Date: Mon, 13 Oct 2025 02:51:28 +0100 Subject: [PATCH] make teleporters explain themselves --- .gitignore | 3 ++- missions/NewbiesNexus.mis | 12 ++++-------- scripts/SkillSectorTeleporter.cs | 8 +++++++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9e3aed0..d89b198 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ gui/ Classic* # scripts folder need to be ignored and then exclusions have to be carved out -# scripts/ ignores the path entirely, whereas scripts/* is treated as a pattern +# scripts/ ignores the entire path forever, whereas scripts/* is treated as a pattern +# ! lets you carve out an exception pattern scripts/* !scripts/SkillSector*.cs diff --git a/missions/NewbiesNexus.mis b/missions/NewbiesNexus.mis index e6fb21f..7de6c47 100644 --- a/missions/NewbiesNexus.mis +++ b/missions/NewbiesNexus.mis @@ -372,8 +372,6 @@ new SimGroup(MissionGroup) { dataBlock = "SolarPanel"; lockCount = "0"; homingCount = "0"; - - Target = "37"; }; new StaticShape() { position = "-158.234 132.947 290.416"; @@ -382,8 +380,6 @@ new SimGroup(MissionGroup) { dataBlock = "SolarPanel"; lockCount = "0"; homingCount = "0"; - - Target = "38"; }; new StaticShape(MainInventory) { position = "-158.549 153.858 241.953"; @@ -413,13 +409,13 @@ new SimGroup(MissionGroup) { msToNext = "1000"; }; new StaticShape() { - position = "-179.634 134.044 242.142"; + position = "-176.434 144.844 233.142"; rotation = "1 0 0 0"; scale = "1 1 1"; dataBlock = "BankTeleporter"; lockCount = "0"; homingCount = "0"; - + Desc = "Static Aim Trainer\nShoot static targets while in the air to score points!\nMove faster to score more points and have fun!"; destination = "ATLSpawn"; }; }; @@ -482,12 +478,12 @@ new SimGroup(MissionGroup) { dataBlock = "BankTeleporter"; lockCount = "0"; homingCount = "0"; - + Desc = "\nWelcome back to the Bank!"; destination = "BankSpawn"; }; new Marker(ATLSpawn) { position = "-546.054 112.086 223.904"; - rotation = "1 0 0 0"; + rotation = "0 0 -1 90"; scale = "1 1 1"; seqNum = "0"; msToNext = "1000"; diff --git a/scripts/SkillSectorTeleporter.cs b/scripts/SkillSectorTeleporter.cs index 4228541..4fdadd2 100644 --- a/scripts/SkillSectorTeleporter.cs +++ b/scripts/SkillSectorTeleporter.cs @@ -33,6 +33,7 @@ function BankTeleporter::onCollision(%data, %obj, %collider) { // Teleporters are generally one way in Skill Sector // Teleporter entities are linked to 'spawn point' objects echo("BankTeleporter collision: " @ %obj @ " and collider: " @ %collider); + echo("Banker: " @ %obj.desc); if (%obj.disabled) { messageClient(%collider.client, 'MsgStationDenied', '\c2Teleporter is recharging please stand by. ~wfx/powered/nexus_deny.wav'); return; @@ -49,6 +50,11 @@ function BankTeleporter::onCollision(%data, %obj, %collider) { %data.sparkEmitter(%obj); %data.schedule(1500, "teleportout", %obj, %collider); %data.schedule(3000, "teleportingDone", %obj, %collider); + if (%obj.desc !$= "") { + echo("isObject passed"); + echo(%obj.desc); + centerprint(%collider.client, %obj.desc, 5, 3); + } } function BankTeleporter::teleportOut(%data, %obj, %player) { @@ -116,7 +122,7 @@ function BankTeleporter::teleportOut(%data, %obj, %player) { function BankTeleporter::teleportIn(%data, %player) { messageClient(%collider.client, 'MsgTeleportStart', '\c2Teleport to '@ %data.destination @' complete! ~wfx/powered/nexus_idle.wav'); %data.sparkEmitter(%player); // z0dd - ZOD, 4/24/02. teleport sparkles - %player.startFade(1000, 0, false ); + %player.startFade(1000, 0, false); %player.playAudio($PlaySound, StationVehicleDeactivateSound); }