News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Tutorial - code review

Started by Andarix, May 15, 2025, 01:22:00 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Yona-TYT

#35
Quote from: Andarix on June 06, 2025, 11:13:22 PMadd in 11720

The graphic is a bit deep and a bit smaller.

Screenshot 2025-06-07 005722.png

I was thinking of extending this to show tool icons as well, although this would require some work on the text.




search_tile_in_tiles() is not defined for class_basic_data.nut, this should fix it and hopefully won't break anything else.

https://github.com/simutrans/tutorial_multipak/commit/e0e8b59b3e2852fab4de327c0948912c4eed5744

Yona-TYT

#36


Yona-TYT

#38
https://github.com/simutrans/tutorial_multipak/commit/7d5eca682ecffc83be32058d2f409d081a722c80

Fix inconsistent layer values.




In pak128 the text label indicating where to build the tunnel has incorrect coordinates.

It should be (96,172), but it's set to (95,172).

Line 883 "class_chapter_03.nut"

          if ((!tile.find_object(mo_tunnel))){
            label_x.create(way2_fac2_fac3[2], pl_unown, translate("Place a Tunnel here!."))
            r_way.c =  coord3d(tile.x, tile.y, tile.z)
          }

simscr06.png

Andarix

I changed the coordinates. But now the track can no longer be built on the slope.

Yona-TYT

Quote from: Andarix on July 24, 2025, 03:24:12 PMI changed the coordinates. But now the track can no longer be built on the slope.
We've had that problem before, due to how slopes are handled in pak128 vs pak64.