[Gcblue-commits] gcb_wx/scripts Menu.py,1.8,1.9 UnitCommands.py,1.11,1.12
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-02 04:18:13
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31820/scripts Modified Files: Menu.py UnitCommands.py Log Message: Sonar work Index: UnitCommands.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/UnitCommands.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** UnitCommands.py 23 Nov 2004 23:30:53 -0000 1.11 --- UnitCommands.py 2 Dec 2004 04:17:24 -0000 1.12 *************** *** 181,185 **** else: SubInterface.RaiseRadarMast() ! def SetFractionalSpeed(UI, k, dispMessage=0): --- 181,203 ---- else: SubInterface.RaiseRadarMast() ! ! ! def Reload0(UI, weap_name): ! UI.LoadLauncher(0, weap_name) ! ! def Reload1(UI, weap_name): ! UI.LoadLauncher(1, weap_name) ! ! def Reload2(UI, weap_name): ! UI.LoadLauncher(2, weap_name) ! ! def Reload3(UI, weap_name): ! UI.LoadLauncher(3, weap_name) ! ! def Reload4(UI, weap_name): ! UI.LoadLauncher(4, weap_name) ! ! def Unload(UI, launcher): ! UI.UnloadLauncher(launcher) def SetFractionalSpeed(UI, k, dispMessage=0): Index: Menu.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/Menu.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Menu.py 23 Nov 2004 23:30:51 -0000 1.8 --- Menu.py 2 Dec 2004 04:17:24 -0000 1.9 *************** *** 129,132 **** --- 129,150 ---- UnitMenu.EndSubMenu() + + UnitMenu.AddItem('Mounts','') + UnitMenu.BeginSubMenu() + nCount = UnitInfo.GetLauncherCount() + for n in range(0, nCount): + weap_name = UnitInfo.GetLauncherWeaponName(n) + weap_qty = UnitInfo.GetLauncherQuantity(n) + if (weap_qty == 0): + nTypes = UnitInfo.GetLauncherTypesCount(n) + for k in range(0, nTypes): + type_name = UnitInfo.GetLauncherTypeName(n, k) + reload_qty = UnitInfo.GetMagazineQuantity(type_name) + if (reload_qty > 0): + UnitMenu.AddItemWithTextParam('Reload %s [%d]' % (type_name, reload_qty), 'Reload%d' % n, type_name) + else: + if (UnitInfo.CanMagazineAcceptItem(weap_name)): + UnitMenu.AddItemWithParam('Unload %s' % weap_name, 'Unload', n) + UnitMenu.EndSubMenu() |