#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
#include <windows.h>

// Include important header files needed to interface with Outpost 2
#include <Outpost2DLL.h>
// Include header files to make it easier to build levels
#include <OP2Helper.h>
#include <BaseBuilder.h>
#include "IUnit.h"
// Include base layout data
// Note: Editing this file is a good way to build bases.
#include "BaseData.h"
#include "Guardpost.h"
// Note: These exports are required by Outpost2.exe from every level
//		 DLL. They give values for the map and tech trees used by the
//		 level and a description to place in the level listbox. The
//		 last export is used to define characteristics of the level.
//		 See RequiredExports.h for more details.
//		 ** Be sure to set these when you build your own level**

char MapName[]			= "on4_RT.map";							// The .map file used for this level
char LevelDesc[]		= "4 Player, LastOne, 'Railtubes 1.0' map";	// Description appearing in the game list box
char TechtreeName[]		= "MULTITEK.TXT";						// File to use for the tech tree
SDescBlock DescBlock	= { MultiLastOneStanding, 4, 12, 0 }; // Game Type,Number of Players Possible,Tech level availible,Units only.
struct SDescBlockEx {
  int unk0;
  int unk1;
  int unk2;
  int unk3;
  int unk4;
  int unk5;
  int unk6;
  int unk7;
};
 SCRIPT_API SDescBlockEx DescBlockEx = { 1, 0, 0, 0, 0, 0, 0, 0 };



// Note: This is the DLL entry point which is called by Windows when the
//		 DLL is first loaded into a processes address space or unloaded
//		 from the process address space. This function also be called for
//		 each thread owned by the process, but this has been disabled
//		 for efficiency reasons by the DisableThreadLibraryCalls during
//		 the first time the method is run.
// Note: You most likely do NOT need to edit this and unless you really
//		 know what you're doing you probably shouldn't.

BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
	if (fdwReason == DLL_PROCESS_ATTACH)
	{
		DisableThreadLibraryCalls(hinstDLL);
	}

    return TRUE;
}



// Note: The following function is called once by Outpost2.exe when the
//		 level is first initialized. This is where you want to create
//		 all the initial units and structures as well as setup any
//		 map/level environment settings such as day and night.

int InitProc()
{
//this should create the starting units for player 1.
if (Player[0].IsHuman()==1)
{
 if (Player[0].IsEden()==1)
  {
     int W;
     IUnit u;

     for (W=0; W<TethysGame::InitialUnits(); ++W)
     {
     TethysGame::CreateUnit(u,mapLynx,LOCATION(49+W,14),0,(map_id)61,0);
     u.DoSetLights(true);
     }
  }
    else
 {if (Player[0].IsHuman()==1){
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
     {
       TethysGame::CreateUnit(u,mapLynx,LOCATION(49+W,14),0,mapMicrowave,0);
       u.DoSetLights(true);
     }
   }
 }
}
// Player 2 starting units.
if (Player[1].IsHuman()==1)
{
if (Player[1].IsEden()==1)
 {
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
    {
    TethysGame::CreateUnit(u,mapLynx,LOCATION(138+W,14),1,(map_id)61,0);
    u.DoSetLights(true);
    }
 }
    else
 {if (Player[1].IsHuman()==1){
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
     {
       TethysGame::CreateUnit(u,mapLynx,LOCATION(138+W,14),1,mapMicrowave,0);
       u.DoSetLights(true);
     }
   }
 }
}
// Player 3.
if (Player[2].IsHuman()==1)
{
if (Player[2].IsEden()==1)
 {
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
    {
    TethysGame::CreateUnit(u,mapLynx,LOCATION(49+W,116),2,(map_id)61,0);
    u.DoSetLights(true);
    }
 }
    else
 {if (Player[2].IsHuman()==1){
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
     {
       TethysGame::CreateUnit(u,mapLynx,LOCATION(49+W,116),2,mapMicrowave,0);
       u.DoSetLights(true);
     }
   }
 }
}
//player 4.
if (Player[3].IsHuman()==1)
{
if (Player[3].IsEden()==1)
 {
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
    {
    TethysGame::CreateUnit(u,mapLynx,LOCATION(138+W,116),3,(map_id)61,0);
    u.DoSetLights(true);
    }
 }
    else
 {if (Player[3].IsHuman()==1){
    int W;
    IUnit u;

    for (W=0; W<TethysGame::InitialUnits(); ++W)
     {
       TethysGame::CreateUnit(u,mapLynx,LOCATION(138+W,116),3,mapMicrowave,0);
       u.DoSetLights(true);
     }
   }
 }
}
// Enemy "AI" setup stuff
int ai1 = TethysGame::NoPlayers() - 1;
    Player[ai1].GoAI();
    Player[ai1].GoPlymouth();
    Player[ai1].SetColorNumber(7);
    Player[ai1].CenterViewOn(90,60);

	TethysGame::CreateWallOrTube(67+31, 59-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(68+31, 59-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(62+31, 58-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(61+31, 58-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(60+31, 58-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 61-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 62-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 63-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 64-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 65-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 66-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 67-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 68-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 69-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 70-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(64+31, 71-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(67+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(68+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(69+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(70+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(71+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(62+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(61+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(60+31, 73-1, 0, (map_id)17);
	TethysGame::CreateWallOrTube(63+31, 73-1, 0, (map_id)17);

IUnit f;
		TethysGame::CreateUnit(f, (map_id)28, LOCATION(65+31, 73-1), ai1, (map_id)0, 0);
		TethysGame::CreateUnit(f, (map_id)28, LOCATION(64+31, 59-1), ai1, (map_id)0, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(69+31, 58-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(67+31, 54-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(72+31, 61-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(60+31, 54-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(58+31, 58-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(55+31, 62-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(59+31, 52-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(58+31, 54-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(57+31, 56-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(56+31, 58-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(55+31, 60-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(72+31, 59-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(71+31, 57-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(70+31, 55-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(69+31, 53-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(71+31, 53-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(72+31, 55-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(73+31, 57-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(74+31, 59-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(57+31, 52-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(56+31, 54-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(55+31, 56-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(54+31, 58-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(52+31, 59-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(71+31, 75-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(72+31, 73-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(73+31, 71-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(74+31, 69-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(75+31, 70-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(74+31, 72-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(73+31, 74-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(72+31, 76-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(74+31, 67-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(69+31, 75-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(71+31, 71-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(54+31, 73-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(56+31, 75-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(58+31, 77-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(60+31, 75-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(58+31, 73-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(56+31, 71-1), ai1, (map_id)60, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(52+31, 71-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(55+31, 69-1), ai1, (map_id)62, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(54+31, 71-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(56+31, 73-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(58+31, 75-1), ai1, (map_id)63, 0);
		TethysGame::CreateUnit(f, (map_id)23, LOCATION(60+31, 77-1), ai1, (map_id)63, 0);
        TethysGame::CreateUnit(f, (map_id)29, LOCATION(96+31, 66-1), ai1, (map_id)0, 0);
		TethysGame::CreateUnit(f, (map_id)29, LOCATION(92+31, 64-1), ai1, (map_id)0, 0);
		TethysGame::CreateUnit(f, (map_id)29, LOCATION(93+31, 60-1), ai1, (map_id)0, 0);
SetupObjects();

//desasters
if(TethysGame::CanHaveDisasters()==1)
{
    CreateTimeTrigger( 1, 0,5000,9000, "EMPMissile");
    CreateTimeTrigger( 1, 0,10100,10500, "EMPMissile2");
    CreateTimeTrigger( 1, 0,50000,70000, "fieldEMP");
    CreateTimeTrigger( 1, 0,10000,12000, "Quake");
    CreateTimeTrigger( 1, 0,10900,12000, "Meteor");

}
else{ CreateTimeTrigger( 1, 1,50000, "ReinforcementA");
//      CreateTimeTrigger( 1, 1,50000, "ReinforcementB");
//     CreateTimeTrigger( 1, 1,50000, "ReinforcementC");
//      CreateTimeTrigger( 1, 1,50000, "ReinforcementD");}
}
	int i;
	// Randomize starting locations
	RandomizeStartingLocations(autosize(startLocation));

	// Place all bases on the map
	for (i = 0; i < TethysGame::NoPlayers(); i++)
	{
		InitPlayerResources(i);

		StartLocation &sLoc = startLocation[i];
		CreateBase(i, sLoc.x, sLoc.y, *sLoc.baseInfo);
		Player[i].CenterViewOn(sLoc.x, sLoc.y);
	}



int flag;
  flag = TethysGame::GetRand(9);
    if (flag<3)
{
	TethysGame::CreateWreck(95, 63, (map_id)11999, 0); // Tech #11999 - tiger speed upgrade
}
else
 {
     if(flag<6)
     {TethysGame::CreateWreck(102, 67, (map_id)8106, 0);
      TethysGame::CreateWreck(103, 67, (map_id)8049, 0);}
     else{ if(flag<9){TethysGame::CreateWreck(90, 59, (map_id)12201, 0);}}
}

	// Misc initialization
	TethysGame::ForceMoraleGood(-1);
	if (TethysGame::UsesMorale())
		TethysGame::FreeMoraleLevel(-1);
	TethysGame::SetDaylightEverywhere(TethysGame::UsesDayNight() == 0);
	TethysGame::SetDaylightMoves(0);
	GameMap::SetInitialLightLevel(-32);

	CreateLastOneStandingVictoryCondition();

	return 1; // return 1 if OK; 0 on failure
}

//Missle desasters
     IUnit star;
SCRIPT_API void EMPMissile()
{
    TethysGame::SetEMPMissile(20+31, 63-1, 4,TethysGame::GetRand(128+31), TethysGame::GetRand(128-1));
}
SCRIPT_API void EMPMissile2()
{
    TethysGame::SetEMPMissile(20+31, 63-1, 4,TethysGame::GetRand(128+31), TethysGame::GetRand(128-1));
}

SCRIPT_API void fieldEMP()
  {int rand;
  rand = TethysGame::GetRand(4);
    if (rand == 0)
    {
    TethysGame::SetEMPMissile(20+31, 63-1, 4,39+(TethysGame::GetRand(22)),4+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+33, 63-1, 4,39+(TethysGame::GetRand(22)),4+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+32, 63-1, 4,39+(TethysGame::GetRand(22)),4+(TethysGame::GetRand(22)));
    }
    if (rand == 1)
    {
    TethysGame::SetEMPMissile(20+32, 63-1, 4,136+(TethysGame::GetRand(22)),106+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+31, 63-1, 4,136+(TethysGame::GetRand(22)),106+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+33, 63-1, 4,136+(TethysGame::GetRand(22)),106+(TethysGame::GetRand(22)));
    }
    if (rand == 2)
    {
    TethysGame::SetEMPMissile(20+32, 63-1, 4,136+(TethysGame::GetRand(22)),4+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+31, 63-1, 4,136+(TethysGame::GetRand(22)),4+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+33, 63-1, 4,136+(TethysGame::GetRand(22)),4+(TethysGame::GetRand(22)));
    }
    if (rand == 3)
    {
    TethysGame::SetEMPMissile(20+33, 63-1, 4,39+(TethysGame::GetRand(22)),106+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+32, 63-1, 4,39+(TethysGame::GetRand(22)),106+(TethysGame::GetRand(22)));
    TethysGame::SetEMPMissile(20+31, 63-1, 4,39+(TethysGame::GetRand(22)),106+(TethysGame::GetRand(22)));
    }
  }



SCRIPT_API void waitfire()
{
        CreateTimeTrigger( 1, 0,100,300, "CreateStar");
        CreateTimeTrigger( 1, 0,1000,2000, "CreateNova");
}
    SCRIPT_API void CreateNova()
    {
        int plr = TethysGame::NoPlayers() - 1;
        IUnit nova;
            TethysGame::CreateUnit(nova,mapLynx,LOCATION(85+TethysGame::GetRand(22),54+TethysGame::GetRand(21)),plr,mapSupernova,0);
            nova.DoSelfDestruct();
    }
    SCRIPT_API void CreateStar()
    {
        int plr = TethysGame::NoPlayers() - 1;
        TethysGame::CreateUnit(star,mapLynx,LOCATION(85+TethysGame::GetRand(22),54+TethysGame::GetRand(21)),plr,mapStarflare,0);
        star.DoSelfDestruct();
    }

SCRIPT_API void Quake ()
{
  TethysGame::SetEarthquake(TethysGame::GetRand(128)+31,TethysGame::GetRand(128)-1,TethysGame::GetRand(4));
}

SCRIPT_API void Meteor ()
{
  TethysGame::SetMeteor(TethysGame::GetRand(128)+31,TethysGame::GetRand(128)-1, TethysGame::GetRand (6));
}

SCRIPT_API void ReinforcementA ()
{ if(Player[0].IsEden()==1)
    {
     TethysGame::CreateUnit(star,mapConVec,LOCATION(46,4),1,mapRareStorage,0);
     TethysGame::CreateUnit(star,mapLynx,LOCATION(49,5),0,mapEMP,0);
     TethysGame::CreateUnit(star,mapSpider,LOCATION(47,5),0,mapNone,0);
     TethysGame::CreateUnit(star,mapSpider,LOCATION(47,4),0,mapNone,0);
     TethysGame::CreateUnit(star,mapSpider,LOCATION(44,5),0,mapNone,0);
        PlayerVehicleEnum vehicleEnum(0);
        while(vehicleEnum.GetNext(star) != 0)
        star.DoSetLights(true);
    }
else
{if(Player[0].IsEden()==0)
    {
     TethysGame::CreateUnit(star,mapConVec,LOCATION(46,4),0,mapMeteorDefense,0);
     TethysGame::CreateUnit(star,mapLynx,LOCATION(49,5),0,mapEMP,0);
     TethysGame::CreateUnit(star,mapLynx,LOCATION(47,5),0,mapRailGun,0);
     TethysGame::CreateUnit(star,mapLynx,LOCATION(47,4),0,mapLaser,0);
     TethysGame::CreateUnit(star,mapLynx,LOCATION(44,5),0,mapLaser,0);
        PlayerVehicleEnum vehicleEnum(0);
        while(vehicleEnum.GetNext(star) != 0)
        star.DoSetLights(true);
    }
  }
TethysGame::AddMessage(49+31,5-1,"Reinforcements Ready.",0,sndSavnt205);
}
// Note: The following function seems to be intended for use in
//		 controlling an AI. It is called once every game cycle.
//		 Use it for whatever code needs to run on a continual basis.
// Note: The standard level DLLs released by Sierra leave this function
//		 empty and handle all AI controls through triggers.

void AIProc()
{
}


// Note: This function is called by Outpost2.exe to obtain a description
//		 of a buffer that is saved to saved game files. Outpost2.exe
//		 calls this function and passes it a pointer to a structure
//		 which describes this buffer. This function is required to set
//		 the fields of this structure. If no buffer needs to be saved
//		 to a saved game file, then the buffer pointer needs to be set
//		 to 0, and the length should also be set to 0.
// Note: This function is called once when the DLL is first initialized.
//		 This means that all data to be saved must have space reserved
//		 ahead of time at the start of the level. (Static sized storage)
//		 In other words, there is no way to dynamically grow the size of
//		 the buffer if more space is needed than originally specified.
// Note: You can probably stretch the above limitation by saving the
//		 pointer to the buffer description passed by Outpost2.exe. This
//		 may allow you to increase the buffer size dynamically but the
//		 idea is yet untested. Keep in mind that you have no idea when
//		 a game may be saved (or just loaded).

void __cdecl GetSaveRegions(struct BufferDesc &bufDesc)
{
	bufDesc.bufferStart = 0;	// Pointer to a buffer that needs to be saved
	bufDesc.length = 0;			// sizeof(buffer)
}





// Note: These last two functions aren't absolutely required by a level
//		 but they found in almost all DLLs anyways.


// Note: This export usually exists, but does nothing other than return 0.
//		 It's use may have been for checking for victory/failure conditions
//		 that are not easily checked for by using triggers.

int StatusProc()
{
	return 0; // must return 0
}


// Note: This is a trigger callback function. This function is
//		 intentionally left empty and is used as the trigger
//		 callback function for triggers that don't want or need
//		 any special callback function.
// Note: The use of SCRIPT_API is used by all trigger functions
//		 to ensure they are exported correctly. (Although,
//		 technically it's not needed in this case since this
//		 function has a function prototype defined in
//		 RequiredExports.h which contains the SCRIPT_API macro
//		 in it. However, most other trigger callback functions
//		 won't have a function prototype anywhere (and you really
//		 don't need to declare a function prototype since you
//		 should never be calling a callback function yourself)
//		 so you should use the SCRIPT_API macro when you define
//		 the function.
//		 Might as well set a good example. =)

SCRIPT_API void NoResponseToTrigger()
{
}

/*

	techDisasterResistantHousing			= 8105,
	techExpandedHousing						= 8104,
	techEnhancedDefensizeFortifications		= 8306,
	techMultitainmentConsoleUpgrade			= 8307,
	techAcidWeaponry						= 8503,
	techAdvancedArmoringSystems				= 10303,
	techHighPoweredExplosives				= 8203,
	techMagmaPurityControl					= 10301,
	techSpiderMaintenanceSoftwareRevision	= 8319,


	techDualTurretWeaponsSystems			= 8201,
	techHeatMining							= 8304,

	techMagmaRefining						= 8103,

	techReducedFoamEvaporation				= 8320,
	techReinforcedPantherConstruction		= 8309,

	techArachnidDurability					= 8321,
	techArtificialLightning					= 10102,
	techEfficiencyEngineeringEden			= 8301,
	techEfficiencyEngineeringPlymouth		= 8302,
	techGrenadeLoadingMechanismPlymouth		= 10306,
	techImprovedLaunchVehicle				= 10101,
	techMeteorWatchObservatory				= 8049,
	techPrecisionTrajectoryProjectionSoftware = 10309,
	techRocketAtmosphericReEntrySystem		= 12201,
	techSkydock								= 8601,
	techSolarPower							= 10204,
	techStasisSystems						= 10208,

	techHabitatRing							= 10205,
	techGrenadeLoadingMechanismEden			= 10305,
	techHeatDissipationSystemsEden			= 12101,
	techHighEnergyRayCompositeProjector		= 8106,
	techIonDriveModule						= 8801,
	techCommandModule						= 10202,
	techMeteorDetection						= 8316,
	techOrbitalPackage						= 10209,
	techSensorPackage						= 10206,

	techFuelingSystems						= 8951,
	techFusionDriveModule					= 8901,

	techPhoenixModule						= 10401,

	techTigerSpeedModification				= 11999,

	techObservatory							= 8051,
	techMeteorDetectionConstruction			= 8317,
	techEvacuationModule					= 12599,
*/