³ò
šõÜNc           @   s_   d  Z  d d k l Z d d k l Z d e f d „  ƒ  YZ e ƒ  Z d e f d „  ƒ  YZ	 d S(	   sj   
$Rev: 592 $
$LastChangedBy: satoon101 $
$LastChangedDate: 2011-11-22 16:20:03 -0500 (Tue, 22 Nov 2011) $
iÿÿÿÿ(   t	   AddonInfo(   t   ValidAddonst   _AddonInstancesc           B   s   e  Z d  Z d „  Z RS(   s5   Class that stores all included/custom addon instancesc         C   s?   | |  j o t  t |  ƒ i | ƒ Sn t | ƒ } |  | <| S(   s"   Returns the given addon's instance(   t   superR   t   __getitem__t   _AddonInstance(   t   selft   addont   value(    (    sX   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/addons/instance.pyR      s    (   t   __name__t
   __module__t   __doc__R   (    (    (    sX   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/addons/instance.pyR      s   R   c           B   s    e  Z d  Z d „  Z d „  Z RS(   s:   Class that stores the instance of an included/custom addonc         C   s‡   | |  _  t i |  i  ƒ |  _ d |  i |  i  |  i  f |  _ t |  i t ƒ  t ƒ  d g ƒ } t | ƒ | i	 |  _ |  i
 ƒ  |  _ d S(   s'   Called when the addon is first importeds   gungame51.scripts.%s.%s.%st    N(   t   basenameR   t   get_addon_typet
   addon_typet   modulet
   __import__t   globalst   localst   reloadt   __dict__t   _get_addon_infot   info(   R   R   t   instance(    (    sX   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/addons/instance.pyt   __init__.   s    	!
c         C   sA   x7 |  i  D], } t |  i  | t ƒ o |  i  | Sq
 q
 Wt ƒ  S(   s,   Returns the AddonInfo instance for the addon(   R   t
   isinstanceR    (   R   t   name(    (    sX   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/addons/instance.pyR   G   s
    
 (   R	   R
   R   R   R   (    (    (    sX   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/addons/instance.pyR   +   s   	N(
   R   R   R    t   validR   t   dictR   t   AddonInstancest   objectR   (    (    (    sX   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/addons/instance.pys   <module>   s
   	