Page 1 of 1

get_engine_interface

Posted: Mon Feb 03, 2014 10:08 pm
by edcolmar
Hey all!

Running the following on the Jan-26-2014 build:

Code: Select all

import engine_c

engine = engine_c.get_engine_interface()


[SP] Caught an Exception:
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/plugins/manager.py', line 64, in __missing__
instance = self.instance(plugin_name, self.base_import)
File '../addons/source-python/packages/source-python/plugins/instance.py', line 73, in __init__
self._plugin = __import__(import_name)
File '../addons/source-python/plugins/leetcoin/leetcoin.py', line 38, in <module>
engine = engine_c.get_engine_interface()

AttributeError: 'module' object has no attribute 'get_engine_interface'

Did this move? Get renamed?

Posted: Mon Feb 03, 2014 10:19 pm
by satoon101
We decided that importing a function whose sole purpose is to retrieve the instance of an interface was unnecessary. So, instead, we now just expose the interface itself as the imported object:

Code: Select all

from engine_c import GameEngine