³ò
šõÜNc           @   sŽ   d  Z  d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ d S(   sj   
$Rev: 592 $
$LastChangedBy: satoon101 $
$LastChangedDate: 2011-11-22 16:20:03 -0500 (Tue, 22 Nov 2011) $
t   ListManagementc           B   sD   e  Z d  Z d Z d Z d Z d „  Z d „  Z d „  Z d „  Z	 RS(   s&   A base list class to create .cfg filest    i    c         C   s   | |  _  d S(   s8   Create an instance of the list and store its config fileN(   t   _config(   t   selft   config(    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyt   __init__   s    c         C   su   t  |  ƒ p d Sn |  i o |  i i |  i ƒ n x8 |  D]0 } x' |  i | ƒ D] } |  i i | ƒ qS Wq= Wd S(   s    Creates the text in the cfg fileN(   t   lent   headerR   t   textt   _get_all_lines(   R   t   sectiont   line(    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyt   _print_to_text   s    
  c         C   sç   t  |  i | ƒ |  i i d j  o |  i | g Sn g  } |  i |  i | ƒ \ } } | i | ƒ xc t  | ƒ |  i |  i i d j p d | j o1 |  i d |  i | ƒ \ } } | i | ƒ qh W| i d |  i | ƒ | S(   s$   Gets all lines for the given sectioniP   s   
t    (   R   t   firstR   t	   indentiont	   _get_linet   appendt   indent(   R   R
   t   linest
   first_linet	   remaindert   current_line(    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR	   1   s    $'c         C   sÃ   | d |  i  i  } x' | d d j o | o | d  } q W| i d ƒ p t | ƒ } n d | j o5 | i d d ƒ \ } } | i ƒ  | i d ƒ f Sn | d	  | i | d ƒ i d ƒ f S(
   s7   Gets the current line so that it is under 80 charactersiP   i    R   s   
i   R   iÿÿÿÿiÿÿÿÿiÿÿÿÿ(   R   R   t   stript   strt   splitt   rstript   lstript   replace(   R   t   messaget   startR   (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR   U   s    (
   t   __name__t
   __module__t   __doc__R   R   R   R   R   R	   R   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR       s   			$t   ListDescriptionc           B   s    e  Z d  Z d Z d Z d Z RS(   s#   Creates a list of Description liness   Description:R   i   i   s      (   R   R    R!   R   R   R   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR"   u   s   t   ListInstructionsc           B   s    e  Z d  Z d Z d Z d Z RS(   s#   Creates a list of Instruction liness   Instructions:s      * i   (   R   R    R!   R   R   R   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR#   ~   s   t	   ListNotesc           B   s2   e  Z d  Z d Z d Z d Z d „  Z d „  Z RS(   s   Creates a list of Notes liness   Notes:s      * i   c         C   s%   | |  _  t ƒ  |  _ t ƒ  |  _ d  S(   N(   R   t   listt   requirest   conflict(   R   R   (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR      s    	c         C   sà   | d j o½ |  i  p
 |  i o¥ |  i i |  i ƒ d |  _ xO |  i  D]D } |  i i |  i d | d ƒ |  i i |  i d | d ƒ qG Wx4 |  i D]% } |  i i |  i d | d ƒ q™ WqÊ n t t |  ƒ i | ƒ S(	   s\   Checks if printing to text, and if so,
            interject required and conflicting addonsR   R   t   "s    " will automatically be enabled.s   Will not load if "s   " can not be enabled.s   Will not load with "s
   " enabled.(	   R&   R'   R   R   R   R   t   superR$   t   __getattribute__(   R   t   attrt   addon(    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR*   –   s    	
 		
 	"(   R   R    R!   R   R   R   R   R*   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR$   ‡   s   	t   ListExamplesc           B   s    e  Z d  Z d Z d Z d Z RS(   s    Creates a list of Examples liness	   Examples:s      * i	   (   R   R    R!   R   R   R   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR-   º   s   t   ListOptionsc           B   s    e  Z d  Z d Z d Z d Z RS(   s   Creates a list of Options liness   Options:R   i   i	   s      (   R   R    R!   R   R   R   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pyR.   Ã   s   N(   R!   R%   R    R"   R#   R$   R-   R.   (    (    (    sW   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/core/cfg/attributes.pys   <module>   s   h		3	