[Orxonox-commit 5587] r10250 - in code/branches/storymodeHS14: cmake data/gui/scripts

landauf at orxonox.net landauf at orxonox.net
Sun Feb 1 22:51:47 CET 2015


Author: landauf
Date: 2015-02-01 22:51:47 +0100 (Sun, 01 Feb 2015)
New Revision: 10250

Removed:
   code/branches/storymodeHS14/data/gui/scripts/campaign.txt
Modified:
   code/branches/storymodeHS14/cmake/LibraryConfig.cmake
   code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua
   code/branches/storymodeHS14/data/gui/scripts/SingleplayerMenu.lua
Log:
tabs -> spaces. removed temp-file

Modified: code/branches/storymodeHS14/cmake/LibraryConfig.cmake
===================================================================
--- code/branches/storymodeHS14/cmake/LibraryConfig.cmake	2015-02-01 21:37:36 UTC (rev 10249)
+++ code/branches/storymodeHS14/cmake/LibraryConfig.cmake	2015-02-01 21:51:47 UTC (rev 10250)
@@ -160,7 +160,7 @@
 # Expand the next statement if newer boost versions are released
 SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.41 1.41.0 1.42 1.42.0 1.43 1.43.0
                               1.44 1.44.0 1.45 1.45.0 1.46 1.46.0 1.46.1 1.49.0
-			      1.53.0)
+                              1.53.0)
 IF(NOT TARDIS)
   FIND_PACKAGE(Boost 1.40 REQUIRED thread filesystem system date_time)
 ENDIF()

Modified: code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua
===================================================================
--- code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua	2015-02-01 21:37:36 UTC (rev 10249)
+++ code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua	2015-02-01 21:51:47 UTC (rev 10250)
@@ -3,130 +3,130 @@
 local P = createMenuSheet("CampaignMenu")
 
 function P.onLoad()
-	
-	local MissionTwoButton = winMgr:getWindow("orxonox/MissionTwoButton")
-	if (P.CheckLevel("missionOne.oxw")) then
-	MissionTwoButton:setProperty("Disabled", "False")
-	end
-	
-	local MissionThreeButton = winMgr:getWindow("orxonox/MissionThreeButton")
-	if (P.CheckLevel("fightInOurBack.oxw")) then
-	MissionThreeButton:setProperty("Disabled", "False")
-	end
+    
+    local MissionTwoButton = winMgr:getWindow("orxonox/MissionTwoButton")
+    if (P.CheckLevel("missionOne.oxw")) then
+    MissionTwoButton:setProperty("Disabled", "False")
+    end
+    
+    local MissionThreeButton = winMgr:getWindow("orxonox/MissionThreeButton")
+    if (P.CheckLevel("fightInOurBack.oxw")) then
+    MissionThreeButton:setProperty("Disabled", "False")
+    end
 
-	local MissionFourButton = winMgr:getWindow("orxonox/MissionFourButton")
-	if (P.CheckLevel("pirateAttack.oxw")) then
-	MissionFourButton:setProperty("Disabled", "False")
-	end
-	
-	local Completed = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
-	if (P.CheckLevel("iJohnVane_TriptoArea51.oxw")) then
-	Completed:setProperty("Visible","True")
-	end
+    local MissionFourButton = winMgr:getWindow("orxonox/MissionFourButton")
+    if (P.CheckLevel("pirateAttack.oxw")) then
+    MissionFourButton:setProperty("Disabled", "False")
+    end
+    
+    local Completed = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
+    if (P.CheckLevel("iJohnVane_TriptoArea51.oxw")) then
+    Completed:setProperty("Visible","True")
+    end
 end
 
 function P.GenerateHelperString(number)
-	local string = ""
-	while number > 1 do
-		string = string.." "
-		number = number-1
-	end
-	string = string.."."
-	return string
+    local string = ""
+    while number > 1 do
+        string = string.." "
+        number = number-1
+    end
+    string = string.."."
+    return string
 end
 
 function P.FindLevel(filename)
-	local level = nil
-	local templevel = nil
-	local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
+    local level = nil
+    local templevel = nil
+    local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
     local index = 0
     while index < size do
-    	templevel = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
-    	if(templevel:getXMLFilename()==filename) then 
-    		level = templevel
-    	end
+        templevel = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+        if(templevel:getXMLFilename()==filename) then 
+            level = templevel
+        end
     index=index+1
     end
     return level
 end
     
 function P.CheckLevel(filename)
-	local file = io.open("/home/pmao/pmao-extra-0/orxonox/storymode/campaign.txt", "r+")
-	local index = 0
-	local returnvalue = false
-	local numberoflines = 58-string.len(filename)
-	local helpstringfalse = filename.." 0"..P.GenerateHelperString(numberoflines) 
-	local helpstringtrue = filename.." 1"..P.GenerateHelperString(numberoflines)
-	while index < 100 do
-		local line = file:read()
-		if(line == helpstringfalse) then
-			returnvalue = false 
-			break
-		end
-		if(line == helpstringtrue) then
-			returnvalue = true
-			break
-		end
-		index=index+1
-	end	
-	io.close(file)
-	return returnvalue
+    local file = io.open("/home/pmao/pmao-extra-0/orxonox/storymode/campaign.txt", "r+")
+    local index = 0
+    local returnvalue = false
+    local numberoflines = 58-string.len(filename)
+    local helpstringfalse = filename.." 0"..P.GenerateHelperString(numberoflines) 
+    local helpstringtrue = filename.." 1"..P.GenerateHelperString(numberoflines)
+    while index < 100 do
+        local line = file:read()
+        if(line == helpstringfalse) then
+            returnvalue = false 
+            break
+        end
+        if(line == helpstringtrue) then
+            returnvalue = true
+            break
+        end
+        index=index+1
+    end
+    io.close(file)
+    return returnvalue
 end
 
 function P.MissionOneButton_clicked(e)
-	local level = P.FindLevel("missionOne.oxw")
-		orxonox.execute("startGame " .. level:getXMLFilename())
-		hideAllMenuSheets()
+    local level = P.FindLevel("missionOne.oxw")
+        orxonox.execute("startGame " .. level:getXMLFilename())
+        hideAllMenuSheets()
 end
 
 function P.MissionTwoButton_clicked(e)
-	local level = P.FindLevel("fightInOurBack.oxw")
-	if (P.CheckLevel("missionOne.oxw")) then
-		orxonox.execute("startGame " .. level:getXMLFilename())
-		hideAllMenuSheets()
-	end
+    local level = P.FindLevel("fightInOurBack.oxw")
+    if (P.CheckLevel("missionOne.oxw")) then
+        orxonox.execute("startGame " .. level:getXMLFilename())
+        hideAllMenuSheets()
+    end
 end
 
 function P.MissionThreeButton_clicked(e)
-	local level = P.FindLevel("pirateAttack.oxw")
-	if (P.CheckLevel("fightInOurBack.oxw")) then
-		orxonox.execute("startGame " .. level:getXMLFilename())
-		hideAllMenuSheets()
-	else
-		 hideMenuSheet(P.name)
-	end
+    local level = P.FindLevel("pirateAttack.oxw")
+    if (P.CheckLevel("fightInOurBack.oxw")) then
+        orxonox.execute("startGame " .. level:getXMLFilename())
+        hideAllMenuSheets()
+    else
+         hideMenuSheet(P.name)
+    end
 end
 
 function P.MissionFourButton_clicked(e)
-	local level = P.FindLevel("iJohnVane_TriptoArea51.oxw")
-	if (P.CheckLevel("pirateAttack.oxw")) then
-		orxonox.execute("startGame " .. level:getXMLFilename())
-		hideAllMenuSheets()
-	else
-		 hideMenuSheet(P.name)
-	end
+    local level = P.FindLevel("iJohnVane_TriptoArea51.oxw")
+    if (P.CheckLevel("pirateAttack.oxw")) then
+        orxonox.execute("startGame " .. level:getXMLFilename())
+        hideAllMenuSheets()
+    else
+         hideMenuSheet(P.name)
+    end
 end
 
 function P.CampaignMenuRefreshButton_clicked(e)
-	local MissionTwoButton = winMgr:getWindow("orxonox/MissionTwoButton")
-	if (P.CheckLevel("missionOne.oxw")) then
-	MissionTwoButton:setProperty("Disabled", "False")
-	end
-	
-	local MissionThreeButton = winMgr:getWindow("orxonox/MissionThreeButton")
-	if (P.CheckLevel("fightInOurBack.oxw")) then
-	MissionThreeButton:setProperty("Disabled", "False")
-	end
+    local MissionTwoButton = winMgr:getWindow("orxonox/MissionTwoButton")
+    if (P.CheckLevel("missionOne.oxw")) then
+    MissionTwoButton:setProperty("Disabled", "False")
+    end
+    
+    local MissionThreeButton = winMgr:getWindow("orxonox/MissionThreeButton")
+    if (P.CheckLevel("fightInOurBack.oxw")) then
+    MissionThreeButton:setProperty("Disabled", "False")
+    end
 
-	local MissionFourButton = winMgr:getWindow("orxonox/MissionFourButton")
-	if (P.CheckLevel("pirateAttack.oxw")) then
-	MissionFourButton:setProperty("Disabled", "False")
-	end
-	
-	local Completed = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
-	if (P.CheckLevel("iJohnVane_TriptoArea51.oxw")) then
-	Completed:setProperty("Visible","True")
-	end
+    local MissionFourButton = winMgr:getWindow("orxonox/MissionFourButton")
+    if (P.CheckLevel("pirateAttack.oxw")) then
+    MissionFourButton:setProperty("Disabled", "False")
+    end
+    
+    local Completed = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
+    if (P.CheckLevel("iJohnVane_TriptoArea51.oxw")) then
+    Completed:setProperty("Visible","True")
+    end
 end
 
 function P.CampaignMenuBackButton_clicked(e)

Modified: code/branches/storymodeHS14/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/storymodeHS14/data/gui/scripts/SingleplayerMenu.lua	2015-02-01 21:37:36 UTC (rev 10249)
+++ code/branches/storymodeHS14/data/gui/scripts/SingleplayerMenu.lua	2015-02-01 21:51:47 UTC (rev 10250)
@@ -39,8 +39,8 @@
             ["callback"]  = P.SingleplayerBackButton_clicked
     })
     P:setButton(1, 4,{
-    		["button"] = winMgr:getWindow("orxonox/CampaignButton"),
-    		["callback"] = P.CampaignButton_clicked
+            ["button"] = winMgr:getWindow("orxonox/CampaignButton"),
+            ["callback"] = P.CampaignButton_clicked
     })
 end
 
@@ -171,7 +171,7 @@
 end
 
 function P.CampaignButton_clicked(e)
-	showMenuSheet("CampaignMenu", true)
+    showMenuSheet("CampaignMenu", true)
 end
 
 return P

Deleted: code/branches/storymodeHS14/data/gui/scripts/campaign.txt
===================================================================
--- code/branches/storymodeHS14/data/gui/scripts/campaign.txt	2015-02-01 21:37:36 UTC (rev 10249)
+++ code/branches/storymodeHS14/data/gui/scripts/campaign.txt	2015-02-01 21:51:47 UTC (rev 10250)
@@ -1,7 +0,0 @@
-1f you want to insert a new level do not use tab use       .
-spacebar!!!                                                .
-missionOne.oxw 1                                           .
-fightInOurBack.oxw 0                                       .
-pirateAttack.oxw 0                                         .
-iJohnVane_TriptoArea51.oxw 0                               .
-............................................................




More information about the Orxonox-commit mailing list