Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/puzzle.py

    r235 r201  
    11from nagslang.constants import COLLISION_TYPE_PLAYER
    2 
    3 
    4 def get_editable_puzzlers():
    5     classes = []
    6     for cls_name, cls in globals().iteritems():
    7         if isinstance(cls, type) and hasattr(cls, 'requires'):
    8             classes.append((cls_name, cls))
    9     return classes
    102
    113
     
    3830        raise NotImplementedError()
    3931
    40     @classmethod
    41     def requires(cls):
    42         """Tell the level editor the arguments we require
    43 
    44            Format is a list of name: type hint tuples"""
    45         return [("name", "string")]
    46 
    4732
    4833class YesPuzzler(Puzzler):
     
    7358        return False
    7459
    75     @classmethod
    76     def requires(cls):
    77         return [("name", "string"), ("collision_types", "list of ints")]
    78 
    7960
    8061class StateProxyPuzzler(Puzzler):
     
    8465    def get_state(self):
    8566        return self.glue.get_state_of(self._state_source)
    86 
    87     @classmethod
    88     def requires(cls):
    89         return [("name", "string"), ("sources", "list of names")]
    9067
    9168
     
    9976                return False
    10077        return True
    101 
    102     @classmethod
    103     def requires(cls):
    104         return [("name", "string"), ("sources", "list of names")]
Note: See TracChangeset for help on using the changeset viewer.