mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-27 16:56:48 -04:00
Players can now launch into Ord Mantell Space from Tansarii Point Station
This commit is contained in:
@@ -71,8 +71,10 @@ public class npe extends script.base_script
|
||||
location world_loc;
|
||||
String cell;
|
||||
location cell_loc;
|
||||
LOG("npe", "Transfer perform engaged for %TU to " + station);
|
||||
switch (station) {
|
||||
case DUNGEON_SPACE_STATION + "*":
|
||||
LOG("npe", "Transferring %TU to npe_space_station");
|
||||
int instance_index = getBestStationInstanceIndex(player, stations);
|
||||
if (instance_index == -1 || instance_index >= stations.length) {
|
||||
return false;
|
||||
@@ -148,6 +150,7 @@ public class npe extends script.base_script
|
||||
}
|
||||
default:
|
||||
LIVE_LOG("npe", "Player is trying to perform a cluster wide transition, but is going to an unsupported station " + station + " should be " + DUNGEON_SPACE_STATION + "*, " + DUNGEON_ORD_SPACE_STATION + "*");
|
||||
LOG("npe", "%TU cannot be sent to " + station);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -438,7 +441,7 @@ public class npe extends script.base_script
|
||||
attachScript(player, SCRIPT_PUBLIC_TRAVEL);
|
||||
utils.setScriptVar(player, SCRIPT_VAR_ORD_SPACE_DESTINATION, new_loc);
|
||||
getClusterWideData(DUNGEON_PUBLIC_MANAGER_NAME, DUNGEON_ORD_SPACE_STATION + "*", false, player);
|
||||
return true;
|
||||
return transferPlayerToOrdMantellSpace(player, new_loc);
|
||||
}
|
||||
public static boolean movePlayerFromOrdMantellSpaceToSharedStation(obj_id player) throws InterruptedException
|
||||
{
|
||||
@@ -461,7 +464,8 @@ public class npe extends script.base_script
|
||||
attachScript(player, SCRIPT_PUBLIC_TRAVEL);
|
||||
utils.setScriptVar(player, SCRIPT_VAR_FROM_ORD_SPACE, 1);
|
||||
getClusterWideData(DUNGEON_PUBLIC_MANAGER_NAME, DUNGEON_SPACE_STATION + "*", false, player);
|
||||
return true;
|
||||
|
||||
return movePlayerFromOrdMantellSpaceToSharedStation(player);
|
||||
}
|
||||
public static boolean movePlayerFromOrdMantellSpaceToOrdMantellDungeon(obj_id player) throws InterruptedException
|
||||
{
|
||||
@@ -471,11 +475,16 @@ public class npe extends script.base_script
|
||||
return true;
|
||||
}
|
||||
public static boolean movePlayerFromOrdMantellDungeonToOrdMantellSpace(obj_id player, location new_loc) throws InterruptedException
|
||||
{
|
||||
return transferPlayerToOrdMantellSpace(player, new_loc);
|
||||
}
|
||||
|
||||
private static boolean transferPlayerToOrdMantellSpace(obj_id player, location new_loc) throws InterruptedException
|
||||
{
|
||||
String scene = getStringObjVar(player, VAR_ORD_SCENE_NAME);
|
||||
if (scene == null || scene.equals("") || !scene.equals("space_ord_mantell"))
|
||||
{
|
||||
LOG("npe", "movePlayerFromOrdMantellDungeonToOrdMantellSpace: empty scene id found: " + player);
|
||||
LOG("npe", "transferPlayerToOrdMantellSpace: empty scene id found: " + player);
|
||||
scene = "space_ord_mantell";
|
||||
}
|
||||
if (isAreaTooFullForTravel(scene, 0, 0))
|
||||
@@ -483,7 +492,7 @@ public class npe extends script.base_script
|
||||
scene = getOpenOrdMantellSpaceZone();
|
||||
if (scene == null || scene.equals(""))
|
||||
{
|
||||
LIVE_LOG("npe", "movePlayerFromOrdMantellDungeonToOrdMantellSpace: player " + player + " can't be moved to ord mantell, all scenes are full");
|
||||
LIVE_LOG("npe", "transferPlayerToOrdMantellSpace: player " + player + " can't be moved to ord mantell, all scenes are full");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,12 +44,15 @@ public class ord_mantell_terminal extends script.base_script
|
||||
space_crafting.repairDamage(player, shipId[0], 1.0f);
|
||||
}
|
||||
if (checkGod(player))
|
||||
{
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
location ordLoc = new location(200, 150, 600);
|
||||
npe.movePlayerFromSharedStationToOrdMantellSpace(player, ordLoc);
|
||||
groundquests.sendSignal(player, "accessedSpace");
|
||||
if (npe.movePlayerFromSharedStationToOrdMantellSpace(player, ordLoc)) {
|
||||
// Only update quests if the player has successfully moved into OM space
|
||||
groundquests.sendSignal(player, "accessedSpace");
|
||||
} else {
|
||||
LOG("npe", "Could not move to OM space!");
|
||||
}
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user