ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/python/events/python_event.py
Revision: 1.1
Committed: Sun Feb 5 00:02:08 2006 UTC (18 years, 5 months ago) by root
Content type: text/x-python
Branch point for: UPSTREAM, MAIN
Log Message:
Initial revision

File Contents

# Content
1 # global_event.py - this script handles all global events, except the plugin init (check plugin_init.py for that).
2 #
3 # This script merely looks and launches scripts in a specific subdirectory of /python/events/
4 # Only .py files are considered, you can simply rename a file to disable.
5 #
6 # This should simplify the separation of different Python things.
7
8 import Crossfire
9 import os
10
11 path = os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(), 'python/events', Crossfire.ScriptParameters())
12
13 if os.path.exists(path):
14 scripts = os.listdir(path)
15
16 for script in scripts:
17 if (script.endswith('.py')):
18 execfile(os.path.join(path, script))