Ikariam x500 Payloads

By oliezekat Last update Dec 19, 2011 — Installed 119,785 times.

Ikariam Remaining Transport Space

in
Subscribe to Ikariam Remaining Transport Space 2 posts, 2 voices



MT0 Scriptwright

Oliezekat,


You posted on the discussion for the "Ikariam Remaining Transport Space" script that I co-authored with Inkietjij that you were interested in combining the functionality of the two scripts. Inkietjij has copyrighted his part of the script so I cannot authorise use of all of it, however my part of it (the event handlers) is copyleft and released under the GNU GPL v3 so it can be re-used.


I have created a separate module that you can just import using an @require statement. If you include this in the header:

// @require        http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js
// @require        http://userscripts.org/scripts/source/49963.user.js

And create a callback function to handle the change in resources and then initialise the event handler object using the callback function it should give you the functionality you are after:

function handleChangeInResources( handler ) {
   // PUT CODE TO HANDLE UPDATES IN HERE.
}
new IkariamTransportResourcesHandler( handleChangeInResources );

Martynius

 
oliezekat Script's Author

In fact, it's not a full copy I would like. Anothers users would like button which complete transports payloads to full loading...

That's mean I don't want include "Ikariam Remaining Transport Space" script or its features. Twice scripts (mine and his) are usefull while used at same time ;o)

But "Ikariam Remaining Transport Space" script show me how I could design requested feature.

NB: your external product as like an API for Ikariam scripts is nice but I advice you to define namespaced source-code (as I did into Triumphal Arch) for clean include into third parties scripts.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel