From 56bf2a1322c9f3c3aa85e08f76ceed88806b5da7 Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Sun, 15 Apr 2012 16:06:34 +0000 Subject: [PATCH] Simplify script. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@17963 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/items/banquet.py | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/python/items/banquet.py b/python/items/banquet.py index ac01ce7b5..3e870c8af 100644 --- a/python/items/banquet.py +++ b/python/items/banquet.py @@ -120,36 +120,26 @@ def do_banquet(): # Put walls. wall = get_one(walls) # top left - w = Crossfire.CreateObjectByName(wall + '_2_2_2') - w.Teleport(m, 0, 0) + m.CreateObject(wall + '_2_2_2', 0, 0) # top right - w = Crossfire.CreateObjectByName(wall + '_2_2_3') - w.Teleport(m, size_x - 1, 0) + m.CreateObject(wall + '_2_2_3', size_x - 1, 0) # bottom left - w = Crossfire.CreateObjectByName(wall + '_2_2_1') - w.Teleport(m, 0, size_y - 1) + m.CreateObject(wall + '_2_2_1', 0, size_y - 1) # bottom right - w = Crossfire.CreateObjectByName(wall + '_2_2_4') - w.Teleport(m, size_x - 1, size_y - 1) + m.CreateObject(wall + '_2_2_4', size_x - 1, size_y - 1) # top and bottom parts for x in range(size_x - 2): - w = Crossfire.CreateObjectByName(wall + '_2_1_2') - w.Teleport(m, x + 1, 0) - w = Crossfire.CreateObjectByName(wall + '_2_1_2') - w.Teleport(m, x + 1, size_y - 1) + m.CreateObject(wall + '_2_1_2', x + 1, 0) + m.CreateObject(wall + '_2_1_2', x + 1, size_y - 1) # left and right parts for y in range(size_y - 2): - w = Crossfire.CreateObjectByName(wall + '_2_1_1') - w.Teleport(m, 0, y + 1) - w = Crossfire.CreateObjectByName(wall + '_2_1_1') - w.Teleport(m, size_x - 1, y + 1) + m.CreateObject(wall + '_2_1_1', 0, y + 1) + m.CreateObject(wall + '_2_1_1', size_x - 1, y + 1) # Food itself for x in range(size_x-2): for y in range(size_y-2): - fo = Crossfire.CreateObjectByName(get_one(foods)) - fo.GodGiven = 1 - fo.Teleport(m, x + 1, y + 1) + m.CreateObject(get_one(foods), x + 1, y + 1).GodGiven = 1 # Store player's current location x = act.X