Time test

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/trunk/maps@4795 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2006-08-15 14:08:49 +00:00
parent 7c6c269741
commit df8c6dddf4
1 changed files with 14 additions and 0 deletions

View File

@ -15,6 +15,7 @@ def do_help():
whoami.Say(' - ref: some checks on objects references')
whoami.Say(' - mark: marked item')
whoami.Say(' - memory: storage-related tests')
whoami.Say(' - time: time of day tests')
def do_arch():
archs = Crossfire.GetArchetypes()
@ -110,6 +111,17 @@ def do_basics():
who = Crossfire.WhoIsActivator()
whoami.Say('type = %d'%who.Type)
def do_time():
cftime = Crossfire.GetTime()
whoami.Say('Year: %d'%cftime[0])
whoami.Say('Month: %d'%cftime[1])
whoami.Say('Day: %d'%cftime[2])
whoami.Say('Hour: %d'%cftime[3])
whoami.Say('Minute: %d'%cftime[4])
whoami.Say('Day of week: %d'%cftime[5])
whoami.Say('Week of year: %d'%cftime[6])
whoami.Say('Season: %d'%cftime[7])
whoami.Say( 'plugin test' )
topic = Crossfire.WhatIsMessage().split()
@ -133,5 +145,7 @@ elif topic[0] == 'resist':
do_resist()
elif topic[0] == 'basics':
do_basics()
elif topic[0] == 'time':
do_time()
else:
do_help()