Ejemplo n.º 1
0
def mm_attach(a):
  try:
    a.fg_wz_intref = asss.reg_interface(WZFlagGame(), a)
    a.fg_wz_cbref1 = asss.reg_callback(asss.CB_FLAGONMAP, flagonmap, a)
    a.fg_wz_cbkill1 = asss.reg_callback(asss.CB_KILL, onkill, a)
    a.fg_wz_freqman = asss.get_interface(asss.I_FREQMAN, a)
  except:
    mm_detach(a)
Ejemplo n.º 2
0
def mm_attach(a):
    try:
        a.fg_wz_intref = asss.reg_interface(WZFlagGame(), a)
        a.fg_wz_cbref1 = asss.reg_callback(asss.CB_FLAGONMAP, flagonmap, a)
        a.fg_wz_cbkill1 = asss.reg_callback(asss.CB_KILL, onkill, a)
        a.fg_wz_freqman = asss.get_interface(asss.I_FREQMAN, a)
    except:
        mm_detach(a)
Ejemplo n.º 3
0
def mm_attach(a):
	# set up interface
	a.fpwd_oldfm = asss.get_interface(asss.I_FREQMAN, a)
	a.fpwd_myint = asss.reg_interface(asss.I_FREQMAN, (initial, shipch, freqch), a)

	# set up command
	a.fpwd_joinpwd_cmd = asss.add_command("joinpwd", c_joinpwd, a)
	a.fpwd_freqpwd_cmd = asss.add_command("freqpwd", c_freqpwd, a)

	# data
	a.fpwd_fpwds = {}
Ejemplo n.º 4
0
def mm_attach(a):
    # set up interface
    a.fpwd_oldfm = asss.get_interface(asss.I_FREQMAN, a)
    a.fpwd_myint = asss.reg_interface(asss.I_FREQMAN,
                                      (initial, shipch, freqch), a)

    # set up command
    a.fpwd_joinpwd_cmd = asss.add_command("joinpwd", c_joinpwd, a)
    a.fpwd_freqpwd_cmd = asss.add_command("freqpwd", c_freqpwd, a)

    # data
    a.fpwd_fpwds = {}
Ejemplo n.º 5
0
    def GetInt(self, group, name):
        try:
            val = int(options[group][name])
            return (1, val)
        except (TypeError, KeyError, ValueError):
            return (0, 0)

    def GetFloat(self, group, name):
        try:
            val = float(options[group][name])
            return (1, val)
        except (TypeError, KeyError, ValueError):
            return (0, 0)

    def GetString(self, group, name):
        try:
            val = str(options[group][name])
            return (1, val)
        except (TypeError, KeyError, ValueError):
            return (0, 0)

    def GetBool(self, group, name):
        try:
            val = bool(options[group][name])
            return (1, int(val))
        except (TypeError, KeyError, ValueError):
            return (0, 0)


intref = asss.reg_interface(OptParser(), None)
Ejemplo n.º 6
0
def mm_attach(a):
    a.fhsos_oldfm = asss.get_interface(asss.I_FREQMAN, a)
    a.fhsos_myint = asss.reg_interface(HS_OwnedShip(), a)
Ejemplo n.º 7
0
def mm_attach(a):
	try:
		a.fg_wz_intref = asss.reg_interface(WZFlagGame(), a)
		a.fg_wz_cbref1 = asss.reg_callback(asss.CB_FLAGONMAP, flagonmap, a)
	except:
		mm_detach(a)
Ejemplo n.º 8
0
def mm_attach(a):
    try:
        a.fg_wz_intref = asss.reg_interface(WZFlagGame(), a)
        a.fg_wz_cbref1 = asss.reg_callback(asss.CB_FLAGONMAP, flagonmap, a)
    except:
        mm_detach(a)
Ejemplo n.º 9
0
def mm_attach(a):
    a.fg_turf_ref = asss.reg_interface(TurfFlagGame(), a)
Ejemplo n.º 10
0
    def GetInt(self, group, name):
        try:
            val = int(options[group][name])
            return (1,val)
        except (TypeError, KeyError, ValueError):
            return (0,0)

    def GetFloat(self, group, name):
        try:
            val = float(options[group][name])
            return (1,val)
        except (TypeError, KeyError, ValueError):
            return (0,0)

    def GetString(self, group, name):
        try:
            val = str(options[group][name])
            return (1,val)
        except (TypeError, KeyError, ValueError):
            return (0,0)

    def GetBool(self, group, name):
        try:
            val = bool(options[group][name])
            return (1,int(val))
        except (TypeError, KeyError, ValueError):
            return (0,0)

intref = asss.reg_interface(OptParser(), None)
Ejemplo n.º 11
0
def mm_attach(a):
    a.fhsos_oldfm = asss.get_interface(asss.I_FREQMAN, a)
    a.fhsos_myint = asss.reg_interface(HS_OwnedShip(), a)