Exemplo n.º 1
0
    def test_sourcemod_path(self):
        """SourceMod path in sys.path"""
        self.assert_(
            sourcemod.get_sourcemod_path().replace("\\", "/") in sys.path[0],
            "%s not found in %s" % (sourcemod.get_sourcemod_path().replace("\\", "/"), sys.path[0]),
        )

        end = "thoushaltalwayskill"
        self.assert_(
            sourcemod.get_sourcemod_path(end).replace("\\", "/").endswith(end),
            '"%s" does not end with "%s"' % (sourcemod.get_sourcemod_path(end).replace("\\", "/"), end),
        )
Exemplo n.º 2
0
    def test_sourcemod_path(self):
        '''SourceMod path in sys.path'''
        self.assert_(
            sourcemod.get_sourcemod_path().replace('\\', '/') in sys.path[0],
            '%s not found in %s' %
            (sourcemod.get_sourcemod_path().replace('\\', '/'), sys.path[0]))

        end = 'thoushaltalwayskill'
        self.assert_(
            sourcemod.get_sourcemod_path(end).replace('\\', '/').endswith(end),
            '"%s" does not end with "%s"' %
            (sourcemod.get_sourcemod_path(end).replace('\\', '/'), end))
Exemplo n.º 3
0
def outmods(cmd):
  mod = gen_mod(sourcemod, deep=True)
  base = sourcemod.get_sourcemod_path() + '/extensions/viper/headers/'
  
  output_header(base, mod)
  
  cmd.reply('Successfully outputted headers')
  return Plugin_Handled
Exemplo n.º 4
0
def outmods(cmd):
    mod = gen_mod(sourcemod, deep=True)
    base = sourcemod.get_sourcemod_path() + '/extensions/viper/headers/'

    output_header(base, mod)

    cmd.reply('Successfully outputted headers')
    return Plugin_Handled