X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=bin%2Fmudpy;fp=bin%2Fmudpy;h=0dfefd2a78e52c8fa392b115374560014be1294b;hp=0000000000000000000000000000000000000000;hb=8bf6b7a787510321b75e477079ebf70ac150d853;hpb=518f0aad04432b4bf0405520e659db3d6ba00a76 diff --git a/bin/mudpy b/bin/mudpy new file mode 100755 index 0000000..0dfefd2 --- /dev/null +++ b/bin/mudpy @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +u"""Skeletal executable for the mudpy engine.""" + +# Copyright (c) 2004-2009 Jeremy Stanley . Permission +# to use, copy, modify, and distribute this software is granted under +# terms provided in the LICENSE file distributed with this software. + +# core objects for the mudpy engine +import os.path, sys +sys.path.append( os.path.realpath(u"lib") ) +import mudpy + +# start it up +mudpy.misc.setup() + +# loop indefinitely while the world is not flagged for termination or +# there are still connected users +while not mudpy.misc.universe.terminate_flag or mudpy.misc.universe.userlist: + + # the world was flagged for a reload of all code/data + if mudpy.misc.universe.reload_flag: + reload(mudpy) + mudpy.misc.reload_data() + mudpy.misc.universe.reload_flag = False + + # do what needs to be done on each pulse + mudpy.misc.on_pulse() + +# shut it all down +mudpy.misc.finish()