Package motherhamster :: Module cheekpouches

Module cheekpouches



Asset Management System (C) Copyright 2004 Hamster Republic Productions

Classes
  AssetBase
a base class for assets - all assets should inherit from it
  GenericAssetPouch
the base class for asset pouches
  SimpleAssetPouch
an asset pouch designed to be instantiated for objects that are saved and loaded by simple pickle
  AssetProperty
the base class for an editable property on an asset
  SimpleProperty
an assetproperty where you just have a simple value stored
  PropertyDeepCopyDefault
an assetproperty where the default value needs a deep copy
  AssetFlag
the class for an editable flag on an asset
  AssetInteger
the class for an editable number that can take a range of values
  AssetFloat
the class for an editable number that can take a range of values
  AssetString
the class for an editable string on an asset
  AssetEnum
the class for an editable number that can take a range of values
  AssetVec2d
the class for an editable 2d vector
  AssetColor
the class for an editable color
  AssetObject
a reflected object
  AssetList
a reflected list of reflected somethings
  AssetDictionary
a reflected dictionary of reflected somethings
  AssetRef
the only valid way to reference an asset - put one of these as a descriptor on your class for a reference to an asset, switch assets by assigning this to the assetid, access the asset through this descriptor exclusively - if you don't, your object will serialize incorrectly The descriptor will store the assetid in an attribute on the instance, using the key you assign the AssetRef descriptor to on the class
  AssetTypeError
Exception for when a classtype that has no Disgorgeer is requested
Functions
 
RegisterPouch(pouch)
registers the Disgorgeer for its class type
 
GetPouch(class_type)
gets the pouch for a class type - returns None if none registered
 
RegisterAssetExtension(class_type, extension, broken_reference=None)
registers an asset type that doesn't need any special loader behavior
 
AvailableAssetClassTypes()
returns a list of base class types for which assets exist
 
AvailableAssetIDs(class_type, rescan_list=False)
returns a list of strings which contain asset names
 
Disgorge(class_type, asset_id, verify_assetid=False)
given an asset id and class type, returns the asset in a wrapper
 
ReportBrokenAsset(asset_id, class_type)
 
RegisterFoodDish(dish)
 
AvailableFoodDishes()
 
GetFoodDish(name)