[Orxonox-commit 5511] r10174 - in code/branches/storymodeHS14: data/gui/scripts src/orxonox/gametypes
maxima at orxonox.net
maxima at orxonox.net
Thu Dec 11 15:51:28 CET 2014
Author: maxima
Date: 2014-12-11 15:51:27 +0100 (Thu, 11 Dec 2014)
New Revision: 10174
Modified:
code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua
code/branches/storymodeHS14/data/gui/scripts/campaign.txt
code/branches/storymodeHS14/src/orxonox/gametypes/Mission.cc
Log:
Final version for presentation.
Modified: code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua
===================================================================
--- code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua 2014-12-11 12:10:38 UTC (rev 10173)
+++ code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua 2014-12-11 14:51:27 UTC (rev 10174)
@@ -51,7 +51,7 @@
end
function P.CheckLevel(filename)
- local file = io.open("/home/pmao/pmao-extra-0/orxonox/storymodeHS14/data/gui/scripts/campaign.txt", "r+")
+ 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)
@@ -133,4 +133,6 @@
hideMenuSheet(P.name)
end
+
+
return P
\ No newline at end of file
Modified: code/branches/storymodeHS14/data/gui/scripts/campaign.txt
===================================================================
--- code/branches/storymodeHS14/data/gui/scripts/campaign.txt 2014-12-11 12:10:38 UTC (rev 10173)
+++ code/branches/storymodeHS14/data/gui/scripts/campaign.txt 2014-12-11 14:51:27 UTC (rev 10174)
@@ -1,7 +1,7 @@
1f you want to insert a new level do not use tab use .
spacebar!!! .
missionOne.oxw 1 .
-fightInOurBack.oxw 1 .
-pirateAttack.oxw 1 .
+fightInOurBack.oxw 0 .
+pirateAttack.oxw 0 .
iJohnVane_TriptoArea51.oxw 0 .
-............................................................
\ No newline at end of file
+............................................................
Modified: code/branches/storymodeHS14/src/orxonox/gametypes/Mission.cc
===================================================================
--- code/branches/storymodeHS14/src/orxonox/gametypes/Mission.cc 2014-12-11 12:10:38 UTC (rev 10173)
+++ code/branches/storymodeHS14/src/orxonox/gametypes/Mission.cc 2014-12-11 14:51:27 UTC (rev 10174)
@@ -81,33 +81,11 @@
void Mission::start()
{
std::fstream myfile;
- myfile.open("/home/pmao/pmao-extra-0/orxonox/storymodeHS14/data/gui/scripts/campaign.txt");
- std::string line;
- std::string mission=this->getFilename();
- int k=58-mission.length();
- std::string helperstring = "";
- if(myfile.is_open()){
- while (k>1) {
- helperstring=helperstring+" ";
- k=k-1;
- }
- helperstring=helperstring+".";
- while(getline (myfile,line)){
- if(line==mission+" 0"+helperstring){
- long pos = myfile.tellp();
- myfile.seekp (pos-61);
- myfile << mission+" 1"+helperstring;
- }
- }}
- else{
- this->end();
- }
- myfile.flush();
- myfile.clear();
- myfile.close();
+
Gametype::start();
this->setTeams();
-
+ //just for testing
+ //this->missionAccomplished_=true;
this->gtinfo_->sendAnnounceMessage("Your mission has started!");
}
@@ -127,7 +105,7 @@
if (this->missionAccomplished_ && !this->gtinfo_->hasEnded()){
this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
std::fstream myfile;
- myfile.open("/home/pmao/pmao-extra-0/orxonox/storymodeHS14/data/gui/scripts/campaign.txt");
+ myfile.open("/home/maxima/maxima-extra-0/orxonox/storymodeHS14/campaign.txt");
std::string line;
std::string mission=this->getFilename();
int k=58-mission.length();
@@ -168,7 +146,7 @@
{
for (ObjectList<Mission>::iterator it = ObjectList<Mission>::begin(); it != ObjectList<Mission>::end(); ++it)
{//TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
- if(accomplished){
+ /* if(accomplished){
std::fstream myfile;
myfile.open("/home/pmao/pmao-extra-0/orxonox/storymodeHS14/data/gui/scripts/campaign.txt");
std::string line;
@@ -192,7 +170,7 @@
myfile.flush();
myfile.clear();
myfile.close();
- }
+ }*/
it->setMissionAccomplished(accomplished);
it->end();
More information about the Orxonox-commit
mailing list