adonthell-commits
[Top][All Lists]
Advanced

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

[adonthell-wastesedge-commits] Release_0-3-1 0f70295 082/237: Added some


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 0f70295 082/237: Added some events.
Date: Mon, 25 Jul 2016 18:14:58 +0000 (UTC)

tag: Release_0-3-1
commit 0f702950552c881cf4181a238aee0eaffb667d96
Author: adondev <adondev>
Commit: adondev <adondev>

    Added some events.
---
 gfx/mapobjects/terrains/forest_left.mobj        |  Bin 4653 -> 4662 bytes
 gfx/mapobjects/terrains/forest_left_leaves.mobj |  Bin 5736 -> 5746 bytes
 maps/test.map                                   |  Bin 2659 -> 2709 bytes
 scripts/events/Makefile.am                      |    3 +-
 scripts/events/action_alch_table.py             |    1 +
 scripts/events/action_clock.py                  |    1 +
 scripts/init.py                                 |   65 +++++++++++++++++++++++
 scripts/schedules/keyboard_control.py           |    8 +++
 8 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/gfx/mapobjects/terrains/forest_left.mobj 
b/gfx/mapobjects/terrains/forest_left.mobj
index d1bd3a8..a4cd56b 100644
Binary files a/gfx/mapobjects/terrains/forest_left.mobj and 
b/gfx/mapobjects/terrains/forest_left.mobj differ
diff --git a/gfx/mapobjects/terrains/forest_left_leaves.mobj 
b/gfx/mapobjects/terrains/forest_left_leaves.mobj
index 420eaae..7e35a28 100644
Binary files a/gfx/mapobjects/terrains/forest_left_leaves.mobj and 
b/gfx/mapobjects/terrains/forest_left_leaves.mobj differ
diff --git a/maps/test.map b/maps/test.map
index 25c0fff..232a687 100755
Binary files a/maps/test.map and b/maps/test.map differ
diff --git a/scripts/events/Makefile.am b/scripts/events/Makefile.am
index 36e7fc6..1530441 100755
--- a/scripts/events/Makefile.am
+++ b/scripts/events/Makefile.am
@@ -6,6 +6,7 @@ pkgdata_DATA = common_to_kitchen.py common_to_parlor.py 
inn_to_yard.py \
        2nd_to_redwyne.py cellar_to_alek.py cellar_to_bath.py 
cellar_to_dwarfs.py \
        cellar_to_storage.py common_to_1st.py 1st_to_2nd.py common_to_cellar.py 
\
        barn_to_cellar.py kitchen_to_cellar.py yard_to_guards.py \
-       guards_ground_to_1st.py
+       guards_ground_to_1st.py \
+       action_clock.py action_alch_table.py
 
 EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/events/action_alch_table.py 
b/scripts/events/action_alch_table.py
new file mode 100644
index 0000000..8468e03
--- /dev/null
+++ b/scripts/events/action_alch_table.py
@@ -0,0 +1 @@
+the_player.speak ("I'd better not touch this... What if it explodes??")
diff --git a/scripts/events/action_clock.py b/scripts/events/action_clock.py
new file mode 100644
index 0000000..9e5169b
--- /dev/null
+++ b/scripts/events/action_clock.py
@@ -0,0 +1 @@
+the_player.speak ("That clock seems to be late!")
diff --git a/scripts/init.py b/scripts/init.py
index 9fcf6ce..675d033 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -582,6 +582,71 @@ if retval < 5:
         ev.set_script ("guards_ground_to_1st")
         lm.add_event (ev)
 
+
+        # Action events
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 1
+        ev.x = 10
+        ev.y = 2
+        ev.dir = STAND_NORTH
+        ev.set_script ("action_clock")
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 10
+        ev.x = 3
+        ev.y = 6
+        ev.dir = STAND_NORTH
+        ev.set_script ("action_alch_table")
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 10
+        ev.x = 4
+        ev.y = 6
+        ev.dir = STAND_NORTH
+        ev.set_script ("action_alch_table")
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 10
+        ev.x = 2
+        ev.y = 5
+        ev.dir = STAND_EAST
+        ev.set_script ("action_alch_table")
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 10
+        ev.x = 5
+        ev.y = 5
+        ev.dir = STAND_WEST
+        ev.set_script ("action_alch_table")
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 10
+        ev.x = 3
+        ev.y = 4
+        ev.dir = STAND_SOUTH
+        ev.set_script ("action_alch_table")
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 10
+        ev.x = 4
+        ev.y = 4
+        ev.dir = STAND_SOUTH
+        ev.set_script ("action_alch_table")
+        lm.add_event (ev)
+
         # Now setup the characters
         lucia = characters ["Lucia Redwyne"]
         lucia.set_dialogue ("dialogues/lucia_start")
diff --git a/scripts/schedules/keyboard_control.py 
b/scripts/schedules/keyboard_control.py
index 11ffd10..d74e6f8 100755
--- a/scripts/schedules/keyboard_control.py
+++ b/scripts/schedules/keyboard_control.py
@@ -71,6 +71,14 @@ if input_has_been_pushed (SDLK_SPACE):
 
         # -- Cleanup
         p = None
+    elif p == None:
+        evt = action_event ()
+        evt.submap = myself.submap ()
+        evt.x = myself.posx ()
+        evt.y = myself.posy ()
+        evt.dir = myself.currentmove ()
+        evt.c = myself
+        event_handler_raise_event (evt)
 
 # -- bring up the main menu
 elif input_has_been_pushed (SDLK_ESCAPE):



reply via email to

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