Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
TheGrimReaper

Avatar / Picture

Registered:
Posts: 26
Reply with quote  #1 
I think that we should have Arguments in scripting. I'm not saying that we should replace the current starting line, but have the ability to have arguments to pass to our programmable blocks. 

Here is my idea:
Check if the void Main(String[] args){} method exist with Type.GetMethod(), and if it doesn't then just use void Main(){} as the main method. If both exist, use void Main(String[] args){} as it should be higher on the hierarchy. 

For Arguments:
If no arguments are given, then it will make the String array "args" have a length of zero. The reason why it should be zero instead of null, is because it will be easier to deal with that way, and it spares us a line because we won't have to have a null checker.

Benefits of Arguments with Scripting:
- One programmable block, multiple uses with different buttons.
- Easier creation of things like airlocks, sorters, or anything that relies on checking for environmental values to function properly.
- More realistic. 
- Possible Multi-Programmable Block programming.
- Tons and Tons of things.
- Post more ideas in this thread?

Drawbacks of Arguments with Scripting:
If you have any, post them here, because I can't think of any, besides for if the implementation is not correct and they end up replacing what is there now with this instead of adding it along side of what we have now which would end up breaking 100% of all scripts.
LordDevious

Avatar / Picture

Registered:
Posts: 998
Reply with quote  #2 
Hehe, fantastic... I was just about to suggest the same.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!