mirror of
https://github.com/Wesley-DeMontigny/WLUS.git
synced 2026-02-09 11:38:36 -06:00
Started rewrite on entire server so that the architecture would be more like an actual game engine. The world server is not implemented anymore so only auth will be working for now
27 lines
552 B
Python
27 lines
552 B
Python
import game_types
|
|
import threading
|
|
|
|
class Script():
|
|
def __init__(self, parent, script_name :str = "", script_path : str = ""):
|
|
self._parent = parent
|
|
self._name : str = script_name
|
|
self._script_path : str = script_path
|
|
|
|
def set_path(self, script_path : str):
|
|
self._script_path = script_path
|
|
|
|
def set_name(self, name):
|
|
self._name = name
|
|
|
|
def get_name(self):
|
|
return self._name
|
|
|
|
def get_parent(self):
|
|
return self._parent
|
|
|
|
def run(self):
|
|
script_file = open(self._script_path, 'r')
|
|
script_str = script_file.read()
|
|
exec(script_str)
|
|
|