News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[Tutorial] Pakset name should start with "Pak128" not "pak128"

Started by Yona-TYT, October 18, 2022, 12:43:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

There is a small but annoying difference in the name of the Pak128, and that is that it no longer starts with a capital letter. This is a problem when checking if the pakset is compatible with the tutorial.

Is the name change to lowercase planned? Or was it an error or carelessness?.

Andarix

It is generally better for such tests to convert everything to uppercase or lowercase.

Here is the function I use in the script AI.

/**
 * returns pakset name (lower case)
 *
 *
 */
function get_set_name()
{
local pakset = get_pakset_name()  // full string from ground.outside.pak
local s = pakset.find(" ")
pakset = pakset.slice(0, s)
pakset = pakset.tolower()

return pakset
}

Yona-TYT

Thank you very much, I will integrate this to the tutorials.   8)

Edit.
Is commit :)
https://github.com/simutrans/tutorial_pak64/commit/72093ae23a3ad9f7460415316311dfd597edcf6e