News:

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

[Bug] bridge/tunnel/way info window chaos

Started by Mariculous, January 08, 2020, 02:09:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

Hey there,
While I was comparing way costs of iron girder elevated road, which is quite inexpensive in maintainance, especially when equipped with trolleybus wires, compared to any flat road, the difference in cost is quite small.
Construction of girder elevated is even less expensive than TarMc roads, I asume this really needs some raised costs.

However, that's not the point here. While exploring this, I noticed that the bridge/tunnel info window does not show the cost of the bridge/tunnel at all.
As you can see in the image, "maintainance" is the maintainance of just and only the way on that bridge/tunnel, while "maintainance including assets" includes the catenary/trolleybus wire but not the bridge maintainance.
I assume it should list cost for the bridge, way and assets at that way and "maintainance including assets" should sum up all of these.
Not quite sure if bridges/tunnels also need renewal, but currently only the way is listed there.

Additionally, the second section in the window seems to be excessive. Is there any reason for this?

Further, for rails it seems there are always two different info windows:
The first click will open a window that will always be titled as the rail type,
the second click will open a window with further information, including the whole first window. That one will be titled as "Bridge" in case it is a bridge, otherwise it will be titled as the track type.

jamespetts

Thank you for the report. I will have to look into this in more detail after I get home.

I should note that tunnels and bridges were separated from the ways in 2014. The underlying tunnels and bridges need maintenance, but do not need renewal. There have been some further changes to the way information dialogue since this time, but I am not sure whether those are related to this issue.

I agree that this does need some improvement. I wonder whether any of the people who have done a lot of work recently on the GUI might be able to help, as my queue of tasks (including a long list of signalling bugs, which are always hard to fix) is very long?
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.

Mariculous

Quoteincluding a long list of signalling bugs
Sorry :D

jamespetts

Quote from: Freahk on January 08, 2020, 02:56:22 PM
Sorry :D

One thing that might assist in organising my work once I get back home is some indication of the relative importance of the various bugs, perhaps in your bug and small coding project list thread?
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.

Mariculous

It is pretty hard to judge importance of bugs as that "relative importance" is pretty vague defined but I'll give it a try.

Ranran(retired)

Quote from: Freahk on January 08, 2020, 02:09:32 PMFurther, for rails it seems there are always two different info windows:

if(!is_water()) {
if(flags&has_way1) {
buf.append(translator::translate(get_weg_nr(0)->get_name()));
buf.append("\n");
obj_bei(0)->info(buf, ist_bruecke());
has_way = true;
if(flags&has_way2) {
buf.append(translator::translate(get_weg_nr(1)->get_name()));
buf.append("\n");
obj_bei(1)->info(buf, ist_bruecke());

In a rough check, I think there is an error in this logic. (grund.cc grund_t::info)


Quote from: Freahk on January 08, 2020, 02:09:32 PMAdditionally, the second section in the window seems to be excessive. Is there any reason for this?
Probably, the window with the small amount of information displayed first is an unnecessary window. (Assuming that window will be deleted in the future) In that case, delete line 495 of weg.cc. In addition, you need to remove a line breaks.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ranran(retired)

#6
Quote from: Freahk on January 08, 2020, 02:09:32 PMAdditionally, the second section in the window seems to be excessive. Is there any reason for this?
I fixed this issue and threw a pull request. please confirm.
https://github.com/jamespetts/simutrans-extended/pull/156

It is the yellow part of the two that is duplicated that is removed.



Quote from: Freahk on January 08, 2020, 02:09:32 PMFurther, for rails it seems there are always two different info windows:
The first click will open a window that will always be titled as the rail type,
the second click will open a window with further information, including the whole first window. That one will be titled as "Bridge" in case it is a bridge, otherwise it will be titled as the track type.
I think this may be due to the two obj->show_info() judgment expressions in simtool.cc line 329-331 and line 378-380.
But I don't know why it doesn't open on the road but on other ways. It would be nice if someone could check it. (´・ω・`)

EDIT:
By the way, the code of the relevant part has not changed from standard. But standard does not open another useless dialog.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

I believe that I merged this fix some time ago: my apologies for not having acknowledged this until now. Thank you Ranran for working on this.
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.

Ranran(retired)

Regarding the remaining issues:
I am guessing than the track is treated as having double objects in extended, which causes two dialogs to open, but I'm not sure where that is happening.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)