Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10692 for code


Ignore:
Timestamp:
Oct 25, 2015, 7:09:11 PM (9 years ago)
Author:
fvultier
Message:
 
Location:
code/branches/fabienHS15
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/data/levels/includes/pickups.oxi

    r9348 r10692  
    7878/>
    7979
     80<PickupRepresentation
     81    name = "destroy"
     82    pickupName = "Destroy Pickup"
     83    pickupDescription = "Destroy all pickups you have."
     84    spawnerTemplate = "destroypickupRepresentation"
     85    inventoryRepresentation = "detroyPickup"
     86/>
     87
     88<PickupRepresentation
     89    name = "destroycarrier"
     90    pickupName = "Destroy Carrier Pickup"
     91    pickupDescription = "destroys you."
     92    spawnerTemplate = "destroycarrierpickupRepresentation"
     93    inventoryRepresentation = "destroyCarrierPickup"
     94/>
     95
    8096<!-- Speed pickups -->
    8197
     
    138154/>
    139155
     156<!-- Munition pickups -->
     157
     158<PickupRepresentation
     159    name = "smallmunitionpickup"
     160    pickupName = "Small munition"
     161    pickupDescription = "Gives a small amount of munition."
     162    spawnerTemplate = "smallmunitionpickupRepresentation"
     163    inventoryRepresentation = "SmallMunition"
     164/>
     165
     166<PickupRepresentation
     167    name = "mediummunitionpickup"
     168    pickupName = "Medium munition"
     169    pickupDescription = "Gives a medium amount of munition."
     170    spawnerTemplate = "mediummunitionpickupRepresentation"
     171    inventoryRepresentation = "MediumMunition"
     172/>
     173
     174<PickupRepresentation
     175    name = "hugemunitionpickup"
     176    pickupName = "Huge munition"
     177    pickupDescription = "Gives a huge amount of munition."
     178    spawnerTemplate = "hugemunitionpickupRepresentation"
     179    inventoryRepresentation = "HugeMunition"
     180/>
     181
    140182<!-- Pickup Collection pickups -->
    141183
     
    175217
    176218<PickupRepresentation
    177     name = "largedamageboostpickup"
    178     pickupName = "Large DamageBoost Pickup"
     219    name = "hugedamageboostpickup"
     220    pickupName = "Huge DamageBoost Pickup"
    179221    pickupDescription = "Multiplies the ship damage with 7."
    180     spawnerTemplate = "largedamageboostpickupRepresentation"
    181     inventoryRepresentation = "LargeDamageBoost"
     222    spawnerTemplate = "hugedamageboostpickupRepresentation"
     223    inventoryRepresentation = "HugeDamageBoost"
    182224/>
    183225
  • code/branches/fabienHS15/data/levels/pickups.oxw

    r9939 r10692  
    3535    <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" />
    3636    <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     37
     38    <!-- DamageBoost pickup -->
     39   
     40    <PickupSpawner pickup=smalldamageboostpickup position="-25,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     41    <PickupSpawner pickup=mediumdamageboostpickup position="0,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     42    <PickupSpawner pickup=hugedamageboostpickup position="25,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />         
     43
     44    <!-- Munition pickups -->
     45
     46    <PickupSpawner pickup=smallmunitionpickup position="-25,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     47    <PickupSpawner pickup=mediummunitionpickup position="0,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     48    <PickupSpawner pickup=hugemunitionpickup position="25,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />   
     49
     50    <!-- Shrink pickup -->
     51
     52    <PickupSpawner pickup=smallshrinkpickup position="-25,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
     53    <PickupSpawner pickup=mediumshrinkpickup position="0,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
     54    <PickupSpawner pickup=hugeshrinkpickup position="25,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />   
    3755
    3856    <!-- Shield pickups -->
     
    7391   
    7492    <Template name=destroymetapickup baseclass=MetaPickup>
    75       <MetaPickup metaType="destroy" />
     93      <MetaPickup representation="destroy" metaType="destroy" />
    7694    </Template>
    7795   
    7896    <Template name=destroycarriermetapickup baseclass=MetaPickup>
    79       <MetaPickup metaType="destroyCarrier" />
     97      <MetaPickup representation="destroycarrier" metaType="destroyCarrier" />
    8098    </Template>
    8199   
     
    93111    <PickupSpawner pickup=dronepickup position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    94112   
    95     <!-- DamageBoost pickup -->
    96    
    97     <PickupSpawner pickup=smalldamageboostpickup position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    98     <PickupSpawner pickup=mediumdamageboostpickup position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    99     <PickupSpawner pickup=largedamageboostpickup position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    100    
    101113    <!-- Other pickups -->
    102114
    103115    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    104116    <PickupRepresentation
    105       name = "MediumHealth"
    106       pickupName = "Medium Health Pack"
    107       pickupDescription = "Once used adds a medium amout of health to the ship."
     117      name = "ContinousHealth"
     118      pickupName = "Continous Health Pack"
     119      pickupDescription = "While useing adds a medium amout of health to the ship."
    108120      spawnerTemplate = "mediumhealthpickupRepresentation"
    109121      inventoryRepresentation = "MediumHealth"
     
    111123
    112124    <Template name=continuoushealthpickup baseclass=HealthPickup>
    113       <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
     125      <HealthPickup representation="ContinousHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
    114126    </Template>
    115127   
    116128    <PickupSpawner pickup=continuoushealthpickup position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    117 
    118     <PickupSpawner pickup="smallshrinkpickup" position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    119     <PickupSpawner pickup="mediumshrinkpickup" position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    120     <PickupSpawner pickup="hugeshrinkpickup" position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    121129   
    122130    <!-- @Objects: 4 boxes (uncontrolled pawns) -->
     
    177185    </Pawn>
    178186
    179     <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 >
    180       <attached>
    181         <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
    182       </attached>
    183       <collisionShapes>
    184         <BoxCollisionShape position="0,0,0" halfExtents="10,10,10" />
    185       </collisionShapes>
    186   </StaticEntity-->
    187 
    188187  </Scene>
    189188</Level>
  • code/branches/fabienHS15/data/levels/templates/pickupRepresentationTemplates.oxt

    r9348 r10692  
    189189</Template>
    190190
     191<!-- Munition pickups: -->
     192
     193<Template name=smallmunitionpickupRepresentation>
     194    <PickupRepresentation>
     195        <spawner-representation>
     196            <StaticEntity>
     197                <attached>
     198                    <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
     199                        <attached>
     200                            <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.3 />
     201                        </attached>
     202                    </Billboard>
     203                </attached>
     204            </StaticEntity>
     205        </spawner-representation>
     206    </PickupRepresentation>
     207</Template>
     208
     209<Template name=smallmunitionpickup baseclass=MunitionPickup>
     210  <MunitionPickup
     211    representation = "smallmunitionpickup"
     212    activationType = "immediate"
     213    durationType = "once"
     214    amount = 10
     215    munitiontype = "LightningMunition"
     216  />
     217</Template>
     218
     219<Template name=mediummunitionpickupRepresentation>
     220    <PickupRepresentation>
     221        <spawner-representation>
     222            <StaticEntity>
     223                <attached>
     224                    <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
     225                        <attached>
     226                            <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.5 />
     227                        </attached>
     228                    </Billboard>
     229                </attached>
     230            </StaticEntity>
     231        </spawner-representation>
     232    </PickupRepresentation>
     233</Template>
     234
     235<Template name=mediummunitionpickup baseclass=MunitionPickup>
     236  <MunitionPickup
     237    representation = "mediummunitionpickup"
     238    activationType = "immediate"
     239    durationType = "once"
     240    amount = 20
     241    munitiontype = "LightningMunition"
     242  />
     243</Template>
     244
     245<Template name=hugemunitionpickupRepresentation>
     246    <PickupRepresentation>
     247        <spawner-representation>
     248            <StaticEntity>
     249                <attached>
     250                    <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
     251                        <attached>
     252                            <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.7 />
     253                        </attached>
     254                    </Billboard>
     255                </attached>
     256            </StaticEntity>
     257        </spawner-representation>
     258    </PickupRepresentation>
     259</Template>
     260
     261<Template name=hugemunitionpickup baseclass=MunitionPickup>
     262  <MunitionPickup
     263    representation = "hugemunitionpickup"
     264    activationType = "immediate"
     265    durationType = "once"
     266    amount = 30
     267    munitiontype = "LightningMunition"
     268  />
     269</Template>
     270
    191271<!-- Meta pickups: -->
    192272
     
    223303</Template>
    224304
     305<Template name=destroypickupRepresentation>
     306    <PickupRepresentation>
     307        <spawner-representation>
     308            <StaticEntity>
     309                <attached>
     310                    <Billboard position="0,0,0" colour="0.60,0.97,0.23" material="Sphere2" scale=0.1>
     311                        <attached>
     312                            <Billboard position="0,0,0" colour="0.40,0.81,0.10" material="Splash" scale=0.65 />
     313                        </attached>
     314                    </Billboard>
     315                </attached>
     316            </StaticEntity>
     317        </spawner-representation>
     318    </PickupRepresentation>
     319</Template>
     320
     321<Template name=destroycarrierpickupRepresentation>
     322    <PickupRepresentation>
     323        <spawner-representation>
     324            <StaticEntity>
     325                <attached>
     326                    <Billboard position="0,0,0" colour="0.60,0.97,0.23" material="Sphere2" scale=0.1>
     327                        <attached>
     328                            <Billboard position="0,0,0" colour="0.40,0.81,0.10" material="Asterisk" scale=0.65 />
     329                        </attached>
     330                    </Billboard>
     331                </attached>
     332            </StaticEntity>
     333        </spawner-representation>
     334    </PickupRepresentation>
     335</Template>
     336
    225337<!-- DamageBoost pickups -->
    226338
     
    232344                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
    233345                        <attached>
    234                             <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageSmall" scale=0.7 />
     346                            <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.3 />
    235347                        </attached>
    236348                    </Billboard>
     
    258370                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
    259371                        <attached>
    260                             <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageMedium" scale=0.7 />
     372                            <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.5 />
    261373                        </attached>
    262374                    </Billboard>
     
    277389</Template>
    278390
    279 <Template name=largedamageboostpickupRepresentation>
     391<Template name=hugedamageboostpickupRepresentation>
    280392    <PickupRepresentation>
    281393        <spawner-representation>
     
    284396                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
    285397                        <attached>
    286                             <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageLarge" scale=0.7 />
    287                         </attached>
    288                     </Billboard>
    289                 </attached>
    290             </StaticEntity>
    291         </spawner-representation>
    292     </PickupRepresentation>
    293 </Template>
    294 
    295 <Template name=largedamageboostpickup baseclass=DamageBoostPickup>
     398                            <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.7 />                           
     399                        </attached>
     400                    </Billboard>
     401                </attached>
     402            </StaticEntity>
     403        </spawner-representation>
     404    </PickupRepresentation>
     405</Template>
     406
     407<Template name=hugedamageboostpickup baseclass=DamageBoostPickup>
    296408  <DamageBoostPickup
    297     representation = "largedamageboostpickup"
     409    representation = "hugedamageboostpickup"
    298410    duration = 10.0
    299411    damageMultiplier = 7.0
     
    498610                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
    499611                        <attached>
    500                             <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.4 />
     612                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.35 />
    501613                        </attached>
    502614                    </Billboard>
     
    524636                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
    525637                        <attached>
    526                             <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.7 />
     638                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.55 />
    527639                        </attached>
    528640                    </Billboard>
     
    550662                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
    551663                        <attached>
    552                             <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=1.0 />
     664                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.75 />
    553665                        </attached>
    554666                    </Billboard>
     
    609721        </attached>
    610722        <collisionShapes>
    611             <BoxCollisionShape position="0,0,0"      halfExtents="1, 1, 1" />
     723            <SphereCollisionShape position="0,0,0" radius=5 />
    612724        </collisionShapes>
    613725        <weaponslots>
    614             <WeaponSlot position="    0,   0,0" />
     726            <WeaponSlot position="0,0,0" />
    615727        </weaponslots>
    616728        <weaponsets>
  • code/branches/fabienHS15/src/modules/pickup/PickupRepresentation.cc

    r9667 r10692  
    187187        Billboard* icon = new Billboard(spawner->getContext());
    188188        icon->setColour(ColourValue(0.89f, 0.79f, 0.08f));
    189         icon->setMaterial("asterisk");
     189        icon->setMaterial("Unknown");
    190190        icon->setScale(0.5);
    191191        sphere->attach(icon);
  • code/branches/fabienHS15/src/modules/pickup/items/CMakeLists.txt

    r9348 r10692  
    88  ShrinkPickup.cc
    99  DamageBoostPickup.cc
     10  MunitionPickup.cc
    1011)
  • code/branches/fabienHS15/src/modules/pickup/items/DronePickup.h

    r9667 r10692  
    4343#include "tools/interfaces/Tickable.h"
    4444
    45 namespace orxonox {
     45namespace orxonox
     46{
    4647
    4748    /**
     
    8081            std::string droneTemplate_; //!< The name of the template, based upon which the Drone is created.
    8182            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    82 
    83 
    84 
    8583    };
    8684}
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.cc

    r10688 r10692  
    560560        else
    561561            return 0;       
    562     }   
     562    }
     563
     564    Munition* Pawn::getMunition(SubclassIdentifier<Munition> * identifier)
     565    {
     566        if (weaponSystem_)
     567        {
     568            return weaponSystem_->getMunition(identifier);
     569        }
     570
     571        return NULL;
     572    }
    563573
    564574    //Tell the Map (RadarViewable), if this is a playership
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.h

    r10688 r10692  
    155155            WeaponPack * getWeaponPack(unsigned int index) const;
    156156            std::vector<WeaponPack *> * getAllWeaponPacks();
     157           
     158            Munition * getMunition(SubclassIdentifier<Munition> * identifier);
    157159
    158160            virtual void addedWeaponPack(WeaponPack* wPack) {}
Note: See TracChangeset for help on using the changeset viewer.