³ò
”~ïNc        	   @   sŒ   d  Z  d d k l Z d d k l Z d d k l Z d d k l Z d d k l	 Z	 d d k
 l Z e d ƒ Z d	 e f d
 „  ƒ  YZ d S(   sj   
$Rev: 604 $
$LastChangedBy: satoon101 $
$LastChangedDate: 2011-12-19 19:12:30 -0500 (Mon, 19 Dec 2011) $
iÿÿÿÿ(   t	   ServerVar(   t   exists(   t   delayed(   t	   getPlayer(   t	   RoundInfo(   t   Repeatt   gg_dm_respawn_delayt   PlayerCountdownc           B   sD   e  Z d  Z d „  Z d „  Z e d „ Z d „  Z e d „  ƒ Z	 RS(   sA   Object used to house the countdown methods for BasePlayer objectsc         C   sB   t  t ƒ p t d |  i ƒ d Sn |  i i d t  t ƒ ƒ d S(   s   Starts the player's repeatgš™™™™™¹?Ni   (   t   intR   R   t   check_respawnt   repeatt   start(   t   self(    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pyt   start_repeat(   s    c         C   s  t  d |  i ƒ p t |  i =d Sn t |  i ƒ i p |  i ƒ  d Sn t i p |  i d ƒ |  i ƒ  d Sn |  i	 i
 d j o# |  i d h  |  i	 i
 d <ƒ nj |  i	 i
 d j o |  i d ƒ nF |  i d ƒ t t ƒ d } | o t | |  i ƒ n |  i i ƒ  d S(	   sK   Sends hudhint messages with remaining time and respawns the player
        t   useridNt   RespawnCountdown_RoundEndedi   t   RespawnCountdown_Pluralt   timet   RespawnCountdown_Singulart   RespawnCountdown_Ended(   R   R   t   playersR   t   isdeadt   stop_repeatR   t   activet   send_hudhintR
   t	   remainingt   floatR   R   R	   t	   gg_playert   respawn(   R   R   (    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pyt
   count_down7   s(    



c         C   s)   |  i  i ƒ  | o |  i  i ƒ  n d S(   s)   Stops the repeat and deletes it if neededN(   R
   t   stopt   delete(   R   R   (    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pyR   {   s    c         C   s   t  i o |  i i ƒ  n d S(   sQ   Checks to see if the round is still
            active before spawning the playerN(   R   R   R   R   (   R   (    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pyR	   ‡   s    
c         C   s7   t  |  d ƒ p  t d |  i |  i ƒ |  _ n |  i S(   s4   Property used to return the player's Repeat instancet   _repeats   gg_deathmatch_%s(   t   hasattrR   R   R   R    (   R   (    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pyR
   ‘   s    (
   t   __name__t
   __module__t   __doc__R   R   t   FalseR   R	   t   propertyR
   (    (    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pyR   %   s   		D	
N(   R$   t   esR    R   t
   gamethreadR   t	   playerlibR   t   gungame51.modules.activeR   t   gungame51.core.repeatR   R   t   objectR   (    (    (    st   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_deathmatch/modules/countdown.pys   <module>   s   