Heres a sample of my coding, I'm
extremely picky about the formatting.
PHP Code:
public function loadRefs(obj) {
temp.i;
temp.e;
temp.vars;
temp.count;
temp.ref;
vars = obj.getVarNames();
count = 0;
for (i = 0; i < vars.size(); i ++) {
if (obj.(@ vars[i]).type() == 1) {
if (MudControl.isRefStr(obj.(@ vars[i]))) {
ref = obj.(@ vars[i]);
obj.(@ vars[i]) = MudControl.parseRef(ref);
obj.(@ vars[i]).addRef(obj);
count ++;
}
}
else if (obj.(@ vars[i]).type() == 3) {
for (e = 0; e < obj.(@ vars[i]).size(); e ++) {
if (obj.(@ vars[i])[e].type() == 1) {
if (MudControl.isRefStr(obj.(@ vars[i])[e])) {
ref = obj.(@ vars[i])[e];
obj.(@ vars[i])[e] = MudControl.parseRef(ref);
obj.(@ vars[i])[e].addRef(obj);
count ++;
}
}
}
}
}
echo(format("References Loaded (%s): %s %s", count, obj.mudtype, obj.mudid));
}