From 8c617badae52fa4ea1f8b20806d59d00f40c2013 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sun, 16 Aug 2015 16:06:51 +0200 Subject: [PATCH] Fixed all portable objects being usable as energy cells --- src/object/old_object.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index e5dc9e3b..f8b61fb6 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -892,6 +892,17 @@ void COldObject::SetType(ObjectType type) m_implementedInterfaces[static_cast(ObjectInterfaceType::Controllable)] = false; } + // TODO: Another one? :/ + if ( m_type == OBJECT_POWER || // PowerCell + m_type == OBJECT_ATOMIC ) // NuclearCell + { + m_implementedInterfaces[static_cast(ObjectInterfaceType::PowerContainer)] = true; + } + else + { + m_implementedInterfaces[static_cast(ObjectInterfaceType::PowerContainer)] = false; + } + if ( m_type == OBJECT_MOBILEwc || m_type == OBJECT_MOBILEtc ||