resetowanie postepow - fix #32

This commit is contained in:
Bartek Stalewski 2018-07-05 16:50:47 +02:00
parent 43180b258e
commit 034a412307
3 changed files with 42 additions and 3 deletions

View File

@ -162,9 +162,7 @@
/set _postepy_current=%{__postep}%;\
/endif
/def postepy = /_postepy_show_times
/def _postepy_show_times = \
/def postepy = \
/let __index=0%; \
/echo +--------------+-------+-----+-----+%; \
/while ({__index}<={_postepy_current}) \

View File

@ -0,0 +1 @@
/set _postepy_reset_counter=1

View File

@ -23,6 +23,46 @@
kolosalne|\
nieopisane
/def postepy = \
/if ({1} =~ "reset") \
/set _postepy_last_reset_time=$[ftime("%H:%M", time())]%;\
/set _postepy_last_reset_own=%ownkills%;\
/set _postepy_last_reset_all=%allkills%;\
/test ++_postepy_reset_counter%;\
/set _postepy_current=0%;\
/send postepy reset%;\
/else \
/let __index=0%; \
/echo +---------------+-------------------+%;\
/echo $[strcat("| ", pad("cykl", -14), "|", pad({_postepy_reset_counter}, 18), " |")]%;\
/echo +---------------+-------+-----+-----+%; \
/if ({_postepy_reset_counter} > 1) \
/echo $[strcat("| ", pad("ostatni reset",-14), "| ", pad({_postepy_last_reset_time},5), " |", pad({_postepy_last_reset_own},4), " |", pad({_postepy_last_reset_all},4), " |")]%;\
/echo +---------------+-------+-----+-----+%;\
/endif %;\
/while ({__index}<={_postepy_current}) \
/let __postep=$[_get_element({__index}, {_postepy_list})]%;\
/let __czas=$(/listvar -v _postepy_czas_$[strcat({__index})])%;\
/let __own=$(/listvar -v _postepy_own_$[strcat({__index})])%;\
/let __all=$(/listvar -v _postepy_all_$[strcat({__index})])%;\
/if ({__czas} =~ "" )\
/let __czas=?:?%;\
/endif%;\
/if ({__own} =~ "" )\
/let __own=?%;\
/endif%;\
/if ({__all} =~ "" )\
/let __all=?%;\
/endif%;\
/echo $[strcat("| ", pad({__postep},-14), "| ", pad({__czas},5), " |", pad({__own},4), " |", pad({__all},4), " |")]%;\
/let __index=$[{__index}+1]%; \
/done%; \
/if ({_postepy_current}==-1) \
/echo -p @{n}| | |%; \
/endif%; \
/echo +---------------+-------+-----+-----+%;\
/endif
/def -Fp2 -mregexp -t'^Zabil.s ' poka_exp = /send postepy
/def exp = \