void DroidDetonationModuleDataComponent::initializeTransientMembers() { // Pull module stat from parent sceno DroidComponent* droidComponent = cast<DroidComponent*>(getParent()); if (droidComponent == NULL) { info("droidComponent was null"); return; } /*for (int i = 0; i < droidComponent->getPropertyCount(); i++) { String prop = droidComponent->getProperty(i); }*/ if (droidComponent->hasKey("bomb_level")) { rating = droidComponent->getAttributeValue("bomb_level"); } if (droidComponent->hasKey("module_count")) { moduleCount = droidComponent->getAttributeValue("module_count"); } if (droidComponent->hasKey("module_init")) { initialized = droidComponent->getAttributeValue("module_init") == 1; } if (droidComponent->hasKey("species")) { species = droidComponent->getAttributeValue("species"); } if (species == DroidObject::MSE) { mseDroid = true; } }
void DroidStimpackModuleDataComponent::initializeTransientMembers() { DroidComponent* droidComponent = cast<DroidComponent*>(getParent()); if (droidComponent == NULL) { info("droidComponent was null"); return; } if(droidComponent->hasKey( "stimpack_capacity")) { capacity = droidComponent->getAttributeValue( "stimpack_capacity"); } if (droidComponent->hasKey("stimpack_speed")) { speed = droidComponent->getAttributeValue("stimpack_speed"); } }
void DroidMaintenanceModuleDataComponent::initializeTransientMembers() { // Pull module stat from parent sceno DroidComponent* droidComponent = cast<DroidComponent*>(getParent()); if (droidComponent == NULL) { info("droidComponent was null"); return; } if( droidComponent->hasKey( "struct_module") ){ moduleRating = droidComponent->getAttributeValue( "struct_module"); } }
void DroidArmorModuleDataComponent::initializeTransientMembers() { // Pull module stat from parent sceno DroidComponent* droidComponent = cast<DroidComponent*>(getParent()); if (droidComponent == NULL) { info("droidComponent was null"); return; } if (droidComponent->hasKey("armor_module")) { armorModule = droidComponent->getAttributeValue("armor_module"); } }
void DroidHarvestModuleDataComponent::initializeTransientMembers() { // Pull module stat from parent sceno DroidComponent* droidComponent = cast<DroidComponent*>(getParent()); if (droidComponent == NULL) { info("droidComponent was null"); return; } if( droidComponent->hasKey( "harvest_power") ){ harvestBonus = droidComponent->getAttributeValue( "harvest_power"); } else{ info( "harvest_power attribute not found" ); } harvestTargets.removeAll(0,10); }