[Orxonox-commit 7056] r11675 - in code/branches/CampaignMap_HS17: data/levels src/modules/objects src/modules/overlays/hud src/orxonox/worldentities

fanconic at orxonox.net fanconic at orxonox.net
Fri Dec 15 12:07:58 CET 2017


Author: fanconic
Date: 2017-12-15 12:07:58 +0100 (Fri, 15 Dec 2017)
New Revision: 11675

Added:
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.cc
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.h
Removed:
   code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.cc
   code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.h
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h
Modified:
   code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw
   code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw
   code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt
Log:
renamed storymodeplanet to NameableStaticEntity

Modified: code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw	2017-12-15 11:07:58 UTC (rev 11675)
@@ -29,35 +29,35 @@
 
   <SpawnPoint position="000.000, 000.000, 000.000" spawnclass=StoryModePawn orientation="0, 0, 0, 1" pawndesign=StoryModeEscort /> 
 
- <StoryModePlanet levelName="Level 1" position="0,0,-500" direction="1,0,0">
+ <NameableStaticEntity levelName="Level 1" position="0,0,-500" direction="1,0,0">
   <attached>
     <Model position="0,0,0" mesh="ETH.mesh" scale=80 />
   </attached>
- </StoryModePlanet>
+ </NameableStaticEntity>
 
-<StoryModePlanet levelName="Level 2" position="500,0,-1000" direction="0,0,0">
+<NameableStaticEntity levelName="Level 2" position="500,0,-1000" direction="0,0,0">
   <attached>
     <Model position="0,0,0" mesh="planets/moon.mesh" scale=50 />
   </attached>
- </StoryModePlanet>
+ </NameableStaticEntity>
     
-<StoryModePlanet levelName="Level 3" position="-500,0,-1000" direction="0,1,0">
+<NameableStaticEntity levelName="Level 3" position="-500,0,-1000" direction="0,1,0">
   <attached>
     <Model position="0,0,0" mesh="can.mesh" scale=50 />
   </attached>
-</StoryModePlanet>
+</NameableStaticEntity>
 
-<StoryModePlanet levelName="Level 4" position="1000,0,-1500" direction="0,0,0">
+<NameableStaticEntity levelName="Level 4" position="1000,0,-1500" direction="0,0,0">
   <attached>
     <Model position="0,0,0" mesh="cube.mesh" scale=50 />
   </attached>
- </StoryModePlanet>
+ </NameableStaticEntity>
 
- <StoryModePlanet levelName="Level 5" position="-1000,0,-1500" direction="0,0,0">
+ <NameableStaticEntity levelName="Level 5" position="-1000,0,-1500" direction="0,0,0">
   <attached>
     <Model position="0,0,0" mesh="Pilz.mesh" scale=50 />
   </attached>
- </StoryModePlanet>
+ </NameableStaticEntity>
 
   
   </Scene>

Modified: code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw	2017-12-15 11:07:58 UTC (rev 11675)
@@ -9,8 +9,7 @@
   include("stats.oxo")
   include("HUDTemplates3.oxo")
   include("templates/lodInformation.oxt")
-  include("StoryModeHUD2")
-  include("StoryMode.oxt")
+  include("templates/HeavyCruiser.oxt")
 ?>
 
 <?lua
@@ -18,7 +17,7 @@
   include("templates/endurancetest_template.oxt")
 ?>
 
-<Level gametype = StoryMode>
+<Level>
   <templates>
     <Template link=lodtemplate_default />
   </templates>
@@ -29,8 +28,15 @@
     skybox       = "Orxonox/Starbox"
   >
 
-  <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-  <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+    <ModularSpaceShip velocity= "20,0,0" position="0,0,200" lookat= "0,0,0" health="1000" maxhealth="1000" initialhealth="1000">
+      <templates>
+        <Template link=endurance />
+      </templates>
+    </ModularSpaceShip>
+    
   </Scene>
 </Level>
 

Deleted: code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.cc	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.cc	2017-12-15 11:07:58 UTC (rev 11675)
@@ -1,91 +0,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Bolt Nikola
- *   Co-authors:
- *      Claudio Fanconi
- *
- *
- *	 Authors' Note:
- *	 The following class inherits of its superclass planet
- * 	 It is meant only for the Campaign Map
- *	 This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play) 
- *	 
- */
-
-#include "Planet.h"
-
-#include <OgreEntity.h>
-#include <OgreBillboardSet.h>
-#include <OgreProgressiveMesh.h>
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "core/XMLPort.h"
-#include "Scene.h"
-#include "graphics/Camera.h"
-#include "CameraManager.h"
-
-#include "core/config/ConfigValueIncludes.h"
-
-namespace orxonox
-{
-    RegisterClass(Planet);
-
-    /**
-     * @brief Constructor
-     */
-    StoryModePlanet::StoryModePlanet(Context* context) : MovableEntity(context)
-    {
-        SUPER(context);
-        this->setConfigValues();
-    }
-
-    StoryModePlanet::~StoryModePlanet()
-    {
-    }
-
-    //TO DO: implement this function like BOT:: setConfigValues() Eg. List of names of the levels.
-    void StoryModePlanet::setConfigValues()
-    {
-    	 static const std::string names[] =
-        {
-            "Berkay Berabi",
-            "Louis  Meile"
-            "Muten Roshi",
-            "Abradolf Lincler",
-            "Lionel Messi",
-            "Kamal Khan",
-            "Karl the Llama",
-            "Thomas the Tankengine",
-            "Rick",
-            "send nudes",
-            "Morty",
-            "Charlie the Unicorn",
-            "Kung Fury",
-            "Postman Pat"
-        };
-        static std::vector<std::string> defaultnames(names, names + sizeof(names) / sizeof(std::string));
-
-        SetConfigValue(names_, defaultnames);
-    }
-}
\ No newline at end of file

Deleted: code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.h
===================================================================
--- code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.h	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/src/modules/objects/StoryModePlanet.h	2017-12-15 11:07:58 UTC (rev 11675)
@@ -1,41 +0,0 @@
-/*
-*This is the header of the StoryModePlanet.cc file
-*In this file we define a constructor, destructor and additional function (which is important to name a planet)
-*
-*Author: Bolt Nikole
-*Co-Author: Fanconi Claudio
-*
-*/
-
-#ifndef _StoryModePlanet_H__
-#define _StoryModePlanet_H__
-
-#include "objects/ObjectsPrereqs.h"
-
-#include <string>
-#include "tools/BillboardSet.h"
-#include "tools/Mesh.h"
-#include "worldentities/MovableEntity.h"
-
-
-#include <vector>
-#include "PlayerInfo.h"
-
-namespace orxonox
-{ 
-    class _ObjectsExport StoryModePlanet : public Planet
-    {
-    	public:
-    		StoryModePlanet(Context* context);
-
-    		virtual ~StoryModePlanet();
-
-    		// This is the function, which is used to name and mark a spacecraft.
-    		// We now want to make it available aswell for a planet
-    		void setConfigValues();
-
-    	private:
-            std::vector<std::string> names_;
-    }
-}
-#endif
\ No newline at end of file

Modified: code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc	2017-12-15 11:07:58 UTC (rev 11675)
@@ -55,7 +55,7 @@
 #include "tools/TextureGenerator.h"
 #include "controllers/NewHumanController.h"
 
-#include "worldentities/StoryModePlanet.h"
+#include "worldentities/NameableStaticEntity.h"
 
 namespace orxonox
 {
@@ -95,7 +95,7 @@
         CameraManager::getInstance().getActiveCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
 
         int i = 0;
-        for(StoryModePlanet* planet : ObjectList<StoryModePlanet>()){
+        for(NameableStaticEntity* planet : ObjectList<NameableStaticEntity>()){
 
 
             Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*>( Ogre::OverlayManager::getSingleton()
@@ -173,7 +173,7 @@
         const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
 
         int i = 0;
-        for(StoryModePlanet* planet : ObjectList<StoryModePlanet>()){
+        for(NameableStaticEntity* planet : ObjectList<NameableStaticEntity>()){
 
             // Transform to screen coordinates
             Vector3 pos = camTransform * planet->getWorldPosition();

Modified: code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt	2017-12-15 11:07:58 UTC (rev 11675)
@@ -12,7 +12,7 @@
   TeamSpawnPoint.cc
   ExplosionPart.cc
   Actionpoint.cc
-  StoryModePlanet.cc
+  NameableStaticEntity.cc
 )
 
-ADD_SUBDIRECTORY(pawns)
+ADD_SUBDIRECTORY(pawns)
\ No newline at end of file

Added: code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.cc	                        (rev 0)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.cc	2017-12-15 11:07:58 UTC (rev 11675)
@@ -0,0 +1,55 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Bolt Nikola
+ *   Co-authors:
+ *      Claudio Fanconi
+ *
+ *
+ *	 Authors' Note:
+ *	 The following class inherits of its superclass planet
+ * 	 It is meant only for the Campaign Map
+ *	 This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play) 
+ *	 
+ */
+
+#include "NameableStaticEntity.h"
+
+namespace orxonox
+{
+    RegisterClass(NameableStaticEntity);
+
+
+    NameableStaticEntity::NameableStaticEntity(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(NameableStaticEntity);
+    }
+
+    NameableStaticEntity::~NameableStaticEntity()
+    {
+    }
+
+    void NameableStaticEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(NameableStaticEntity, XMLPort, xmlelement, mode);
+        XMLPortParam(NameableStaticEntity, "levelName", setLevelName, getLevelName, xmlelement, mode);
+    }
+}
\ No newline at end of file

Added: code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.h
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.h	                        (rev 0)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/NameableStaticEntity.h	2017-12-15 11:07:58 UTC (rev 11675)
@@ -0,0 +1,36 @@
+/*
+*This is the header of the NameableStaticEntity.cc file
+*In this file we define a constructor, destructor and additional function (which is important to name a planet)
+*
+*Author: Bolt Nikole
+*Co-Author: Fanconi Claudio
+*
+*/
+
+#ifndef _NameableStaticEntity_H__
+#define _NameableStaticEntity_H__
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{ 
+    class _OrxonoxExport NameableStaticEntity : public StaticEntity
+    {
+    	public:
+    		NameableStaticEntity(Context* context);
+    		virtual ~NameableStaticEntity();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            inline void setLevelName(const std::string& levelname)
+                { this->levelName_ = levelname; }
+
+            inline const std::string& getLevelName()
+                { return this->levelName_; }
+
+        private:
+            std::string levelName_;
+    };
+}
+#endif
\ No newline at end of file

Deleted: code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc	2017-12-15 11:07:58 UTC (rev 11675)
@@ -1,55 +0,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Bolt Nikola
- *   Co-authors:
- *      Claudio Fanconi
- *
- *
- *	 Authors' Note:
- *	 The following class inherits of its superclass planet
- * 	 It is meant only for the Campaign Map
- *	 This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play) 
- *	 
- */
-
-#include "StoryModePlanet.h"
-
-namespace orxonox
-{
-    RegisterClass(StoryModePlanet);
-
-
-    StoryModePlanet::StoryModePlanet(Context* context) : StaticEntity(context)
-    {
-        RegisterObject(StoryModePlanet);
-    }
-
-    StoryModePlanet::~StoryModePlanet()
-    {
-    }
-
-    void StoryModePlanet::XMLPort(Element& xmlelement, XMLPort::Mode mode){
-        SUPER(StoryModePlanet, XMLPort, xmlelement, mode);
-        XMLPortParam(StoryModePlanet, "levelName", setLevelName, getLevelName, xmlelement, mode);
-    }
-}
\ No newline at end of file

Deleted: code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h	2017-12-14 16:07:43 UTC (rev 11674)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h	2017-12-15 11:07:58 UTC (rev 11675)
@@ -1,36 +0,0 @@
-/*
-*This is the header of the StoryModePlanet.cc file
-*In this file we define a constructor, destructor and additional function (which is important to name a planet)
-*
-*Author: Bolt Nikole
-*Co-Author: Fanconi Claudio
-*
-*/
-
-#ifndef _StoryModePlanet_H__
-#define _StoryModePlanet_H__
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "worldentities/StaticEntity.h"
-
-namespace orxonox
-{ 
-    class _OrxonoxExport StoryModePlanet : public StaticEntity
-    {
-    	public:
-    		StoryModePlanet(Context* context);
-    		virtual ~StoryModePlanet();
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-
-            inline void setLevelName(const std::string& levelname)
-                { this->levelName_ = levelname; }
-
-            inline const std::string& getLevelName()
-                { return this->levelName_; }
-
-        private:
-            std::string levelName_;
-    };
-}
-#endif
\ No newline at end of file



More information about the Orxonox-commit mailing list