Interface administrators, moderator
2,756
edits
No edit summary |
No edit summary |
||
Line 36: | Line 36: | ||
== Meta File == | == Meta.xml File == | ||
This is used to provide some basic information and what scripts/files it provides.<br> | |||
'''All resources must have a meta.xml, or the resource won't load!''' | |||
Example | |||
{{XMLCode|1=<meta> | {{XMLCode|1=<meta> | ||
<info author="" type="" version="" description="" /> | <info author="" type="" version="" description="" /> | ||
Line 56: | Line 48: | ||
<file url="" src="" type="" /> | <file url="" src="" type="" /> | ||
</meta>}} | </meta>}} | ||
Some notes: | |||
* All "src" attributes are a relative path to the file, with the resource's folder as the root. See the "Sandbox" section above for more info on that. | |||
* The <code>info</code> node contains attributes that indicates who made the resource, it's type (custom description), custom version number, and a description of the resource<br> | |||
* Every script file needs to have a <code><script></code> node, each with a "type" attribute that refers to what side the script will run on (server or client), a language attribute that tells the server/client which language the script file uses (see [[ScriptingLanguages|supported scripting languages]]), and a "src" attribute with the file name as a relative path (i.e. "example.js" or "foo/bar.js". | |||
* Every custom file needs to have a <code><file></code> node, each with a "src" attribute for the file's path, and a "type" attribute indicating whether it's for the client or server. | |||
* Any <code><dependency></code> node, with a "src" attribute with the other resource's name, will require the other resource to be loaded BEFORE this one. | |||
== Client-side Files == | == Client-side Files == |