[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: wastesedge/scripts/schedules/mapcharacters to_c
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: wastesedge/scripts/schedules/mapcharacters to_cellar.py,1.5,1.6 |
Date: |
Thu, 22 Aug 2002 16:08:12 -0400 |
Update of /cvsroot/adonthell/wastesedge/scripts/schedules/mapcharacters
In directory subversions:/tmp/cvs-serv31919/schedules/mapcharacters
Modified Files:
to_cellar.py
Log Message:
FIXED problem of NPCs not reaching cellar due to temporarily blocked path
Index: to_cellar.py
===================================================================
RCS file:
/cvsroot/adonthell/wastesedge/scripts/schedules/mapcharacters/to_cellar.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** to_cellar.py 21 Aug 2002 15:34:50 -0000 1.5
--- to_cellar.py 22 Aug 2002 20:08:10 -0000 1.6
***************
*** 69,73 ****
else: dir = adonthell.STAND_WEST
! self.myself.set_goal (x, y, dir)
# -- reached Bjarn's room
--- 69,74 ----
else: dir = adonthell.STAND_WEST
! if not self.myself.set_goal (x, y, dir):
! self.myself.time_callback ("1t", self.walk)
# -- reached Bjarn's room
***************
*** 81,140 ****
else:
self.myself.pause ()
-
-
- def run_old (self):
- myself = self.myself
- todo = myself.get_val ("todo")
-
- # -- waiting
- if todo == 0:
- delay = myself.get_val ("delay")
-
- # If standing delay expired, move around next time
- if delay == 0:
- myself.set_val ("todo", 1)
- else:
- myself.set_val ("delay", delay - 1)
-
- # -- get movement target
- elif todo == 1:
- x, y, dir = self.exits[myself.submap ()]
-
- # -- in Bjarn's room
- if x == -1:
- submap = myself.mymap ().get_submap (myself.submap ())
- x = random.randint (1, 4)
- y = random.randint (5, 9)
-
- while not submap.get_square (x, y).is_free () or (y == 5 and
x > 2):
- x = random.randint (1, 4)
- y = random.randint (5, 9)
-
- # -- calculate direction
- # -- north-western area
- if x + y < 10:
- if x + 3 > y: dir = adonthell.STAND_SOUTH
- else: dir = adonthell.STAND_EAST
- # -- south-east corner
- else:
- if y - (x + 3) > 0: dir = adonthell.STAND_NORTH
- else: dir = adonthell.STAND_WEST
-
- myself.set_goal (x, y, dir)
- myself.set_val ("todo", 2)
-
- # -- move
- elif todo == 2:
- if myself.follow_path () == 1:
- # -- reached our final destination
- myself.set_val ("todo", 0)
-
- if myself.submap () == 7 and myself.posx () != 1:
- if myself.get_name () == adonthell.gamedata_player
().get_name ():
- myself.set_schedule ("keyboard_control")
- bjarn = adonthell.gamedata_get_character ("Bjarn
Fingolson")
- bjarn.set_dialogue ("dialogues.extro")
- bjarn.launch_action (myself)
-
- else:
- myself.set_schedule_active (0)
--- 82,83 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: wastesedge/scripts/schedules/mapcharacters to_cellar.py,1.5,1.6,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src data_screen.cc,1.23,1.24 gamedata.cc,1.27,1.28 gamedata.h,1.13,1.14
- Next by Date:
[Adonthell-commits] CVS: adonthell config.status,1.16,1.17 configure.in,1.68,1.69
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src data_screen.cc,1.23,1.24 gamedata.cc,1.27,1.28 gamedata.h,1.13,1.14
- Next by thread:
[Adonthell-commits] CVS: adonthell config.status,1.16,1.17 configure.in,1.68,1.69
- Index(es):