ID:122689
 
Not Feasible
Applies to:DM Language
Status: Not Feasible

Implementing this feature is not possible now or in the foreseeable future
It'd be pretty handy to use call() to access procs defined in other dmb files, eg:

// Inside an external dmb file, special.dmb
var/specialcode = "SPECIAL" // for security

proc/special( params )
set cancall = 1
. = "Your params are: [params]"
return list(md5("[.][specialcode]"),.)

// Inside the current dmb
var/specialcode = "SPECIAL"
client/verb/test()
var/test = call("special.dmb", "special")("testing")
if( (test.len>1) && test[1]==md5("[test[2]][specialcode]") )
src << test[2]


I know something similar is already possible using shell()/startup() and world.params, but that is rather cumbersome and does unnecessary work. How feasible would it be to implement this?
I don't see how this would work and why you'd desire such functionality.

It's already possible to connect to another game through the use of world.Export().

I don't see how this approach is desired. Every time you would execute that proc BYOND would have to run the specified .dmb file from scratch, call world/New() on it, execute the function, store the return value, and shut it all down again.
The problem is world/Export() isn't very fast, nor too reliable. Plus it requires for the external dmb to be hosted.

And yes, this would work somewhat like DMCGI in that it would start the world (but in a limited fashion of course, not the whole gusto- perhaps the external dmb's code can even be executed inside the memory of the current one- or i probably don't know what i'm talking about), call the proc, and then kill the process.

The main use of this would be to allow some flexible modding for projects. For example, you could plug in different map generators written by your players for a dungeon crawler, etc. without having to use another language.