mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Fixed up in-hands and flags and shit jesus fucking BYOND christ
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
'''
|
||||
Created on Apr 29, 2014
|
||||
|
||||
@author: Rob
|
||||
'''
|
||||
import argparse,os
|
||||
|
||||
from byond.objtree import ObjectTree
|
||||
from byond.basetypes import Proc
|
||||
|
||||
def dumpSubTypes(atom):
|
||||
print('{}:{}: {}'.format(atom.filename,atom.line,atom.path))
|
||||
for rpath,catom in atom.children.items():
|
||||
if not isinstance(catom,Proc):
|
||||
dumpSubTypes(catom)
|
||||
|
||||
if __name__ == '__main__':
|
||||
opt = argparse.ArgumentParser()
|
||||
opt.add_argument('project', metavar="project.dme")
|
||||
opt.add_argument('--subtypes',type=str,help="List all subtypes of the given type")
|
||||
args = opt.parse_args()
|
||||
if os.path.isfile(args.project):
|
||||
tree = ObjectTree()
|
||||
tree.ProcessFilesFromDME(args.project)
|
||||
if args.subtypes:
|
||||
atom = tree.GetAtom(args.subtypes)
|
||||
dumpSubTypes(atom)
|
||||
Reference in New Issue
Block a user