Proposal: Stay on Target!
2 to 1 after 48 hours. enacted by derrick.
Adminned at 10 Oct 2018 15:51:16 UTC
A program has a target, which is the name of a program defaulting to its owner, and tracked in the GNDT. A program may change their target as a daily action.
After the line `var randomSeed = "__RANDOM";` insert:
// END GLOBAL VARIABLE SECTION
Add to the rule "Formatting":
The area in the Master Control Program between "// GLOBAL VARIABLE SECTION" and "// END GLOBAL VARIABLE SECTION" is known as the Global variable section.
when adding a function to the master control program, it shall not be placed inside an existing function not specified, and if shall not be placed after the first if statement outside of a function.
insert into the Global Variable Section:
var actingProgram = "__PROGRAM"
Add to the Bullet list in preprocessor
*"__PROGRAM" may be replaced by the Name of the Program which is executing the Master Control Program
Add these functions to the Master Control Program:
function getProgramInfo(program){
var programInfo = GNDTArray.filter(entry=>entry[0]==program);
if(!programInfo) printLine("Illegal Execution! invalid program name");
else return programInfo;
}
function getTarget(program){
var info = getProgramInfo(program);
if(info) return info[3];
}
Right now the identity of who runs the program doesn’t matter. This will allow players to target allies and enemies for different effects.
Kevan: he/him