Misc tests.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13881 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2010-09-25 08:00:27 +00:00
parent c04fb836a2
commit 52c08abb82
2 changed files with 121 additions and 0 deletions

View File

@ -0,0 +1,107 @@
arch map
name find_by_arch_name
width 5
height 5
msg
Created: 2010-02-28 Nicolas Weeger
Modified: 2010-02-28 Nicolas Weeger
endmsg
end
arch afloor_left
end
arch afloor_left
y 1
end
arch afloor_left
y 2
end
arch afloor_left
y 3
end
arch afloor_left
y 4
end
arch afloor_left
x 1
end
arch afloor_left
x 1
y 1
end
arch afloor_left
x 1
y 2
end
arch afloor_left
x 1
y 3
end
arch afloor_left
x 1
y 4
end
arch afloor_left
x 2
end
arch afloor_left
x 2
y 1
end
arch afloor_left
x 2
y 2
end
arch pirate_lass
x 2
y 2
arch event_say
title Python
slaying /test/find_by_arch_name.py
end
end
arch afloor_left
x 2
y 3
end
arch afloor_left
x 2
y 4
end
arch afloor_left
x 3
end
arch afloor_left
x 3
y 1
end
arch afloor_left
x 3
y 2
end
arch afloor_left
x 3
y 3
end
arch afloor_left
x 3
y 4
end
arch afloor_left
x 4
end
arch afloor_left
x 4
y 1
end
arch afloor_left
x 4
y 2
end
arch afloor_left
x 4
y 3
end
arch afloor_left
x 4
y 4
end

View File

@ -0,0 +1,14 @@
import Crossfire
who = Crossfire.WhoAmI()
pl = Crossfire.WhoIsActivator()
msg = Crossfire.WhatIsMessage()
found = pl.CheckArchInventory(msg)
who.Say('check for find_arch_by_name')
if (found != None):
who.Say('found %s'%found.Name)
else:
who.Say('didn\'t find %s'%msg)