So, Zyt3x convinced me to be in favor of a database, I'll address that a little here, as well as what I think should happen with objects/smartcolors.simba.
- Completely replace the current objects.simba with a combination of MSI's object finding and smartcolors.simba. Will keep the name objects.simba, though.
- Have a global type, TRSObject, that can be imported to scripts/SRL files if needed (i.e. bank.simba could utilize object functions).
- Since SmartColors updates a global SC array during runtime, the final array can be uploaded to a database periodically throughout a script, or at the end. This would ensure everyone is using the most up to date object records. I'm not going to get into details about a database, but I just want you guys to think about it.
- For bank.simba, TRSObject could be used something like this:
Simba Code:// any file that requires object finding; will use bank.simba or this example
{$include_once objects.simba}
const
BANK_VARROCK_EAST = 0;
function __getBankObject(bank: integer): TObject; // TObject will be in the object.simba file
begin
case bank of
BANK_VARROCK_EAST:
with result do
begin
// attributes here
end;
end;
end;
function openBank(bank: integer): boolean;
begin
clickObject(__getBankObject(bank));
end;
// whatever other bank functions here
begin
end.
Basically the new objects.simba will just be an intelligent object finding library. Scripters can choose whether or not to use it, of course.
Thoughts?