Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9318


Ignore:
Timestamp:
Jul 18, 2012, 10:36:24 PM (12 years ago)
Author:
landauf
Message:

removed PickupIdentifier for a number of reasons (I talked to Damian about it before)
a pickup now references the PickupRepresentation by name with the "representation" attribute

Location:
code/branches/presentation2012merge
Files:
3 deleted
38 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/gui/scripts/PickupInventory.lua

    r9297 r9318  
    108108
    109109function P.createPickupEntry(index, pickup)
    110     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
     110    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
    111111
    112112    local name = "orxonox/PickupInventory/Box/Pickup" .. index
     
    193193function P.createDetailsWindow(pickupIndex)
    194194    local pickup = P.pickupsList[pickupIndex]
    195     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
     195    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
    196196
    197197    local index = P.getNewDetailNumber()
  • code/branches/presentation2012merge/data/levels/includes/pickups.oxi

    r9269 r9318  
    33
    44<PickupRepresentation
     5    name = "smallshieldpickup"
    56    pickupName = "Small Shield Pickup"
    67    pickupDescription = "Gives you a small-sized shield for 30 seconds."
    78    inventoryRepresentation = "SmallShield"
    89    spawnerTemplate = "smallshieldpickupRepresentation"
    9 >
    10     <pickup>
    11         <ShieldPickup template=smallshieldpickup />
    12     </pickup>
    13 </PickupRepresentation>
    14 
    15 <PickupRepresentation
     10/>
     11
     12<PickupRepresentation
     13    name = "mediumshieldpickup"
    1614    pickupName = "Medium Shield Pickup"
    1715    pickupDescription = "Gives you a medium-sized shield for 30 seconds."
    1816    inventoryRepresentation = "MediumShield"
    1917    spawnerTemplate = "mediumshieldpickupRepresentation"
    20 >
    21     <pickup>
    22         <ShieldPickup template=mediumshieldpickup />
    23     </pickup>
    24 </PickupRepresentation>
    25 
    26 <PickupRepresentation
     18/>
     19
     20<PickupRepresentation
     21    name = "hugeshieldpickup"
    2722    pickupName = "Huge Shield Pickup"
    2823    pickupDescription = "Gives you a big shield for 60 seconds."
    2924    inventoryRepresentation = "HugeShield"
    3025    spawnerTemplate = "hugeshieldpickupRepresentation"
    31 >
    32     <pickup>
    33         <ShieldPickup template=hugeshieldpickup />
    34     </pickup>
    35 </PickupRepresentation>
     26/>
    3627
    3728<!-- Health pickups -->
    3829
    3930<PickupRepresentation
     31    name = "smallhealthpickup"
    4032    pickupName = "Small Health Boost"
    4133    pickupDescription = "Adds a small amout of health to the ship."
    4234    inventoryRepresentation = "SmallHealth"
    4335    spawnerTemplate = "smallhealthpickupRepresentation"
    44 >
    45     <pickup>
    46         <HealthPickup template=smallhealthpickup />
    47     </pickup>
    48 </PickupRepresentation>
    49 
    50 <PickupRepresentation
     36/>
     37
     38<PickupRepresentation
     39    name = "mediumhealthpickup"
    5140    pickupName = "Medium Health Boost"
    5241    pickupDescription = "Adds a medium amout of health to the ship."
    5342    spawnerTemplate = "mediumhealthpickupRepresentation"
    5443    inventoryRepresentation = "MediumHealth"
    55 >
    56     <pickup>
    57         <HealthPickup template=mediumhealthpickup />
    58     </pickup>
    59 </PickupRepresentation>
    60 
    61 <PickupRepresentation
     44/>
     45
     46<PickupRepresentation
     47    name = "hugehealthpickup"
    6248    pickupName = "Huge Health Boost"
    6349    pickupDescription = "Adds a huge amout of health to the ship."
    6450    spawnerTemplate = "hugehealthpickupRepresentation"
    6551    inventoryRepresentation = "HugeHealth"
    66 >
    67     <pickup>
    68         <HealthPickup template=hugehealthpickup />
    69     </pickup>
    70 </PickupRepresentation>
    71 
    72 <PickupRepresentation
     52/>
     53
     54<PickupRepresentation
     55    name = "crazyhealthpickup"
    7356    pickupName = "Crazy Madness Health Boost"
    7457    pickupDescription = "Adds a crazy amout of health to the ship."
    7558    spawnerTemplate = "crazyhealthpickupRepresentation"
    7659    inventoryRepresentation = "CrazyMadnessHealth"
    77 >
    78     <pickup>
    79         <HealthPickup template=crazyhealthpickup />
    80     </pickup>
    81 </PickupRepresentation>
     60/>
    8261
    8362<!-- Meta pickups -->
    8463
    8564<PickupRepresentation
     65    name = "use"
    8666    pickupName = "Use Pickup"
    8767    pickupDescription = "Uses all pickups you have."
    8868    spawnerTemplate = "usepickupRepresentation"
    8969    inventoryRepresentation = "usePickup"
    90 >
    91     <pickup>
    92         <MetaPickup metaType="use" />
    93     </pickup>
    94 </PickupRepresentation>
    95 
    96 <PickupRepresentation
     70/>
     71
     72<PickupRepresentation
     73    name = "drop"
    9774    pickupName = "Drop Pickup"
    9875    pickupDescription = "Drops all pickups you have."
    9976    spawnerTemplate = "droppickupRepresentation"
    10077    inventoryRepresentation = "dropPickup"
    101 >
    102     <pickup>
    103         <MetaPickup metaType="drop" />
    104     </pickup>
    105 </PickupRepresentation>
     78/>
    10679
    10780<!-- Speed pickups -->
    10881
    10982<PickupRepresentation
     83    name = "smallspeedpickup"
    11084    pickupName = "Small Speed Boost"
    11185    pickupDescription = "Multiplies Speed of the Ship by a small amount."
    11286    spawnerTemplate = "smallspeedpickupRepresentation"
    11387    inventoryRepresentation = "SmallSpeed"
    114 >
    115     <pickup>
    116         <SpeedPickup template=smallspeedpickup />
    117     </pickup>
    118 </PickupRepresentation>
    119 
    120 <PickupRepresentation
     88/>
     89
     90<PickupRepresentation
     91    name = "mediumspeedpickup"
    12192    pickupName = "Medium Speed Boost"
    12293    pickupDescription = "Multiplies Speed of the Ship by a bigger amount."
    12394    spawnerTemplate = "mediumspeedpickupRepresentation"
    12495    inventoryRepresentation = "MediumSpeed"
    125 >
    126     <pickup>
    127         <SpeedPickup template=mediumspeedpickup />
    128     </pickup>
    129 </PickupRepresentation>
    130 
    131 <PickupRepresentation
     96/>
     97
     98<PickupRepresentation
     99    name = "hugespeedpickup"
    132100    pickupName = "Huge Speed Boost"
    133101    pickupDescription = "Multiplies Speed of the Ship by a huge amount."
    134102    spawnerTemplate = "hugespeedpickupRepresentation"
    135103    inventoryRepresentation = "HugeSpeed"
    136 >
    137     <pickup>
    138         <SpeedPickup template=hugespeedpickup />
    139     </pickup>
    140 </PickupRepresentation>
    141 
    142 <PickupRepresentation
     104/>
     105
     106<PickupRepresentation
     107    name = "smalljumppickup"
    143108    pickupName = "Small Jump Boost"
    144109    pickupDescription = "Boosts the Ship with a massive amount for a very short time."
    145110    spawnerTemplate = "smalljumppickupRepresentation"
    146111    inventoryRepresentation = "SmallSpeed"
    147 >
    148     <pickup>
    149         <SpeedPickup template=smalljumppickup />
    150     </pickup>
    151 </PickupRepresentation>
     112/>
    152113
    153114<!-- Invisible pickups -->
    154115
    155116<PickupRepresentation
     117    name = "smallinvisiblepickup"
    156118    pickupName = "Small Invisibility"
    157119    pickupDescription = "Makes you invisible for 5 seconds."
    158120    spawnerTemplate = "smallinvisiblepickupRepresentation"
    159121    inventoryRepresentation = "SmallInvisible"
    160 >
    161     <pickup>
    162         <InvisiblePickup template=smallinvisiblepickup />
    163     </pickup>
    164 </PickupRepresentation>
    165 
    166 <PickupRepresentation
     122/>
     123
     124<PickupRepresentation
     125    name = "mediuminvisiblepickup"
    167126    pickupName = "Medium Invisibility"
    168127    pickupDescription = "Makes you invisible for 10 seconds."
    169128    spawnerTemplate = "mediuminvisiblepickupRepresentation"
    170129    inventoryRepresentation = "MediumInvisible"
    171 >
    172     <pickup>
    173         <InvisiblePickup template=mediuminvisiblepickup />
    174     </pickup>
    175 </PickupRepresentation>
    176 
    177 <PickupRepresentation
     130/>
     131
     132<PickupRepresentation
     133    name = "hugeinvisiblepickup"
    178134    pickupName = "Huge Invisibility"
    179135    pickupDescription = "Makes you invisible for 20 seconds."
    180136    spawnerTemplate = "hugeinvisiblepickupRepresentation"
    181137    inventoryRepresentation = "HugeInvisible"
    182 >
    183     <pickup>
    184         <InvisiblePickup template=hugeinvisiblepickup />
    185     </pickup>
    186 </PickupRepresentation>
     138/>
    187139
    188140<!-- Pickup Collection pickups -->
    189141
    190142<PickupRepresentation
     143    name = "triplehealthspeedinvisibilitypickup"
    191144    pickupName = "Tri Pickup"
    192145    pickupDescription = "Adds health, speed and invisibility."
    193146    spawnerTemplate = "triplehealthspeedinvisibilitypickupRepresentation"
    194 >
    195     <pickup>
    196         <PickupCollection template=triplehealthspeedinvisibilitypickup />
    197     </pickup>
    198 </PickupRepresentation>
     147/>
    199148
    200149<!-- Drone Pickup -->
    201150
    202151<PickupRepresentation
     152    name = "dronepickup"
    203153    pickupName = "Drone Pickup"
    204154    pickupDescription = "Adds a Drone to the Player's Spaceship"
    205155    spawnerTemplate = "dronepickupRepresentation"
    206 >
    207     <pickup>
    208         <DronePickup template=dronepickup />
    209     </pickup>
    210 </PickupRepresentation>
     156/>
    211157
    212158<!-- DamageBoost Pickup -->
    213159
    214160<PickupRepresentation
     161    name = "smalldamageboostpickup"
    215162    pickupName = "Small DamageBoost Pickup"
    216163    pickupDescription = "Multiplies the ship damage with 2."
    217164    spawnerTemplate = "smalldamageboostpickupRepresentation"
    218165    inventoryRepresentation = "SmallDamageBoost"
    219 >
    220     <pickup>
    221         <DamageBoostPickup template=smalldamageboostpickup />
    222     </pickup>
    223 </PickupRepresentation>
    224 
    225 <PickupRepresentation
     166/>
     167
     168<PickupRepresentation
     169    name = "mediumdamageboostpickup"
    226170    pickupName = "Medium DamageBoost Pickup"
    227171    pickupDescription = "Multiplies the ship damage with 5."
    228172    spawnerTemplate = "mediumdamageboostpickupRepresentation"
    229173    inventoryRepresentation = "MediumDamageBoost"
    230 >
    231     <pickup>
    232         <DamageBoostPickup template=mediumdamageboostpickup />
    233     </pickup>
    234 </PickupRepresentation>
    235 
    236 <PickupRepresentation
     174/>
     175
     176<PickupRepresentation
     177    name = "largedamageboostpickup"
    237178    pickupName = "Large DamageBoost Pickup"
    238179    pickupDescription = "Multiplies the ship damage with 7."
    239180    spawnerTemplate = "largedamageboostpickupRepresentation"
    240181    inventoryRepresentation = "LargeDamageBoost"
    241 >
    242     <pickup>
    243         <DamageBoostPickup template=largedamageboostpickup />
    244     </pickup>
    245 </PickupRepresentation>
     182/>
    246183
    247184<!-- Shrink Pickup -->
    248185
    249186<PickupRepresentation
     187    name = "smallshrinkpickup"
    250188    pickupName = "Small Shrink"
    251189    pickupDescription = "Shrinks the Ship by a bit"
    252190    spawnerTemplate = "smallshrinkpickupRepresentation"
    253191    inventoryRepresentation = "SmallShrink"
    254 >
    255     <pickup>
    256         <ShrinkPickup template=smallshrinkpickup />
    257     </pickup>
    258 </PickupRepresentation>
    259 
    260 <PickupRepresentation
     192/>
     193
     194<PickupRepresentation
     195    name = "mediumshrinkpickup"
    261196    pickupName = "Medium Shrink"
    262197    pickupDescription = "Shrinks the Ship"
    263198    spawnerTemplate = "mediumshrinkpickupRepresentation"
    264199    inventoryRepresentation = "MediumShrink"
    265 >
    266     <pickup>
    267         <ShrinkPickup template=mediumshrinkpickup />
    268     </pickup>
    269 </PickupRepresentation>
    270 
    271 <PickupRepresentation
     200/>
     201
     202<PickupRepresentation
     203    name = "hugeshrinkpickup"
    272204    pickupName = "Huge Shrink"
    273205    pickupDescription = "Shrinks the Ship considerably"
    274206    spawnerTemplate = "hugeshrinkpickupRepresentation"
    275207    inventoryRepresentation = "HugeShrink"
    276 >
    277     <pickup>
    278         <ShrinkPickup template=hugeshrinkpickup />
    279     </pickup>
    280 </PickupRepresentation>
    281 
     208/>
  • code/branches/presentation2012merge/data/levels/pickups.oxw

    r9291 r9318  
    131131    <PickupSpawner position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    132132      <pickup>
    133         <MetaPickup metaType="use" />
     133        <MetaPickup representation="use" metaType="use" />
    134134      </pickup>
    135135    </PickupSpawner>
     
    137137    <PickupSpawner position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    138138      <pickup>
    139         <MetaPickup metaType="drop" />
     139        <MetaPickup representation="drop" metaType="drop" />
    140140      </pickup>
    141141    </PickupSpawner>
     
    194194    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    195195    <PickupRepresentation
     196      name = "MediumHealth"
    196197      pickupName = "Medium Health Pack"
    197198      pickupDescription = "Once used adds a medium amout of health to the ship."
    198199      spawnerTemplate = "mediumhealthpickupRepresentation"
    199200      inventoryRepresentation = "MediumHealth"
    200     >
    201       <pickup>
    202         <HealthPickup health=500 activationType=immediate healthRate=10 durationType=continuous />
    203       </pickup>
    204     </PickupRepresentation>
     201    />
    205202
    206203    <PickupSpawner position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    207204      <pickup>
    208         <HealthPickup health=500 activationType=immediate healthRate=10 durationType=continuous />
     205        <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
    209206      </pickup>
    210207    </PickupSpawner>
  • code/branches/presentation2012merge/data/levels/presentation09b.oxw

    r9316 r9318  
    102102    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    103103    <PickupRepresentation
     104      name = "MediumHealth"
    104105      pickupName = "Medium Health Pack"
    105106      pickupDescription = "Once used adds a medium amout of health to the ship."
    106107      spawnerTemplate = "mediumhealthpickupRepresentation"
    107108      inventoryRepresentation = "MediumHealth"
    108     >
    109       <pickup>
    110         <HealthPickup health=100 activationType="onUse" durationType="once" />
    111       </pickup>
    112     </PickupRepresentation>
     109    />
    113110
    114111    <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    115112      <pickup>
    116         <HealthPickup health=100 activationType=onUse durationType=once />
     113        <HealthPickup representation="MediumHealth" health=100 activationType=onUse durationType=once />
    117114      </pickup>
    118115    </PickupSpawner>
  • code/branches/presentation2012merge/data/levels/presentationFS10.oxw

    r9016 r9318  
    148148    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    149149    <PickupRepresentation
     150      name = "MediumHealth"
    150151      pickupName = "Medium Health Pack"
    151152      pickupDescription = "Once used adds a medium amout of health to the ship."
    152153      spawnerTemplate = "mediumhealthpickupRepresentation"
    153154      inventoryRepresentation = "MediumHealth"
    154     >
    155       <pickup>
    156         <HealthPickup health=50 activationType="onUse" durationType="once" />
    157       </pickup>
    158     </PickupRepresentation>
     155    />
    159156
    160157    <PickupSpawner position="25,-75,-500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    161158      <pickup>
    162         <HealthPickup health=50 activationType=onUse durationType=once />
     159        <HealthPickup representation="MediumHealth" health=50 activationType=onUse durationType=once />
    163160      </pickup>
    164161    </PickupSpawner>
  • code/branches/presentation2012merge/data/levels/presentationHS09.oxw

    r9316 r9318  
    105105    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    106106    <PickupRepresentation
     107      name = "MediumHealth"
    107108      pickupName = "Medium Health Pack"
    108109      pickupDescription = "Once used adds a medium amout of health to the ship."
    109110      spawnerTemplate = "mediumhealthpickupRepresentation"
    110111      inventoryRepresentation = "MediumHealth"
    111     >
    112       <pickup>
    113         <HealthPickup health=100 activationType="onUse" durationType="once" />
    114       </pickup>
    115     </PickupRepresentation>
     112    />
    116113
    117114    <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    118115      <pickup>
    119         <HealthPickup health=100 activationType=onUse durationType=once />
     116        <HealthPickup representation="MediumHealth" health=100 activationType=onUse durationType=once />
    120117      </pickup>
    121118    </PickupSpawner>
  • code/branches/presentation2012merge/data/levels/templates/pickupRepresentationTemplates.oxt

    r9303 r9318  
    1919<Template name=smallshieldpickup>
    2020  <ShieldPickup
     21    representation = "smallshieldpickup"
    2122    duration = 10
    2223    shieldabsorption = 0.7
     
    4546<Template name=mediumshieldpickup>
    4647  <ShieldPickup
     48    representation = "mediumshieldpickup"
    4749    duration = 30
    4850    shieldabsorption = 0.8
     
    7274<Template name=hugeshieldpickup>
    7375  <ShieldPickup
     76    representation = "hugeshieldpickup"
    7477    duration = 60
    7578    shieldabsorption = 0.95
     
    100103<Template name=smallhealthpickup>
    101104  <HealthPickup
     105    representation = "smallhealthpickup"
    102106    health = 10
    103107    healthType = "limited"
     
    125129<Template name=mediumhealthpickup>
    126130  <HealthPickup
     131    representation = "mediumhealthpickup"
    127132    health = 50
    128133    healthType = "limited"
     
    150155<Template name=hugehealthpickup>
    151156  <HealthPickup
     157    representation = "hugehealthpickup"
    152158    health = 100
    153159    healthType = "limited"
     
    175181<Template name=crazyhealthpickup>
    176182  <HealthPickup
     183    representation = "crazyhealthpickup"
    177184    health = 1000
    178185    healthType = "permanent"
     
    236243<Template name=smalldamageboostpickup>
    237244  <DamageBoostPickup
     245    representation = "smalldamageboostpickup"
    238246    duration = 10.0
    239247    damageMultiplier = 2.0
     
    261269<Template name=mediumdamageboostpickup>
    262270  <DamageBoostPickup
     271    representation = "mediumdamageboostpickup"
    263272    duration = 10.0
    264273    damageMultiplier = 5.0
     
    286295<Template name=largedamageboostpickup>
    287296  <DamageBoostPickup
     297    representation = "largedamageboostpickup"
    288298    duration = 10.0
    289299    damageMultiplier = 7.0
     
    314324<Template name=smallspeedpickup>
    315325  <SpeedPickup
     326    representation = "smallspeedpickup"
    316327    duration = 10.0
    317328    speedAdd = 0.0
     
    340351<Template name=mediumspeedpickup>
    341352  <SpeedPickup
     353    representation = "mediumspeedpickup"
    342354    duration = 10.0
    343355    speedAdd = 0.0
     
    366378<Template name=hugespeedpickup>
    367379  <SpeedPickup
     380    representation = "hugespeedpickup"
    368381    duration = 10.0
    369382    speedAdd = 0.0
     
    392405<Template name=smalljumppickup>
    393406  <SpeedPickup
     407    representation = "smalljumppickup"
    394408    duration = 0.7
    395409    speedAdd = 5000.0
     
    420434<Template name=smallinvisiblepickup>
    421435  <InvisiblePickup
     436    representation = "smallinvisiblepickup"
    422437    duration = 5.0
    423438    activaionType = "immediate"
     
    444459<Template name=mediuminvisiblepickup>
    445460  <InvisiblePickup
     461    representation = "mediuminvisiblepickup"
    446462    duration = 10.0
    447463    activaionType = "immediate"
     
    468484<Template name=hugeinvisiblepickup>
    469485  <InvisiblePickup
     486    representation = "hugeinvisiblepickup"
    470487    duration = 20.0
    471488    activaionType = "immediate"
     
    492509<Template name=smallshrinkpickup>
    493510  <ShrinkPickup
     511    representation = "smallshrinkpickup"
    494512    duration = 10.0
    495513    shrinkFactor = 2.5
     
    517535<Template name=mediumshrinkpickup>
    518536  <ShrinkPickup
     537    representation = "mediumshrinkpickup"
    519538    duration = 30.0
    520539    shrinkFactor = 5.0
     
    542561<Template name=hugeshrinkpickup>
    543562  <ShrinkPickup
     563    representation = "hugeshrinkpickup"
    544564    duration = 60.0
    545565    shrinkFactor = 10.0
     
    570590
    571591<Template name=triplehealthspeedinvisibilitypickup>
    572     <PickupCollection>
     592    <PickupCollection
     593        representation = "triplehealthspeedinvisibilitypickup"
     594    >
    573595        <pickupables>
    574596            <HealthPickup template=mediumhealthpickup />
     
    630652
    631653<Template name=dronepickup>
    632     <DronePickup droneTemplate=droneTemplate />
    633 </Template>
    634 
     654    <DronePickup representation=dronepickup droneTemplate=droneTemplate />
     655</Template>
     656
  • code/branches/presentation2012merge/src/modules/pickup/CMakeLists.txt

    r7163 r9318  
    44  Pickup.cc
    55  PickupCollection.cc
    6   PickupCollectionIdentifier.cc
    76  PickupManager.cc
    87  PickupRepresentation.cc
  • code/branches/presentation2012merge/src/modules/pickup/Pickup.cc

    r9313 r9318  
    3636#include "core/CoreIncludes.h"
    3737#include "util/StringUtils.h"
    38 
    39 #include "pickup/PickupIdentifier.h"
    4038
    4139#include "DroppedPickup.h"
     
    8684    /**
    8785    @brief
    88         Initializes the PickupIdentififer of this Pickup.
    89     */
    90     void Pickup::initializeIdentifier(void)
    91     {
    92         this->pickupIdentifier_->addParameter("activationType", this->getActivationType());
    93         this->pickupIdentifier_->addParameter("durationType", this->getDurationType());
    94     }
    95 
    96     /**
    97     @brief
    9886        Method for creating a Pickup object through XML.
    9987    */
     
    10290        SUPER(Pickup, XMLPort, xmlelement, mode);
    10391
     92        XMLPortParam(Pickup, "representation", setRepresentationName, getRepresentationName, xmlelement, mode);
    10493        XMLPortParam(Pickup, "activationType", setActivationTypeAsString, getActivationTypeAsString, xmlelement, mode);
    10594        XMLPortParam(Pickup, "durationType", setDurationTypeAsString, getDurationTypeAsString, xmlelement, mode);
    106 
    107         this->initializeIdentifier();
    10895    }
    10996
     
    206193
    207194        Pickup* pickup = orxonox_cast<Pickup*>(item);
     195        pickup->setRepresentationName(this->getRepresentationName());
    208196        pickup->setActivationType(this->getActivationType());
    209197        pickup->setDurationType(this->getDurationType());
    210 
    211         pickup->initializeIdentifier();
    212198    }
    213199
  • code/branches/presentation2012merge/src/modules/pickup/Pickup.h

    r9313 r9318  
    105105            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    106106
     107            virtual const std::string& getRepresentationName() const
     108                { return this->representationName_; }
     109
    107110            /**
    108111            @brief Get the activation type of the Pickup.
     
    150153
    151154        protected:
    152             void initializeIdentifier(void);
     155            virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    153156
    154             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     157            /**
     158            @brief Sets the representation name which refers to the name of the PickupRepresentation that is used to represent this pickup.
     159            */
     160            inline void setRepresentationName(const std::string& name)
     161                { this->representationName_ = name; }
    155162
    156163            /**
     
    173180            void initialize(void); //!< Initializes the member variables.
    174181
     182            std::string representationName_; //!< The name of the associated PickupRepresentation.
    175183            pickupActivationType::Value activationType_; //!< The activation type of the Pickup.
    176184            pickupDurationType::Value durationType_; //!< The duration type of the Pickup.
  • code/branches/presentation2012merge/src/modules/pickup/PickupCollection.cc

    r9296 r9318  
    3939#include "CollectiblePickup.h"
    4040#include "DroppedPickup.h"
    41 #include "PickupCollectionIdentifier.h"
    4241
    4342#include "PickupCollection.h"
     
    5453        The creator of the object.
    5554    */
    56     PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator), pickupCollectionIdentifier_(NULL)
     55    PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator)
    5756    {
    5857        RegisterObject(PickupCollection);
    5958
    60         this->pickupCollectionIdentifier_ = new PickupCollectionIdentifier(this);
    6159        this->processingUsed_ = false;
    6260        this->processingPickedUp_ = false;
     
    7674        }
    7775        this->pickups_.clear();
    78 
    79         if(this->pickupCollectionIdentifier_ != NULL)
    80             this->pickupCollectionIdentifier_->destroy();
    8176    }
    8277
     
    8984        SUPER(PickupCollection, XMLPort, xmlelement, mode);
    9085
     86        XMLPortParam(PickupCollection, "representation", setRepresentationName, getRepresentationName, xmlelement, mode);
    9187        XMLPortObject(PickupCollection, CollectiblePickup, "pickupables", addPickupable, getPickupable, xmlelement, mode);
    9288    }
     
    217213
    218214        PickupCollection* pickup = orxonox_cast<PickupCollection*>(item);
     215        pickup->setRepresentationName(this->getRepresentationName());
    219216        // Clone all Pickupables this PickupCollection consist of.
    220217        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
     
    243240
    244241        return true;
    245     }
    246 
    247     /**
    248     @brief
    249         Get the PickupIdentifier of this PickupCollection.
    250         This is in fact the PickupCollectionIdentifier.
    251     @return
    252         Returns a pointer to the PickupIdentifier of this PickupCollection.
    253     */
    254     const PickupIdentifier* PickupCollection::getPickupIdentifier(void) const
    255     {
    256         return this->pickupCollectionIdentifier_;
    257242    }
    258243
  • code/branches/presentation2012merge/src/modules/pickup/PickupCollection.h

    r9295 r9318  
    5050        The PickupCollection combines different @ref orxonox::Pickupable "Pickupables" (more precisely @ref orxonox::CollectiblePickup "CollectiblePickups") to a coherent, single pickup and makes them seem (from the outside looking in) just as if they were just one @ref orxonox::Pickupable "Pickupable".
    5151
    52         To differentiate between different types of @ref orxonox::PickupCollection "PickupCollections" (just as we differentiate between different types of @ref orxonox::Pickupable "Pickupables") we define a new identifyer called the @ref orxonox::PickupCollectionIdentifier "PickupCollectionIdentifier" which has pretty much the same properties as the @ref orxonox::PickupIdentifier "PickupIdentifier" but extende to @ref orxonox::PickupCollection "PickupCollections".
    53 
    5452        A PickupCollection can be created in XML as follows:
    5553        @code
     
    8583            virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
    8684
    87             virtual const PickupIdentifier* getPickupIdentifier(void) const; //!< Get the PickupIdentifier of this PickupCollection.
     85            inline void setRepresentationName(const std::string& name)
     86                { this->representationName_ = name; }
     87            virtual const std::string& getRepresentationName() const
     88                { return this->representationName_; }
    8889
    8990            bool addPickupable(CollectiblePickup* pickup); //!< Add the input Pickupable to list of Pickupables combined by this PickupCollection.
     
    101102            virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    102103
    103             PickupCollectionIdentifier* pickupCollectionIdentifier_; //!< The PickupCollectionIdentifier of this PickupCollection. Is used to distinguish different PickupCollections amongst themselves.
    104 
    105104        private:
    106105            void changedUsedAction(void); //!< Helper method.
     
    108107            void pickupsChanged(void); //!< Helper method.
    109108
     109            std::string representationName_; //!< The name of the associated PickupRepresentation.
    110110            std::list<CollectiblePickup*> pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid.
    111111
  • code/branches/presentation2012merge/src/modules/pickup/PickupManager.cc

    r8858 r9318  
    8787
    8888        this->representations_.clear();
    89         this->representationsNetworked_.clear();
    9089
    9190        // Destroying all the PickupInventoryContainers that are still there.
     
    106105    /**
    107106    @brief
    108         Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents, on the server (or in standalone mode).
    109         For every type of Pickupable (uniquely identified by a PickupIdentifier) there can be one (and just one) PickupRepresentation registered.
    110     @param identifier
    111         The PickupIdentifier identifying the Pickupable.
     107        Registers a PickupRepresentation.
     108    @param name
     109        The representation's name.
    112110    @param representation
    113111        A pointer to the PickupRepresentation.
     
    115113        Returns true if successful and false if not.
    116114    */
    117     bool PickupManager::registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
    118     {
    119         assert(identifier);
     115    bool PickupManager::registerRepresentation(const std::string& name, PickupRepresentation* representation)
     116    {
    120117        assert(representation);
    121118
    122119        // If the list is not empty and Pickupable already has a Representation registered.
    123         if(!this->representations_.empty() && this->representations_.find(identifier) != this->representations_.end())
     120        if(!this->representations_.empty() && this->representations_.find(name) != this->representations_.end())
    124121            return false;
    125122
    126         this->representations_[identifier] = representation;
     123        this->representations_[name] = representation;
    127124
    128125        orxout(verbose, context::pickups) << "PickupRepresentation &" << representation << " registered with the PickupManager." << endl;
     
    132129    /**
    133130    @brief
    134         Unegisters a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents, on the server (or in standalone mode).
    135     @param identifier
    136         The PickupIdentifier identifying the Pickupable.
    137     @param representation
    138         A pointer to the PickupRepresentation.
     131        Unegisters a PickupRepresentation.
     132    @param name
     133        The representation's name.
    139134    @return
    140135        Returns true if successful and false if not.
    141136    */
    142     bool PickupManager::unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
    143     {
    144         assert(identifier);
    145         assert(representation);
    146 
    147         std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare>::iterator it = this->representations_.find(identifier);
     137    bool PickupManager::unregisterRepresentation(const std::string& name)
     138    {
     139        std::map<std::string, PickupRepresentation*>::iterator it = this->representations_.find(name);
    148140        if(it == this->representations_.end()) // If the Pickupable is not registered in the first place.
    149141            return false;
     
    151143        this->representations_.erase(it);
    152144
    153         orxout(verbose, context::pickups) << "PickupRepresentation &" << representation << " unregistered with the PickupManager." << endl;
     145        orxout(verbose, context::pickups) << "PickupRepresentation &" << name << " unregistered with the PickupManager." << endl;
    154146        return true;
    155147    }
     
    157149    /**
    158150    @brief
    159         Registers a PickupRepresentation on the host it was created.
    160     @param representation
    161         A pointer to the PickupRepresentation.
    162     @return
    163         Returns true if successful, false if not.
    164     */
    165     bool PickupManager::registerRepresentation(PickupRepresentation* representation)
    166     {
    167         assert(representation);
    168 
    169         // If the list is not empty and PickupRepresentation is already registered.
    170         if(!this->representationsNetworked_.empty() && this->representationsNetworked_.find(representation->getObjectID()) != this->representationsNetworked_.end())
    171             return false;
    172 
    173         this->representationsNetworked_[representation->getObjectID()] = representation;
    174         return true;
    175     }
    176 
    177     /**
    178     @brief
    179         Unregisters a PickupRepresentation on the host it is being destroyed (which is the same host on which it was created).
    180     @param representation
    181         A pointer to the Pickuprepresentation.
    182     @return
    183         Returns true if successful, false if not.
    184     */
    185     bool PickupManager::unregisterRepresentation(PickupRepresentation* representation)
    186     {
    187         assert(representation);
    188 
    189         std::map<uint32_t, PickupRepresentation*>::iterator it = this->representationsNetworked_.find(representation->getObjectID());
    190         if(it == this->representationsNetworked_.end()) // If the Pickupable is not registered in the first place.
    191             return false;
    192 
    193         this->representationsNetworked_.erase(it);
    194         return true;
    195     }
    196 
    197     /**
    198     @brief
    199         Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
    200     @param identifier
    201         The PickupIdentifier.
     151        Get the PickupRepresentation with the given name.
     152    @param name
     153        The name of the PickupRepresentation.
    202154    @return
    203155        Returns a pointer to the PickupRepresentation.
    204156    */
    205     PickupRepresentation* PickupManager::getRepresentation(const PickupIdentifier* identifier)
    206     {
    207         std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare>::iterator it = this->representations_.find(identifier);
    208         if(it == this->representations_.end()) // If there is no PickupRepresentation associated with the input PickupIdentifier.
     157    PickupRepresentation* PickupManager::getRepresentation(const std::string& name)
     158    {
     159        std::map<std::string, PickupRepresentation*>::iterator it = this->representations_.find(name);
     160        if(it == this->representations_.end()) // If there is no PickupRepresentation associated with the input name.
    209161        {
    210162            orxout(verbose, context::pickups) << "PickupManager::getRepresentation() returned default representation." << endl;
     
    353305        {
    354306            // If there is no PickupRepresentation registered the default representation is used.
    355             if(this->representations_.find(pickup->getPickupIdentifier()) == this->representations_.end())
    356                 PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
     307            if(this->representations_.find(pickup->getRepresentationName()) == this->representations_.end())
     308                PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickup->getRepresentationName(), pickedUp);
    357309            else
    358                 PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->representations_[pickup->getPickupIdentifier()]->getObjectID(), pickedUp);
     310                PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickup->getRepresentationName(), pickedUp);
    359311        }
    360312        // If the concerned host is somewhere in the network, we call pickupChangedPickedUpNetwork() on its PickupManager.
     
    362314        {
    363315            // If there is no PickupRepresentation registered the default representation is used.
    364             if(this->representations_.find(pickup->getPickupIdentifier()) == this->representations_.end())
     316            if(this->representations_.find(pickup->getRepresentationName()) == this->representations_.end())
    365317            {
    366318                callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
     
    368320            else
    369321            {
    370                 callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getPickupIdentifier()]->getObjectID(), pickedUp);
     322                callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickedUp);
    371323            }
    372324        }
     
    388340        The pickedUp status the Pickupable changed to.
    389341    */
    390     /*static*/ void PickupManager::pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, bool pickedUp)
     342    /*static*/ void PickupManager::pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, const std::string& representationName, bool pickedUp)
    391343    {
    392344        PickupManager& manager = PickupManager::getInstance(); // Get the PickupManager singleton on this host.
     
    402354            container->unusable = false;
    403355            container->representationObjectId = representationObjectId;
     356            container->representationName = representationName;
    404357            // Insert the container into the pickupInventoryContainers_ list.
    405358            manager.pickupInventoryContainers_.insert(std::pair<uint32_t, PickupInventoryContainer*>(pickup, container));
     
    417370            manager.updateGUI(); // Tell the PickupInventory that something has changed.
    418371        }
    419     }
    420 
    421     /**
    422     @brief
    423         Get the PickupRepresentation of an input Pickupable.
    424         This method spares us the hassle to export the PickupIdentifier class to lua.
    425     @param pickup
    426         The number identifying the Pickupable whose PickupRepresentation should be returned.
    427     @return
    428         Returns the PickupRepresentation of the input Pickupable or NULL if an error occurred.
    429     */
    430     orxonox::PickupRepresentation* PickupManager::getPickupRepresentation(uint32_t pickup)
    431     {
    432         // Clear and rebuild the representationsNetworked_ list.
    433         //TODO: Better solution?
    434         this->representationsNetworked_.clear();
    435         for(ObjectList<PickupRepresentation>::iterator it = ObjectList<PickupRepresentation>::begin(); it != ObjectList<PickupRepresentation>::end(); ++it)
    436             this->representationsNetworked_[it->getObjectID()] = *it;
    437 
    438         // Get the container belonging to the input pickup, if not found return the default representation.
    439         std::map<uint32_t, PickupInventoryContainer*>::iterator it = this->pickupInventoryContainers_.find(pickup);
    440         if(it == this->pickupInventoryContainers_.end())
    441             return this->defaultRepresentation_;
    442 
    443         // Get the PickupRepresentation of the input pickup (through the objecId of the representation stored in the PickupInventoryContainer belonging to the pickup), if not found return the default representation.
    444         std::map<uint32_t, PickupRepresentation*>::iterator it2 = this->representationsNetworked_.find(it->second->representationObjectId);
    445         if(it2 == this->representationsNetworked_.end())
    446             return this->defaultRepresentation_;
    447 
    448         return it2->second;
    449372    }
    450373
  • code/branches/presentation2012merge/src/modules/pickup/PickupManager.h

    r8706 r9318  
    4141#include "core/WeakPtr.h"
    4242
    43 #include "pickup/PickupIdentifier.h"
    44 
    4543#include "PickupRepresentation.h"
    4644
     
    6765        bool unusable; //!< Whether the @ref orxonox::Pickupable "Pickupable" is droppable.
    6866        uint32_t representationObjectId; //!< The objectId of the @ref orxonox::PickupRepresentation "PickupRepresentation" that represents the @ref orxonox::Pickupable "Pickupable".
     67        std::string representationName; //!< The name of the associated PickupRepresentation
    6968    };
    7069    // tolua_end
     
    7473        The PickupManager class manages @ref orxonox::Pickupable "Pickupables".
    7574
    76         It has in essence two tasks to fulfill. Firstly it must link @ref orxonox::Pickupable "Pickupables" (through their @ref orxonox::PickupIdentifier "PickupIdentifiers") to their respective @ref orxonox::PickupRepresentation "PickupRepresentations". Secondly it manages the PickupInventory. (The PickupInventory is the GUI that displays @ref orxonox::Pickupable "Pickupables" for the covenience of the user.)
     75        It has in essence two tasks to fulfill. Firstly it must link @ref orxonox::Pickupable "Pickupables" (through their representation-name attribute) to the respective @ref orxonox::PickupRepresentation "PickupRepresentations". Secondly it manages the PickupInventory. (The PickupInventory is the GUI that displays @ref orxonox::Pickupable "Pickupables" for the covenience of the user.)
    7776
    7877        @section PickupManagerTechnicalDetails Technical details
     
    8685
    8786        Firstly there are a number of lists (where by list I really mean any kind of ordered data structure) kept.
    88         - The @ref orxonox::PickupManager::representations_ "representations_" list links @ref orxonox::PickupRepresentation "PickupRepresentations" with @ref orxonox::PickupIdentifier "PickupIdentifiers" and can be used to get the @ref orxonox::PickupRepresentation "PickupRepresentation" for a given @ref orxonox::Pickupable "Pickupable". It is only populated on the server (or in standalone mode). Each @ref orxonox::PickupRepresentation "PickupRepresentation" that is generated through XML registers itself with the PickupManager and is thereby added to the list.
    89         - The @ref orxonox::PickupManager::representationsNetworked_ "representationsNetworked_" list is the networked (hence the name) equivalent to the @ref orxonox::PickupManager::representations_ "representations_" list. It links an objectId of a @ref orxonox::PickupRepresentation "PickupRepresentation" to a @ref orxonox::PickupRepresentation "PickupRepresentation". This list is maintained on all hosts, each representation registers itself (in its constructor) with the PickupManager. Since the representations are synchronised they are created on each host. The "same" instance on each host is identified by the same objectId and that is why we store the representations with the objectId as key. We can then use this list to get a @ref orxonox::PickupRepresentation "PickupRepresentation" for a specific @ref orxonox::Pickupable "Pickupable" (or more precisely a number identifiying that particular pickup, but we'll see that, when we look at the next list) on a client to be used in the PickupInventory.
     87        - The @ref orxonox::PickupManager::representations_ "representations_" list links @ref orxonox::PickupRepresentation "PickupRepresentations" with its name and can be used to get the @ref orxonox::PickupRepresentation "PickupRepresentation" for a given @ref orxonox::Pickupable "Pickupable". It is only populated on the server (or in standalone mode). Each @ref orxonox::PickupRepresentation "PickupRepresentation" that is generated through XML registers itself with the PickupManager and is thereby added to the list.
    9088        - The @ref orxonox::PickupManager::pickupInventoryContainers_ "pickupInventoryContainers_" list links a number identifying a @ref orxonox::Pickupable "Pickupable" to a data structure (the @ref orxonox::PickupInventoryContainer "PickupInventoryContainer"), which contains all necessary information about that @ref orxonox::Pickupable "Pickupable". This list is maintained on all hosts, a new container is inserted when a @ref orxonox::Pickupable "Pickupable" is picked up, but only if it has been picked up by the repsective host. This list is then used by the PickupInventory to access the required information and to get the correct @ref orxonox::PickupRepresentation "PickupRepresentation".
    9189        - The @ref orxonox::PickupManager::pickups_ "pickups_" list links a number identifiying a @ref orxonox::Pickupable "Pickupable" to a (weak pointer to a) @ref orxonox::Pickupable "Pickupable". It is only maintained by the server (or in standalone mode), to be able to use, unuse and drop @ref orxonox::Pickupable "Pickupables" through the PickupInventory. Since @ref orxonox::Pickupable "Pickupables" only exist on the server a client that wants to change a pickups status has so send a request over the network (with the number identifying the pickup) to the server and then the server facilitates the change, using this list to map from the identifyer to the actual @ref orxonox::Pickupable "Pickupable".
     
    114112            static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export
    115113
    116             bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
    117             bool unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Unegisters a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
     114            bool registerRepresentation(const std::string& name, PickupRepresentation* representation);
     115            bool unregisterRepresentation(const std::string& name);
    118116
    119             bool registerRepresentation(PickupRepresentation* representation); //!< Registers a PickupRepresentation on the host it was created.
    120             bool unregisterRepresentation(PickupRepresentation* representation); //!< Unregisters a PickupRepresentation on the host it is being destroyed.
    121 
    122             PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
     117            PickupRepresentation* getRepresentation(const std::string& name); // tolua_export
    123118
    124119            virtual void pickupChangedUsed(Pickupable* pickup, bool used); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input used state.
    125120            static void pickupChangedUsedNetwork(uint32_t pickup, bool inUse, bool usable, bool unusable); //!< Helper method to react to the change in the used status of a Pickupable.
    126121            virtual void pickupChangedPickedUp(Pickupable* pickup, bool pickedUp); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input pickedUp state.
    127             static void pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, bool pickedUp); //!< Helper method to react to the change in the pickedUp status of a Pickupable.
     122            static void pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, const std::string& representationName, bool pickedUp); //!< Helper method to react to the change in the pickedUp status of a Pickupable.
    128123
    129124        // Methods to be used by the PickupInventory.
    130125        public:
    131126            // tolua_begin
    132             orxonox::PickupRepresentation* getPickupRepresentation(uint32_t pickup); //!< Get the PickupRepresentation of an input indentifier for Pickupable.
    133 
    134127            int getNumPickups(void); //!< Get the number of pickups currently picked up by the player.
    135128            /**
     
    163156            PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation.
    164157
    165             std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types of Pickupables) and PickupRepresentations.
    166             std::map<uint32_t, PickupRepresentation*> representationsNetworked_; //!< Map linking the PickupRepresentation's objectId to the PickupRepresentation itself. It is used for networking purposes.
     158            std::map<std::string, PickupRepresentation*> representations_; //!< Map linking PickupRepresentations and their names.
    167159
    168160            std::map<uint32_t, PickupInventoryContainer*> pickupInventoryContainers_; //!< Map linking a number identifying a Pickupable to a PickupInventoryContainer, which contains all necessary information about that Pickupable.
  • code/branches/presentation2012merge/src/modules/pickup/PickupPrereqs.h

    r9269 r9318  
    7373    class Pickup;
    7474    class PickupCollection;
    75     class PickupCollectionIdentifier;
    7675    class PickupManager;
    7776    class PickupRepresentation;
  • code/branches/presentation2012merge/src/modules/pickup/PickupRepresentation.cc

    r9302 r9318  
    5252        This is primarily for use of the PickupManager in creating a default PickupRepresentation.
    5353    */
    54     PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL), pickup_(NULL)
     54    PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL)
    5555    {
    5656        RegisterObject(PickupRepresentation);
     
    6464        Default Constructor. Registers the object and initializes its member variables.
    6565    */
    66     PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), spawnerRepresentation_(NULL), pickup_(NULL)
     66    PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), spawnerRepresentation_(NULL)
    6767    {
    6868        RegisterObject(PickupRepresentation);
     
    7070        this->initialize();
    7171        this->registerVariables();
    72 
    73         PickupManager::getInstance().registerRepresentation(this); // Registers the PickupRepresentation with the PickupManager.
    7472    }
    7573
     
    8482
    8583        if(this->isInitialized())
    86         {
    87             if(GameMode::isMaster() && this->pickup_ != NULL)
    88             {
    89                 PickupManager::getInstance().unregisterRepresentation(this->pickup_->getPickupIdentifier(), this);
    90             }
    91             PickupManager::getInstance().unregisterRepresentation(this);
    92         }
     84            PickupManager::getInstance().unregisterRepresentation(this->getName());
    9385    }
    9486
     
    128120        XMLPortParam(PickupRepresentation, "spawnerTemplate", setSpawnerTemplate, getSpawnerTemplate, xmlelement, mode);
    129121        XMLPortParam(PickupRepresentation, "inventoryRepresentation", setInventoryRepresentation, getInventoryRepresentation, xmlelement, mode);
    130         XMLPortObject(PickupRepresentation, Pickupable, "pickup", setPickup, getPickup, xmlelement, mode);
    131122        XMLPortObject(PickupRepresentation, StaticEntity, "spawner-representation", setSpawnerRepresentation, getSpawnerRepresentationIndex, xmlelement, mode);
    132 
    133         if(GameMode::isMaster())
    134         {
    135             // Registers the PickupRepresentation with the PickupManager through the PickupIdentifier of the Pickupable it represents.
    136             PickupManager::getInstance().registerRepresentation(this->pickup_->getPickupIdentifier(), this);
    137         }
    138 
    139         if(this->spawnerRepresentation_ != NULL)
    140             this->spawnerRepresentation_->setVisible(false);
    141123
    142124        orxout(verbose, context::pickups) << "PickupRepresentation created: name: '" << this->name_ << "', description: '" << this->description_ << "', spawnerTemplate: '" << this->spawnerTemplate_ << "'." << endl;
     
    172154    }
    173155
     156    void PickupRepresentation::changedName()
     157    {
     158        // Registers the PickupRepresentation with the PickupManager.
     159        PickupManager::getInstance().unregisterRepresentation(this->getOldName());
     160        PickupManager::getInstance().registerRepresentation(this->getName(), this);
     161    }
     162
     163    void PickupRepresentation::setSpawnerRepresentation(StaticEntity* representation)
     164    {
     165        this->spawnerRepresentation_ = representation;
     166        if(this->spawnerRepresentation_ != NULL)
     167            this->spawnerRepresentation_->setVisible(false);
     168    }
     169
    174170    /**
    175171    @brief
  • code/branches/presentation2012merge/src/modules/pickup/PickupRepresentation.h

    r9302 r9318  
    4141
    4242#include "interfaces/Pickupable.h"
    43 #include "pickup/PickupIdentifier.h"
    4443#include "worldentities/StaticEntity.h"
    4544
     
    5453    /**
    5554    @brief
    56         The PickupRepresentation class represents a specific pickup type (identified by its @ref orxonox::PickupIdentifier "PickupIdentifier"). It defines the information displayed in the GUI (PickupInventory) and how @ref orxonox::PickupSpawner "PickupSpawners" that spawn the pickup type look like.
     55        The PickupRepresentation class represents a specific pickup type. It defines the information displayed in the GUI (PickupInventory) and how @ref orxonox::PickupSpawner "PickupSpawners" that spawn the pickup type look like.
    5756        They are created through XML and are registered with the @ref orxonox::PickupManager "PickupManager".
    5857
     
    6463            spawnerTemplate = "awesomePickupRepresentation"
    6564            inventoryRepresentation = "AwesomePickup"
    66         >
    67             <pickup>
    68                 <SomePickup />
    69             </pickup>
    70         </PickupRepresentation>
     65        />
    7166        @endcode
    7267        As you might have noticed, there is a parameter called <em>spawnerTemplate</em> and also another parameter called <em>inventoryRepresentation</em>. Let's first explain the second one, <em>inventoryRepresentation</em>.
     
    133128            */
    134129            inline const std::string& getInventoryRepresentation(void) const { return this->inventoryRepresentation_; } // tolua_export
    135             /**
    136             @brief Get the Pickupable represented by this PickupRepresentation.
    137             @param index The index.
    138             @return Returns (for index = 0) a pointer to the Pickupable. For index > 0 it returns NULL.
    139             */
    140             inline const Pickupable* getPickup(unsigned int index) const
    141                 { if(index == 0) return this->pickup_; return NULL; }
     130
     131            virtual void changedName();
    142132
    143133            StaticEntity* createSpawnerRepresentation(PickupSpawner* spawner); //!< Create a spawnerRepresentation for a specific PickupSpawner.
     
    168158            @param representation A pointer to the StaticEntity that is the spawnerRepresentation of this PickupRepresentation.
    169159            */
    170             inline void setSpawnerRepresentation(StaticEntity* representation)
    171                 { this->spawnerRepresentation_ = representation; }
     160            void setSpawnerRepresentation(StaticEntity* representation);
     161
    172162            /**
    173163            @brief Set the image representing the pickup in the PickupInventory.
     
    176166            inline void setInventoryRepresentation(const std::string& image)
    177167                { this->inventoryRepresentation_ = image; }
    178             /**
    179             @brief Set the Pickupable that is represented by this PickupRepresentation.
    180             @param pickup A pointer to the Pickupable.
    181             */
    182             inline void setPickup(Pickupable* pickup)
    183                 { this->pickup_ = pickup; }
    184168
    185169        private:
     
    195179            std::string inventoryRepresentation_; //!< The name of an image representing the pickup in the PickupInventory.
    196180
    197             Pickupable* pickup_; //!< The Pickupable that is represented by this PickupRepresentation.
    198 
    199181    }; // tolua_export
    200182
  • code/branches/presentation2012merge/src/modules/pickup/PickupSpawner.cc

    r9302 r9318  
    9595        else
    9696        {
    97             PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(this->pickup_->getPickupIdentifier());
     97            PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(this->pickup_->getRepresentationName());
    9898            this->attach(representation->createSpawnerRepresentation(this));
    9999            this->setActive(true);
     
    149149        else
    150150        {
    151             PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(this->pickup_->getPickupIdentifier());
     151            PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(this->pickup_->getRepresentationName());
    152152            this->attach(representation->createSpawnerRepresentation(this));
    153153            this->setActive(true);
  • code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc

    r9305 r9318  
    3838#include "core/XMLPort.h"
    3939
    40 #include "pickup/PickupIdentifier.h"
    4140#include "worldentities/pawns/SpaceShip.h"
    4241
     
    7877    /**
    7978    @brief
    80         Initializes the PickupIdentifier of this pickup.
    81     */
    82     void DamageBoostPickup::initializeIdentifier(void)
    83     {
    84         this->pickupIdentifier_->addParameter("duration", this->getDuration());
    85         this->pickupIdentifier_->addParameter("damageMultiplier", this->getDamageMultiplier());
    86     }
    87 
    88     /**
    89     @brief
    9079        Method for creating a DamageBoostPickup object through XML.
    9180    */
     
    9685        XMLPortParam(DamageBoostPickup, "duration", setDuration, getDuration, xmlelement, mode);
    9786        XMLPortParam(DamageBoostPickup, "damageMultiplier", setDamageMultiplier, getDamageMultiplier, xmlelement, mode);
    98 
    99         this->initializeIdentifier();
    10087    }
    10188
     
    196183        pickup->setDuration(this->getDuration());
    197184        pickup->setDamageMultiplier(this->getDamageMultiplier());
    198         pickup->initializeIdentifier();
    199185    }
    200186
  • code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h

    r9272 r9318  
    7979
    8080        protected:
    81             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    8281            void setDamageMultiplier(float damageMultiplier); //!< Sets the DamageMultiplier according to the XML.
    8382
  • code/branches/presentation2012merge/src/modules/pickup/items/DronePickup.cc

    r9313 r9318  
    3939
    4040#include "controllers/DroneController.h"
    41 #include "pickup/PickupIdentifier.h"
    4241#include "worldentities/Drone.h"
    4342#include "worldentities/pawns/Pawn.h"
     
    8180    /**
    8281    @brief
    83         Initializes the PickupIdentifier of this pickup.
    84     */
    85     void DronePickup::initializeIdentifier(void)
    86     {
    87         this->pickupIdentifier_->addParameter("droneTemplate", this->getDroneTemplate());
    88     }
    89 
    90     /**
    91     @brief
    9282        Method for creating a DronePickup object through XML.
    9383    */
     
    9686        SUPER(DronePickup, XMLPort, xmlelement, mode);
    9787        XMLPortParam(DronePickup, "droneTemplate", setDroneTemplate, getDroneTemplate, xmlelement, mode);
    98 
    99         this->initializeIdentifier();
    10088    }
    10189
     
    198186        DronePickup* pickup = orxonox_cast<DronePickup*>(item);
    199187        pickup->setDroneTemplate(this->getDroneTemplate());
    200 
    201         pickup->initializeIdentifier();
    202188    }
    203189}
  • code/branches/presentation2012merge/src/modules/pickup/items/DronePickup.h

    r9312 r9318  
    7575
    7676        protected:
    77             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    78 
    7977            void setDroneTemplate(const std::string& templatename); //!< Set the droneTemplate.
    8078
  • code/branches/presentation2012merge/src/modules/pickup/items/HealthPickup.cc

    r9312 r9318  
    3838#include "core/XMLPort.h"
    3939
    40 #include "pickup/PickupIdentifier.h"
    4140#include "worldentities/pawns/Pawn.h"
    4241
     
    8786    /**
    8887    @brief
    89         Initializes the PickupIdentifier of this pickup.
    90     */
    91     void HealthPickup::initializeIdentifier(void)
    92     {
    93         this->pickupIdentifier_->addParameter("health", this->getHealth());
    94         this->pickupIdentifier_->addParameter("healthType", this->getHealthType());
    95         this->pickupIdentifier_->addParameter("healthRate", this->getHealthRate());
    96     }
    97 
    98     /**
    99     @brief
    10088        Method for creating a HealthPickup object through XML.
    10189    */
     
    11098        if(!this->isContinuous())
    11199            this->setHealthRate(0.0f); // TODO: this logic should be inside tick(), not in XMLPort
    112 
    113         this->initializeIdentifier();
    114100    }
    115101
     
    277263        pickup->setHealthRate(this->getHealthRate());
    278264        pickup->setHealthType(this->getHealthType());
    279 
    280         pickup->initializeIdentifier();
    281265    }
    282266
  • code/branches/presentation2012merge/src/modules/pickup/items/HealthPickup.h

    r9312 r9318  
    121121
    122122        protected:
    123             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    124 
    125123            void setHealth(float health); //!< Sets the health.
    126124            void setHealthRate(float speed); //!< Set the rate at which health is transferred if the pickup is continuous.
  • code/branches/presentation2012merge/src/modules/pickup/items/InvisiblePickup.cc

    r9305 r9318  
    4040#include "core/XMLPort.h"
    4141
    42 #include "pickup/PickupIdentifier.h"
    4342#include "worldentities/pawns/Pawn.h"
    4443
     
    7978    /**
    8079    @brief
    81         Initializes the PickupIdentifier of this pickup.
    82     */
    83     void InvisiblePickup::initializeIdentifier(void)
    84     {
    85         this->pickupIdentifier_->addParameter("duration", this->getDuration());
    86     }
    87 
    88     /**
    89     @brief
    9080        Method for creating a HealthPickup object through XML.
    9181    */
     
    9484        SUPER(InvisiblePickup, XMLPort, xmlelement, mode);
    9585        XMLPortParam(InvisiblePickup, "duration", setDuration, getDuration, xmlelement, mode);
    96 
    97         this->initializeIdentifier();
    9886    }
    9987
     
    157145        InvisiblePickup* pickup = orxonox_cast<InvisiblePickup*>(item);
    158146        pickup->setDuration(this->getDuration());
    159         pickup->initializeIdentifier();
    160147    }
    161148
  • code/branches/presentation2012merge/src/modules/pickup/items/InvisiblePickup.h

    r7547 r9318  
    7272            InvisiblePickup(BaseObject* creator); //!< Constructor.
    7373            virtual ~InvisiblePickup(); //!< Destructor.
    74            
     74
    7575            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML.
    7676            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
     
    9191
    9292        protected:
    93             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    94 
    9593            bool setInvisible(bool invisibility); //!< Set the Pawn to be invisible or visible again.
    9694            void setDuration(float duration); //!< Sets the time the InvisibilityPickup will last.
  • code/branches/presentation2012merge/src/modules/pickup/items/MetaPickup.cc

    r9313 r9318  
    3636
    3737#include "interfaces/PickupCarrier.h"
    38 #include "pickup/PickupIdentifier.h"
    3938#include "worldentities/pawns/Pawn.h"
    4039
     
    8685    /**
    8786    @brief
    88         Helper method to initialize the PickupIdentifier.
    89     */
    90     void MetaPickup::initializeIdentifier(void)
    91     {
    92         this->pickupIdentifier_->addParameter("metaType", this->getMetaType());
    93     }
    94 
    95     /**
    96     @brief
    9787        Method for creating a MetaPickup object through XML.
    9888    */
     
    10292
    10393        XMLPortParam(MetaPickup, "metaType", setMetaTypeAsString, getMetaTypeAsString, xmlelement, mode);
    104 
    105         this->initializeIdentifier();
    10694    }
    10795
     
    172160        MetaPickup* pickup = orxonox_cast<MetaPickup*>(item);
    173161        pickup->setMetaType(this->getMetaType());
    174 
    175         pickup->initializeIdentifier();
    176162    }
    177163
  • code/branches/presentation2012merge/src/modules/pickup/items/MetaPickup.h

    r9312 r9318  
    106106
    107107        protected:
    108             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    109 
    110108            /**
    111109            @brief Set the meta type of the MetaPickup.
  • code/branches/presentation2012merge/src/modules/pickup/items/ShieldPickup.cc

    r9305 r9318  
    3838#include "core/XMLPort.h"
    3939
    40 #include "pickup/PickupIdentifier.h"
    4140#include "worldentities/pawns/Pawn.h"
    4241
     
    8079    /**
    8180    @brief
    82         Initializes the PickupIdentifier of this pickup.
    83     */
    84     void ShieldPickup::initializeIdentifier(void)
    85     {
    86         this->pickupIdentifier_->addParameter("duration", this->getDuration());
    87         this->pickupIdentifier_->addParameter("ShieldHealth", this->getShieldHealth());
    88         this->pickupIdentifier_->addParameter("ShieldAbsorption", this->getShieldAbsorption());
    89     }
    90 
    91     /**
    92     @brief
    9381        Method for creating a ShieldPickup object through XML.
    9482    */
     
    10088        XMLPortParam(ShieldPickup, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode);
    10189        XMLPortParam(ShieldPickup, "duration", setDuration, getDuration, xmlelement, mode);
    102 
    103         this->initializeIdentifier();
    10490    }
    10591
     
    188174        pickup->setShieldAbsorption(this->getShieldAbsorption());
    189175        pickup->setShieldHealth(this->getShieldHealth());
    190         pickup->initializeIdentifier();
    191176    }
    192177
  • code/branches/presentation2012merge/src/modules/pickup/items/ShieldPickup.h

    r7547 r9318  
    104104
    105105        protected:
    106             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    107106            void pickupTimerCallback(void); //!< Helper method. Is called by the Timer as soon as it expires.
    108107
  • code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc

    r9305 r9318  
    4040#include "core/XMLPort.h"
    4141
    42 #include "pickup/PickupIdentifier.h"
    4342#include "worldentities/pawns/Pawn.h"
    4443
     
    8180    }
    8281
    83     void ShrinkPickup::initializeIdentifier(void)
    84     {
    85         this->pickupIdentifier_->addParameter("shrinkFactor", this->getShrinkFactor());
    86         this->pickupIdentifier_->addParameter("duration", this->getDuration());
    87         this->pickupIdentifier_->addParameter("shrinkDuration", this->getShrinkDuration());
    88     }
    89 
    9082   /**
    9183    @brief
     
    9991        XMLPortParam(ShrinkPickup, "duration", setDuration, getDuration, xmlelement, mode);
    10092        XMLPortParam(ShrinkPickup, "shrinkDuration", setShrinkDuration, getShrinkDuration, xmlelement, mode);
    101 
    102         this->initializeIdentifier();
    10393    }
    10494
     
    321311        pickup->setDuration(this->getDuration());
    322312        pickup->setShrinkDuration(this->getShrinkDuration());
    323 
    324         pickup->initializeIdentifier();
    325313    }
    326314}
  • code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.h

    r8858 r9318  
    119119                { if(speed <= 0.0f) { orxout(internal_warning, context::pickups) << "Invalid shrink duration in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkDuration_ = speed; }
    120120
    121         protected:
    122             void initializeIdentifier(void);
    123 
    124121        private:
    125122            void initialize(void);
     
    135132            float currentFactor_;       //!< The shrink factor that is currently applied.
    136133            float timeRemainig_;        //!< The remaining shrink time.
    137            
     134
    138135            Pawn* carrierToPawnHelper(void);
    139136            Timer durationTimer_;
  • code/branches/presentation2012merge/src/modules/pickup/items/SpeedPickup.cc

    r9305 r9318  
    3838#include "core/XMLPort.h"
    3939
    40 #include "pickup/PickupIdentifier.h"
    4140#include "worldentities/pawns/SpaceShip.h"
    4241
     
    8079    /**
    8180    @brief
    82         Initializes the PickupIdentifier of this pickup.
    83     */
    84     void SpeedPickup::initializeIdentifier(void)
    85     {
    86         this->pickupIdentifier_->addParameter("duration", this->getDuration());
    87         this->pickupIdentifier_->addParameter("speedAdd", this->getSpeedAdd());
    88         this->pickupIdentifier_->addParameter("speedMultiply", this->getSpeedMultiply());
    89     }
    90 
    91     /**
    92     @brief
    9381        Method for creating a SpeedPickup object through XML.
    9482    */
     
    10088        XMLPortParam(SpeedPickup, "speedAdd", setSpeedAdd, getSpeedAdd, xmlelement, mode);
    10189        XMLPortParam(SpeedPickup, "speedMultiply", setSpeedMultiply, getSpeedMultiply, xmlelement, mode);
    102 
    103         this->initializeIdentifier();
    10490    }
    10591
     
    189175        pickup->setSpeedAdd(this->getSpeedAdd());
    190176        pickup->setSpeedMultiply(this->getSpeedMultiply());
    191 
    192         pickup->initializeIdentifier();
    193177    }
    194178
  • code/branches/presentation2012merge/src/modules/pickup/items/SpeedPickup.h

    r9269 r9318  
    103103
    104104        protected:
    105             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    106105            void pickupTimerCallback(void); //!< Function that gets called when timer ends.
    107106
  • code/branches/presentation2012merge/src/orxonox/CMakeLists.txt

    r8858 r9318  
    5050ADD_SUBDIRECTORY(items)
    5151ADD_SUBDIRECTORY(overlays)
    52 ADD_SUBDIRECTORY(pickup)
    5352ADD_SUBDIRECTORY(sound)
    5453ADD_SUBDIRECTORY(weaponsystem)
  • code/branches/presentation2012merge/src/orxonox/OrxonoxPrereqs.h

    r9286 r9318  
    151151    class OrxonoxOverlay;
    152152    class OverlayGroup;
    153 
    154     // pickup
    155     class PickupIdentifier;
    156153
    157154    //sound
  • code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.cc

    r9293 r9318  
    3939
    4040#include "infos/PlayerInfo.h"
    41 #include "pickup/PickupIdentifier.h"
    4241#include "worldentities/pawns/Pawn.h"
    4342
     
    5251        Constructor. Registers the objects and initializes its member variables.
    5352    */
    54     Pickupable::Pickupable() : pickupIdentifier_(NULL), used_(false), pickedUp_(false)
     53    Pickupable::Pickupable() : used_(false), pickedUp_(false)
    5554    {
    5655        RegisterRootObject(Pickupable);
     
    5857        this->carrier_ = NULL;
    5958
    60         this->pickupIdentifier_ = new PickupIdentifier(this);
    6159        this->beingDestroyed_ = false;
    6260        this->enabled_ = true;
     
    6967    Pickupable::~Pickupable()
    7068    {
    71         if(this->pickupIdentifier_ != NULL)
    72         {
    73             orxout(verbose, context::pickups) << "Pickupable (&" << this << ") destroyed." << endl;
    74             this->pickupIdentifier_->destroy();
    75         }
    7669    }
    7770
  • code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.h

    r9293 r9318  
    5353        Pickups (@ref orxonox::Pickupable "Pickupables") are objects that (quite unsurprisingly) can be picked up. Additionally they can be used and unused (transition from used to not used), and also dropped.
    5454
    55         A class of Pickups can incorporate many different types of pickups (see @ref orxonox::PickupIdentifier "PickupIdentifier"), each type is uniquely defined by a @ref orxonox::PickupIdentifier "PickupIdentifier". Each pickup has such an identifier identiying its type. This means that two pickups of the same type have identifiers which are equal.
    56 
    5755    @author
    5856        Damian 'Mozork' Frick
     
    7068            virtual ~Pickupable(); //!< Default destructor.
    7169
     70            //! @brief Returns the representation name which refers to the name of the PickupRepresentation that is used to represent this pickup.
     71            virtual const std::string& getRepresentationName() const = 0;
     72
    7273            /**
    7374            @brief Get whether the Pickupable is currently in use or not.
     
    144145            virtual void clone(OrxonoxClass*& item) {}
    145146
    146             /**
    147             @brief Get the PickupIdentifier of this Pickupable.
    148             @return Returns a pointer to the PickupIdentifier of this Pickupable.
    149             */
    150             virtual const PickupIdentifier* getPickupIdentifier(void) const
    151                 { return this->pickupIdentifier_; }
    152 
    153147            bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.
    154148            bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up.
     
    158152
    159153        protected:
    160             /**
    161             @brief Helper method to initialize the PickupIdentifier.
    162             */
    163             void initializeIdentifier(void) {}
    164 
    165154            virtual void preDestroy(void); //!< A method that is called by OrxonoxClass::destroy() before the object is actually destroyed.
    166155            virtual void destroyPickup(void); //!< Destroys a Pickupable.
     
    187176            */
    188177            virtual bool createSpawner(void) = 0;
    189 
    190             PickupIdentifier* pickupIdentifier_; //!< The PickupIdentifier of this Pickupable.
    191178
    192179        private:
Note: See TracChangeset for help on using the changeset viewer.