News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Shortcut key for narrow gauge?

Started by jamespetts, August 12, 2012, 05:42:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I am trying to add "q" as the shortcut key for building narrow gauge track in Pak128.Britain-Ex, but am doing something wrong, as "q" ends up being bound to ordinary track instead.

Here is the existing menuconf.tab:


# railtools
toolbar[2][0]=ways(2,0)
toolbar[2][1]=ways(2,1)
toolbar[2][2]=bridges(2)
toolbar[2][3]=tunnels(2)
toolbar[2][4]=wayobjs(2)
toolbar[2][5]=signs(2)
toolbar[2][6]=general_tool[17],16,,2
toolbar[2][7]=general_tool[33],30,,2
toolbar[2][8]=buildings(33,2)
toolbar[2][9]=buildings(34,2)
toolbar[2][10]=buildings(35,2)
toolbar[2][11]=buildings(35,0)
toolbar[2][12]=general_tool[14],,t,2
toolbar[2][13]=general_tool[18],,e,2

# narrowgaugetools
toolbar[3][0]=ways(8,0)
toolbar[3][1]=ways(8,1)
toolbar[3][2]=bridges(8)
toolbar[3][3]=tunnels(8)
toolbar[3][4]=wayobjs(8)
toolbar[3][5]=signs(8)
toolbar[3][6]=general_tool[17],16,,8
toolbar[3][7]=buildings(33,8)
toolbar[3][8]=buildings(34,8)
toolbar[3][9]=buildings(35,8)
toolbar[3][10]=buildings(35,0)
toolbar[3][11]=general_tool[14],,t,2
toolbar[3][12]=general_tool[18],,e,2


I have modified this to replace the line "toolbar[3][11]=general_tool[14],,t,2" with "toolbar[3][11]=general_tool[14],,q,2". Before modifying it, "q" was unbound. Now, "q" is bound to standard gauge track.

I am rather confused, as I thought that "toolbar[3][11]=general_tool[14],,t,2" was the definition line for a the tool for laying narrow gauge track, and that the letter specified afterwards was the shortcut key for it. Is this not so?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Lubak91

"2" is number for track waytype, "8" is number for narrowgauge waytype...


toolbar[3][11]=general_tool[14],,q,8
So, let me get this straight. You want to fly on a magic carpet to see the King of the Potato People and plead with him for your freedom, and you're telling me you are completely sane?!

jamespetts

That works excellently - thank you very much.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

greenling

james do you rechange the menu struktur?
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

jamespetts

No, the structure remains unchanged: I have simply added a shortcut key.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

greenling

Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!