IRC logs for #openttd on OFTC at 2022-06-23
            
00:22:20 *** joel has joined #openttd
00:24:59 *** joel has quit IRC (Remote host closed the connection)
00:34:23 *** joel has joined #openttd
00:35:57 *** wallabra has joined #openttd
00:40:06 *** joel has quit IRC (Remote host closed the connection)
00:49:55 *** joel has joined #openttd
00:49:57 *** joel has quit IRC (Read error: Connection reset by peer)
01:25:06 *** joel has joined #openttd
01:47:15 *** Wormnest has quit IRC (Quit: Leaving)
01:48:27 *** joel has quit IRC (Remote host closed the connection)
01:53:21 *** Joel has joined #openttd
02:31:09 *** D-HUND has joined #openttd
02:34:36 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:08:49 *** glx has quit IRC ()
04:10:10 *** wallabra has quit IRC (Ping timeout: 480 seconds)
04:27:14 *** Smedles_ has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:27:47 *** Smedles has joined #openttd
05:27:40 *** Flygon has joined #openttd
05:28:20 *** wallabra has joined #openttd
05:39:43 *** andythenorth has joined #openttd
05:43:17 *** sla_ro|master has joined #openttd
06:23:09 *** andythenorth has quit IRC (Quit: andythenorth)
06:23:44 *** D-HUND is now known as debdog
06:24:39 *** andythenorth has joined #openttd
06:33:18 *** andythenorth has quit IRC (Quit: andythenorth)
06:35:25 *** andythenorth has joined #openttd
07:35:42 <peter1138> Hrmm
07:44:57 <andythenorth> yup
08:37:00 *** wallabra has quit IRC (Ping timeout: 480 seconds)
08:56:31 *** HerzogDeXtEr has joined #openttd
09:04:18 *** sla_ro|master has quit IRC ()
09:20:22 *** Samu has joined #openttd
09:29:46 <Joel> Is there a window event handler that will be triggered by changing the settings? I want to be able to set a member variable of the window when a setting changes, not OnPaint
09:36:14 <Eddi|zuHause> a setting can have a callback function when it changes
09:56:40 <Samu> how to know which is the most advanced railtype if they both have the same max speed and cost?
09:56:53 <Samu> i gotta pick one!
09:57:35 <peter1138> Pick the one that is compatible with the engines you want to use.
10:13:20 <Samu> they already are
10:13:28 <Samu> i have that check
10:13:44 <peter1138> Okay, then it doesn't matter.
10:14:43 <Samu> i went with the cost factor , the higher, the better, keks, which may not always be the case
10:20:23 <Samu> problem is when everything is equal
10:20:30 <Samu> then i really have to random pick
10:27:33 <Samu> let's see now what it comes up for mail
10:37:59 <Samu> Driving Van Trailer + 4x Sliding Wall Van (Twin) on Advanced electric high-speed line construction
10:39:06 <Samu> absurd line costs
10:39:14 <Samu> for such a cheap train
10:39:32 <Samu> guess going with the highest rail cost isn't always the best idea
10:48:16 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan updated pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928
10:49:54 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan commented on pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928#pullrequestreview-1016796081
10:50:06 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan commented on pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928#pullrequestreview-1016796347
10:50:36 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan commented on pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928#pullrequestreview-1016796865
11:58:15 *** virtualrandomnumber has joined #openttd
11:58:58 *** virtualrandomnumber has quit IRC ()
12:07:24 *** glx has joined #openttd
12:07:24 *** ChanServ sets mode: +v glx
12:34:10 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928#issuecomment-1164351229
12:42:10 *** Joel has quit IRC (Ping timeout: 480 seconds)
12:44:47 *** joel has joined #openttd
12:47:39 *** sla_ro|master has joined #openttd
12:51:06 <Samu> i don't know how to program this...
12:51:38 <Samu> i got 3 railtypes, each with 50, 70 and 90 max speed, then i have the train with 60 max speed
12:52:30 <Samu> i want to compute the railtype which is faster than the train but not the highest
12:52:44 <Samu> so, i want to get the railtype with 70 max speed
12:52:53 <Samu> don't know how to do this in code
12:55:23 <Samu> so, the one which is closest to the train speed, but never lower
12:56:15 <glx> rail list, valuate speed, filter
12:56:34 <Samu> and the other situation is, 3 railtypes with 30 and 50 max speed, with train 60 max speed
12:56:51 <Samu> in this case i want to get the fastest possible, which is 50
12:58:06 <Samu> i said 3 railtypes, i meant 2
12:59:07 <Samu> and then there's the matter of ties
12:59:43 <Samu> 3 railtypes, each with 60 60, i want to get both
12:59:46 <Samu> 60 60 60
13:00:37 <glx> they might have different costs
13:00:51 <Samu> that's okay for now
13:00:54 <glx> build or maintenance
13:04:29 <Samu> https://pastebin.com/raw/d97tsA8D
13:04:33 <Samu> i got this far only
13:04:51 <Samu> i can only get a list of the fastest
13:05:13 <Samu> ones
13:09:07 <Samu> maybe i need a table?
13:09:11 <Samu> instead of array?
13:09:18 <Samu> i dunno, i'm lost
13:09:30 *** Joel__ has joined #openttd
13:09:32 <glx> I'd get an AIRailTypeList, valuated (and sorted) with AIRail.GetMaxSpeed, then you store the fastest railtype, then you remove items slower than the train
13:10:03 <glx> if the list is empty you use the stored value, else the slowest in the list
13:13:05 <glx> descending sort for unfiltered speed, so Begin() is the fastest, ascending sort for filtered so Begin is the slowest
13:35:15 <andythenorth> augment / replace train prop 25 with a dword, and add a var to read it?
13:35:31 <andythenorth> maybe ignoring the slightly odd var 42 OR thing
13:36:15 <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles#Consist_cargo_.2842.29
13:37:17 <andythenorth> it's such a classic :)
13:37:17 <andythenorth> https://github.com/OpenTTD/OpenTTD/commit/10ab24a5f149955f3af71ba152609a4be676b795
13:37:21 <andythenorth> https://github.com/OpenTTD/OpenTTD/commit/f28723830fc92c4ef2235739a1dd85d686235211
13:38:05 *** nielsm has joined #openttd
13:43:58 <Samu> thanks, I think I did it, let me test
13:45:12 <glx> of course before valuation with speed, you valuate with can run/has power and keep only what the train can use
13:46:39 <Samu> nop, i failed somewhere, the final list became empty :(
13:46:50 *** Joel__ has quit IRC (Ping timeout: 480 seconds)
13:54:32 <Samu> for some reason, the 2 temporary lists became both empty?
13:55:41 <glx> hmm you had list1 then did list2=list1 before filtering ?
13:55:52 <Samu> i have 3 lists
13:56:05 <Samu> or 4 if i count the original one
13:56:16 <glx> IIRC lists are not copied when assigned to a variable
13:57:18 *** WormnestAndroid has quit IRC (Remote host closed the connection)
13:57:19 <Samu> https://pastebin.com/raw/cUsSnFjs
13:57:59 <Samu> list 1-> railtypes, it's an array
13:58:16 <Samu> list 2-> railtypes_list, it's an AIList
13:58:36 <Samu> list 3-> railtypes_below_train_speed, it's an AIList
13:58:51 <Samu> list 4-> best_railtypes, it's an array
13:59:03 <glx> you didn't valuate, so all values are 0
13:59:41 <glx> I think
13:59:43 <Samu> i added the value railtypes_list.AddItem(railtype, railtype_max_speed);
14:00:13 <Samu> cant use valuate because some railtypes have 0 in it
14:00:16 <glx> ah right the values should be right
14:00:53 <peter1138> if 0 then 9001
14:01:55 <glx> railtypes_below_train_speed.KeepBelowValue(train_max_speed); <-- don't you want the opposite ?
14:02:38 <glx> a rail speed limit higher than train speed limit
14:03:15 <Samu> ah, i think i found the problem
14:04:01 <Samu> railtypes_below_train_speed.KeepValue(railtypes_below_train_speed.GetValue(railtypes_below_train_speed.Begin()));
14:04:01 <andythenorth> dword per train vehicle then? :P
14:04:07 <andythenorth> breaks everything?
14:07:44 <Samu> okay, it got somewhere!
14:08:53 *** joel has quit IRC (Remote host closed the connection)
14:09:12 <Samu> it picked Zeus (Electric), with Suburban Coach (Large) on Dual-power accelerated main line construction
14:09:37 <Samu> rail line max speed is 180 km/h
14:09:39 *** joel has joined #openttd
14:10:14 <Samu> zeus electric is 159 km/h
14:10:36 *** Tirili has joined #openttd
14:10:38 <glx> would still be faster to use valuate, you can use a custom valuator
14:10:53 <Samu> suburban coach theres' 140 and 159 km/h
14:10:59 <Samu> with the same name
14:11:05 <Samu> so i assume it's the 159 km/h
14:12:22 <Samu> guess it got it right, the previous railtype speed is 130 km/h
14:12:44 <Samu> and the next is 230
14:14:47 *** Joel__ has joined #openttd
14:17:41 *** joel has quit IRC (Ping timeout: 480 seconds)
14:18:21 <Samu> i'm against valuators, they cause spikes
14:18:42 <Samu> openttd becomes a stutterfest with them
14:21:23 *** WormnestAndroid has joined #openttd
14:28:33 <Samu> hmm there's no way to know if an engine is dual-headed
14:29:12 <Samu> can't do a precise measure of air drag
14:29:38 <Samu> it counts number of parts, and multihead engines are 2 parts in the equation
14:29:41 <andythenorth> air drag is silly
14:32:19 <Samu> very niche use case
14:43:28 *** joel has joined #openttd
14:43:55 *** andythenorth has quit IRC (Quit: andythenorth)
14:44:53 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan updated pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928
14:51:32 *** joel has quit IRC (Ping timeout: 480 seconds)
14:59:23 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan commented on pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928#pullrequestreview-1017177998
15:00:21 *** joel has joined #openttd
15:01:16 <glx> joel: yeah some part of the code are "hidden"
15:01:45 <glx> (not really, but settings is part of generated code)
15:02:19 <Joel__> Yeah I found out about setting callbacks, but couldn't figure out where to find it. Seems obvious in hindsight. Thanks for all the help so far, I really appreciate it
15:03:32 <LordAro> We appreciate you sticking with it :)
15:03:40 <LordAro> and all our unreasonable demands
15:10:40 <glx> github mobile app is weird, it correctly says 6 files changed, but if I click to see the diff, it also includes unrelated modified lang files from previous WT commit
15:17:53 *** joel has quit IRC (Remote host closed the connection)
15:18:04 *** joel has joined #openttd
15:27:34 *** sla_ro|master has quit IRC ()
15:27:48 <LordAro> rebase related?
15:29:56 *** andythenorth has joined #openttd
15:33:47 <glx> don't think so, branch is 1 ahead, 3 behind and the website display is correct
15:36:18 *** Montana_ has joined #openttd
15:37:34 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan updated pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928
15:37:43 *** Joel__ has quit IRC (Quit: Leaving)
15:38:37 *** joel has quit IRC (Remote host closed the connection)
15:39:04 *** joel has joined #openttd
15:57:31 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
15:57:52 *** jinks has joined #openttd
15:58:51 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928#pullrequestreview-1017277761
16:04:41 *** andythenorth has quit IRC (Quit: andythenorth)
16:10:12 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan updated pull request #9928: Change: Remove scrollbar from town authority actions panel https://github.com/OpenTTD/OpenTTD/pull/9928
16:28:54 *** joel has quit IRC ()
16:32:51 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
16:32:58 *** Smedles has joined #openttd
16:57:14 *** Tirili has quit IRC (Quit: Leaving)
16:57:20 *** Tirili has joined #openttd
17:08:04 *** wallabra has joined #openttd
17:37:59 *** Tirili has quit IRC (Quit: Leaving)
17:38:04 *** Tirili has joined #openttd
17:46:52 <Samu> i finally integrated that whole advance distance from openttd into the script
17:47:03 <Samu> well, parts of, i assumed a lot of things
17:50:30 <Samu> from iron horse, it picked Hector (Electric) with 5 Railcar Trailers
17:51:20 <Samu> i assumed in code that train are going uphill the entire time
17:51:30 <Samu> maybe that's affecting the results
18:02:46 *** Montana_ has quit IRC (Quit: Leaving)
18:16:05 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:19:57 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:20:06 *** Smedles has joined #openttd
18:36:35 *** Etua has joined #openttd
18:50:13 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/68257e0d7d3402494db9756c66ca43a5397ef520
18:50:14 <DorpsGek> - Update: Translations from eints (by translators)
18:58:03 *** Wormnest has joined #openttd
19:30:44 *** tokai has joined #openttd
19:30:44 *** ChanServ sets mode: +v tokai
19:37:36 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:49:30 *** sla_ro|master has joined #openttd
20:00:38 <Samu> woah, iron horse has some wagons with the exact same running cost, capacity and weight
20:00:49 <Samu> only differenciator is price
20:01:12 *** Mapminik has joined #openttd
20:01:17 <Samu> oh, also same speed
20:02:08 <Samu> guess i need to take price into account in the formula, lol
20:04:45 *** Etua has quit IRC (Ping timeout: 480 seconds)
20:04:48 *** Mapminik is now known as Etua
20:11:28 *** Etua has quit IRC (Quit: Etua)
20:32:41 *** andythenorth has joined #openttd
20:50:26 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #9931: Feature: Multi-track level crossings https://github.com/OpenTTD/OpenTTD/pull/9931
21:18:55 <LordAro> oho
21:19:32 <Samu> so professional
21:27:15 *** nielsm has quit IRC (Remote host closed the connection)
21:31:48 *** andythenorth has quit IRC (Quit: andythenorth)
21:42:08 <Samu> tables behave quite random
21:42:26 <Samu> i never get the same ordering
21:45:28 <Samu> it feels like I'm doing something wrong
21:45:33 <Samu> but I'm not
21:47:26 <Samu> look at this piece of code
21:47:29 <Samu> https://pastebin.com/raw/t7YwE9vT
21:50:08 <Samu> I get different ordering https://imgur.com/a/2cXbBFq
21:50:16 <Samu> on multiple runs
21:50:50 <Samu> because I'm using engineWagonPairs is a table
21:51:04 <Samu> so weird
21:55:26 *** Samu has quit IRC (Quit: Leaving)
21:57:26 *** sla_ro|master has quit IRC ()
22:10:11 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:49:23 *** Tirili has quit IRC (Quit: Leaving)
22:49:28 *** Tirili has joined #openttd
22:49:31 *** Tirili has quit IRC (Remote host closed the connection)
23:14:07 <DorpsGek> [OpenTTD/OpenTTD] Joel-Milligan updated pull request #9929: Fix #9363: Rebuild client list on reinit event https://github.com/OpenTTD/OpenTTD/pull/9929
23:15:20 *** Joel has joined #openttd
23:19:44 *** Joel has quit IRC ()
23:58:40 *** grossing has quit IRC ()
23:58:40 *** grossing has joined #openttd