Code File Management

Screw up game balance and fix bugs by creating more bugs. Now you too can join the discussion. This is where the magic happens. Sometimes actual magic.

Code File Management

Postby arokha » Sat May 07, 2016 2:55 pm

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.
User avatar
arokha
 
Posts: 164
Joined: Mon Aug 10, 2015 12:54 am

Re: Code File Management

Postby antsnap2 » Thu May 12, 2016 11:45 am

Good software design. Idea++
Antsy Coder. Characters: Muffy (drider), Jaslene (naga), Susan (slime), Miki (oni), Alythess (Demon)
User avatar
antsnap2
 
Posts: 97
Joined: Mon Oct 12, 2015 2:25 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 4 guests