
02-25-2007, 05:55 AM
|
|
Incubator
|
 |
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
|
|
|
I would like to see something like 'import' being made functional by allowing you to create function links in one object to another.
Example:
Weapon: +Strange/Name
public function a()
public function b()
Weapon: +Another/One
public function a()
public function c()
So you have function a() and b() in the weapon +Strange/Name which due to the characters in it, you can't call +Strange/Name.a() and such because of the special characters so you have to use makevar() or something.
Now in the weapon named +Another/One you could have something like:
function onCreated() {
import(makevar("+Strange/Name"));
}
What the import function would do would be to take an object as its parameter and make function links in the current object leading to the imported object. This way you can call functions from other objects without using large object identifiers before the function.
Also, you might notice how function a exists in both objects, I think there could be an option in the import function to overwrite existing functions with imported ones or not. Also importing would only work for public functions since its basically inserting one function linking to another.
Again, maybe another feature could be an import prefix, which would simply add the specified prefix to imported function names so existing functions can't be overwritten at all. |
|
|
|