Page 1 of 1

Code File Management

PostPosted: Sat May 07, 2016 2:55 pm
by arokha
Going forward as we move to the Polaris codebase, we will need to manage our changes to the default .dm files better.

Changes to stock code (files without the _vr.dm ending) must be kept very small. They should call a hook, or proc, in another .dm file with the _vr suffix.

For example, if you want to change how a button on the requests console works, do not edit the request console interface file. Instead, make a new file with the same name, ending in _vr.dm and put your relevant code in there. Then, in the actual requests interface file, call your code with:
Code: Select all
if(your_proc()) return

And in your code, you should return a value of 1 if it has succeeded. If it does not return, or returns a 0, then the original requests console code can run.

Re: Code File Management

PostPosted: Thu May 12, 2016 11:45 am
by antsnap2
Good software design. Idea++