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 type: __call__, __delattr__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __instancecheck__, __le__, __lt__, __ne__, __repr__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

    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
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__

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