Package horizons :: Package world :: Package building :: Class BuildingClass
[hide private]
[frames] | no frames]

Type BuildingClass

source code

       object --+        
                |        
             type --+    
                    |    
ingametype.IngameType --+
                        |
                       BuildingClass

Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(self, db, id, yaml_data) source code
the object's type
__init__(self, db, id, yaml_data)
Final loading for the building class.
source code
 
__str__(self)
str(x)
source code
 
_loadObject(cls)
Loads building from the db.
source code
 
_do_load(cls, all_action_sets, action_set, action_id) source code
 
get_tooltip(self)
Returns tooltip text of a building class.
source code
    Inherited from ingametype.IngameType
 
_fife_object(self) source code
 
_parse_component_templates(self)
Prepares misc data in self.component_templates
source code
 
_strip_translation_marks(self, string)
Converts object translation `string` to translated object for in-game display.
source code
 
name(self) source code
    Inherited from type
 
__call__(x, ...)
x(...)
 
__delattr__(...)
x.__delattr__('name') <==> del x.name
 
__eq__(x, y)
x==y
 
__ge__(x, y)
x>=y
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
__gt__(x, y)
x>y
 
__hash__(x)
hash(x)
bool
__instancecheck__()
check if an object is an instance
 
__le__(x, y)
x<=y
 
__lt__(x, y)
x<y
 
__ne__(x, y)
x!=y
 
__repr__(x)
repr(x)
 
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
bool
__subclasscheck__()
check if a class is a subclass
list of immediate subclasses
__subclasses__()
list
mro()
return a type's method resolution order
    Inherited from object
 
__format__(...)
default object formatter
 
__reduce__(...)
helper for pickle
 
__reduce_ex__(...)
helper for pickle
int
__sizeof__()
size of object in memory, in bytes
 
__subclasshook__(...)
Abstract classes can override this to customize issubclass().
Class Variables [hide private]
  log = logging.getLogger('world.building')
  basepackage = 'horizons.world.building.'
  classstring = 'Building[{id}]'
Instance Variables [hide private]
    Inherited from ingametype.IngameType
  additional_provided_resources
TUTORIAL: Now you know the basic attributes each type has.
Properties [hide private]
    Inherited from type
  __abstractmethods__
  __base__
  __bases__
  __basicsize__
  __dictoffset__
  __flags__
  __itemsize__
  __mro__
  __name__
  __weakrefoffset__
    Inherited from object
  __class__
the object's class
Method Details [hide private]

__new__(self, db, id, yaml_data)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, db, id, yaml_data)
(Constructor)

source code 

Final loading for the building class. Load a lot of attributes for the building classes

Parameters:
  • id - building id.
  • db - DbReader
Returns: the object's type
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

_loadObject(cls)

source code 

Loads building from the db.

Overrides: ingametype.IngameType._loadObject

get_tooltip(self)

source code 

Returns tooltip text of a building class. ATTENTION: This text is automatically translated when loaded already. DO NOT wrap the return value of this method in T()!

Returns:
string tooltip_text