Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2012, 3:51:51 PM (12 years ago)
Author:
landauf
Message:

small cleanup in ship selection:

  • renamed some functions
  • moved implementation of changeStartingShip() from header to source file
  • removed ShipManager which doesn't seem to be used nor compiled (and it's just a copy of LevelManager anyway)
Location:
code/branches/presentation2012merge/data/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua

    r9272 r9281  
    1919   P.shipList = {}
    2020   for line in io.lines("../levels/templates/.shipmodels") do  --checks if shipmodel is included in level file
    21     if selectedlevel:hasShip(string.lower(line)) then
     21    if selectedlevel:hasStartingShip(string.lower(line)) then
    2222        P.shipList[#P.shipList+1] = string.lower(line)
    2323    end
     
    3232    for k,v in pairs(P.shipList) do
    3333        --TODO: only add ship if is in the right filter tab
    34         --if tag == nil or v:hasShip(tag) then
     34        --if tag == nil or v:hasStartingShip(tag) then
    3535            local item = CEGUI.createListboxTextItem(v)
    3636            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     
    107107
    108108    if (selectedlevel ~= nil and P.ShipSelectionGetSelectedModel() ~= nil)  then
    109     selectedlevel:selectShip(P.ShipSelectionGetSelectedModel())
     109    selectedlevel:selectStartingShip(P.ShipSelectionGetSelectedModel())
    110110        orxonox.execute("startGame " .. "_temp.oxw")
    111111        hideAllMenuSheets()
  • code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua

    r9272 r9281  
    4848        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    4949        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
    50             --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
    5150            local levelXMLFilename = level:getXMLFilename()
    5251            -- create an imageset for each screenshot
Note: See TracChangeset for help on using the changeset viewer.