Outerra forum
Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: giucam on November 23, 2012, 10:21:37 am
-
Well, i'm pretty blown off... i wanted to put the engine implementation in a different js file but i found out javascript doesn't have any #include like thing.
Google says there are workarounds but they are for js files used in web pages. Is there an Outerra way to do that?
-
Normally html files can contain multiple script statements so you don't necessarily need includes, but in our case it's a problem. We can attach multiple scripts into JS context, but so far there's no way how to specify which ones should be attached. Looks like we'll have to add support for it by allowing some #include statements in the root script and then, before loading, parsing the script header and attach the referred scripts, removing the #include lines as we do it.
Maybe not #include but something else.
-
mmh... it amazes me how can a language not have such a basic thing builtin...
i can leave without it without problems for now but yeah, it will be needed in the future.