Added subclasses for all exported classes, and linked them to API
parent
1d2f085ef3
commit
3ccb7783c9
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Construction
|
||||
"""
|
||||
from ._pydfhack import _ConstructionManager
|
||||
class Construction(_ConstructionManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_ConstructionManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Creature
|
||||
"""
|
||||
from ._pydfhack import _CreatureManager
|
||||
class Creature(_CreatureManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_CreatureManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::GUI
|
||||
"""
|
||||
from ._pydfhack import _GUIManager
|
||||
class GUI(_GUIManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_GUIManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Maps
|
||||
"""
|
||||
from ._pydfhack import _MapManager
|
||||
class Map(_MapManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_MapManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Materials
|
||||
"""
|
||||
from ._pydfhack import _MaterialsManager
|
||||
class Materials(_MaterialsManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_MaterialsManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::MemInfo
|
||||
"""
|
||||
from ._pydfhack import _MemInfo
|
||||
class MemInfo(_MemInfo):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_MemInfo.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Position
|
||||
"""
|
||||
from ._pydfhack import _PositionManager
|
||||
from .blocks import Point, Block
|
||||
class Position(_PositionManager):
|
||||
api = None
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_PositionManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
return self.api.prepare()
|
||||
|
||||
def get_cursor(self):
|
||||
self.prepare()
|
||||
coords = self.cursor_coords
|
||||
return Point(*coords)
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Translation
|
||||
"""
|
||||
from ._pydfhack import _TranslationManager
|
||||
class Translation(_TranslationManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_TranslationManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Python class for DF_Hack::Vegetation
|
||||
"""
|
||||
from ._pydfhack import _VegetationManager
|
||||
class Vegetation(_VegetationManager):
|
||||
api = None
|
||||
started = False
|
||||
def __init__(self, api, *args, **kwds):
|
||||
_VegetationManager.__init__(self, args, kwds)
|
||||
self.api = api
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Enforce Suspend/Start
|
||||
"""
|
||||
if self.api.prepare():
|
||||
if not self.started:
|
||||
self.started = self.Start()
|
||||
return self.started
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue