From 2d81db3d489e036efb3f1c166578bfc7147953fd Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Tue, 1 Nov 2011 16:40:52 +0000 Subject: [PATCH] Test for the 'NoSave' property. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@15369 282e977c-c81d-0410-88c4-b93c2d0d6712 --- test/python.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/python.py b/test/python.py index 6e09a9571..41797293a 100644 --- a/test/python.py +++ b/test/python.py @@ -41,6 +41,7 @@ def do_help(): help += ' - anim\n' help += ' - hook\n' help += ' - checkinventory\n' + help += ' - nosave\n' whoami.Say(help) @@ -414,6 +415,11 @@ def do_check_inventory(): else: whoami.Say('did not find anything matching ' + what) +def do_no_save(): + item = whoami.Map.CreateObject('food', 2, 1) + item.NoSave = 1 + whoami.Say('no_save set, the food should not be saved') + topic = Crossfire.WhatIsMessage().split() #whoami.Say('topic = %s'%topic) #whoami.Say('topic[0] = %s'%topic[0]) @@ -485,5 +491,7 @@ elif topic[0] == 'hook': do_hook() elif topic[0] == 'checkinventory': do_check_inventory() +elif topic[0] == 'nosave': + do_no_save() else: do_help()