User Tools

Site Tools


pf:rpldocs:everything_else
everything else.txt
case STATEMENT.REFREAD:
	s1 = GetStringFromStack();
		stack.Push(heap[s1]);
		stack.Push(new Data(0));
	

case STATEMENT.REFWRITE:
		s1 = GetStringFromStack();

case STATEMENT.REFEXISTS:
	stack.Push(new Data(heap.ContainsKey(GetStringFromStack()) ? 1 : 0));

case STATEMENT.REFDELETE:

case STATEMENT.READ:
	s1 = command.data.GetString();
		stack.Push(heap[s1]);
		stack.Push(new Data(0));

case STATEMENT.WRITE:
		s1 = command.data.GetString();

case STATEMENT.EXISTS:
	stack.Push(new Data(heap.ContainsKey(command.data.GetString()) ? 1 : 0));

case STATEMENT.DELETE:

case STATEMENT.REFREADGLOBAL:
	s1 = GetStringFromStack();
		stack.Push(GameSpace.instance.globalHeap[s1]);
		stack.Push(new Data(0));

case STATEMENT.REFWRITEGLOBAL:
		s1 = GetStringFromStack();

case STATEMENT.REFEXISTSGLOBAL:
	stack.Push(new Data(GameSpace.instance.globalHeap.ContainsKey(GetStringFromStack()) ? 1 : 0));

case STATEMENT.REFDELETEGLOBAL:

case STATEMENT.READGLOBAL:
	s1 = command.data.GetString();
		stack.Push(GameSpace.instance.globalHeap[s1]);
		stack.Push(new Data(0));

case STATEMENT.WRITEGLOBAL:
		s1 = command.data.GetString();

case STATEMENT.EXISTSGLOBAL:
	stack.Push(new Data(GameSpace.instance.globalHeap.ContainsKey(command.data.GetString()) ? 1 : 0));

case STATEMENT.DELETEGLOBAL:

case STATEMENT.CLEARGLOBALS:

case STATEMENT.NOTPERSIST:
	s1 = GetStringFromStack();


case STATEMENT.INVOCATIONCOUNT:
	stack.Push(new Data(invocationCount));

case STATEMENT.DOUBLEQUOTE:
	stack.Push(new Data("\""));


case STATEMENT.GETTYPE:
	d1 = GetDataFromStack();
	stack.Push(new Data(d1.GetType().ToString()));



case STATEMENT.SETLISTELEMENTRPN:
	// value, list, index
	i1 = GetIntFromStack();
	list1 = GetListFromStack();
	if (stack.Count > 0) { d1 = stack.Pop(); } else { d1 = new Data(0);}
	
case STATEMENT.REMOVELISTELEMENT:
	i1 = GetIntFromStack();
	list1 = GetListFromStack();


case STATEMENT.GETKEY:
	s1 = GetStringFromStack();
		stack.Push(new Data(Input.GetKey(kc1) ? 1 : 0));
		stack.Push(new Data(0));

case STATEMENT.GETKEYDOWN:
	s1 = GetStringFromStack();
			stack.Push(new Data(0));
			stack.Push(new Data(Input.GetKeyDown(kc2) ? 1 : 0));
		stack.Push(new Data(0));

case STATEMENT.GETKEYUP:
	s1 = GetStringFromStack();
			stack.Push(new Data(0));
			stack.Push(new Data(Input.GetKeyUp(kc2) ? 1 : 0));
		stack.Push(new Data(0));

case STATEMENT.GETMOUSEBUTTON:
	i1 = GetIntFromStack();
	stack.Push(new Data(Input.GetMouseButton(i1) ? 1 : 0));

case STATEMENT.GETMOUSEBUTTONDOWN:
	i1 = GetIntFromStack();
		stack.Push(new Data(Input.GetMouseButtonDown(i1) ? 1 : 0));

case STATEMENT.GETMOUSEBUTTONUP:
	i1 = GetIntFromStack();
		stack.Push(new Data(Input.GetMouseButtonUp(i1) ? 1 : 0));

case STATEMENT.GETMOUSESCREENPOSITION:
	stack.Push(new Data(Input.mousePosition.x / Screen.width));
	stack.Push(new Data(Input.mousePosition.y / Screen.height));

case STATEMENT.GETMOUSESCREENPIXELPOSITION:
	stack.Push(new Data(Input.mousePosition.x));
	stack.Push(new Data(Input.mousePosition.y));

case STATEMENT.GETMOUSEPOSITION:
	Vector3 wp = GameSpace.instance.mainCamera.ScreenToWorldPoint(Input.mousePosition);
	stack.Push(new Data(wp.x));
	stack.Push(new Data(wp.y));

case STATEMENT.GETMOUSECELL:
	Vector3 wp2 = GameSpace.instance.mainCamera.ScreenToWorldPoint(Input.mousePosition);
	stack.Push(new Data((int)(wp2.x / (float)GameSpace.GRID_SIZE)));
	stack.Push(new Data((int)(wp2.y / (float)GameSpace.GRID_SIZE)));

case STATEMENT.RESETGAMETIME:

case STATEMENT.SETGAMETIME:
	f1 = GetFloatFromStack();

case STATEMENT.SETGAMETIMEFRAMES:
	i1 = GetIntFromStack();

case STATEMENT.GETGAMETIMEFRAMES:
	stack.Push(new Data(GameSpace.instance.updateCount));

case STATEMENT.PAUSEGAME:
	GameSpace.instance.paused = true;

case STATEMENT.UNPAUSEGAME:
	GameSpace.instance.paused = false;

case STATEMENT.OPERATEWHILEPAUSED:
	operateWhilePaused = GetIntFromStack() == 1;

case STATEMENT.ISPAUSED:
	stack.Push(new Data(GameSpace.instance.paused ? 1 : 0));

case STATEMENT.USERCANCELED:
	stack.Push(new Data(GameSpace.instance.userCancelAction ? 1 : 0));
		

case STATEMENT.MAPWIDTH:
	stack.Push(new Data(GameSpace.GAMESPACE_WIDTH));
						
case STATEMENT.MAPHEIGHT:
	stack.Push(new Data(GameSpace.GAMESPACE_HEIGHT));
				
case STATEMENT.SCREENWIDTH:
	stack.Push(new Data(Screen.width));
						
case STATEMENT.SCREENHEIGHT:
	stack.Push(new Data(Screen.height));
	

case STATEMENT.DEBUG:
		d1 = stack.Peek();
		Debug.Log(d1.GetType() + " " + d1.GetInt() + " " + d1.GetFloat() + " " + d1.GetString());
		Debug.Log("--EMPTY STACK--");

case STATEMENT.TRACE:
	DebugText.LogMessage(this,GetStringFromStack());
	
case STATEMENT.PRINT:
	DebugText.PrintMessage(this,GetStringFromStack());

case STATEMENT.TRACEALL: 
		foreach (Data d in stack) {
		DebugText.LogMessage(this, sbu.ToString());

		case STATEMENT.PRINTALL: 
		foreach (Data d in stack) {
		DebugText.PrintMessage(this, sbu.ToString());

		case STATEMENT.TRACEALLSP: 
		foreach (Data d in stack) {
		DebugText.LogMessage(this, sbu.ToString());

		case STATEMENT.PRINTALLSP: 
		foreach (Data d in stack) {
		DebugText.PrintMessage(this, sbu.ToString());

case STATEMENT.TRACE2:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack();
	DebugText.LogMessage(this,s0);

	case STATEMENT.PRINT2:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack();
	DebugText.PrintMessage(this,s0);

case STATEMENT.TRACE3:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack(); 
	s3 = GetStringFromStack();
	DebugText.LogMessage(this,s0);

	case STATEMENT.PRINT3:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack(); 
	s3 = GetStringFromStack();
	DebugText.PrintMessage(this,s0);

case STATEMENT.TRACE4:
	s1 = GetStringFromStack();
	s2 = GetStringFromStack(); 
	s3 = GetStringFromStack(); 
	s4 = GetStringFromStack();
	DebugText.LogMessage(this,s0);

	case STATEMENT.PRINT4:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack(); 
	s3 = GetStringFromStack(); 
	s4 = GetStringFromStack();
	DebugText.PrintMessage(this,s0);

case STATEMENT.TRACE5:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack(); 
	s3 = GetStringFromStack(); 
	s4 = GetStringFromStack(); 
	s5 = GetStringFromStack();
	DebugText.LogMessage(this,s0);
	
case STATEMENT.PRINT5:
	s1 = GetStringFromStack(); 
	s2 = GetStringFromStack(); 
	s3 = GetStringFromStack(); 
	s4 = GetStringFromStack(); 
	s5 = GetStringFromStack();
	DebugText.PrintMessage(this,s0);

case STATEMENT.TRACESTACK: 
	foreach(Data d in stack) {
	DebugText.LogMessage(this,sb.ToString());

	case STATEMENT.PRINTSTACK: 
	foreach(Data d in stack) {
	DebugText.PrintMessage(this,sb.ToString());

	case STATEMENT.CLEARTRACELOG:

case STATEMENT.GETUPDATECOUNT:
	stack.Push(new Data(updateCount));

case STATEMENT.RANDINT:
	int max = GetIntFromStack();
	int min = GetIntFromStack();
	stack.Push(new Data(min+amt));

case STATEMENT.RANDFLOAT:
	stack.Push(new Data((float)GameSpace.instance.RandDouble()));

case STATEMENT.RANDCOORDS:
	gsx = (int)(GameSpace.instance.RandDouble() * GameSpace.GRID_WIDTH);
	gsy = (int)(GameSpace.instance.RandDouble() * GameSpace.GRID_HEIGHT);
	stack.Push(new Data(gsx));
	stack.Push(new Data(gsy));

case STATEMENT.RANDCOORDSINRANGE:
	f1 = GetFloatFromStack();
	gsy = GetIntFromStack();
	gsx = GetIntFromStack();
				stack.Push(new Data(i1));
				stack.Push(new Data(i2));

case STATEMENT.RANDXCOORD:
	stack.Push(new Data(gsx));

case STATEMENT.RANDYCOORD:
	stack.Push(new Data(gsy));

case STATEMENT.CURRENTCOORDS:
	stack.Push(new Data(GetCell(baseUnit.coordX)));
	stack.Push(new Data(GetCell(baseUnit.coordY)));

case STATEMENT.CURRENTX:
	stack.Push(new Data(GetCell(baseUnit.coordX)));

case STATEMENT.CURRENTY:
	stack.Push(new Data(GetCell(baseUnit.coordY)));

case STATEMENT.SETUNITCURRENTCOORDS:
	i3 = GetIntFromStack(); //UID
	i2 = GetIntFromStack(); //x-coord
	i1 = GetIntFromStack(); //y-coord

case STATEMENT.SETCURRENTCOORDS:
	i2 = GetIntFromStack(); // x
	i1 = GetIntFromStack(); // y

case STATEMENT.SETUNITCURRENTX:
	i2 = GetIntFromStack(); // x
	i1 = GetIntFromStack(); // UID

case STATEMENT.SETUNITCURRENTY:
	i2 = GetIntFromStack();  // y
	i1 = GetIntFromStack(); // UID

case STATEMENT.SETCURRENTX:
	i1 = GetIntFromStack();

	case STATEMENT.SETCURRENTY:
	i1 = GetIntFromStack();

case STATEMENT.CURRENTPIXELCOORDS:
	stack.Push(new Data(baseUnit.coordX));
	stack.Push(new Data(baseUnit.coordY));					

case STATEMENT.GETUNITTRANSFORMPOSITION:
	stack.Push(new Data(baseUnit.transform.position.x));
	stack.Push(new Data(baseUnit.transform.position.y));
	stack.Push(new Data(baseUnit.transform.position.z));
	
case STATEMENT.SETSCREENMODE:
	i1 = GetIntFromStack();

case STATEMENT.SETSCREENCOORDS:
	f2 = GetFloatFromStack(); //screenY = f2
	f1 = GetFloatFromStack(); //screenX = f1

case STATEMENT.SETSCREENCOORDX:
	f1 = GetFloatFromStack(); //screenX = f1

case STATEMENT.SETSCREENCOORDY:
	f1 = GetFloatFromStack(); //screenY = f1

case STATEMENT.SETSCREENPIXELCOORDS:
	i2 = GetIntFromStack(); //screenY
	i1 = GetIntFromStack(); //screenX

case STATEMENT.SETSCREENPIXELCOORDX:
	i1 = GetIntFromStack();

case STATEMENT.SETSCREENPIXELCOORDY:
	i1 = GetIntFromStack();
	
case STATEMENT.GETBUILDSLOTSCREENCOORDS:
	i2 = GetIntFromStack(); // corner
	i1 = GetIntFromStack(); // slot number
		stack.Push(new Data(sp.x / (float)Screen.width));
		stack.Push(new Data(sp.y / (float)Screen.height));

case STATEMENT.GETCONTROLPANELBUTTONSCREENCOORDS:
	i1 = GetIntFromStack(); // corner
	s1 = GetStringFromStack(); // button name
		stack.Push(new Data(sp.x / (float)Screen.width));
		stack.Push(new Data(sp.y / (float)Screen.height));

case STATEMENT.GETTECHPANELVISIBLE:
	stack.Push(new Data(GameSpace.instance.gameControls.techPanel.activeSelf ? 1 : 0));

case STATEMENT.SETTECHPANELVISIBLE:
	i1 = GetIntFromStack();

case STATEMENT.CELLTOPIXEL:
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
	stack.Push(new Data(wx));
	stack.Push(new Data(wy));
	
case STATEMENT.PIXELTOCELL:
	f2 = GetFloatFromStack(); //py
	f1 = GetFloatFromStack(); //px
	stack.Push(new Data(x));
	stack.Push(new Data(y));

case STATEMENT.CREATEEFFECT:
	f2 = GetFloatFromStack(); //pixel y
	f1 = GetFloatFromStack(); //pixel x
	s1 = GetStringFromStack();  //Which effect
			stack.Push(new Data(s.GUID));

case STATEMENT.DESTROYEFFECT:
	i1 = GetIntFromStack();  //effect guid
	
case STATEMENT.GETALLUNITSINRANGE:
	i1 = GetIntFromStack();
	f1 = GetFloatFromStack();
	gsy = GetIntFromStack();
	gsx = GetIntFromStack();
	stack.Push(new Data(units))

case STATEMENT.GETALLSHIPSINRANGE:
	i1 = GetIntFromStack();
	f1 = GetFloatFromStack();
	gsy = GetIntFromStack();
	gsx = GetIntFromStack();
	stack.Push(new Data(units))

case STATEMENT.GETNEARESTSHIPINRANGE:
	i1 = GetIntFromStack();
	f1 = GetFloatFromStack();
	gsy = GetIntFromStack();
	gsx = GetIntFromStack();
	stack.Push(new Data(nearestShip));

case STATEMENT.GETCORESWITHVAR:
	d1 = stack.Pop();
	s1 = GetStringFromStack();
		stack.Push(new Data(cch.UID));
	stack.Push(new Data(i1));

case STATEMENT.ADDSCRIPTTOUNIT:
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();

case STATEMENT.SETSCRIPTVAR:
	d1 = stack.Pop();
	s2 = GetStringFromStack();
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();
	
case STATEMENT.GETSCRIPTVAR:
	s2 = GetStringFromStack();
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();
	stack.Push(d1);
	
case STATEMENT.SELF:
	stack.Push(new Data(baseUnit.UID));

case STATEMENT.GETSHIPATTRIBUTE:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();
	GetShipAttribute(i1, i2);

case STATEMENT.SETSHIPATTRIBUTE:
		d1 = stack.Pop();
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();
	SetShipAttribute(i1, i2, d1);

case STATEMENT.GETATTRIBUTE:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();
	GetAttribute(i1, i2);

case STATEMENT.SETATTRIBUTE:
		d1 = stack.Pop();
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();

	SetAttribute(i1, i2, d1);

case STATEMENT.GETUNITTYPE:
	i1 = GetIntFromStack(); // UID
		stack.Push(new Data(unit.gameObject.name));
		stack.Push(new Data(""));
	
case STATEMENT.SETIMAGE:
	s1 = GetStringFromStack(); //image name
	s2 = GetStringFromStack(); //image pos
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.REMOVEIMAGES:
	i1 = GetIntFromStack(); //unit uid
	
case STATEMENT.SETIMAGEPOSITION:
	f3 = GetFloatFromStack(); //z
	f2 = GetFloatFromStack(); //y
	f1 = GetFloatFromStack(); //x
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGEPOSITIONX:
	f1 = GetFloatFromStack(); //x
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGEPOSITIONY:
	f1 = GetFloatFromStack(); //y
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGEPOSITIONZ:
	f1 = GetFloatFromStack(); //z
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGELAYER:
	s2 = GetStringFromStack(); //layer name
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
	
case STATEMENT.SETIMAGEORDER:
	i2 = GetIntFromStack(); //layer order
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGEROTATION:
	f1 = GetFloatFromStack(); //rotation in radians
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGESCALE:
	f2 = GetFloatFromStack(); //y
	f1 = GetFloatFromStack(); //x
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGESCALEX:
	f1 = GetFloatFromStack(); //x
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGESCALEY:
	f1 = GetFloatFromStack(); //y
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.SETIMAGECOLOR:
	i5 = GetIntFromStack(); //a
	i4 = GetIntFromStack(); //b
	i3 = GetIntFromStack(); //g
	i2 = GetIntFromStack(); //r
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

 case STATEMENT.GETIMAGEPOSITION:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid

case STATEMENT.GETIMAGEPOSITIONX:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			stack.Push(new Data(id.go.transform.localPosition.x));
			stack.Push(new Data());

case STATEMENT.GETIMAGEPOSITIONY:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			stack.Push(new Data(id.go.transform.localPosition.y));
		stack.Push(new Data());

case STATEMENT.GETIMAGEPOSITIONZ:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			stack.Push(new Data(id.go.transform.localPosition.z));
			stack.Push(new Data());

case STATEMENT.GETIMAGELAYER:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
		stack.Push(new Data((unit as CommonUnit).GetSortingLayerName(s1)));
		stack.Push(new Data());

case STATEMENT.GETIMAGEORDER:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
		stack.Push(new Data((unit as CommonUnit).GetSortingOrder(s1)));

case STATEMENT.GETIMAGEROTATION:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			stack.Push(new Data(id.go.transform.eulerAngles.z*Mathf.Deg2Rad));
			stack.Push(new Data());

case STATEMENT.GETIMAGESCALE:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			float scX, scY;
			stack.Push(new Data(scX));
			stack.Push(new Data(scY));
			stack.Push(new Data());stack.Push(new Data());

case STATEMENT.GETIMAGESCALEX:
	f1 = GetFloatFromStack(); //x
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			float scX, scY;
			stack.Push(new Data(scX));
			stack.Push(new Data());

case STATEMENT.GETIMAGESCALEY:
	f1 = GetFloatFromStack(); //y
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			float scX, scY;
			stack.Push(new Data(scY));

case STATEMENT.GETIMAGECOLOR:
	s1 = GetStringFromStack(); //which image
	i1 = GetIntFromStack(); //unit uid
			stack.Push(new Data((int)(c1.r*255)));
			stack.Push(new Data((int)(c1.g*255)));
			stack.Push(new Data((int)(c1.b*255)));
			stack.Push(new Data((int)(c1.a*255)));							
			stack.Push(new Data()); stack.Push(new Data()); stack.Push(new Data()); stack.Push(new Data());


case STATEMENT.WINMISSION:

case STATEMENT.FAILMISSION:

case STATEMENT.SETFAILONHQLOSS:
	GameSpace.instance.failOnHQLoss = GetIntFromStack() != 0;

case STATEMENT.GETFAILONHQLOSS:
	stack.Push(new Data(GameSpace.instance.failOnHQLoss ? 1 : 0));

case STATEMENT.SETHQJUMPTIME:
	GameSpace.instance.hqJumpTime = GetIntFromStack();

case STATEMENT.SETSHOWSPECIALENDING:
	GameSpace.instance.showSpecialEnding = GetIntFromStack() != 0;

case STATEMENT.PLAYSOUND:
	CustomSounds.Play(GetStringFromStack());

case STATEMENT.SHOWCONVERSATION:
	s1 = GetStringFromStack();

case STATEMENT.SHOWCONVERSATIONNOPAUSE:
	s1 = GetStringFromStack();

case STATEMENT.SHOWCONVERSATIONAUTOMODE:
	f2 = GetFloatFromStack();
	f1 = GetFloatFromStack();
	s1 = GetStringFromStack();

case STATEMENT.CLOSECONVERSATION:
	s1 = GetStringFromStack();

case STATEMENT.ADDCONVERSATIONMESSAGE:
	s2 = GetStringFromStack();
	i1 = GetIntFromStack();
	s1 = GetStringFromStack(); 

case STATEMENT.CLEARCONVERSATION:
	s1 = GetStringFromStack(); 

case STATEMENT.DESTROYCONVERSATION:
	s1 = GetStringFromStack();

case STATEMENT.CONVERSATIONSHOWING:
	stack.Push(GameSpace.instance.conversationsManager.IsConversationShowing() ? new Data(1) : new Data(0));

case STATEMENT.SPECIFICCONVERSATIONSHOWING:
	s1 = GetStringFromStack();
	stack.Push(GameSpace.instance.conversationsManager.IsSpecificConversationShowing(s1) ? new Data(1) : new Data(0));
		
case STATEMENT.SETTEXT:
	s1 = GetStringFromStack();
					
case STATEMENT.SETTEXTCOLOR:
	i4 = GetIntFromStack();  // alpha 
	i3 = GetIntFromStack();  // blue
	i2 = GetIntFromStack();  // green
	i1 = GetIntFromStack();  // red

case STATEMENT.SETTEXTSIZE:
	f1 = GetFloatFromStack();

case STATEMENT.SETTEXTX:
	f1 = GetFloatFromStack();

case STATEMENT.SETTEXTY:
	f1 = GetFloatFromStack();

case STATEMENT.SETTEXTROTATION:
	f1 = GetFloatFromStack();

case STATEMENT.SETTEXTORDER:
	i1 = GetIntFromStack();

case STATEMENT.SHOWMESSAGE:
	s0 = GetStringFromStack();

case STATEMENT.SHOWMESSAGEDISMISSIBLE:
	s0 = GetStringFromStack();

case STATEMENT.WASMESSAGEDISMISSED:
	stack.Push(new Data(GameSpace.instance.messageDismissed ? 1 : 0));
	
case STATEMENT.CREATEINDICATORARROW:
	i1 = GetIntFromStack();    //
	f3 = GetFloatFromStack();  // rotation
	f2 = GetFloatFromStack();  // position f2*Screen.height
	f1 = GetFloatFromStack();  // position f1*Screen.width
	s0 = GetStringFromStack(); // 
	
case STATEMENT.DESTROYINDICATORARROW:
	s0 = GetStringFromStack();

case STATEMENT.SETINDICATORARROWPOSITION:
	f2 = GetFloatFromStack();
	f1 = GetFloatFromStack();
	s0 = GetStringFromStack();

case STATEMENT.SETINDICATORARROWROTATION:
	f1 = GetFloatFromStack();
	s0 = GetStringFromStack();

case STATEMENT.SETINDICATORARROWCOLOR:
	i4 = GetIntFromStack();
	i3 = GetIntFromStack();
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();
	s0 = GetStringFromStack();

case STATEMENT.DISTANCE:
	float y1 = GetFloatFromStack();
	float x1 = GetFloatFromStack();
	float y2 = GetFloatFromStack();
	float x2 = GetFloatFromStack();
	float di = Mathf.Sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
	stack.Push(new Data(di));


case STATEMENT.ISEDITMODE:
	stack.Push(new Data(GameSpace.editMode ? 1 : 0));

case STATEMENT.FUNC:

case STATEMENT.CALL:

	
case STATEMENT.CONST_LATHETARGETS:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.LATHETARGETS));

case STATEMENT.CONST_CREATEENERGYSOURCEWHENDESTROYED:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.CREATEENERGYSOURCEWHENDESTROYED));

case STATEMENT.CONST_CREATEAMPGEMWHENDESTROYED:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.CREATEAMPGEMWHENDESTROYED));

case STATEMENT.CONST_ISENEMY:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.ISENEMY));

case STATEMENT.CONST_GROWSTRUC:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.GROWSTRUC));

case STATEMENT.CONST_CREATEFOOTPRINT:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.CREATEFOOTPRINT));

case STATEMENT.CONST_MISSIONGOAL:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.MISSIONGOAL));

case STATEMENT.CONST_TAKEMAPSPACE:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.TAKEMAPSPACE));

case STATEMENT.CONST_ISBUILDING:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.ISBUILDING));

case STATEMENT.CONST_ISDESTROYED:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.ISDESTROYED));

	case STATEMENT.CONST_SHIP_ISENEMY:
	stack.Push(new Data((int)CONST_SHIP_ATTRIBUTES.ISENEMY));

case STATEMENT.CONST_SHIP_HULLSIZE:
	stack.Push(new Data((int)CONST_SHIP_ATTRIBUTES.HULLSIZE));

case STATEMENT.CONST_SHIP_HULLBUILT:
	stack.Push(new Data((int)CONST_SHIP_ATTRIBUTES.HULLBUILT));

case STATEMENT.CONST_SHIP_CMCOST:
	stack.Push(new Data((int)CONST_SHIP_ATTRIBUTES.CMCOST));

case STATEMENT.CONST_SHIP_CMBUILTAMT:
	stack.Push(new Data((int)CONST_SHIP_ATTRIBUTES.CMBUILTAMT));
	break;

case STATEMENT.CONST_SHIP_ISCONNECTEDTOENERGYMINE:
	stack.Push(new Data((int)CONST_SHIP_ATTRIBUTES.ISCONNECTEDTOENERGYMINE));

case STATEMENT.CONST_COORDX:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.COORDX));

case STATEMENT.CONST_COORDY:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.COORDY));

case STATEMENT.CONST_PIXELCOORDX:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.PIXELCOORDX));

case STATEMENT.CONST_PIXELCOORDY:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.PIXELCOORDY));

case STATEMENT.CONST_RECEIVESPACKETS:
	stack.Push(new Data((int)CONST_UNIT_ATTRIBUTES.RECEIVESPACKETS));

case STATEMENT.SIGNAL_NONE:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_NONE));

case STATEMENT.SIGNAL_SINE:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_SINE));

case STATEMENT.SIGNAL_SQUARE:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_SQUARE));

case STATEMENT.SIGNAL_TRIANGLE:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_TRIANGLE));

case STATEMENT.SIGNAL_SAWTOOTH:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_SAWTOOTH));

case STATEMENT.SIGNAL_RANDOM:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_RANDOM));

case STATEMENT.SIGNAL_CONSTANT:
	stack.Push(new Data((int)CONST_SIGNALTYPES.SIGNAL_CONSTANT));

case STATEMENT.ISUNIT:
	stack.Push(new Data(baseUnit is UnitManager ? 1 : 0));

case STATEMENT.DESTROYPARTICLE:
	i2 = GetIntFromStack(); //mode
	i1 = GetIntFromStack(); //UID

case STATEMENT.DESTROYBOND:
	i1 = GetIntFromStack(); //UID

case STATEMENT.CREATEUNIT:
	i2 = GetIntFromStack(); //Y cell
	i1 = GetIntFromStack(); //X cell
	s1 = GetStringFromStack(); //Unit Name
		stack.Push(new Data(unit.UID));
		stack.Push(new Data(-1));

case STATEMENT.DESTROYUNIT:
	i2 = GetIntFromStack(); //mode
	i1 = GetIntFromStack(); //UID

case STATEMENT.SETUNITISGOAL:
	i2 = GetIntFromStack(); //goal
	i1 = GetIntFromStack(); //UID

case STATEMENT.GETUNITISGOAL:
	i1 = GetIntFromStack(); //UID
			stack.Push(new Data(u.isGoal ? 1 : 0));
			stack.Push(new Data(0));

case STATEMENT.UNITISDESTROYED:
	i1 = GetIntFromStack(); //UID
	stack.Push(new Data(1)); 
	stack.Push(new Data(u.dead ? 1 : 0));

case STATEMENT.INITCANNONSHOT:
	i3 = GetIntFromStack(); //Enemy bool
	i2 = GetIntFromStack(); //Target Particle UID (can be virtual)
	i1 = GetIntFromStack(); //CannonShot UID

case STATEMENT.INITMISSILE:
i3 = GetIntFromStack(); //Enemy bool
i2 = GetIntFromStack(); //Target Particle UID (can be virtual)
i1 = GetIntFromStack(); //Missile UID

case STATEMENT.MOVESHIP:
	i4 = GetIntFromStack(); //mode
	i3 = GetIntFromStack(); //y
	i2 = GetIntFromStack(); //x
	i1 = GetIntFromStack(); // Ship UID

case STATEMENT.ROTATESHIPTOCELL:
	i3 = GetIntFromStack(); //y
	i2 = GetIntFromStack(); //x
	i1 = GetIntFromStack(); // Ship UID

case STATEMENT.ROTATESHIPTOPIXEL:
	f2 = GetIntFromStack(); //y
	f1 = GetIntFromStack(); //x
	i1 = GetIntFromStack(); // Ship UID

case STATEMENT.ROTATESHIP:
	f1 = GetIntFromStack(); //angle in radians
	i1 = GetIntFromStack(); // Ship UID

case STATEMENT.ROTATESHIPDEGREES:
	f1 = GetIntFromStack(); //angle in degrees
	i1 = GetIntFromStack(); // Ship UID

case STATEMENT.GETSHIPHULLSECTION:
	i3 = GetIntFromStack(); // y
	i2 = GetIntFromStack(); // x
	i1 = GetIntFromStack(); // Ship UID
				stack.Push(new Data(-1));
					stack.Push(new Data(0));
					stack.Push(new Data((int)h.hullType));

case STATEMENT.GETSHIPHULLSECTIONBUILT:
	i3 = GetIntFromStack(); // y
	i2 = GetIntFromStack(); // x
	i1 = GetIntFromStack(); // Ship UID
				stack.Push(new Data(0));
					stack.Push(new Data(0));
					stack.Push(new Data(h.isBuilding ? 0 : 1));
			stack.Push(new Data(0));

case STATEMENT.DELETESHIPFROMSLOT:
	i2 = GetIntFromStack(); //Destroy ship
	i1 = GetIntFromStack(); //Slot ID
	if (i1 >= 0 && i1 <= 23) {
		GameSpace.instance.buildPanel.DeleteBuildButton(i1, i2 != 0, i2 > 1);
	//DeleteShipFromSlot needs the second arg to indicate if you want to destroy the associated ship (if built). 
	// If the player builds a ship a script could then delete the build slot but leave the ship 
	// (so it could not be rebuilt for instance).

case STATEMENT.GETSHIPFROMSLOT:
	i1 = GetIntFromStack(); //Slot ID
		stack.Push(new Data(GameSpace.instance.buildPanel.GetShipFromSlot(i1)));
		stack.Push(new Data(-1));

case STATEMENT.GETSLOTFROMSHIP:
	i1 = GetIntFromStack(); //Ship UID
	stack.Push(new Data(GameSpace.instance.buildPanel.GetSlotFromShip(i1)));

case STATEMENT.GETSHIPNAMEFROMSLOT:
	i1 = GetIntFromStack(); //Slot ID
			stack.Push(new Data(sn));
			stack.Push(new Data(""));

case STATEMENT.GETSHIPSLOTCOUNT:
	i1 = GetIntFromStack(); //builtships
	stack.Push(new Data(GameSpace.instance.buildPanel.GetBuildSlotCount(i1 != 0)));

case STATEMENT.ADDSTOCKSHIPTOINVENTORY:
	s1 = GetStringFromStack(); 

case STATEMENT.ADDCUSTOMSHIPTOINVENTORY:
	s1 = GetStringFromStack(); 
		byte[] bdata = System.Convert.FromBase64String(s1);

case STATEMENT.ADDGAMEEVENT:
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();
		stack.Push(new Data(pos));

case STATEMENT.ADDGAMEEVENTATCELL:
	i4 = GetIntFromStack();
	i3 = GetIntFromStack();
	i2 = GetIntFromStack();    
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();

case STATEMENT.ADDGAMEEVENTATPIXEL:
	i2 = GetIntFromStack();
	f2 = GetFloatFromStack();
	f1 = GetFloatFromStack();
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();
		stack.Push(new Data(pos));
		
case STATEMENT.SETGAMEEVENTFADETIME:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();
  
case STATEMENT.SETGAMEEVENTMESSAGE:
	s1 = GetStringFromStack();
	i1 = GetIntFromStack();
	
case STATEMENT.SETGAMEEVENTTYPE:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();

case STATEMENT.GETLANDCOUNT:
	stack.Push(new Data(Land.instance.landTotal));

case STATEMENT.GETENEMYMIRECOUNT:
	stack.Push(new Data(Land.instance.redCoverTotal));

case STATEMENT.GETMIRECOUNT:
	stack.Push(new Data(Land.instance.blueCoverTotal));

case STATEMENT.GETENERGYSOURCECOUNT:
	stack.Push(new Data(GameSpace.instance.energySources.Count));

case STATEMENT.GETENERGYSOURCES: 
		foreach (EnergySource es in GameSpace.instance.energySources) {
		stack.Push(new Data(results));

case STATEMENT.GETRANDOMENERGYSOURCE: 
			stack.Push(new Data(-1));
					stack.Push(new Data(es.UID));

case STATEMENT.GETGLOBALSTOREDENERGY:
	stack.Push(new Data(f1));

case STATEMENT.SETGLOBALSTOREDENERGY:
	f1 = GetFloatFromStack();

case STATEMENT.GETTECHAVAILABILITY:
	i1 = GetIntFromStack();
		stack.Push(new Data(0));
		stack.Push(new Data(GameSpace.instance.techAvailable[i1] ? 1 : 0));

case STATEMENT.SETTECHAVAILABILITY:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack();

case STATEMENT.GETALLOWSHIPAMP:
	stack.Push(new Data(GameSpace.instance.allowShipAmp ? 1 : 0));

case STATEMENT.SETALLOWSHIPAMP:
	i1 = GetIntFromStack();

case STATEMENT.SETHULLBUILDRATEMOD:
	f1 = GetFloatFromStack();

case STATEMENT.GETAMPGEMCOUNT:
	stack.Push(new Data(GameSpace.instance.ampGems));

case STATEMENT.SETAMPGEMCOUNT:
	i1 = GetIntFromStack();

case STATEMENT.GETMAXBLUEEMERGENT:
	stack.Push(new Data(GameSpace.instance.maxBlueEmergents));
	
case STATEMENT.GETMAXREDEMERGENT:
	stack.Push(new Data(GameSpace.instance.maxRedEmergents));
	
case STATEMENT.SETMAXBLUEEMERGENT:
	i1 = GetIntFromStack();
	
case STATEMENT.SETMAXREDEMERGENT:
	i1 = GetIntFromStack();
	
case STATEMENT.GETBLUEEMERGENTRATE:
	stack.Push(new Data(GameSpace.instance.blueEmergentRate));
	
case STATEMENT.GETREDEMERGENTRATE:
	stack.Push(new Data(GameSpace.instance.redEmergentRate));
	
case STATEMENT.SETBLUEEMERGENTRATE:
	f1 = GetFloatFromStack();
	
case STATEMENT.SETREDEMERGENTRATE:
	f1 = GetFloatFromStack();

case STATEMENT.SETPICKUPTYPE:
	s1 = GetStringFromStack(); //type
	i1 = GetIntFromStack(); //UID

case STATEMENT.SETDOPPELBEHAVIOR:
	s1 = GetStringFromStack(); //behavior
	i1 = GetIntFromStack(); //UID

	
case STATEMENT.SETDOPPELHOMECELL:
	i3 = GetIntFromStack(); //Y
	i2 = GetIntFromStack(); //X
	i1 = GetIntFromStack(); //UID

case STATEMENT.CREATEPARTICLE:
	i2 = GetIntFromStack(); //enemy
	i1 = GetIntFromStack(); //particle type (1=Triangle, 2=Square, 3-Free)
	f4 = GetFloatFromStack(); //Speed
	f3 = GetFloatFromStack(); //direction in rad
	f2 = GetFloatFromStack(); //y
	f1 = GetFloatFromStack(); //x

case STATEMENT.PARTICLEEXISTS:
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETOWNEDPARTICLECOUNT:
	i1 = GetIntFromStack(); //uid
	
case STATEMENT.CREATEBOND:
	f1 = GetFloatFromStack(); //Bond distance
	i3 = GetIntFromStack(); //Show
	i2 = GetIntFromStack(); //Particle 2 UID
	i1 = GetIntFromStack(); //Particle 1 UID
			stack.Push(new Data(b.UID));
			stack.Push(new Data(-1));

case STATEMENT.BONDEXISTS:
	i1 = GetIntFromStack(); //Bond UID
		stack.Push(new Data(1));
		stack.Push(new Data(0));

case STATEMENT.GETPARTICLESINRANGE:
	i5 = GetIntFromStack(); //enemy
	i4 = GetIntFromStack(); //square
	i3 = GetIntFromStack(); //range
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
		stack.Push(new Data(results));

case STATEMENT.GETPARTICLESINRADIUS:
	i5 = GetIntFromStack(); //enemy
	i4 = GetIntFromStack(); //square
	i3 = GetIntFromStack(); //range
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
		stack.Push(new Data(results));

case STATEMENT.GETPARTICLECOUNTINRADIUS:
	i5 = GetIntFromStack(); //enemy
	i4 = GetIntFromStack(); //square
	i3 = GetIntFromStack(); //range
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
		stack.Push(new Data(c));

case STATEMENT.GETPARTICLEPOSITION:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.position.x));
			stack.Push(new Data(p.position.y));
		} else {
			stack.Push(new Data(-1));
			stack.Push(new Data(-1));

case STATEMENT.SETPARTICLEPOSITION:
	f2 = GetFloatFromStack(); //y
	f1 = GetFloatFromStack(); //x
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.TELEPORTPARTICLE:
	i3 = GetIntFromStack(); //breakbonds
	i2 = GetIntFromStack(); //wholechain
	f2 = GetFloatFromStack(); //py
	f1 = GetFloatFromStack(); //px
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.FINDPARTICLETARGET:
	f3 = GetFloatFromStack(); //followEmitterProbability
	f2 = GetFloatFromStack(); //followShipProbability
	f1 = GetFloatFromStack(); //followTargetProbability
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLEMAXSPEED:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.MAX_DELTA));
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLEMAXSPEED:
	f1 = GetFloatFromStack(); //max speed
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLEMAXAGE:
	i1 = GetIntFromStack(); //Particle UID
					stack.Push(new Data(p.maxAge));
				} else {
					stack.Push(new Data(0));

case STATEMENT.SETPARTICLEMAXAGE:
	i2 = GetIntFromStack(); //max age in frames
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLEMAXDISTANCE:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.terminationDistance));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETPARTICLEHEALTH:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.health));
		} else {
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLEMAXDISTANCE:
	f1 = GetFloatFromStack(); //max distance from owner before destruction
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.SETPARTICLEHEALTH:
	f1 = GetFloatFromStack(); //health
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLEMASS:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.mass));
		} else {
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLEMASS:
	f1 = GetFloatFromStack(); //mass
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLEDRAG:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.dragAmt));
		} else {
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLEDRAG:
	f1 = GetFloatFromStack(); //mass
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.SETPARTICLEIMMEDIATEFORCE:
	f2 = GetFloatFromStack(); //force
	f1 = GetFloatFromStack(); //direction in radians
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLETARGET:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.GetTargetObjectUID()));
		} else {
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLETARGET:
	i2 = GetIntFromStack(); //Target Object UID
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLETARGETATTRACTIONINTERVAL:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.targetObjectPullInterval));
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLETARGETATTRACTIONINTERVAL:
	i2 = GetIntFromStack(); //Attraction interval in frames
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLETARGETATTRACTIONFORCE:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.targetObjectAttractionForce));
		} else {
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLETARGETATTRACTIONFORCE:
	f1 = GetFloatFromStack(); //Attraction force
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.GETPARTICLESAMEINTERACTION:
	i1 = GetIntFromStack(); //Particle UID
			//Boolean is flipped in meaning between crpl and the particle variable's meaning
			stack.Push(new Data(p.homoInteractionIgnore ? 0 : 1));
			stack.Push(new Data(0));

case STATEMENT.GETPARTICLEMOTION:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(td.y));
			stack.Push(new Data(td.x));

case STATEMENT.GETPARTICLEHASTELEPORTED:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.teleported ? 1 : 0));

case STATEMENT.SETPARTICLEMOTION:
	f2 = GetFloatFromStack(); //deltay
	f1 = GetFloatFromStack(); //deltaX
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.SETPARTICLESAMEINTERACTION:
	i2 = GetIntFromStack(); //Same interaction
	i1 = GetIntFromStack(); //Particle UID
			//Boolean is flipped in meaning between crpl and the particle variable's meaning

case STATEMENT.GETPARTICLEDESTROYATEDGE:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data(p.destroyAtEdge ? 1 : 0));

case STATEMENT.SETPARTICLEDESTROYATEDGE:
	i2 = GetIntFromStack(); //Destroy at edge bool

case STATEMENT.GETPARTICLEFORCEPARAMS:
	i1 = GetIntFromStack(); //Particle UID
			stack.Push(new Data((int)p.oscillationType));
			stack.Push(new Data(p.oscillationForceMin));
			stack.Push(new Data(p.oscillationForceMax));
			stack.Push(new Data(p.oscillationTime));
			stack.Push(new Data(p.oscillationPhase));
			stack.Push(new Data((int)p.oscillationDirectionType));
			stack.Push(new Data(p.oscillationDirectionMinAngle));
			stack.Push(new Data(p.oscillationDirectionMaxAngle));
			stack.Push(new Data(p.oscillationDirectionTime));
			stack.Push(new Data(p.oscillationDirectionPhase));
		} else {
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));
			stack.Push(new Data(0));

case STATEMENT.SETPARTICLEFORCEPARAMS:
	f6 = GetFloatFromStack(); //Oscillation direction phase
	i5 = GetIntFromStack(); //Oscillation direction time
	f5 = GetFloatFromStack(); //Oscillation direction max angle
	f4 = GetFloatFromStack(); //Oscillation direction min angle
	i4 = GetIntFromStack(); //Oscillation direction waveform Type
	f3 = GetFloatFromStack(); //Oscillation phase
	i3 = GetIntFromStack(); //Oscillation time
	f2 = GetFloatFromStack(); //Oscillation max force
	f1 = GetFloatFromStack(); //Oscillation min force
	i2 = GetIntFromStack(); //Oscillation force waveform Type
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.SETPARTICLEFORCESPEEDLIMIT:
	f1 = GetFloatFromStack(); // Speed limit
	i1 = GetIntFromStack(); // Particle

case STATEMENT.SETPARTICLEINTERACTDELAY:
	i2 = GetIntFromStack(); //Delay    
	i1 = GetIntFromStack(); //Particle

case STATEMENT.GETPARTICLEINTERACTDELAY:
	i1 = GetIntFromStack(); //Particle
			stack.Push(new Data(p.interactWithSiblingsDelay));

case STATEMENT.SETPARTICLEFORCEDIRECTIONRELATIVEPARTICLE:
	i2 = GetIntFromStack(); //The relative particle
	i1 = GetIntFromStack(); //Particle to releative particle of

case STATEMENT.SETPARTICLERETURNWHENRECALLED:
	i2 = GetIntFromStack(); //Bool on whether it should return when recalled by owner
	i1 = GetIntFromStack(); //Particle UID

case STATEMENT.SETUNITRECALLCHILDPARTICLES:
	i2 = GetIntFromStack(); //Bool on whether it should recall child particles
	i1 = GetIntFromStack(); //Unit UID

case STATEMENT.GETBONDMOVEMENTPARAMS: 
	i1 = GetIntFromStack(); //Bond UID
		stack.Push(new Data((int)bond.movementType));
		stack.Push(new Data((int)bond.movementBondMinDistance));
		stack.Push(new Data((int)bond.movementBondMaxDistance));
		stack.Push(new Data((int)bond.movementTime));
		stack.Push(new Data((int)bond.movementPhase));
	} else {
		stack.Push(new Data(0));
		stack.Push(new Data(0));
		stack.Push(new Data(0));
		stack.Push(new Data(0));
		stack.Push(new Data(0));

case STATEMENT.SETBONDMOVEMENTPARAMS:
	f3 = GetFloatFromStack(); // phase
	i3 = GetIntFromStack(); // time
	f2 = GetFloatFromStack(); // max length
	f1 = GetFloatFromStack(); // min length
	i2 = GetIntFromStack(); //Signal waveform Type
	i1 = GetIntFromStack(); //Bond UID

case STATEMENT.GETBONDLENGTH:
	i1 = GetIntFromStack(); //Bond UID
		stack.Push(new Data(bond.BOND_DISTANCE));

case STATEMENT.SETBONDLENGTH:
	f1 = GetFloatFromStack(); //Length
	i1 = GetIntFromStack(); //Bond UID

case STATEMENT.GETALLCONNECTEDPARTICLES:
	i1 = GetIntFromStack(); 
				stack.Push(new Data(rp.UID));
			stack.Push(new Data(results.Count));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETALLCONNECTEDPARTICLECOUNT:
	i1 = GetIntFromStack();
			stack.Push(new Data(results.Count));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETALLCONNECTEDBONDS:
	i1 = GetIntFromStack(); 
				stack.Push(new Data(b.UID));
			stack.Push(new Data(results.Count));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETALLCONNECTEDBONDCOUNT:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(results.Count));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETNEARESTTARGET:
	i8 = GetIntFromStack(); //onlyEnemyShip
	i7 = GetIntFromStack(); //excludeVirtual
	i6 = GetIntFromStack(); //excludeNormal
	i5 = GetIntFromStack(); // bool for find untargeted particle
	i4 = GetIntFromStack(); // bool for enemy
	i3 = GetIntFromStack(); // range in cells
	i2 = GetIntFromStack(); // cell y
	i1 = GetIntFromStack(); // cell x
			stack.Push(new Data(pb.UID));
		} else {
			stack.Push(new Data(-1));

case STATEMENT.DAMAGEPARTICLE:
	f1 = GetFloatFromStack();
	i1 = GetIntFromStack(); 

case STATEMENT.ISEMERGENT:
	i1 = GetIntFromStack(); 
		stack.Push(new Data(p != null ? 1 : 0));

case STATEMENT.ISHULL:
	i1 = GetIntFromStack();
		stack.Push(new Data(p != null ? 1 : 0));

case STATEMENT.ISPARTICLE:
	i1 = GetIntFromStack();
		stack.Push(new Data(p != null ? 1 : 0));

case STATEMENT.CLEARALLFIELDS:

case STATEMENT.SETFIELDCELL:
	f2 = GetFloatFromStack(); //force y
	f1 = GetFloatFromStack(); //force x
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x

case STATEMENT.ISHQPRESENT:
	stack.Push(new Data(GameSpace.instance.headquartersShips.Count == 0 ? 0 : 1));
	
case STATEMENT.GETHQS: 
			results.Add(new Data(cm.UID));
		stack.Push(new Data(results));

case STATEMENT.GETLAND:
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
	stack.Push(new Data(Land.instance.GetLand(i1, i2)));

case STATEMENT.SETLAND:
	i3 = GetIntFromStack(); //land
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x

case STATEMENT.SETLANDBULK:
	i5 = GetIntFromStack(); //square
	i4 = GetIntFromStack(); //range
	i3 = GetIntFromStack(); //land
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x

case STATEMENT.GETMIRE:
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
	stack.Push(new Data(Land.instance.GetCovered(i1, i2)));

case STATEMENT.SETMIRE:
	i3 = GetIntFromStack(); //-1,0,1
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x

case STATEMENT.MIRELAND:
	i3 = GetIntFromStack(); //enemy
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x

case STATEMENT.GROWSTRUC:
	i3 = GetIntFromStack(); //enemy
	i2 = GetIntFromStack(); //y
	i1 = GetIntFromStack(); //x
	
	stack.Push(new Data(i4)); 	//0 for didn't do anything, 
								//1 for normal struc, 
								//2 for armor.  
								//That is whether it is built or destroyed the enemy type.

case STATEMENT.SETEMITTERPARTICLETYPE:
	i2 = GetIntFromStack(); // 0 =ParticleType.FREE , 1 =ParticleType.TRIANGLE, else ParticleType.SQUARE;
	i1 = GetIntFromStack(); // particle UID

case STATEMENT.SETEMITTERPRODUCTIONINTERVAL:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack(); 

case STATEMENT.SETEMITTERMAXPARTICLES:
	i2 = GetIntFromStack(); // MAX_PARTICLE_COUNT
	i1 = GetIntFromStack(); // UID

case STATEMENT.SETEMITTERMAXTIME:
		i2 = GetIntFromStack(); // Time
		i1 = GetIntFromStack(); // UID

case STATEMENT.SETEMITTERMAXDISTANCE:
	i2 = GetIntFromStack(); // Distance
	i1 = GetIntFromStack(); // UID

case STATEMENT.SETEMITTERMAXPARTICLESPEED:
		f1 = GetFloatFromStack(); // Speed
		i1 = GetIntFromStack();   // UID

case STATEMENT.SETEMITTERPARTICLEHEALTH:
	f1 = GetFloatFromStack(); // particleHealth
	i1 = GetIntFromStack();   //UID

case STATEMENT.SETEMITTERTARGETPROBABILITY:
	i2 = GetIntFromStack(); // UID
	i1 = GetIntFromStack(); // targetProbability

case STATEMENT.SETEMITTEREMITTERTARGETPROBABILITY:
	i2 = GetIntFromStack(); // emitterTargetProbability
	i1 = GetIntFromStack(); // UID
\
case STATEMENT.SETEMITTERRECALLRANGE:
	i2 = GetIntFromStack(); // recallRange 
	i1 = GetIntFromStack(); // UID

case STATEMENT.SETEMITTERDESTROYEATEDGE: // typo immortalized
case STATEMENT.SETEMITTERDESTROYATEDGE:
	i2 = GetIntFromStack(); // bool
	i1 = GetIntFromStack(); // UID

case STATEMENT.SETEMITTERENEMYPATTERN:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETEMITTERBONDDISTANCE:
	f1 = GetFloatFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETEMITTERBONDSTIFFNESS:
	f1 = GetFloatFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETEMITTERMINCHAINLENGTH:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETEMITTERMAXCHAINLENGTH:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETEMITTERSHAPESIZE:
	f1 = GetFloatFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.GETEMITTERPARTICLETYPE:
	i1 = GetIntFromStack(); {
				tpti = 0; FREE
				tpti = 1; TRIANGLE
				tpti = 2; SQUARE
				tpti = 3; ?? Round?
			stack.Push(new Data(tpti));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERPRODUCTIONINTERVAL:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(productionInterval));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERMAXPARTICLES:
	i1 = GetIntFromStack(); {
			stack.Push(new Data((MAX_PARTICLE_COUNT));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERMAXTIME:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(terminationTime));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERMAXDISTANCE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(terminationDistance));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERMAXPARTICLESPEED:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(maxParticleSpeed));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERPARTICLEHEALTH:
	i1 = GetIntFromStack(); {
			stack.Push(new Data((u as GravityWell).particleHealth));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERTARGETPROBABILITY:
	i1 = GetIntFromStack(); {
			stack.Push(new Data((targetProbability));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTEREMITTERTARGETPROBABILITY:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(emitterTargetProbability));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERRECALLRANGE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(recallRange));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERDESTROYEATEDGE: // typo immortalized
case STATEMENT.GETEMITTERDESTROYATEDGE:
		i1 = GetIntFromStack(); {
			stack.Push(new Data(destroyAtEdge ? 1 : 0));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERENEMYPATTERN:
	i1 = GetIntFromStack(); {
			stack.Push(new Data((int)(enemyPattern)); 	// 0=SINGLE
														// 1=CHAIN
														// 2=BOX
														// 3=CENTI
														// 4=BAR
														// 5=WHEEL
			
case STATEMENT.GETEMITTERBONDDISTANCE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data((BOND_DISTANCE));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERBONDSTIFFNESS:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(BOND_STIFFNESS));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERMINCHAINLENGTH:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(minChainLength));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETEMITTERMAXCHAINLENGTH:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(maxChainLength));
		} else {

case STATEMENT.GETEMITTERSHAPESIZE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(SHAPE_SIZE));
		} else {
			stack.Push(new Data(0));

case STATEMENT.SETENERGYSOURCERATE:
	f1 = GetFloatFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETENERGYSOURCERANGE:
	i2 = GetIntFromStack();
	i1 = GetIntFromStack(); {

case STATEMENT.SETENERGYSOURCEGROWENEMYENERGYMINE:
	i2 = GetIntFromStack(); //bool
	i1 = GetIntFromStack(); {

case STATEMENT.GETENERGYSOURCERATE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data((energyRate));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETENERGYSOURCERANGE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(range));
		} else {
			stack.Push(new Data(0));

case STATEMENT.GETENERGYSOURCEGROWENEMYENERGYMINE:
	i1 = GetIntFromStack(); {
			stack.Push(new Data(growEnemyEnergyMine ? 1 : 0));
//  UnitAttribte list  GET and  SET calls for each of these Boolean or data, as may be the case. 
For i1 = uid
LATHETARGETS 							latheCanTarget ? 1 : 0));
CREATEENERGYSOURCEWHENDESTROYED  		createEnergySourceWhenDestroyed ? 1 : 0));
CREATEAMPGEMWHENDESTROYED 				createAmpGemWhenDestroyed ? 1 : 0));
ISENEMY 								enemy ? 1 : 0));
GROWSTRUC 								growStruc ? 1 : 0));
CREATEFOOTPRINT 						createFootprint ? 1 : 0));
MISSIONGOAL 							isGoal ? 1 : 0));
CREATEFOOTPRINT 						createFootprint ? 1 : 0));
ISBUILDING 								isBuilding ? 1 : 0));
ISDESTROYED 							dead ? 1 : 0));
RECEIVESPACKETS) 						packReceiver  1 : 0));
HASHEALTHBAR 							healthBar 	l ? 1 : 0));
HASENERGYBAR 							energyBar != null ? 1 : 0));
PARTICLESDAMAGE  						particlesDamage ? 1 : 0));
SHIPHULLDAMAGES 						ignoreShipParticleCollisions? 0 : 1));
MIREDAMAGES 							mireDamage ? 1 : 0));
COORDX 									gameSpaceX));
COORDY 									gameSpaceY));
PIXELCOORDX 							coordX));
PIXELCOORDY 							coordY));
HEALTH 									health));
MAXHEALTH 								maxHealth));
ENERGY 									energyStore));
MAXENERGY 								MAX_ENERGY));
ENERGYPACKDELAY 						energyStorePackRequestRate));
MIREDAMAGEAMT 							MIRE_DAMAGE_AMT));
LATHEDAMAGEAMT 							LATHE_DAMAGE_AMT));
//
case STATEMENT.GETUNITLATHETARGETS:
case STATEMENT.SETUNITLATHETARGETS:

case STATEMENT.GETUNITCREATEENERGYSOURCEWHENDESTROYED:
case STATEMENT.SETUNITCREATEENERGYSOURCEWHENDESTROYED:

case STATEMENT.GETUNITISENEMY:
case STATEMENT.SETUNITISENEMY:

case STATEMENT.GETUNITGROWSTRUC:
case STATEMENT.SETUNITGROWSTRUC:

case STATEMENT.GETUNITCREATEAMPGEMWHENDESTROYED:
case STATEMENT.SETUNITCREATEAMPGEMWHENDESTROYED:

case STATEMENT.GETUNITCREATEFOOTPRINT:
case STATEMENT.SETUNITCREATEFOOTPRINT:

case STATEMENT.GETUNITMISSIONGOAL:
case STATEMENT.SETUNITMISSIONGOAL:

case STATEMENT.GETUNITTAKEMAPSPACE:
case STATEMENT.SETUNITTAKEMAPSPACE:

case STATEMENT.GETUNITISBUILDING:
case STATEMENT.SETUNITISBUILDING:
		
case STATEMENT.GETUNITCOORDX:
case STATEMENT.SETUNITCOORDX:

case STATEMENT.GETUNITCOORDY:
case STATEMENT.SETUNITCOORDY:

case STATEMENT.GETUNITPIXELCOORDX:
case STATEMENT.SETUNITPIXELCOORDX:

case STATEMENT.GETUNITPIXELCOORDY:
case STATEMENT.SETUNITPIXELCOORDY:

case STATEMENT.GETUNITRECEIVESPACKETS:
case STATEMENT.SETUNITRECEIVESPACKETS:

case STATEMENT.GETUNITHEALTH:
case STATEMENT.SETUNITHEALTH:

case STATEMENT.GETUNITMAXHEALTH:
case STATEMENT.SETUNITMAXHEALTH:

case STATEMENT.GETUNITENERGY:
case STATEMENT.SETUNITENERGY:

case STATEMENT.GETUNITMAXENERGY:
case STATEMENT.SETUNITMAXENERGY:

case STATEMENT.GETUNITHASHEALTHBAR:
case STATEMENT.SETUNITHASHEALTHBAR:
	
case STATEMENT.GETUNITHASENERGYBAR:
case STATEMENT.SETUNITHASENERGYBAR:
	
case STATEMENT.GETUNITENERGYPACKDELAY:
case STATEMENT.SETUNITENERGYPACKDELAY:

case STATEMENT.GETUNITPARTICLESDAMAGE:
case STATEMENT.SETUNITPARTICLESDAMAGE:
	
case STATEMENT.GETUNITSHIPHULLDAMAGES:
case STATEMENT.SETUNITSHIPHULLDAMAGES:

case STATEMENT.GETUNITMIREDAMAGES:
case STATEMENT.SETUNITMIREDAMAGES:
	
case STATEMENT.GETUNITMIREDAMAGEAMT:
case STATEMENT.SETUNITMIREDAMAGEAMT:

case STATEMENT.SETUNITLATHEDAMAGEAMT:
case STATEMENT.GETUNITLATHEDAMAGEAMT:

case STATEMENT.SETUNITCOORDS:
case STATEMENT.GETUNITCOORDS:
			stack.Push(new Data(u.gameSpaceX));
			stack.Push(new Data(u.gameSpaceY));
			
case STATEMENT.SETUNITPIXELCOORDS:
case STATEMENT.GETUNITPIXELCOORDS:
			stack.Push(new Data(-1));
			stack.Push(new Data(-1));

case STATEMENT.GETUNITISDESTROYED:

//  ShipAttribte list  GET and  SET calls for each of these Boolean or data, as may be the case. 
ISDESTROYED 			dead ? 1 : 0));
ISENEMY       			enemy ? 1 : 0));
ISCONNECTEDTOENERGYMINE IsConnectedToEnergyMine() ? 1 : 0));
HASAMP        			IsAmpGemInstalled() ? 1 : 0));
ROTATION       			eulerAngles.z*Mathf.Deg2Rad));
ROTATIONDEGREES 		eulerAngles.z));
COORDX      			cellX));
COORDY     				cellY));
PIXELCOORDX     		transform.position.x));
PIXELCOORDY     		transform.position.y));
HULLWIDTH       		shipPlan.GetHullWidth()));
HULLHEIGHT      		shipPlan.GetHullHeight()));
HULLSIZE       			shipPlan.totalHullCount));
HULLBUILT       		scannedHullCount - hullToBuildCount));
CMCOST       			BUILD_COST));
CMBUILTAMT      		builtAmt));
ENERGY       			energyStore));
ENERGYCAP       		ENERGYCAP));
THRUSTMULTIPLIER      	THRUST_MULTIPLIER));

//
case STATEMENT.GETSHIPISDESTROYED:

case STATEMENT.GETSHIPTHRUSTMULTIPLIER:
case STATEMENT.SETSHIPTHRUSTMULTIPLIER:

case STATEMENT.GETSHIPROTATION:
case STATEMENT.SETSHIPROTATION:

case STATEMENT.GETSHIPROTATIONDEGREES:
case STATEMENT.SETSHIPROTATIONDEGREES:

case STATEMENT.GETSHIPCOORDS:
			stack.Push cellX));
			stack.Push cellY));

case STATEMENT.SETSHIPCOORDS:
	i3 = GetIntFromStack();
	i2 = GetIntFromStack();
	i1 = GetIntFromStack(); 
	
case STATEMENT.SETSHIPCOORDX:
case STATEMENT.GETSHIPCOORDX:

case STATEMENT.SETSHIPCOORDY:
case STATEMENT.GETSHIPCOORDY:

case STATEMENT.GETSHIPPIXELCOORDS:
			stack.Push position.x));
			stack.Push position.y));

case STATEMENT.SETSHIPPIXELCOORDS:
	f2 = GetFloatFromStack();
	f1 = GetFloatFromStack();
	i1 = GetIntFromStack(); {
	
case STATEMENT.GETSHIPPIXELCOORDX:
case STATEMENT.SETSHIPPIXELCOORDX:

case STATEMENT.GETSHIPPIXELCOORDY:
case STATEMENT.SETSHIPPIXELCOORDY:

case STATEMENT.SETSHIPISENEMY:
case STATEMENT.GETSHIPISENEMY:

case STATEMENT.GETSHIPENERGY:
case STATEMENT.SETSHIPENERGY: 

case STATEMENT.GETSHIPENERGYCAP:
case STATEMENT.SETSHIPENERGYCAP:

case STATEMENT.SETSHIPMODULESAMMO:                

case STATEMENT.GETSHIPHULLSIZE:

case STATEMENT.GETSHIPHULLBUILT:

case STATEMENT.GETSHIPCMCOST:

case STATEMENT.GETSHIPCMBUILTAMT:

case STATEMENT.GETSHIPISCONNECTEDTOENERGYMINE:

case STATEMENT.GETSHIPHASAMP:

case STATEMENT.GETSHIPHULLWIDTH:

case STATEMENT.GETSHIPHULLHEIGHT:

pf/rpldocs/everything_else.txt · Last modified: 2016/10/16 17:53 by Karsten75