adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-wastesedge-commits] Release_0-3-4 c0f10e1 05/22: FIXED extro


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-4 c0f10e1 05/22: FIXED extro
Date: Mon, 25 Jul 2016 18:15:48 +0000 (UTC)

tag: Release_0-3-4
commit c0f10e1b0d1d0b272af18f7cc79f314a82f4dbf0
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>

    FIXED extro
---
 scripts/actions/talk.py                      |   18 ++++++++++++------
 scripts/schedules/mapcharacters/bjarn.py     |    2 +-
 scripts/schedules/mapcharacters/extro.py     |   13 ++++++-------
 scripts/schedules/mapcharacters/to_cellar.py |    3 ++-
 4 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/scripts/actions/talk.py b/scripts/actions/talk.py
index a4f8696..3396692 100755
--- a/scripts/actions/talk.py
+++ b/scripts/actions/talk.py
@@ -1,5 +1,7 @@
 #
-#  (C) Copyright 2001 Kai Sterker <address@hidden>
+#  $Id$
+#
+#  (C) Copyright 2001/2003 Kai Sterker <address@hidden>
 #  Part of the Adonthell Project http://adonthell.linuxgames.com
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -10,7 +12,7 @@
 #  See the COPYING file for more details
 #
 
-# -- Map Character Action Event to launch a dialogue with the requester.
+# -- mapcharacter Action Event to launch a dialogue with the requester.
 
 
 import adonthell
@@ -23,14 +25,18 @@ class talk:
     def restore_schedule (self, retval, args):
         # -- activate the characters' schedules
         # player isn't event-driven yet
-        args[0].set_schedule_active (1)
-        args[0].resume ()
-        args[1].resume ()
+        args[2].set_schedule_active (1)
+        if not args[0]: args[2].resume ()
+        if not args[1]: args[3].resume ()
 
         adonthell.gamedata_engine ().set_control_active (1)
 
     def run (self, requester):
         if requester.get_name() == adonthell.gamedata_player ().get_name():
+            # -- get characters' current state
+            player_state = requester.is_paused ()
+            npc_state = self.myself.is_paused ()
+            
             # -- deactivate the schedule of the characters involved
             self.myself.pause ()
             requester.pause ()
@@ -50,7 +56,7 @@ class talk:
             dlg.thisown = 0
 
             # -- attach the callback
-            dlg.py_signal_connect (self.restore_schedule, 
adonthell.win_event_CLOSE, (requester, self.myself))
+            dlg.py_signal_connect (self.restore_schedule, 
adonthell.win_event_CLOSE, (player_state, npc_state, requester, self.myself))
 
             # -- add the dialogue window to the win_manager
             adonthell.win_manager_get_active ().add (dlg)
diff --git a/scripts/schedules/mapcharacters/bjarn.py 
b/scripts/schedules/mapcharacters/bjarn.py
index 361b6b4..35bc622 100644
--- a/scripts/schedules/mapcharacters/bjarn.py
+++ b/scripts/schedules/mapcharacters/bjarn.py
@@ -42,7 +42,7 @@ class bjarn (schedule.speak):
     # -- Get at the proper place when Erek lets the player into the room
     #    and at the end of the game.
     def await_player (self):
-        self.myself.jump_to (self.myself.submap (), 3, 6)
+        self.myself.jump_to (7, 3, 6)
         self.myself.stand_west ()
     
     def start_talking (self):
diff --git a/scripts/schedules/mapcharacters/extro.py 
b/scripts/schedules/mapcharacters/extro.py
index fad697b..d9fd5c7 100644
--- a/scripts/schedules/mapcharacters/extro.py
+++ b/scripts/schedules/mapcharacters/extro.py
@@ -1,5 +1,5 @@
 #
-#  (C) Copyright 2001 Kai Sterker <address@hidden>
+#  (C) Copyright 2001/2003 Kai Sterker <address@hidden>
 #  Part of the Adonthell Project http://adonthell.linuxgames.com
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -30,15 +30,16 @@ class extro:
         erek = adonthell.gamedata_get_character ("Erek Stonebreaker")
         jelom = adonthell.gamedata_get_character ("Jelom Rasgar")
         talan = adonthell.gamedata_get_character ("Talan Wendth")
-        talan.set_schedule_active (0)
         silverhair = adonthell.gamedata_get_character ("Imoen Silverhair")
         player = adonthell.gamedata_player ()
 
+        talan.pause ()
+
         # -- init the bubble texts
         #    (character, text)
         self.text = [(bjarn, N_("There is no denying it. Yes, I feigned the 
theft. ")), \
             (erek, N_("But Master? How could you do such an infamous deed? 
")), \
-                       (jelom, N_("That I would know as well! And where are 
the gems then? ")), \
+            (jelom, N_("That I would know as well! And where are the gems 
then? ")), \
             (bjarn, N_("What? Haven't I made myself clear already? ")), \
             (bjarn, N_("I despise those Elves and their uncanny ways. ")), \
             (bjarn, N_("Their ... meddling with reality contradicts all 
principles I learnt to hold true.     ")), \
@@ -49,7 +50,7 @@ class extro:
             (bjarn, N_("Theft by a high born like Lady Silverhair would have 
been considered a grave insult by the clan elders.     ")), \
             (bjarn, N_("Had she been convicted, they might have chosen to 
cease trading with her likes. ")), \
             (bjarn, N_("It might have been years before any Elf got his filthy 
hands on our beloved gems again! ")), \
-                       (silverhair, N_("I feared as much and I       feared 
the consequences.")), \
+            (silverhair, N_("I feared as much and I       feared the 
consequences.")), \
             (silverhair, N_("Without the arcane arts my kind would soon 
succumb to the human tides. ")), \
             (silverhair, N_("But without gems and ores purchased from the 
small folk we cannot create magic. ")), \
             (jelom, N_("Who would have thought that? ")), \
@@ -225,7 +226,6 @@ class extro:
         elif self.index == 20:
             bjarn = self.text[3][0]
             if self.done == 0:
-                bjarn.set_schedule_active (0)
                 bjarn.set_goal (7, 3, adonthell.STAND_NORTH)
                 self.done = 1
                 
@@ -242,7 +242,6 @@ class extro:
             bjarn = self.text[3][0]
             bjarn.go_south ()
             bjarn.load ('bjarn_crying.mchar')
-            bjarn.pause ()
             
             talan = adonthell.gamedata_get_character ('Talan Wendth')
             talan.load ("talan_beaten.mchar")
@@ -576,7 +575,7 @@ class extro:
             update = 1
             self.alek_run.update ()
             self.x[2] = self.update_wood (self.wood3, self.x[2])
-               
+
             if self.anim % 4 == 0:
                 self.x[0] = self.update_wood (self.wood1, self.x[0])
 
diff --git a/scripts/schedules/mapcharacters/to_cellar.py 
b/scripts/schedules/mapcharacters/to_cellar.py
index c56f900..df6aa38 100644
--- a/scripts/schedules/mapcharacters/to_cellar.py
+++ b/scripts/schedules/mapcharacters/to_cellar.py
@@ -1,5 +1,5 @@
 #
-#  (C) Copyright 2001/2002 Kai Sterker <address@hidden>
+#  (C) Copyright 2001/2002/2003 Kai Sterker <address@hidden>
 #  Part of the Adonthell Project http://adonthell.linuxgames.com
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -83,6 +83,7 @@ class to_cellar:
             self.myself.set_schedule ("keyboard_control")
             bjarn = adonthell.gamedata_get_character ("Bjarn Fingolson")
             bjarn.set_dialogue ("dialogues.extro")
+            bjarn.pause ()
             bjarn.launch_action (self.myself)
                         
         else:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]