Fixed all portable objects being usable as energy cells

master
krzys-h 2015-08-16 16:06:51 +02:00
parent 0986a200d7
commit 8c617badae
1 changed files with 11 additions and 0 deletions

View File

@ -892,6 +892,17 @@ void COldObject::SetType(ObjectType type)
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Controllable)] = false;
}
// TODO: Another one? :/
if ( m_type == OBJECT_POWER || // PowerCell
m_type == OBJECT_ATOMIC ) // NuclearCell
{
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::PowerContainer)] = true;
}
else
{
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::PowerContainer)] = false;
}
if ( m_type == OBJECT_MOBILEwc ||
m_type == OBJECT_MOBILEtc ||