[Gcblue-commits] gcb_wx/scripts AI.py,1.22,1.23 UnitCommands.py,1.20,1.21
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-07-20 16:25:02
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4256/scripts Modified Files: AI.py UnitCommands.py Log Message: Index: AI.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/AI.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** AI.py 2 Jul 2005 16:51:11 -0000 1.22 --- AI.py 20 Jul 2005 16:24:53 -0000 1.23 *************** *** 1,3 **** --- 1,4 ---- from UnitCommands import * + from SubTactics import * import math *************** *** 321,324 **** --- 322,328 ---- TI.SetMemoryText('Description', 'Head to and bomb target') TI.SetMemoryValue(2, 1) # state: 1 - fly to release, 2 - release + if (not UI.IsAir()): + TI.EndTask() + return iteration = iteration + 1 *************** *** 386,389 **** --- 390,396 ---- TI.SetMemoryValue(10, datum_lon) TI.SetMemoryValue(11, datum_lat) + if (not UI.IsAir()): + TI.EndTask() + return iteration = iteration + 1 *************** *** 539,551 **** - def ActivateAllSensors(UI): - UI.SetAllSensorState(1) - def ActivatePassiveSensors(UI): - nSensors = UI.GetSensorCount() - for n in range(0, nSensors): - sensor_info = UI.GetSensorInfo(n) - if (sensor_info.IsPassive()): - UI.SetSensorState(n, 1) def Emcon(TI): --- 546,550 ---- *************** *** 567,581 **** UI = TI.GetPlatformInterface() - def GetConnControl(BB): - return BB.Write('ConnLock', '') - - def ReleaseConnControl(BB): - BB.Erase('ConnLock') - - def GetSensorControl(BB): - return BB.Write('SensorLock', '') - def ReleaseSensorControl(BB): - BB.Erase('SensorLock') def SAM_Defense(UI): --- 566,570 ---- Index: UnitCommands.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/UnitCommands.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** UnitCommands.py 10 Jul 2005 20:32:02 -0000 1.20 --- UnitCommands.py 20 Jul 2005 16:24:53 -0000 1.21 *************** *** 1,3 **** --- 1,26 ---- + + def ActivateAllSensors(UI): + UI.SetAllSensorState(1) + + def ActivatePassiveSensors(UI): + nSensors = UI.GetSensorCount() + for n in range(0, nSensors): + sensor_info = UI.GetSensorInfo(n) + if (sensor_info.IsPassive()): + UI.SetSensorState(n, 1) + + def GetConnControl(BB): + return BB.Write('ConnLock', '') + + def ReleaseConnControl(BB): + BB.Erase('ConnLock') + + def GetSensorControl(BB): + return BB.Write('SensorLock', '') + + def ReleaseSensorControl(BB): + BB.Erase('SensorLock') + def TakeControl(UI): UI.TakeControl() *************** *** 34,37 **** --- 57,63 ---- UI.AddNavWaypoint(lon, lat) + def AddWaypointOrderDeg(UI, lon_deg, lat_deg): + deg_to_rad = 0.01745329252 + UI.AddNavWaypoint(deg_to_rad*lon_deg, deg_to_rad*lat_deg) def AddPatrolOrderGroup(GI): *************** *** 42,46 **** def AddPatrolOrder(UI): ! UI.AddTask('Patrol', 1.0) def AddPatrolStation(UI, lon, lat): --- 68,75 ---- def AddPatrolOrder(UI): ! if (UI.IsSub()): ! UI.AddTask('SubPatrol', 1.0) ! else: ! UI.AddTask('Patrol', 1.0) def AddPatrolStation(UI, lon, lat): |