³ò
˜õÜNc           @   se  d  Z  d d k Z d d k Z d d k l Z d d k l Z d d k l Z d d k 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
 ƒ  Z d e _ d e _ d e _ d d i d ƒ d i ƒ  d e _ e i d ƒ Z e ƒ  Z e i d ƒ Z d „  Z d „  Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d „  Z$ d S(   sj   
$Rev: 592 $
$LastChangedBy: satoon101 $
$LastChangedDate: 2011-11-22 16:20:03 -0500 (Tue, 22 Nov 2011) $
iÿÿÿÿN(   t	   getPlayer(   t   getWeaponNameList(   t   getWeaponList(   t	   AddonInfo(   t   PriorityAddon(   t   Playeri   (   t   get_warmup_weapon(   t
   get_weapont   gg_dead_strips   GG Dead Strips   GG Dev Teams   5.1.%ss   $Rev: 592 $s   $Rev: i   i    t   gg_nade_bonust   gg_map_strip_exceptionsc          C   sl   t  i i t ƒ t i d d t ƒ xB t  i ƒ  D]4 }  x+ t i	 |  ƒ D] } t
 |  | d d ƒ qF Wq0 Wd  S(   Ni   t   gg_removeIdleLoopi   i   (   t   est   addonst   registerClientCommandFiltert   drop_filtert
   gamethreadt   delayednamet   removeIdleLoopt   getUseridListt   spet   getWeaponDictt   set_spawn_flags(   t   useridt   weapon(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyt   load6   s      c          C   sf   t  i i t ƒ t i d ƒ xB t  i ƒ  D]4 }  x+ t i |  ƒ D] } t	 |  | d d ƒ q@ Wq* Wd  S(   NR   i   i    (
   R   R   t   unregisterClientCommandFilterR   R   t   cancelDelayedR   R   R   R   (   R   R   (    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyt   unloadC   s      c         C   s"   t  i i d t  i ƒ  d ƒ d  S(   Ns    es_xfire %s game_weapon_manager s   AddOutput "maxpieces 0"(   R   t   servert   queuecmdt	   getuserid(   t	   event_var(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyt   round_startS   s    c         C   sv  |  d } t  |  d ƒ } d | t j o d  Sn t i d | ƒ o | d j o d  Sn | d j o d  Sn | d j o$ t  t i d ƒ ƒ d j o d  Sn | t | ƒ i d
 d g j o t | | d	 ƒ d  Sn t | ƒ i } | | j o t | | d	 ƒ d  Sn t	 | | ƒ | d j o0 t
 | ƒ i p t i i d | ƒ d  SqXn t i i d | | f ƒ d  S(   Nt   itemR   s	   weapon_%si    t   knifet   c4t
   gg_map_obji   i   t	   flashbangt   smokegrenadet	   hegrenades   es_xsexec %s "use weapon_knife"s   es_xsexec %s "use weapon_%s"(   i   i   (   t   intt   list_weaponNameListR   t   existst	   ServerVarR   t   stripexceptionsR   R   t   remove_weaponR    t   heR   R   (   R    R"   R   t   currentWeapon(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyt   item_pickupY   s.    
!) c          C   s÷   g  }  t  t ƒ i d ƒ D]Q } | i ƒ  d j o8 |  | i ƒ  i d ƒ o | i ƒ  n d | i ƒ  q q ~  } xi t d ƒ D][ } | | j o q n x> | i D]3 } t i | d ƒ d j o q¥ n t	 i
 | ƒ q¥ Wq Wt i d d	 t ƒ d  S(
   Nt   ,t    t   weapon_s	   weapon_%ss   #alls   CBaseEntity.m_hOwnerEntityiÿÿÿÿi   R   (   t   strR
   t   splitt   stript
   startswithR   t	   indexlistR   t   getindexpropR   t   removeEntityByIndexR   R   R   (   t   _[1]t   xt   list_noStripR   t   index(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyR      s    m 
 c         C   s&   t  i i d |  | f d | ƒ d  S(   Ns   es_xfire %s weapon_%s s   addoutput "spawnflags %s"(   R   R   R   (   R   R   t   flag(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyR   ¥   s    c         C   sH   d | } t  i |  | ƒ } | o! t  i |  | ƒ t  i | ƒ n d  S(   Ns	   weapon_%s(   R   t
   ownsWeapont
   dropWeapont   removeEntityByInstance(   R   R"   t
   weaponNamet	   theWeapon(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyR.   «   s
    
c         C   sý   t  | ƒ o | d i ƒ  d j o d Sn t i d |  ƒ p d Sn t |  ƒ i } d t j o t ƒ  } n t |  ƒ i	 d } | p d  Sn | d j o t
 | d | j ƒ Sn t t ƒ d j o d Sn | i d d	 ƒ t |  ƒ j o d Sn d S(   Ni    t   dropi   R   t   gg_warmup_roundR   R(   s	   weapon_%sR3   t   0R4   (   R3   RH   (   t   lent   lowerR   R+   R   R   R   R   R    t
   attributesR)   R5   R	   t   replaceR   (   R   t   argsR   t	   curWeapon(    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pyR   ´   s"    $(%   t   __doc__R   R   t	   playerlibR    t	   weaponlibR   R   R   t   gungame51.core.addons.shortcutsR   t   gungame51.core.addonsR   t    gungame51.core.players.shortcutsR   t   gg_warmup_round.gg_warmup_roundR   t   gg_nade_bonus.gg_nade_bonusR   t   infot   namet   titlet   authorR6   t   versionR,   R	   R*   R
   R   R   R!   R1   R   R   R.   R   (    (    (    sp   /home/saberrider/srcds/css/cstrike/addons/eventscripts/gungame51/scripts/included/gg_dead_strip/gg_dead_strip.pys   <module>   s6   				$					7				