Help with factories
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 7
- Joined: Tue, 10. Feb 04, 10:45
Help with factories
Does anyone know how to get a list (array) of resources that are used by a factory. I might have missed something obvious, but the script only seems to provide functions to get the number of resources (primary and secondary) used by a factory.
-
- Posts: 1087
- Joined: Sun, 7. Mar 04, 23:03
most scripts use a workaround:
- create a script, that returns an array containing all available wares (manually add 'em to an array)
- use a loop that tests for each element in this array, whether it's used by the station or not, if used, add it to another array
then you've got the used wares
let's hope there will be a function to get the ressources in 1.4
- create a script, that returns an array containing all available wares (manually add 'em to an array)
- use a loop that tests for each element in this array, whether it's used by the station or not, if used, add it to another array
then you've got the used wares

let's hope there will be a function to get the ressources in 1.4
-
- Posts: 7
- Joined: Tue, 10. Feb 04, 10:45
-
- Posts: 1087
- Joined: Sun, 7. Mar 04, 23:03
-
- Posts: 7
- Joined: Tue, 10. Feb 04, 10:45
Looks like someone has already written the script I need over here.
http://www.x2source.com/mods/pafiledb.p ... gory&id=17
Thanks for your help
http://www.x2source.com/mods/pafiledb.p ... gory&id=17
Thanks for your help
