Announcing the declaration finder.
Posted: Sat Feb 13, 2016 11:00 am
Ever wanted to find out where a given proc or var is defined?
https://tgstation13.org/findshit.php
BAM!
It parses thru xml giving by byond when you compile using the command line compiler and give it the option -o, finds the type you give, and then finds the earliest point on the type tree that thing is defined.
Limitations:
It doesn't yet understand mobs and objs are children of atom/movable, or that turfs are childrens of atom, or that atoms are childs of datums.
It shows the root definition or the earliest definition only, plans are to also show overrides (and in the case of vars, defaults and override values)
It only understands types as they are defined in the code. (meaning that you also have to watch out for types that don't start with datum, adding /datum/ to the start would confuse the script in that case.)
Updating is currently manually done, but i'll automate that.
This may go down from time to time as i update it to make it better.
Example link:
Find the root definition of /mob/living/carbon/human/Life()
https://tgstation13.org/findshit.php
BAM!
It parses thru xml giving by byond when you compile using the command line compiler and give it the option -o, finds the type you give, and then finds the earliest point on the type tree that thing is defined.
Limitations:
It doesn't yet understand mobs and objs are children of atom/movable, or that turfs are childrens of atom, or that atoms are childs of datums.
It shows the root definition or the earliest definition only, plans are to also show overrides (and in the case of vars, defaults and override values)
It only understands types as they are defined in the code. (meaning that you also have to watch out for types that don't start with datum, adding /datum/ to the start would confuse the script in that case.)
Updating is currently manually done, but i'll automate that.
This may go down from time to time as i update it to make it better.
Example link:
Find the root definition of /mob/living/carbon/human/Life()