[Orxonox-commit 7446] r12053 - in code/branches/WorldMap_HS18: data/gui/layouts data/gui/scripts data/levels data/levels/templates src/orxonox src/orxonox/gametypes

linggj at orxonox.net linggj at orxonox.net
Wed Oct 24 11:32:58 CEST 2018


Author: linggj
Date: 2018-10-24 11:32:57 +0200 (Wed, 24 Oct 2018)
New Revision: 12053

Modified:
   code/branches/WorldMap_HS18/data/gui/layouts/CampaignMenu.layout
   code/branches/WorldMap_HS18/data/gui/scripts/CampaignMenu.lua
   code/branches/WorldMap_HS18/data/levels/StoryModeMap.oxw
   code/branches/WorldMap_HS18/data/levels/templates/StoryModeEscort.oxt
   code/branches/WorldMap_HS18/src/orxonox/LevelManager.cc
   code/branches/WorldMap_HS18/src/orxonox/gametypes/StoryMode.cc
Log:
Ship added

Modified: code/branches/WorldMap_HS18/data/gui/layouts/CampaignMenu.layout
===================================================================
--- code/branches/WorldMap_HS18/data/gui/layouts/CampaignMenu.layout	2018-10-24 09:29:37 UTC (rev 12052)
+++ code/branches/WorldMap_HS18/data/gui/layouts/CampaignMenu.layout	2018-10-24 09:32:57 UTC (rev 12053)
@@ -6,6 +6,8 @@
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
         <Property name="Area" value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
         <Property name="BackgroundEnabled" value="False" />
+        
+
         <Window name="Mission1Text" type="MenuWidgets/Button">
             <Property name="Text" value="Mission One" />
             <Property name="Visible" value="False" />
@@ -18,20 +20,22 @@
             <Property name="Area" value="{{0.1,0},{0.75,0},{0.25,0},{0.95,0}}" />
             <Event function="CampaignMenu.Mission1Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="Mission2Text" type="MenuWidgets/Button">
             <Property name="Text" value="Fight in our Back" />
-            <Property name="Visible" value="False" />
+            <Property name="Visible" value="True" />
             <Property name="Area" value="{{0.35,0},{0.6,0},{0.55,0},{0.65,0}}" />
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission2Button_clicked" name="Clicked" />
         </Window>
         <Window name="Mission2Button" type="MenuWidgets/JuuButton">
-            <Property name="Visible" value="False" />
+            <Property name="Visible" value="True" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
             <Property name="Area" value="{{0.4,0},{0.7,0},{0.5,0},{0.85,0}}" />
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission2Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="Mission3Text" type="MenuWidgets/Button">
             <Property name="Text" value="Pirate Attack" />
             <Property name="Visible" value="False" />
@@ -46,6 +50,7 @@
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission3Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="Mission4Text" type="MenuWidgets/Button">
             <Property name="Text" value="Trip to Area 51" />
             <Property name="Visible" value="False" />
@@ -60,6 +65,7 @@
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission4Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="Mission5Text" type="MenuWidgets/Button">
             <Property name="Text" value="Area 51 under Fire" />
             <Property name="Visible" value="False" />
@@ -74,6 +80,7 @@
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission5Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="Mission6Text" type="MenuWidgets/Button">
             <Property name="Text" value="Escape the Bastards" />
             <Property name="Visible" value="False" />
@@ -84,8 +91,10 @@
         <Window name="Mission6Button" type="MenuWidgets/JuuButton">
             <Property name="Visible" value="False" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
+            
             <Property name="Area" value="{{0.6,0},{0.17,0},{0.65,0},{0.27,0}}" />
-            <Property name="Disabled" value="True" />
+            
+            <Property name="Disabled" value="True" /> 
             <Event function="CampaignMenu.Mission6Button_clicked" name="Clicked" />
         </Window>
         <Window name="Mission7Text" type="MenuWidgets/Button">
@@ -95,6 +104,7 @@
             <Event function="CampaignMenu.Mission7Button_clicked" name="Clicked" />
             <Property name="Area" value="{{0.4,0},{0.025,0},{0.6,0},{0.075,0}}" />
         </Window>
+
         <Window name="Mission7Button" type="MenuWidgets/JuuButton">
             <Property name="Visible" value="False" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
@@ -116,6 +126,7 @@
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission8Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="Mission9Text" type="MenuWidgets/Button">
             <Property name="Text" value="Retaliation" />
             <Property name="Visible" value="False" />
@@ -130,6 +141,7 @@
             <Property name="Disabled" value="True" />
             <Event function="CampaignMenu.Mission9Button_clicked" name="Clicked" />
         </Window>
+
         <Window name="CampaignMenuBackButton" type="MenuWidgets/Button">
             <Property name="Text" value="Back" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
@@ -145,5 +157,6 @@
             <Property name="MaxSize" value="{{2,1},{2,1}}" />
             <Property name="Area" value="{{0.4,0},{0.15,0},{0.6,0},{0.2,0}}" />
         </Window>
+        
     </Window>
 </GUILayout>
\ No newline at end of file

Modified: code/branches/WorldMap_HS18/data/gui/scripts/CampaignMenu.lua
===================================================================
--- code/branches/WorldMap_HS18/data/gui/scripts/CampaignMenu.lua	2018-10-24 09:29:37 UTC (rev 12052)
+++ code/branches/WorldMap_HS18/data/gui/scripts/CampaignMenu.lua	2018-10-24 09:32:57 UTC (rev 12053)
@@ -32,11 +32,13 @@
         label:setProperty("Visible","True")
     end
 end
-
+--Updated Buttons der levels
 function P.updateButton(index, button)
+    --Wenn genuegend Levels vorhanden sind, wird der Butten angezeigt
     if (P.shouldDisplayButton(index)) then
         button:setProperty("Visible", "True")
 
+        --wenn genuegend levels bestanden sind, wird er benutzbar
         if (P.shouldEnableButton(index)) then
             button:setProperty("Disabled", "False")
         end
@@ -43,6 +45,10 @@
     end
 end
 
+function P.Test(e)
+     orxonox.execute("startMainMenu")
+end
+
 function P.shouldDisplayButton(index)
     local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()
     return index < size

Modified: code/branches/WorldMap_HS18/data/levels/StoryModeMap.oxw
===================================================================
--- code/branches/WorldMap_HS18/data/levels/StoryModeMap.oxw	2018-10-24 09:29:37 UTC (rev 12052)
+++ code/branches/WorldMap_HS18/data/levels/StoryModeMap.oxw	2018-10-24 09:32:57 UTC (rev 12053)
@@ -28,13 +28,17 @@
   >
 
 
-    <StaticEntity position="0,0,0" direction="0,0,0" >
+    <StaticEntity position="0,0,0" direction="0,0,-1" >
       <attached>
 
-        <Model position="600,370,0" mesh="planets/moon.mesh" scale=100 />
+        <Model position="600,370,0" mesh="planets/moon.mesh" scale=100 visible="false" />
+         <Model position="550,300,0" mesh="assff.mesh" scale=20  visible="true" orientation="-0.015,0.091,0.038,-0.995"/>
+        <Model position="600,370,0" mesh="Coordinates.mesh" scale=10 />
         <Billboard colour="1,1,0.05" position="600,370,-80"  material="Flares/lensflare" scale=4.5 />
-  
-        <Model position="100,350,-250" mesh="planets/moon.mesh" scale=100  />
+       
+
+        <Model position="100,350,-250" mesh="planets/moon.mesh" scale=100  visible="false"/>
+         <Model position="50,300,-250" mesh="assff.mesh" scale=20  visible="true" orientation="-0.015,0.091,0.038,-0.995"/>
         <Billboard colour="1,1,0.05" position="100,350,-330"  material="Flares/lensflare" scale=4.5 />
 
         <Model position="-600,250,-500" mesh="planets/moon.mesh" scale=100 />
@@ -65,6 +69,7 @@
 
     <SpawnPoint position="000.000, 000.000, 1000.000" orientation="0, 0, 0, -1" pawndesign=StoryMode />
     
+    
   </Scene>
 </Level>
 

Modified: code/branches/WorldMap_HS18/data/levels/templates/StoryModeEscort.oxt
===================================================================
--- code/branches/WorldMap_HS18/data/levels/templates/StoryModeEscort.oxt	2018-10-24 09:29:37 UTC (rev 12052)
+++ code/branches/WorldMap_HS18/data/levels/templates/StoryModeEscort.oxt	2018-10-24 09:32:57 UTC (rev 12053)
@@ -42,7 +42,7 @@
       <MultiStateEngine position="-7.6, 0, 0" template=spaceshipescortengine />
     </engines>
     <attached>
-      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="escortShip.mesh" />
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=20 mesh="escortShip.mesh" />
       <Model position="0,0,0" yaw=180 pitch=90 roll=0 scale=4 mesh="escortWeapon.mesh" />
 <!--Model mesh="cube.mesh" mass=10 position="0,0,3" scale3D="10,4,8" />
 <Model mesh="cube.mesh" mass=10 position="12.6,-2,3" scale3D="2.8,2.8,11" />

Modified: code/branches/WorldMap_HS18/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/WorldMap_HS18/src/orxonox/LevelManager.cc	2018-10-24 09:29:37 UTC (rev 12052)
+++ code/branches/WorldMap_HS18/src/orxonox/LevelManager.cc	2018-10-24 09:32:57 UTC (rev 12053)
@@ -62,7 +62,7 @@
     {
         RegisterObject(LevelManager);
         this->setConfigValues();
-
+        orxout(status)<<" a ";
         // check override
         if (!CommandLineParser::getArgument("level")->hasDefaultValue())
         {
@@ -256,7 +256,7 @@
     {
         // Get all files matching the level criteria
         Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw");
-
+        orxout(internal_info) << levels << "itse me";
         // We only want to load as little as possible
         ClassTreeMask mask;
         mask.exclude(Class(BaseObject));

Modified: code/branches/WorldMap_HS18/src/orxonox/gametypes/StoryMode.cc
===================================================================
--- code/branches/WorldMap_HS18/src/orxonox/gametypes/StoryMode.cc	2018-10-24 09:29:37 UTC (rev 12052)
+++ code/branches/WorldMap_HS18/src/orxonox/gametypes/StoryMode.cc	2018-10-24 09:32:57 UTC (rev 12053)
@@ -46,6 +46,7 @@
     
     StoryMode::StoryMode(Context* context) : Gametype(context)
     {
+        orxout(internal_info) << levels << "itse me";
         RegisterObject(StoryMode);
 
         this->gtinfo_ = new GametypeInfo(context);
@@ -64,7 +65,7 @@
 */
     void StoryMode::exit()
     {
-        orxout() << "s funktioniert"<< endl;
+      
         for (StoryMode* mission : ObjectList<StoryMode>())
         { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
             mission->end();



More information about the Orxonox-commit mailing list