Package horizons :: Package component :: Module restrictedpickup :: Class RestrictedPickup
[hide private]
[frames] | no frames]

Class RestrictedPickup

source code

Component --+

Handles pickup location restrictions per whitelist. Treats something as allowed (not restricted) if contained in the whitelist *allowed*. If this is specified but empty, everything is considered forbidden.

Instance Methods [hide private]
__init__(self, allowed=None)
Used for initialization code that does not require any other components.
source code
pickup_allowed_at(self, target_class) source code
    Inherited from Component
__gt__(self, other) source code
__lt__(self, other) source code
This is called by the ComponentHolder after it set the instance.
source code
load(self, db, worldid)
This does on load what __init() and initalize() together do on constructions at runtime.
source code
Removes component and reference to instance
source code
save(self, db)
Will do nothing, but will be always called in componentholder code, even if not implemented.
source code
Class Methods [hide private]
    Inherited from Component
get_instance(cls, arguments=None)
This function is used to instantiate classes from yaml data.
source code
Class Variables [hide private]
  NAME = 'restricted'
    Inherited from Component
Properties [hide private]
    Inherited from Component
Method Details [hide private]

__init__(self, allowed=None)

source code 

Used for initialization code that does not require any other components. This is always called first, on construction and on load.

Overrides: Component.__init__
(inherited documentation)