Remove unused python_event.py

master
Kevin Zheng 2022-05-21 10:18:37 -07:00
parent 365a2ac4a9
commit e79633565f
1 changed files with 0 additions and 18 deletions

View File

@ -1,18 +0,0 @@
# python_event.py - this script handles all global events, except the plugin init (check plugin_init.py for that).
#
# This script merely looks and launches scripts in a specific subdirectory of /python/events/
# Only .py files are considered, you can simply rename a file to disable.
#
# This should simplify the separation of different Python things.
import Crossfire
import os
path = os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(), 'python/events', Crossfire.ScriptParameters())
if os.path.exists(path):
scripts = os.listdir(path)
for script in scripts:
if (script.endswith('.py')):
exec(open(os.path.join(path, script)).read())