Log for #openttd on 28th January 2019:
Times are UTC Toggle Colours
00:00:02  *** Flygon has joined #openttd
00:00:19  *** nielsm has quit IRC
00:03:46  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:03:55  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:06:57  *** tokai has joined #openttd
00:06:57  *** ChanServ sets mode: +v tokai
00:09:09  <Samu> terraform_gui.cpp is about the option that removes all company owned stuff in the scenario editor
00:09:16  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:09:19  <Samu> naturally that includes AIs
00:09:59  <peter1138> Removing company owned stuff does what to AI options?
00:10:11  <Samu> updates icons, button states
00:10:18  <Samu> stuff like that
00:10:26  <glx> why ?
00:10:27  <peter1138> Why?
00:10:38  <Samu> because they're removed
00:11:11  <glx> displaying options depends on terraformed stuff ?
00:11:18  <glx> don't be silly
00:11:48  <Samu> it's not terraform
00:13:00  <Samu> it's this
00:13:31  <Samu> the AI's are then removed
00:13:37  <Samu> so i have to update the window
00:14:55  <Samu> if i dont update, it's gonna reflect them as being active, with the green smiles for a while, until i drag the window around
00:15:53  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid
00:17:37  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid
00:19:37  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:23:55  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:26:37  <Samu>
00:26:45  <Samu> it's aligned, surprisingly
00:27:00  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:27:02  <Samu> I had many doubts in this part
00:27:09  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:28:19  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:30:20  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:32:15  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:32:36  <peter1138> uint text_right = rtl ? text_left + text_width : text_left + text_width
00:32:43  <peter1138> Samu, so tell me what that line does, Samu?
00:34:21  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7084: Change: AI/GS Config GUI overhaul
00:35:40  <Samu> hmm nothing
00:35:57  <peter1138> But yeah, it's all wrong.
00:36:03  <peter1138> You already know the area where you can draw text.
00:36:09  <peter1138> And you know the size of the images.
00:36:14  <peter1138> You do not need to get the width of the text.
00:39:56  <Samu> oh, wait, that part
00:40:02  <Samu> is not what I thought
00:40:07  <Samu> thats the AI List window
00:40:14  <Samu> let me recheck
00:41:01  <peter1138> As in the list of available AIs?
00:41:17  <Samu> list of available AIs, yes, that one
00:41:29  <Samu> bad screenshot, let me take it out
00:41:36  <peter1138> Then you don't need to do anything special as there's no icons in there.
00:41:51  <Samu> there is now
00:42:09  <peter1138> And even then, you still don't need to get the width of the text.
00:42:12  <Samu> sec im posting a new screenshot
00:43:13  <Samu>
00:43:37  <peter1138> Sure. Why do you think you need to mess about getting string width?
00:44:24  <Samu> I don't know, honestly, i'm not sure it would fit before hitting the scrollbar
00:44:43  <peter1138> Why wouldn't it?
00:45:02  <peter1138> You just need to draw the text within the limits.
00:45:26  <peter1138> Again, check how other windows do this. None of them need to get the width of the text.
00:45:41  <glx> DrawString() takes care of RTL stuff IIRC
00:46:06  <peter1138> Yup.
00:47:32  <glx> see how it's done for NewGRFWindow
00:48:15  <glx> only sprite size is used to determine text starting position
00:48:25  <glx> no need to get string size
00:48:33  <peter1138> Yup. Depending on rtl, you apply that width to either the left or right side.
00:49:10  <glx> string width is needed only when you want to draw something after the string
00:49:42  <Samu> i draw the newspaper icon
00:49:59  <glx> but even then it's easier to just base the position on the widget edge and don't care about the string
00:50:50  <peter1138> Samu, please, look at how other windows do it. That is not right.
00:51:00  <peter1138> Just because it seems to work, it is not right.
00:51:37  <Samu> gonna look at newgrf, brb
00:53:23  <glx> oh and NewGRFWindow even draw 2 sprites in front of the string
00:53:53  <glx> all that without the string width
00:55:09  <glx> always check how it's done in other windows, don't need to reinvent the wheel ;)
01:18:18  <Samu> uint text_left = rtl ? r.left + WD_FRAMERECT_LEFT : r.left + rai.width + 10;
01:18:33  <Samu> uint text_right = rtl ? r.right - rai.width - 10 : r.right - WD_FRAMERECT_RIGHT;
01:18:42  <Samu> text_width is unused
01:19:02  <Samu> very interesting...
01:19:11  <Samu> i totally forgot about the r.
01:19:24  <glx> of course it's unused, it's not needed
01:21:48  <Samu> wasn't sure how the 'r.' would help me
01:21:55  <Samu> that was the key
01:22:42  <peter1138> + 10 is probaly not right.
01:23:07  <Samu> isn't it the empty space between the icon and the text?
01:23:18  <peter1138> You've lost WD_FRAMERECT_LEFT
01:23:52  *** Thedarkb-X40 has joined #openttd
01:25:51  <Samu> r.left + WD_FRAMERECT_LEFT + rai.width + 10; ?
01:26:20  <Samu> oh great, visual studio decided to hang
01:26:40  <Samu> rip changes
01:29:39  <Samu> uint rai_left = rtl ? r.right - WD_MATRIX_RIGHT - rai.width : r.left + WD_MATRIX_LEFT;
01:30:24  *** Thedarkb1-T60 has quit IRC
01:30:44  <Samu> uint square_left  = rtl ? r.right - square.width - 5 : r.left + 5; of newgrf
01:31:14  <peter1138> Yeah
01:31:19  <peter1138> newgrf hardcodes 5 for some reason.
01:31:51  <peter1138> Your line is right.
01:32:15  <Samu> uint text_left = rtl ? r.left + WD_FRAMERECT_LEFT : r.left + rai.width + 10;
01:32:33  <Samu> is this wrong? got the impression something's wrong here
01:35:37  <Samu> yeah, the first one, (random) is slightly misaligned
01:36:01  <peter1138> text_left is fine.
01:37:17  <peter1138> uint text_left = r.left + WD_FRAMERECT_LEFT + (rtl ? 0 : rai.width + 10); would work.
01:37:54  <peter1138> Either works.
01:38:09  <peter1138> Neither needs text width, heh.
01:42:20  <Samu> right to left looks misaligned
01:42:29  <Samu> left to right looks fine
01:44:05  <Samu> vs
01:44:14  <Samu> was fine before :(
01:44:43  <Samu> looking at Available AI list
01:46:03  <Samu> maybe text_right is wrong
01:46:08  <peter1138> Are you sure you have the same code for that first line?
01:46:46  <Samu> let me check
01:47:45  <Samu> wait im dumb
01:47:58  <Samu> sorry, the string i was working on is RandomAI
01:48:11  <Samu> the others with the actual icons have not been fixed yet
01:48:18  <peter1138> Hah
01:48:28  <Samu> brb fixing
01:51:50  <Samu> looks like I can avoid repetition
01:51:59  <Samu> will simplify this part of the code
01:52:23  <peter1138> Yes, text_left & text_right won't change.
01:53:45  <peter1138> You just set them up once and then draw all the strings.
01:53:59  <Samu> just did that
01:54:14  <Samu> i have a question regarding the use of static_cast
01:54:27  <Samu> Alberth didn't like that
01:54:31  <Samu> if (this->slot != OWNER_DEITY && static_cast<AIInfo *>((*it).second)->UseAsRandomAI()) DrawSprite(SPR_AICONFIG_RANDOM, PAL_NONE, rai_left, y + rai_y_offset);
01:54:55  <peter1138> Why do you need to cast it?
01:54:56  <Samu> can't recall why exactly
01:55:36  <peter1138> Dereferencing second should give you the right type.
01:56:33  <Samu> maybe because GS doesn't have UseAsRandomAI
01:56:37  <Samu> can't recall for sure
01:56:48  <glx> unless it's a ScriptInfo I think
01:57:38  <peter1138> Hmm, is this OWNER_DEITY test used to determine if it is AI or GS then?
01:57:43  <Samu> yes
01:57:47  <peter1138> Oh dear.
01:57:56  <glx> IIRC in this area, we sometime use a generic ScriptInfo container to store the derived objects
01:59:46  <glx> ScriptInfoList::const_iterator it = this->info_list->begin(); <-- I'm right ;)
02:00:17  <glx> so cast needed to call derived member functions
02:01:22  <Samu> GS's can't be randomized
02:01:38  <peter1138> Yes, we understand that.
02:01:50  <Samu> no point drawing
02:02:21  <glx> I think it's more like GS don't have UseAsRandomAI() ;)
02:02:30  <glx> same for ScriptInfo
02:03:03  <DorpsGek_II> [OpenTTD/OpenTTD] James103 commented on issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
02:03:06  <glx> hence the cast when you're sure it's an AI
02:04:49  <Samu> at that point in the code, yes, i certified it is dealing with an AI
02:04:58  <Samu> never gonna be a GS
02:05:30  <Samu> so, static_cast is being correctly used?
02:05:37  <Samu> or do i have to change this
02:05:55  <glx> it seems OK
02:06:20  <Samu> cool :)
02:08:42  <glx> if you look in the next widget case, you'll see the same is done to draw the info details
02:09:15  *** snail_UES_ has quit IRC
02:09:43  <glx> hmm wait not the same window maybe, but still
02:12:07  <glx> ok it's the same window
02:12:32  <Samu> it's the AI Settings window, right?
02:12:42  <Samu> that one is much more complex
02:13:05  <Samu> have to fix the text_left, text_right stuff in there too
02:13:07  <glx> no AIList
02:13:46  <glx> case WID_AIL_INFO_BG, you'll see a static_cast there too
02:14:13  <Samu> ah
02:14:20  <Samu> interesting, i missed it
02:14:27  <Samu> i didn't touch that part
02:19:50  *** snail_UES_ has joined #openttd
02:21:29  <glx> hmm the info panel is nasty, it assumes an AIInfo even for GameInfo
02:21:58  <glx> luckily only common fields from ScriptInfo are used
02:28:08  <glx> funny, AIInfo and GameInfo both declare their own GetAPIVersion() with local storage
02:29:10  <glx> oh it's because libraries
02:40:21  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
02:49:40  <Samu> I don't think I need DeleteWindowByClass(WC_QUERY_STRING); on the AI List anymore
02:49:46  <Samu> gonna remove
02:50:44  <Samu> the AI Settings window will handle if it's needed to close
02:50:52  <Samu> not the AI List
02:53:37  <Samu> InvalidateWindowClassesData(WC_AI_SETTINGS); is also wrong, i can be cirurgic about it
02:55:11  <Samu> InvalidateWindowData(WC_AI_SETTINGS, slot);
02:55:18  <Samu> let's test
02:56:59  <Samu> success!
02:57:04  <Samu> one less windows closure!
02:59:25  <Samu> oh snap, i forgot to add the fixes to textfile window
02:59:41  <Samu> thought i had them already
03:23:10  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
03:36:34  *** Wormnest has quit IRC
03:43:22  *** D-HUND has joined #openttd
03:47:36  *** glx has quit IRC
03:50:42  *** debdog has quit IRC
04:06:14  <Samu> i'm attempting to simplify DrawWidget for AIConfigWindow
04:06:20  <Samu> avoid repetition
04:06:44  <Samu> now that I got more experience, I know what to do
04:09:26  *** snail_UES_ has quit IRC
04:09:29  <Samu> gonna sleep, cyas goodnigh
04:09:42  *** Samu has quit IRC
04:15:09  *** Thedarkb1-X40 has joined #openttd
04:20:49  *** Thedarkb-X40 has quit IRC
04:24:31  *** snail_UES_ has joined #openttd
04:25:04  *** Pikka has quit IRC
04:26:39  *** snail_UES_ has quit IRC
04:27:39  *** HerzogDeXtEr has quit IRC
06:00:42  *** keoz has joined #openttd
06:32:18  *** sla_ro|master has joined #openttd
07:15:08  *** Pikka has joined #openttd
07:16:33  <Pikka> boing
07:19:42  *** keoz has quit IRC
07:23:00  *** andythenorth has joined #openttd
07:31:01  *** CZTR has joined #openttd
07:36:21  <peter1138> Yes no
07:37:16  <Pikka> why not?
07:58:27  <andythenorth> Pikka: the strayan contingent need help with 64 cargos :)
07:59:56  <Pikka> is it that his NML is out of date and doesn't allocate more than 32 ids?
08:00:29  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7108: Feature: Group liveries, and livery window usability enhancements.
08:00:34  <Pikka> that was my first thought, but I don't use NML so I wouldn't know
08:02:50  <peter1138> Maybe it doesn't work ;p
08:03:07  <andythenorth> I did test it :P
08:03:10  <andythenorth> maybe I did it wrong
08:03:24  <andythenorth> Pikka: so are you the last remaining nfo coder? :)
08:08:01  *** nielsm has joined #openttd
08:08:13  <Pikka> maybe... who knows, maybe coding industries will convince me to switch :)
08:12:05  * peter1138 pokes at azure./
08:16:47  * Pikka bbl
08:16:50  *** Pikka has quit IRC
08:17:02  <andythenorth> we should preserve pikka for the nation
08:17:06  *** andythenorth has quit IRC
08:17:17  *** Thedarkb1-X40 has quit IRC
08:58:12  *** supermop_Home has quit IRC
09:01:41  *** andythenorth has joined #openttd
09:12:49  <DorpsGek_II> [OpenTTD/OpenTTD] Gabda87 commented on pull request #7120: Feature: Town Voronoi diagram
09:29:15  *** Pikka has joined #openttd
09:35:34  <andythenorth> bob
09:35:41  <andythenorth> draw a new website pikka? o_O
09:36:04  <Pikka> eek
09:36:41  <andythenorth> 99 Designs
09:44:31  <nielsm> birds, making confetti from newspapers...
09:44:39  * nielsm has taken two days off work
09:45:37  <andythenorth> o_O
09:45:45  <planetmaker> moin
09:46:30  <Pikka> boing
09:47:06  *** sla_ro|master has quit IRC
09:58:47  *** Samu has joined #openttd
09:58:51  <Samu> hi
09:59:19  <andythenorth> moin
10:05:09  <peter1138> Hi
10:09:32  <Samu> why is this so confusing
10:09:50  <Samu> aligning text with images
10:10:00  <peter1138> What now?
10:10:21  <Samu> can you tell me if the alignment on AI SETTINGS is ok?
10:10:32  <Samu> AI CONFIG i mean
10:10:46  <Samu> hold on, i'll link to code directly
10:11:23  <Samu>
10:12:01  <Samu> uint cid_right = rtl ? cid_left + widest_cid : cid_left + widest_cid;
10:12:12  <peter1138> That's wrong.
10:12:18  <andythenorth> did anyone release a new Horse yet?
10:12:25  <peter1138> Because you're selecting the same value regardless of rtl.
10:12:45  <Samu> the value is defined just above
10:12:48  <nielsm> andythenorth, aren't horses usually kept in captivity?
10:12:53  <andythenorth> wild horses
10:13:16  <peter1138> Samu, how is it different from"uint cid_right = cid_left + widest_cid; ?
10:13:23  <Samu> cid_left is not the same value for rtl than ltr
10:13:26  * andythenorth is actually listening to 'runaway horses' by pure coincidence
10:13:44  <Samu> uint cid_left = rtl ? rai_left - 10 - widest_cid : rai_left + rai.width + 10;
10:14:00  <andythenorth>
10:14:01  <peter1138> But you're setting cid_right on the line you showed, not cid_left.
10:14:21  <Samu> but cid_left is defined above
10:14:31  <peter1138> How is that relevant?
10:16:38  <Samu> im confused
10:18:01  *** Heiki has quit IRC
10:18:13  *** Heiki has joined #openttd
10:18:13  <Samu> uint cid_right = rtl ? r.right - WD_MATRIX_RIGHT - widest_icon - 1 - rai.width - 10 - widest_cid + widest_cid : r.left + WD_MATRIX_LEFT + widest_icon + 1 + rai.width + 10 + widest_cid;
10:18:22  <Samu> with everything expanded
10:18:36  <peter1138> Why would you "expand" it?
10:18:45  <nielsm> when layouting in RTL, you do exactly the same as when layouting in LTR mode, except you start from the right-hand edge and subtract lengths, instead of starting from left-hand edge and adding lengths
10:19:08  <peter1138> uint cid_right = rtl ? cid_left + widest_cid : cid_left + widest_cid;
10:19:21  <andythenorth> do we handle that explicitly every time we draw text?
10:19:24  <peter1138> cid_left and widest_cid are the same values regardless of rtl, within that line.
10:19:40  <andythenorth> it's not just a widget tree, and we run reverse order?
10:20:41  <peter1138> Yeah, it's a bit shitty when we have text and icons mixed.
10:20:59  <peter1138> By mixed I mean drawn within the same widget.
10:21:14  <nielsm> andythenorth, the window layout stuff does handle most of that automatically
10:21:32  <nielsm> except for self-drawn things, like list items combined from text and graphics
10:21:45  <nielsm> those aren't layouted automatically, but "owner-drawn"
10:22:59  <andythenorth> anyone find a narrow-guage version of this?
10:23:08  <Samu> uint cid_right = rtl ? cid_left + widest_cid;
10:23:21  <Samu> just this
10:23:34  <peter1138> No.
10:23:35  <Samu> oh wait no
10:23:39  <Samu> uint cid_right = cid_left + widest_cid
10:23:54  <Samu> ;
10:23:55  <peter1138> I wrote exactly that line earlier.
10:24:07  <Samu> ok, let me fix that already
10:25:17  <peter1138> I'm glad it took 10 minutes to resolve that.
10:25:26  <Samu> done, but i'm still wondering... if everything else is correct
10:25:49  <peter1138> I'm not saying the rest is right.
10:25:53  <peter1138> But that is obviously wrong.
10:26:09  <Samu> let me copy paste
10:26:17  <peter1138> I'm busy at the moment, tbh.
10:26:27  <Samu>
10:26:48  <nielsm> what am I doing here?
10:26:48  <Samu> i've edited it so far to try avoid repetition
10:27:12  <andythenorth> meh
10:27:15  <Samu> i'm only wondering if i have the rlt stuff correct
10:27:23  <andythenorth> IRL narrow gauge is probably too small for ladle wagons
10:27:27  <andythenorth> such realism
10:27:39  <Samu> it's the part I have most difficulty
10:27:40  <Samu> solving
10:28:19  <nielsm> Samu, get some graph paper and try working out the layout calculations for LTR and RTL separately, with pen and paper
10:29:59  <nielsm> draw how the window _should_ look, and work backwards from that to figure out how to calculate the dimensions and positions of things
10:32:22  <nielsm> TrueBrain: how about building a docker of the dedicated server along with the nightlies?
10:32:23  <Samu> that's actually a good idea
10:42:50  <Samu> dang, the counting of image widths is what's confusing me in the right to left approach
10:43:16  <nielsm> not a whole lot of distance from north to east...
10:44:06  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog
10:48:57  <Samu> sprites are drawn from left to right only?
10:49:20  <nielsm> they are drawn at the position you give
10:49:37  <nielsm> they are never mirrored on screen, and the screen coordinate system is always left edge as zero
10:49:52  <nielsm> with X values increasing towards the right
10:51:08  <Samu> left edge as zero
10:51:15  <andythenorth> usually flipping things is just a transform, with faff
10:51:23  <Samu> so I see they're only drawn left to right
10:51:31  <Samu> hence the whole confusion
10:51:46  <Samu> trying to apply them on a right to left text
10:52:32  <nielsm> you can maybe think of it as arranding a bunch of boxes in a row, in RTL the order of the boxes is reversed, but the contents of each box is not
10:52:55  <nielsm> (except that the text is drawn from the right edge of the box in RTL mode, but that's beside the point)
10:53:15  <nielsm> s/arranding/arranging/
10:55:27  <Samu> wondering if i needed to measure company id string
10:55:42  <Samu> the 1-15 text being displayed
10:56:39  <Samu> need it to align
11:01:21  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog
11:04:27  <peter1138> You can measure just "99"
11:05:16  <Samu> i measured all numbers from 1 to 15
11:05:25  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
11:05:53  <Samu> this was much easier to visualize with pen and paper, kudos
11:05:57  <Samu> nielsm
11:05:58  <peter1138> I know you did.
11:06:15  <Samu> and peter1138 too, much thx
11:06:18  <peter1138> Samu, back in the day, pen and paper was used to figure out the program logic too.
11:07:32  <nielsm> in 2003 and 2004 the exams I took in computer science included pen-and-paper coding problems, no textbooks, computers, or even pocket calculators, allowed
11:08:01  <Samu> everything is correct, the only exception being uint cid_right = rtl ? cid_left + widest_cid : cid_left + widest_cid; which i fixed
11:08:21  <Samu> which isn't wrong per se, but ... just ... meh, nvm
11:08:22  <peter1138> I mean, it wasn't "wrong" but it was pointless.
11:08:40  <peter1138> But now, is it correct and simple, or is it correct and complex?
11:09:03  <peter1138> Can o' worms there.
11:10:58  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
11:11:22  <nielsm> okay I think that patch is done now
11:20:03  <planetmaker> meh... cc1plus: error: unrecognized command line option "-std=c++11"
11:20:04  <planetmaker> make[1]: *** [string.o] Error 1
11:20:04  <planetmaker> make[1]: *** Waiting for unfinished jobs....
11:20:04  <planetmaker> cc1plus: error: unrecognized command line option "-std=c++11"
11:20:04  <planetmaker> cc1plus: error: unrecognized command line option "-std=c++11"
11:20:04  <planetmaker> make[1]: *** [alloc_func.o] Error 1
11:20:06  <planetmaker> make[1]: *** [strgen_base.o] Error 1
11:20:08  <planetmaker> make[1]: Leaving directory `/home/openttd/git-publicserver/objs/lang'
11:20:10  <planetmaker> make: *** [all] Error 1
11:20:12  <planetmaker> [root@publicserver-new git-publicserver]# gcc --version
11:20:14  <planetmaker> gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
11:20:16  <planetmaker> ups.. .sorry
11:21:39  <planetmaker> so... what gcc do I need?
11:24:01  <planetmaker> 6.x I guess
11:31:04  <Samu> unrelated, I am wondering if it's okay to let ai settings be editable in SE if the instance is active and alive
11:31:30  <Samu> for some reason, I decided it was not okay
11:31:37  <Samu> now I must remember why
11:32:00  <andythenorth> planetmaker: clang? o_O
11:32:03  * andythenorth not serious
11:32:18  <planetmaker> not on that version of centos
11:32:27  <Eddi|zuHause> i have 7.3.1
11:33:35  <planetmaker> centos has astonishing long lifetime... but stuff gets old nonetheless
11:33:56  <Eddi|zuHause> well, you might want a version that is less than 7 years old
11:34:14  <planetmaker> 2.6.32-042stab130.1 #1 SMP Tue May 22 09 <-- probably :)
11:34:30  <planetmaker> EOL is next year for that distro
11:36:31  <LordAro> planetmaker: i think 4.9 will work, still
11:37:07  <LordAro> 4.8, even -
11:37:50  <LordAro> 4.9 for c++14
11:39:22  <planetmaker> I must upgrade the HV this year :|
11:42:28  <nielsm> Samu, don't change settings behind an already started AI, they probably won't be coded to assume settings can change under their feet
11:44:41  <andythenorth> based on my limited experience coding GS I would strongly concur
11:44:56  *** Pikka has quit IRC
11:47:32  <Samu> the issue is this: I save a game with ais. I rename .sav to .scn and i open it in the editor
11:47:57  <Samu> what can be allowed and what can't be allowed on ais
11:48:15  <Samu> what will happen once i save the scenario and play it
11:48:51  <nielsm> don't change settings behind the back of an already started AI, but feel free to add or remove players?
11:49:41  <Samu> that's apparently my current decision, was only trying to remember why I did it this way
11:49:48  <Samu> my poor brain
11:50:19  <nielsm> this is why documenting your software and keeping the documentation updated is a good idea :)
11:54:31  <planetmaker> devtoolset seems to be a centos/rhel thing to get newer tools...
11:57:22  <Samu> what will be saved in relation to AI data when the save is done in the scenario editor
11:57:35  <Samu> something that i must explore
12:04:41  <peter1138> planetmaker, wow, that's an ancient machine.
12:08:34  <Samu> just found out
12:08:36  <Samu> 		/* Save the data that was just loaded. */
12:08:41  <Samu> this is great!
12:09:50  <Samu> that partially explains why I'm not letting its settings to be altered in SE
12:13:41  <Samu> I could improve this part a bit, though. Currently, I'm simply disabling the Settings window.
12:13:59  <Samu> Perhaps I could access the window, but have everything grayed out
12:14:10  <Samu> at least I could see how they are atm
12:15:24  <Samu> less restrictive
12:15:52  <Samu> more friendly
12:17:53  <planetmaker> peter1138, yep. As long as there's security updates and it works... no need to upgrade ;)
12:21:33  <Eddi|zuHause> well, i think the time has come where one of those things doesn't apply anymore :p
12:23:45  <planetmaker> :)
12:25:08  <peter1138> Grr, my monodevelop is not updating references or whatever it is properly.
12:27:43  * peter1138 tries a clean.
12:33:01  <planetmaker> <-- TrueBrain for a nightly server I need this info to be current
12:34:47  <peter1138> Ooh
12:35:22  <peter1138> Is there another URL that does similar? I'm sure I saw one that had current info on it.
12:35:25  <peter1138> But yes.
12:56:14  <Arveen2> word on the internet is nightly builds are back ?
12:56:38  <peter1138> Yup
12:57:03  <Arveen2> fantastic :D
12:57:18  <peter1138> Cos TrueBrain is a magician.
12:57:39  <Arveen2> I tried to build a recent version on VS like 2 weeks ago and it failed when trying to use the ottd useful 6.0 package
12:57:58  <peter1138> Don't need to use that any more.
12:58:08  <peter1138> Latest build instructions use vcpkg.
12:58:08  <Arveen2> oh
12:58:33  <Arveen2> i didn't notice there was a change
12:59:47  <Arveen2> seems like it's time to get some ottding going tonight, heh
13:03:43  *** D-HUND is now known as debdog
13:04:48  <nielsm> I kinda want to set up a server running nightly, and auto-upgrading at some point a few hours after each new build
13:06:46  <planetmaker> well...
13:07:15  <planetmaker> such server used to exist... maybe it should be revived :)
13:07:58  <planetmaker> coop always used manual updates, usually between games. But there was for a time a server by dihedral which updated every day.
13:08:00  <planetmaker> Was fun :)
13:08:44  <planetmaker> Seeing that about no-one plays on coop servers regularily anymore... maybe a good idea to put it to such use
13:10:01  <nielsm> I'm thinking writing a small GS that sends newspapers/other messages to players when the daily update is about to be installed so they can get ready
13:10:25  <nielsm> then pause the game for the last 5-10 minutes before kicking everyone off and installing the new version
13:11:10  <planetmaker> I don't think it needs a GS for that purpose. You can send to ingame via admin port which you need anyway
13:11:44  <nielsm> well could do silly things like putting the latest changes in the storybook? :D
13:11:54  <planetmaker> :)
13:12:20  <planetmaker> or adding an extended tutorial script as GS... hm... OpenTTD tutorial server
13:13:05  <nielsm> ask players starting a new company "do you want a tutorial?" and if they do, it finds route suggestions and shows what to do?
13:13:09  <nielsm> could be neat
13:13:19  <planetmaker> something like that, yes
13:13:28  <peter1138> Who needs a GS when you can just make AIs cheat!
13:14:43  <peter1138> Hmm, shall I work on group liveries some more? Like making this hierarchy thing work.
13:14:48  <peter1138> It's kinda a pain :/
13:15:33  <Arveen2> i'd play coop again without hesitation if there would be a new game
13:15:50  <peter1138> Cos at the moment "scheme not in use" means use-the-default-vehicle-type-specific scheme, rather than use-the-parent-group scheme.
13:15:55  <Arveen2> i was playing frequently but you are right, seems not much is going on there
13:16:13  <peter1138> OpenTTDCoop was never my build style.
13:16:29  <Eddi|zuHause> peter1138: needs more OOP?
13:16:59  <Eddi|zuHause> LiveryResolver object
13:17:09  <peter1138> Eddi|zuHause, no, it's just, which is preferable, use type-specific or parent?
13:17:31  <peter1138> it could possibly even be either, "default" or "inherit"
13:17:33  <planetmaker> Arveen2, it needs people who actually help with running that
13:17:34  <Eddi|zuHause> peter1138: spontaneously i'd say parent
13:17:46  <peter1138> k
13:18:08  <planetmaker> I'm about the only person currently who is somewhat around and has access to the servers. But it needs people playing. Moderating ingame,... updating the server
13:18:17  <planetmaker> not difficult. Not much to do. But needs doing
13:18:40  <planetmaker> I'm happy to grant access to people who want to carry on with that
13:18:43  <Arveen2> yeah, i see
13:18:50  <planetmaker> "the old people" seem to have gone mostly
13:18:50  <Eddi|zuHause> peter1138: say, i'm making tram networks, and one group per line in a town, then it might be useful to have a parent group for each town that handles the livery
13:19:02  <Arveen2> the last couple of games it was already hard to get a plan going
13:19:29  <nielsm> peter1138: vehicle is asked for its livery, vehicle asks its group for livery, group asks parent group for livery, etc., until vehicle receives a group livery configuration, and then it applies default liveries for its types for any "default" values in the group livery config?
13:19:30  <peter1138> planetmaker, they moved on to that other game on steam?
13:19:45  <Eddi|zuHause> fortnite? :p
13:19:48  <planetmaker> Maybe it needs to be handled a bit different than before... dunno. Making a plan... could be done alone, if need be
13:19:54  <peter1138> the one V is involved in
13:20:00  <planetmaker> peter1138, factorio? Possibly. It's addictive :P
13:20:01  <nielsm> and the same group livery check could be used to draw the default values in the livery config window
13:20:18  <planetmaker> and they have nice MP servers, too
13:21:20  <peter1138> Are we going to try to put OpenTTD on Steam?
13:21:29  <planetmaker> yes?
13:21:42  <peter1138> Was it you talking about it?
13:21:47  <planetmaker> Not making progress on getting 'openttd' as username. But will go forward with another
13:21:50  <planetmaker> yes
13:22:09  <peter1138> I dunno, Steam's social aspect is useful.
13:22:19  <peter1138> "$Friend is now playing OpenTTD, click to join!"
13:22:29  <peter1138> (Sort of)
13:22:37  <nielsm> that would imply adding some steam api stuff into the game
13:22:38  <nielsm> :)
13:22:43  <peter1138> planetmaker, openttd already gone? :/
13:22:43  <planetmaker> Not using that really much myself... but possibly.
13:22:59  <planetmaker> some guy has it ... and wasn't online for 4 years... but yeah
13:23:08  <peter1138> nielsm, maybe. You get a notification starting just a shortcut in steam as well.
13:23:22  <peter1138> Send a tweet to Gabe himself lol
13:23:24  <planetmaker> but username != display name I think
13:23:48  <peter1138> Yeah, can we just set up an openttd developer account
13:24:06  <planetmaker> nielsm, maybe it would imply that... but it could be a special steam version... like --with-steam-api on config
13:24:06  <peter1138> Hmm, is it actually single-user or some kinda of organisation system? Never looked of course.
13:24:32  <planetmaker> peter1138, yes, that's why I wanted openttd. But will or so
13:24:37  <planetmaker> +take
13:24:41  <nielsm> peter1138, if we want "click here to join their game" there would need to be something that announces to steam that you have started/joined a network server and what its address is
13:24:50  <peter1138> nielsm, yup
13:25:13  <nielsm> also possibly a way to convert a singleplayer game to multiplayer in "one click"?
13:25:16  <peter1138> Anyway that's a long way off
13:25:21  <peter1138> First step is just get it on Steam.
13:25:25  <nielsm> i.e. not save, quit, reload on multiplayer mode
13:25:26  <planetmaker> yop
13:25:27  <peter1138> I know people have asked for it for years.
13:25:42  <peter1138> nielsm, PR it ;D
13:25:49  <planetmaker> opinion used to be quite against it, I think. But... seems to have changed
13:26:52  *** snail_UES_ has joined #openttd
13:28:26  <peter1138> Hmm, of course if the app needs some kind of key (credentials) to access features on the platform then that's kinda awkward.
13:28:49  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened issue #7125: Convert singleplayer game to multiplayer server
13:29:25  <peter1138> L0(
13:29:27  <peter1138> :-)
13:29:28  <nielsm> peter1138, that's basically a compile-time option right?
13:29:56  <peter1138> Means user-compiled builds won't work?
13:30:36  <nielsm> eh let's look at how it actually works:
13:30:44  <peter1138> Nah, speculate!
13:31:01  <planetmaker> wtf... "Ihr Account konnte nicht eingerichtet werden. Versuchen Sie es bitte später noch einmal." could not create account. Try again later
13:33:08  <nielsm> someone requested a while ago a feature to broadcast "joined network game" etc to discord/similar too, that could maybe be wrapped in similar code
13:34:28  <Eddi|zuHause> nielsm: i suggested to them to try an admin port wrapper
13:34:49  <nielsm> does a network client have an admin port?
13:35:43  <peter1138> Mmm, Earl Grey.
13:37:25  <planetmaker> nielsm, coop runs an admin port to irc bridge for OpenTTD. That same could easily be done with discord as well
13:37:38  <planetmaker> and all joins etc are broadcast as well as ingame chat
13:38:10  <nielsm> yeah but this is about a player connecting their client to a server they do not control, and have their client tell a local application about which server they joined
13:39:19  <planetmaker> admin port is currently only available for... servers
13:39:40  <peter1138> That was nielsm's point :)
13:40:15  <planetmaker> sorry, read it as question
13:45:02  <peter1138> Oh. My Jenkins isn't running. Odd.
13:45:31  <peter1138> That explains why the CI isn't running I suppose.
13:49:00  <peter1138> r154352009-08-09extra/pngcodec
13:49:07  <peter1138> Is pngcodec relevant at all?
13:49:35  <peter1138> All those extras seem pretty out of date.
13:53:42  *** snail_UES_ has quit IRC
13:54:44  <DorpsGek_II> [OpenTTD/OpenTTD] paulcobbaut opened issue #7126: custom font settings in openttd.cfg seem to be ignored
13:55:32  <planetmaker> uh... no. pngcodec is the old 32bpp era, not the current
13:56:17  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
13:56:17  <planetmaker> grfcodec is actually correct
13:56:28  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
13:56:33  <planetmaker> and catcodec probably, too
13:56:33  <peter1138> planetmaker, that's what I thought.
13:57:07  <planetmaker> osie likely, too
13:57:17  <nielsm> oh shit, if ottd gets on steam people are going to demand achievements!
13:57:17  <planetmaker> open??x ... checking :D
13:57:30  <planetmaker> nielsm, not a bad thing, is it?
13:57:47  <planetmaker> opengfx is a bit out-of-date
13:58:11  <DorpsGek_II> [OpenTTD/OpenTTD] paulcobbaut commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
13:58:14  <nielsm> "enemy of nature: raise 100 sea tiles to land in one operation"
13:58:41  <planetmaker> openmsx and opensfx are ok
13:58:58  <peter1138> Any Mac OS users around? :D
13:59:00  <planetmaker> nforenum is also ok
13:59:05  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
13:59:56  <nielsm> (the problem with achievements is that you need to litter checks for them around the code everywhere)
14:00:54  <planetmaker> so in summary: everything in finger.o.o is fine - except OpenTTD nightlies. And somewhat OpenGFX, but no big deal there.
14:01:32  <peter1138> planetmaker,
14:01:45  <milek7> steam api stuff could be incompatible with GPL
14:02:07  <nielsm> milek7 it's not
14:02:18  <planetmaker> I checked. It should be ok
14:02:32  <nielsm> the api is public, nothing is secret about it
14:02:48  <peter1138> If it's just a web api, then no.
14:03:26  <nielsm> the game integration is a dynamic library you link and call into, which does IPC with the running steam client
14:03:27  <planetmaker> well... yes. no. The SDK has some NDA included
14:03:58  <planetmaker> but going to check that carefully
14:04:15  <peter1138> Then strictly speaking, yeah, that's not usable.
14:05:43  <planetmaker> Not sure that is needed, though. At least not for bringing it on steam in the first place
14:06:17  <nielsm> yeah no, not needed to just be published
14:06:28  <nielsm> only for the integration with "join my server" etc
14:06:44  <DorpsGek_II> [OpenTTD/website] planetmaker opened issue #48:
14:08:44  <milek7> hm, i thought GPL extended also to dynamic libraries
14:09:31  <milek7> yes, at least this is FSF interpretation
14:09:32  <nielsm> yeah technically you're violating GPL by making a binary that depends on an external library that isn't GPL compatible
14:09:48  <nielsm> (unless that library is arguably part of the operating system)
14:10:13  <peter1138> Hence the C runtime on Windows is "okay".
14:10:19  <nielsm> because you're not allowed to infect the proprietary code with GPL
14:10:42  <planetmaker> vice versa?
14:10:46  <nielsm> then your own code becomes a license violation
14:12:48  <nielsm> the way I understand it, a single chunk of GPL code in a loaded and running binary "infects" all other code in that same process with GPL-ness, and if that would be a violation of the license of any of that other code, then that original chunk of GPL code is used without permission
14:13:38  <nielsm> i.e. if you write an in-process COM server for windows file explorer shell API, then it can't actually run because it's not allowed to be loaded in the explorer process
14:13:49  <nielsm> pretty dumb
14:13:56  <planetmaker> "Generally, any license that has a so-called “copyleft” element will be problematic when combining code with the Steamworks SDK. The best-known example is GPL."
14:14:11  <planetmaker> the SDK is not the web API, though
14:14:53  <nielsm> I've seen that argument used for a foobar2000 plugin integrating FFTW, fb2k itself it closed software, the plugin SDK is BSD 2-clause or 3-clause license (iirc), and FFTW is GPL
14:15:16  <nielsm> and the author of FFTW, or maybe it was a resampling library?, claimed it was illegal use
14:16:01  <planetmaker> fftw = fastest fourier transform of the west?
14:16:04  <nielsm> yes
14:16:10  <planetmaker> :)
14:16:12  <nielsm> actually it was probably not that
14:16:28  <peter1138> That would be a violation, yes.
14:16:40  <peter1138> But ergh, we don't need to discuss that :)
14:24:21  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
14:24:31  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7127: Fix #7112, fef8b831a9: incorrect precondition check
14:25:44  *** supermop_work has joined #openttd
14:26:06  <supermop_work> yo
14:26:16  <Markk> No.
14:26:36  *** glx has joined #openttd
14:26:37  *** ChanServ sets mode: +v glx
14:36:06  *** Mahjong2 has quit IRC
14:39:01  *** Mahjong has joined #openttd
14:39:02  *** andythenorth has quit IRC
14:39:34  *** Mahjong has quit IRC
14:39:50  *** Mahjong has joined #openttd
14:41:25  *** Flygon has quit IRC
14:45:43  *** Arveen2 has quit IRC
14:46:00  <Samu> who's a bool expert? need to simplify/optimize/avoid repetition:
14:46:22  <planetmaker> indeed. I think we all know what GPL allows and what not :) And make decisions according to that wrt steam
14:47:44  <Samu> IsConsideredDead is repeated, just wondering if there's a way to not have it twice
14:48:35  <glx> Samu: you may want to add parenthesis around your || and && groups, it's easier than trying to remember the evaluation order
14:49:05  <Samu> oh, right, i keep forgeting
14:50:17  <glx> IIRC it's first && then || but may be the other way
14:52:08  <Samu>
14:52:26  <peter1138> Always specify the order you want, heh.
14:52:28  <nielsm> no, that can't be simplified with regard to IsConsideredDead
14:53:23  <glx> _game_mode == GM_NORMAL && (IsConsideredDead(this->slot) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0) <-- you really mean (normal && dead) || flags ?
14:54:07  <glx> oups forget it, wrong reading :)
14:54:18  <glx> too many parenthesis for me
14:54:28  <peter1138> Problem is it may not be right ;)
14:54:51  <Samu> in a normal game do this check: IsConsideredDead(this->slot) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0
14:54:51  <nielsm> it's a really complex condition and should not be a single line to begin with
14:55:03  <nielsm> write it as a function that accepts/rejects via early returns
14:55:04  <peter1138> nielsm, indeed.
14:55:06  <Samu> in main menu, do check in line 1
14:55:17  <Samu> in scenario editor, do check line 3
14:58:02  <Samu> IsConsideredDead isn't flexible enough to deal with scenario editor :|
14:58:21  <glx> maybe split in "editable |= ...;" lines hoping the compiler optimises "true |= ..." stuff
14:58:40  <peter1138> Or editable &=
14:58:44  *** andythenorth has joined #openttd
14:58:45  <nielsm>
14:58:48  <nielsm> something like that
14:58:51  <nielsm> is how I read the condition
14:58:58  <nielsm> and that's easier to read and argue about
14:58:58  *** andythenorth has quit IRC
14:59:05  <peter1138> nielsm, yes
14:59:21  <nielsm> it won't win contests for being short, but we're not here to code golf, we're here to write bug-free code
14:59:49  <glx> indeed the function is self explain
14:59:51  <Samu> if (!IsValidAiID(slot)) return true; is only for non deity
15:00:15  <nielsm> Samu I don't know, your code is not clear because you're not using enough parentheses
15:00:24  <Samu> oh :(
15:00:51  <nielsm> ?: conditional expressions are another place there operator precedence rules are really difficult to remember
15:01:18  <nielsm> and you should really not use ?: expressions with anything but simple values or singular conditionals in each slot
15:01:29  <nielsm> (foo == bar) ? x : y
15:01:33  <nielsm> is good
15:01:44  <glx> indeed ?: has less priority than ||
15:01:50  <nielsm> (foo == bar || foo == baz) ? (x+5) : (y*6)
15:01:53  <nielsm> is too complex
15:02:21  <Samu> let me edit
15:04:19  <glx> so (a ? b : c || d) is (a ? b : (c || d)) when you may want it to be ((a ? b : c) || d)
15:04:40  *** andythenorth has joined #openttd
15:05:22  <glx> that's why it's better to use parenthesis, ensure it does what you want
15:05:48  <nielsm> or just split up conditionals into multiple statements
15:05:58  <peter1138> :D
15:06:02  <nielsm> a modern compiler is probably going to generate identical code
15:06:17  <planetmaker> yep... the ternary operator is... too complex with anything bigger than very simple stuff
15:06:33  <planetmaker> not reader-friendly. And compilers...are good enough, I guess, too
15:06:35  <peter1138> ternary is okay for rtl ? ;-)
15:06:44  <peter1138> (That was not a question)
15:07:17  <glx> when it's not in the middle of some complex stuff it's ok :)
15:07:19  <planetmaker> rtl = read_from_left ? no : yes
15:07:23  *** andythenorth has quit IRC
15:08:09  <glx> but mixing || and && is already complex enough to not add ?: in it
15:08:24  <Samu> it was working
15:08:42  <glx> but it was not doing what you expected I think
15:08:45  <Samu> just wanted to make it simpler, i guess
15:09:00  <Samu> no, it was doing as I intended
15:09:15  <nielsm> well, we couldn't figure out what you intended
15:09:18  <nielsm> so it was bad code
15:09:26  <glx> even (this->slot == OWNER_DEITY ? Game::GetInstance() == NULL : !IsValidAiID(this->slot) || Company::Get(this->slot)->ai_instance == NULL) ?
15:09:34  <Samu> hehe, the game did understand
15:09:49  <glx> ah yes you really wanted (c || d)
15:09:55  <glx> you were lucky
15:10:18  <nielsm> the compiler does exactly what you tell it to, even when you misspeak
15:10:26  <nielsm> (then it just doesn't do what you intended)
15:11:45  <glx> hehe like using if (a = b) instead if (a == b)
15:11:46  <Samu> a && (b ? (c) : (d || e))
15:12:01  <glx> it's valid but not what you usually want
15:12:27  <Samu> becomes a && (c), or a && (d || e)
15:12:51  <planetmaker> Samu, in that case I very much prefer a && IsThisFunctionTrue(b,c,d,e)
15:13:43  <glx> hey use a lamba function ;)
15:13:59  <Samu> something like the private that glx used to fix the widgets?
15:13:59  <glx> *lambda
15:14:06  <Samu> what's a lambda?
15:14:26  <Samu> googles
15:14:29  <planetmaker> I'm not exactly on good terms with lambda functions :P
15:14:51  <Samu> ah, ^
15:15:10  <Samu> i call it circumflex accent
15:16:01  <peter1138> planetmaker, better review my group-livery PR then ;)
15:16:32  <nielsm> ^ is not involved in C++ lambda syntax
15:16:40  <glx> Samu:
15:16:44  <nielsm> (it's just the bitwise xor operator)
15:17:20  <peter1138> Oh yes, hierarchy. Hmm.
15:17:36  <glx> but a normal function is ok too
15:17:36  <peter1138> Maybe I can lambdaise that and make it generic.
15:18:38  <Samu> "Constructs a closure: an unnamed function object capable of capturing variables in scope. " not english enough for me
15:20:07  <glx> btw Samu I guess your editable calculation happens for DrawWidgets and OnClick
15:20:45  <Samu> yes, that which you fixed recently
15:20:54  <Samu> the private idea
15:20:58  <glx> so indeed you should use an external function
15:21:00  <Samu> whatever private is
15:21:30  <glx> that way you'll be sure draw and click are similar
15:21:50  <glx> even if the conditions are changed later
15:22:28  <glx> and with the external function it's possible to get rid of the expression complexity
15:23:08  *** Taede has quit IRC
15:23:11  *** Taede has joined #openttd
15:23:24  <glx> I didn't in my fix, but for your complex stuff it's needed
15:24:04  <Samu>
15:24:11  <Samu> gonna learn from it
15:26:02  <glx> the return line can be spit in 3 if (...) return true, then a final return false, so 4 lines instead of 1, but easier to follow
15:27:32  <planetmaker> Samu, and the function itself: it is much more readable in the form which niels suggested earlier: early returns instead of one complex expression
15:28:45  <planetmaker> if _game_mode == GM_MENU return true;
15:29:00  <glx> indeed, once something in ... || ... || ... is true it won't change
15:29:21  <planetmaker> if (this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot) return true;
15:29:51  <planetmaker> if (config_item.flags & SCRIPTCONFIG_INGAME) != 0 return true
15:29:54  <planetmaker> return false;
15:30:03  <glx> hey that's my stuff ;) (and yes I could have split it)
15:30:34  <planetmaker> sorry. was it you? Ok, Sam u, take glx' advice :)
15:32:01  <glx> and this one is not that complex, but indeed as it's in a function it's easy to split it to simplify the reading
15:32:51  <peter1138> 45 minutes later...
15:33:29  <Samu>
15:33:30  <Samu> tada!
15:34:05  <Samu> what is nullptr?
15:34:12  <Samu> should be NULL
15:34:13  *** Wormnest has joined #openttd
15:34:19  <nielsm> nullptr is the same as NULL
15:34:26  <nielsm> except it's a pointer type
15:34:36  <nielsm> and a keyword
15:34:42  <glx> and if you see nullptr you failed somewhere ;)
15:34:43  <nielsm> while NULL is a #define'd constant
15:35:18  <nielsm> new C++ code should use nullptr instead of NULL or 0 when working with pointer types
15:35:46  <glx> but in openttd we still use NULL
15:35:53  <Samu> hmm it was working with NULL, not sure I'd change to nullptr
15:36:21  <nielsm> they're functionally identical
15:36:27  <nnyby> Google's C++ style guide is an interesting read btw,
15:37:20  <nnyby> openttd seems to follow a more C-like style which I kinda like cause I don't know too much C++ >_<
15:38:10  <planetmaker> well... OpenTTD cannot deny its C heritage
15:38:37  <nielsm>   ugh CI stuck :(
15:38:39  <planetmaker> its style guide works extremely well, IMHO
15:39:07  <crem2> nullptr is safer than NULL. nullptr cannot be converted to integer. So if `int *p;`, you cannot mistakenly do `*p = nullptr`, but can `*p = NULL`.
15:40:34  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog
15:42:08  <planetmaker> is there a way to re-trigger the CI?
15:42:13  <crem2> There once was this particular typo which caused some very large outage in one of major services of one of well-known software companies. :)
15:42:41  <peter1138> Probably needs TB to log in again. Shitty azure :/
15:42:58  <planetmaker> or should I simply merge that commit and hope it compiles? :P
15:43:15  <peter1138> Well you can test it locally.
15:43:28  <glx> ah yes #7106 is stuck too
15:43:42  <Samu> oh crap, i need to actually enable the configure button too
15:43:43  <glx> force pushed 15h ago
15:44:08  <Samu> enabled in one place, left it unenabled in the other
15:44:10  <planetmaker> the CI seems somewhat unreliable :|
15:44:22  <glx> hey it's free
15:44:47  <planetmaker> the other didn't cost us anything either ;)
15:45:07  <planetmaker> (but time / maintenance)
15:45:23  *** sla_ro|master has joined #openttd
15:46:11  <peter1138> Need TB to login on a cron, heh
15:46:26  <planetmaker> :P
15:46:31  <peter1138> Or maybe just get logins for other devs so they can do it.
15:46:43  <planetmaker> a bot checking issues to have completed and re-trigger a built, if not
15:46:50  <planetmaker> like the stale issue checker
15:47:14  <Samu> this->SetWidgetDisabledState(WID_AIC_CONFIGURE, this->selected_slot == INVALID_COMPANY || GetConfig(this->selected_slot)->GetConfigList()->size() == 0);
15:47:20  <nielsm> some more people with login-access to the azure org would help too
15:47:25  <Samu> this->SetWidgetDisabledState(WID_AID_SETTINGS, ai_debug_company == INVALID_COMPANY || GetConfig(ai_debug_company)->GetConfigList()->size() == 0);
15:47:41  <nielsm> I don't think you even need any special permissions for it, just ability to log in as a member of the org to "keep it alive"
15:47:46  <Samu> it's funny, in one place it's called settings, in the other it's called configure, and yet they refer to the exact same window
15:48:17  <planetmaker> do we have some keepass database with login & stuff? Would make sense IMHO
15:48:34  <peter1138> Don't think it needs to be a single login, in this case.
15:48:35  <nielsm> just add more members to the org?
15:48:39  <nielsm> yeah
15:48:49  <planetmaker> also true probably, yes
15:49:01  <planetmaker> always need 2 with complete access to every service
15:49:04  <nielsm> ping orudge?
15:49:05  <planetmaker> at least
15:49:32  <peter1138> Or, we could pay for it?
15:49:53  <peter1138> Hmm
15:49:56  <nielsm> I think paid accounts have the same rule
15:50:06  <Samu> i need a GS with no parameters, for testing
15:50:12  <Samu> testing button state
15:50:12  <peter1138> Ah, right, this page I'm looking at is 5 years old :/
15:50:13  <nielsm> unless you pay for your own azure build hosts
15:50:17  <Samu> do u know of any?
15:51:02  <glx> write one
15:52:20  <glx> it's often easier to write an "empty" script than to search for one matching your test case
15:52:38  <peter1138> Urgh, now I have to invalidate colours when changing a group's parent.
15:52:46  <planetmaker> Samu, tutorial-GS?
15:54:34  *** andythenorth has joined #openttd
15:54:38  <glx> Samu: you can probably adapt into a GameScript with no difficulty
15:55:39  <glx> <-- maybe easier
15:56:16  <andythenorth> well
16:00:21  <peter1138> And traversing parents is easy, but children not so much.
16:01:46  <peter1138> Maybe I should just not support group heirarchy :p
16:01:52  <andythenorth> 2.0
16:05:22  *** WWacko1976-work has quit IRC
16:06:18  *** Pikka has joined #openttd
16:06:39  <Samu> editing minimalGS brb
16:09:01  <Samu> interesting, just found a bug
16:09:13  <Samu> if the parameter is DEVELOPER
16:09:21  <Samu> the list of settings isn't empty
16:09:34  <Samu> it's not considering whether they're visible or not
16:10:14  <Samu> technically, the list has items, but since they're hidden...
16:10:27  <Samu> it should disable the button
16:10:33  <Samu> dont u think?
16:11:55  <glx> if nothing is displayed, disabling makes sense I guess
16:11:57  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7127: Fix #7112, fef8b831a9: incorrect precondition check
16:16:21  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker merged pull request #7127: Fix #7112, fef8b831a9: incorrect precondition check
16:16:27  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker closed issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
16:17:07  <planetmaker> bbl
16:24:23  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7101: Fix #6636: Airplanes could be sent to helicopter station depots
16:24:36  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7101: Fix #6636: Airplanes could be sent to helicopter station depots
16:24:41  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh closed issue #6636: airplane going for helistation depot
16:28:47  *** Gja has joined #openttd
16:31:28  <nielsm> hmm :P
16:31:52  <nielsm> I think that's the result of savegame version incrementing past that I used in another branch :)
16:31:54  <glx> nice
16:41:07  *** keoz has joined #openttd
16:43:57  <Samu> back
16:44:06  <Samu> GetConfig(ai_debug_company)->GetConfigList()->size() == 0
16:44:27  <Samu> this check isn't enough to determine whether Settings button is to be enabled or disabled
16:44:42  <Samu> need another private function?
16:45:07  <Samu> and it's used both for AI Congig and AI Debug
16:45:13  <Samu> Config*
16:45:20  <Samu> hmm so... can't be private?
16:45:50  <Samu> something a-la IsConsideredDead, I suppose
16:46:05  <andythenorth> we need a mac-in-cloud for testing :P
16:46:20  <andythenorth> currently I have to be mac-in-cloud personally, it's getting demoralising :D
16:46:47  <peter1138> :D
16:47:03  <peter1138> But do your fonts work?
16:47:38  <andythenorth> I have NFI
16:47:45  <andythenorth> I would never use a weird font
16:47:50  <andythenorth> so now I have to learn how to do that
16:48:31  <glx> you just have to set fonts in the config
16:50:59  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7081: Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)
17:01:39  <nielsm> it's annoying testing things that really need a release/optimized build for performance
17:01:50  <nielsm> since those take rather long to make
17:04:38  <Samu> I am inventing ^_^static bool IsGUIConfigListEmpty(CompanyID slot)
17:05:16  <Samu> mostly copy pasting code around into it
17:06:46  * andythenorth wonders how bad the page load here really is
17:07:15  <Samu> insta loaded for me
17:08:19  <andythenorth> my browser brings it down in about 500ms, uncached
17:11:03  <andythenorth> the openttd website is 100ms
17:12:04  <nielsm> time to compare!
17:15:32  <LordAro> nielsm: neither of those are fast
17:17:23  <nielsm> I don't see any particular improvement in this scene at least
17:21:33  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7083: Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
17:27:20  *** frosch123 has joined #openttd
17:32:36  <TrueBrain> nielsm: cool idea for nightly docker. we first need a template for that .. interested? :)
17:33:01  <nielsm> I'd have to learn those things from the ground up first then
17:33:05  <nielsm> ._.
17:34:27  <Samu> hmm, is it okay to close the window on me if there are no more visible settings when I set ai_developer_tools off?
17:34:37  <Samu> would I like that to happen?
17:36:33  <Samu> i wouldn't mind, because i know there are no more visible settings anymore, but what if someone doesn't know of this?
17:36:40  <nielsm> doesn't matter imo
17:36:45  <nielsm> whatever is easier to do
17:37:12  <nielsm> it's such a rare occurrence it really doesn't matter, as long as you don't crash
17:38:53  *** synchris has joined #openttd
17:40:37  <Samu> ok, gonna close it on me
17:40:55  <Samu> behave similar to textfile, also closes on me when there's nothing to display
17:43:35  <TrueBrain> nielsm: bah :P So we need to find someone to contribute a Dockerfile :D
17:43:38  <TrueBrain> as it really is a good idea
17:44:38  *** Progman has joined #openttd
17:46:49  <Samu> crap, the debug window is also relevant, i keep forgetting it exists :p
17:49:34  <DorpsGek_II> [OpenTTD/website] TrueBrain commented on issue #48:
17:50:04  <TrueBrain> okay, Azure Pipelines is really annoying. It really has to be a logged-in user to dequeue the builds ..
17:50:28  <TrueBrain> it also fails to cancel jobs because newer versions are available
17:50:30  <TrueBrain> (which it normally does)
17:50:34  <TrueBrain> so it really is buggy
17:52:19  <TrueBrain> CPython uses the old-style Azure Pipelines webhook .. possibly that is more stable or something
17:56:51  *** supermop_work has quit IRC
17:57:20  <andythenorth> new website design then?
17:57:21  <andythenorth> :P
17:58:23  <LordAro> uhoh
17:58:36  <andythenorth> probably not right now imho
17:58:37  <andythenorth> also BBL
17:58:39  *** andythenorth has quit IRC
17:58:43  <peter1138> When you buy too much veg to fit in your fridge...
17:59:53  <peter1138> nielsm, might see more of a difference with a 32bpp blitter.
18:05:05  *** Gja has quit IRC
18:05:16  <nielsm> peter1138 ah good idea
18:05:35  <glx> animated blitter maybe
18:06:22  <nielsm> force_full_redraw = false  <- flip that?
18:08:52  *** Gja has joined #openttd
18:10:37  *** Wolf01 has joined #openttd
18:10:59  <Samu> how to check if a window is open
18:11:05  <nielsm>  seeing a tiny difference now
18:11:27  <Samu> need to re-open to refresh widgets plane
18:11:48  <Samu> debug window is a big buggy
18:12:01  <peter1138> BringWindowToFrontById() will return the window pointer if it's open, and highlight it.
18:12:05  <peter1138> Might not be what you want.
18:12:36  <Wolf01> o/
18:12:37  <Samu> i guess invalidatedata would be more appropriate, but it involves hidden widgets
18:12:46  <Samu> dont know how to do this
18:12:47  *** tokai|noir has joined #openttd
18:12:47  *** ChanServ sets mode: +v tokai|noir
18:13:36  <Wolf01> So, I just asked to activate FTTH up to 200M (my area isn't covered by the 1000M), let's see how much they take to do it
18:14:45  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7083: Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
18:15:25  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7083: Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
18:15:39  <LordAro> Wolf01: that's a bit better than you've currently got, i think? :p
18:15:49  <Wolf01> Just a little boost from 4M
18:16:21  *** andythenorth has joined #openttd
18:16:29  *** Wormnest has quit IRC
18:19:47  *** tokai has quit IRC
18:19:51  <TrueBrain> peter1138: I keep looking for ways to automatically log myself in every hour or so .. but for that it first needs to stall, so I can check if my fix works :P But yeah, it would help if one or two of you also got an account so you can dequeue if I am not here
18:20:32  <TrueBrain> I have two more attempts lined up .. we will see tomorrow if either one works :)
18:21:02  <peter1138> What sort of account does one need?
18:22:29  <Samu> does this look alright? it looks strange to see typedef outside
18:22:45  <Samu> may i have it outside?
18:23:12  <peter1138> It needs to be outside because it's the return type.
18:23:17  <Samu> and why can't it be static?
18:23:27  <TrueBrain> peter1138: euh .. I think orudge can sign you up on your email, I guess
18:23:27  <peter1138> What can't what be static?
18:23:39  <Samu> static typedef
18:23:41  <TrueBrain> but you have to signup to Azure Pipelines
18:23:46  <TrueBrain> (right top corner, Sign Up)
18:23:51  <peter1138> Hmm, I can probably add that to my existing account.
18:23:59  <Samu> im only using it for ai_gui.cpp file
18:24:09  <glx> a typedef is always static
18:24:14  <Samu> oh, ok
18:24:26  <glx> unless it's in a header
18:24:40  <peter1138> a typedef does not have any storage, so it can't be static.
18:24:46  <TrueBrain> peter1138: easiest is the address, as that keeps the Team simple and clean
18:25:21  *** Thedarkb-T60 has joined #openttd
18:25:48  <Samu> im gonna need the function for some of the windows'es
18:26:08  <Samu> AI Settings, AI Debug, AI Config
18:26:34  <nielsm> (btw "windows" is already plural, it doesn't need any 'es suffix or otherwise)
18:27:21  <Samu> it was an exclusive of AI Settings
18:27:32  <Samu> but i realized i need it outside of it
18:28:07  <Samu> to determine some widgets enableness
18:37:10  <andythenorth> oof eints :P
18:37:13  <andythenorth> that UI is horrid
18:38:20  <andythenorth> too many things to fix andythenorth :P
18:38:24  <andythenorth> have a break
18:42:26  <Samu> 		visible_settings.clear();
18:42:27  <Samu> 		visible_settings.swap(BuildVisibleSettingsList(this->slot));
18:42:36  <Samu> is swap what i really want?
18:42:59  <Samu> i want to transfer the items from a list to the other, and then discard it
18:43:20  <Samu> swap doesn't seem to be what i want
18:45:18  <peter1138> Damn, I really should remove stashes when I'm done with them.
18:46:36  <Samu> swap is working though
18:47:15  <andythenorth> git stash apply oops
18:47:25  <andythenorth> git stash unapply :P
18:47:41  <Samu> nop it's not working
18:47:44  <Samu> fail
18:47:59  *** HerzogDeXtEr has joined #openttd
18:48:22  <Samu> well, screw it
18:48:25  <Samu> reverting
18:48:36  <DorpsGek_II> [OpenTTD/OpenTTD] George-VB commented on issue #6907: Cargo capacity should be recalculated on TRIGGER_VEHICLE_NEW_LOAD
18:50:00  <peter1138> git stash pop
18:50:04  <peter1138> git stash drop, etc
18:50:41  *** gelignite has joined #openttd
18:50:55  <peter1138> ^ 6907...
18:51:01  <peter1138> Capacity can only be changed in a depot, right?
18:52:32  <andythenorth> no
18:52:37  <andythenorth> cb36
18:53:46  <andythenorth> station trigger, possibly others
18:53:54  <peter1138> So is 6907 valid?
18:53:55  <andythenorth> wiki is vague, and I didn't read the trigger code
18:54:04  <andythenorth> being candid, fuck knows
18:54:22  <andythenorth> I am having sense of humour failure about newgrf stuff :P
18:54:24  <peter1138> Don't need to read the code, is it *meant* to do what he wants, heh
18:54:41  <peter1138> I've never used autorefit, and don't know where it even came from.
18:54:49  <andythenorth> it was a nice misguided idea
18:55:51  <andythenorth> on the plus side I rarely use the refit GUI any more, just set station refit order
18:55:56  <andythenorth> on the negative side, spiders
18:56:06  <peter1138> Hmm, newgrf cache is invalidated before and after the trigger is done.
18:56:14  <andythenorth>
18:56:23  <peter1138> q
18:57:50  <peter1138> Ok, so the trigger happens, and then the cache is invalid.
18:57:59  <planetmaker> autorefit... is that the refit which you can tell a train to do at a station?
18:58:11  <peter1138> I think so.
18:58:15  <planetmaker> so you can ship wood to a factory and the same train ships back a few supplies?
18:58:30  <planetmaker> advanced, but useful stuff
18:58:46  <TrueBrain> andythenorth: I understand you jump to 'bootstrap' in the news-post-topic, but realise it is a solution, instead of telling the requirements. You limit the possible solutions immediately, without clear benefits. Possibly it is good to rethink it to something like: well-known-and-established framework which has no dependencies on javascript
18:58:54  <TrueBrain> that would be much more preferred to me
18:59:08  <TrueBrain> (as if someone makes a Bootstrap site with Javascript bla, I am not going to be really happy about it)
18:59:25  <peter1138> Bootstrap is Meh.
18:59:36  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #6907: Cargo capacity should be recalculated on TRIGGER_VEHICLE_NEW_LOAD
18:59:59  <andythenorth> hmm
19:00:01  <TrueBrain> havent used Bootstrap in years; but I guess it is easy to make good websites which have all the modern solutions
19:00:12  <TrueBrain> just ... not depending on Javascript is much more valuable, in my opinion :)
19:00:14  <andythenorth> dunno, can we talk about it another day
19:00:19  <andythenorth> I am having sense of humour failure
19:00:21  <TrueBrain> (and you can make Bootstrap not depend on Javascript :P)
19:00:22  <andythenorth> about my OpenTTD jobs list
19:00:41  <TrueBrain> sense of humour failure?
19:00:43  <TrueBrain> wtf is that? :)
19:01:43  <andythenorth> too many things I need to sort out, and everything seems to be an argument :P
19:01:57  <andythenorth> need to reset perspective :P
19:02:43  <andythenorth> specifically to Bootstrap, I agree with your wording
19:02:54  <andythenorth> but FFS, we already shipped all this in eints, and nobody commented
19:03:10  <andythenorth> eints possibly has jquery in it pointlessly even, and nobody checked
19:03:22  <planetmaker> andythenorth, sounds like the point at which I felt like ~2...3 years ago where I basically needed to take a break... scaling things down
19:03:40  <andythenorth> so does that 100ms really matter enough that we have to throw out all possibility of ever using a framework
19:03:45  <andythenorth> seems a bit not-invented-here
19:04:11  <TrueBrain> 100ms?
19:04:22  <andythenorth> pointless jquery load on eints ;)
19:04:35  <andythenorth> I can't remember if it's used, but I don't know what would use it
19:05:09  <TrueBrain> ah; I am not too fuzzed about the loading times etc
19:05:16  <TrueBrain> and eints can use Javascript, that is fine
19:05:21  <TrueBrain> just our main page is loaded by non-javascript geeks
19:05:29  <TrueBrain> it should not break because someone didnt load javascript :)
19:05:33  <andythenorth> yeah I get that
19:05:35  <TrueBrain> different set of requirements :)
19:05:43  <andythenorth> just these irrational fears people have
19:05:46  <andythenorth> same BS every time
19:05:55  <andythenorth> anyway, let's put my smiley face on :)
19:06:11  <andythenorth> fucking css coders who insist on hand-crafted BS
19:06:26  <andythenorth> but don't even know what a macro is
19:06:50  <peter1138> :D
19:07:07  <andythenorth> so things I am supposed to be doing
19:07:21  <andythenorth> - fixing whatever is broken with 64 cargos for GarryG, who I like
19:07:24  <TrueBrain> there, I wrote a tiny list of requirements with why we want it :)
19:07:36  <andythenorth> - testing the mac scrollwheel stuff, which I never use, so I don't know what's correct there
19:07:54  <andythenorth> - testing mac font regression, which I don't understand, cos I use the pixel font, instead of weird things
19:08:37  <TrueBrain> but yeah, to reiterate what was said by planetmaker, I guess, paraphrased: don't make this your second job, plz :)
19:08:43  <andythenorth> innit :)
19:08:47  <TrueBrain> we all tried that :P
19:08:53  <andythenorth> - making a test grf for 5006, because if I don't who will, despite that george will keep demanding it
19:09:07  <andythenorth> err actually that's it
19:09:33  <peter1138> George is usually good with test GRFs
19:09:43  <peter1138> At least, sort of.
19:09:48  <andythenorth> well I'm going to wait and see then :P
19:09:50  <TrueBrain> just 4 things? you slacker! :P
19:10:01  <peter1138> Usually it's a massive GRF containing everything and no instructions on what is meant to happen.
19:12:19  <andythenorth> "I like trains"
19:12:38  <andythenorth> if we could have more of a newgrf maintainer, that would be super
19:12:44  <andythenorth> but that's not how open source works :D
19:13:19  <TrueBrain> we can at least make it more accessible
19:14:19  <planetmaker> andythenorth, they look superb. And I can't help to feel reminded on V's rainbow snails :)
19:15:21  <andythenorth> me too
19:15:32  <andythenorth> FML newgrf :)
19:15:49  <andythenorth> actually the thing that is bugging me most is the new industry / cargo / house stuff
19:16:03  <andythenorth> it will probably be shipping in 1.9.x, but we don't have the nml support or docs
19:16:07  <andythenorth> that's kinda lame imo :)
19:16:26  <andythenorth> feels like I should fix it, but not sure I can alone
19:18:21  <andythenorth> eh so I did test it
19:19:16  <planetmaker> do you have merge rights with NML?
19:20:27  <andythenorth> I did, not sure right now
19:20:30  <peter1138> Is it just NML isn't updated?
19:20:35  <peter1138> Shouldn't it give an error? :D
19:20:56  <peter1138> kk, group livery inheritance sort of working.
19:21:35  <andythenorth>
19:21:47  <peter1138> kk
19:21:49  <peter1138> So it's there.
19:21:50  <andythenorth> I get 47 cargos in the game with 47 cargo FIRS
19:21:58  <peter1138> The guy might just be using an old version?
19:22:00  <andythenorth> think it's just user error
19:22:11  <andythenorth> Garry has a brain injury and it's 41 degrees in Oz east coast
19:22:11  <planetmaker> hm?
19:22:21  <andythenorth> so he might benefit from some help, he's a nice guy
19:22:33  <andythenorth> he has so much fun making this stuff
19:22:46  <planetmaker> well, yes, he has.
19:22:53  <planetmaker> but ... what's the issue?
19:23:29  <andythenorth>
19:23:52  <andythenorth> could move his post to graphics forum, and make a thread about 64 cargo stuff?
19:24:28  <planetmaker> hm, yes, I shall do that
19:25:43  <andythenorth> thanks!
19:25:44  <Wolf01> Ok, so it's not FTTH but FTTC, there is one FTTH 100/100 which costs an eye
19:25:59  <Wolf01> Still not bad, but certified for 80M
19:26:21  <Wolf01> I was hoping for a true FTTH
19:26:47  <peter1138> Gosh, this actually works.
19:27:01  <peter1138> Wolf01, "fibre broadband" is a lie, yes.
19:27:07  <Samu> start_date parameter is evil, evil!!! still getting crashes
19:28:45  <andythenorth> peter1138: works? o_O
19:28:49  <Wolf01> 200/20 still better than 4/0.2
19:29:37  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7117: Fix group hierarchy not being visible in RTL languages.
19:29:45  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7117: Fix group hierarchy not being visible in RTL languages.
19:33:52  <peter1138> Wolf01, somewhat.
19:34:07  *** keoz has quit IRC
19:38:26  * andythenorth wonders if George has cdist in that game
19:38:43  <andythenorth> probably unrelated, but there was a run of cdist issues with autorefit and capacity
19:39:40  <andythenorth> " Force the train to refit to some other cargo, that is not available on both stations, and back to the required cargo on loading. "
19:41:30  <Samu> when im trying to reset the settings of an AI that was switched to Random AI, I am getting a crash
19:41:31  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh requested changes for pull request #7049: Fix #6599: Can still click on buy button in vehicle selection window even if no vehicle is selected
19:41:47  <Samu> because AI Info does not exist
19:42:51  <Samu> what to do, what to do
19:43:12  <andythenorth> kinda wondering about
19:44:00  <andythenorth> and the comment above that conditional
19:46:20  <Samu> AI Info really does not exist for Random AIs... i need another approach for the reset button
19:46:43  <Samu> i was basing on the existance of an AI Info in every case...
19:46:53  <Samu> must think
19:48:46  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
19:49:27  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
19:53:52  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
19:55:47  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
19:57:24  <LordAro> nielsm: currently trying a s/NULL/nullptr/, just for funsies
19:57:34  <nielsm> global?
19:57:39  <nielsm> :o
19:57:40  <LordAro> yes :p
19:57:57  <peter1138> #define NULL nullptr
19:58:03  <peter1138> Expect it not to work.
19:58:31  <milek7> i think it is already defined this way
19:58:33  <nielsm> that's honestly not a bad approach
19:58:36  <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on issue #6907: Cargo capacity should be recalculated on TRIGGER_VEHICLE_NEW_LOAD
19:58:53  <LordAro> milek7: depends on platform & compiler, i suspect
19:59:00  <LordAro> seemed to compile fine :)
19:59:03  <LordAro> how dull
19:59:46  <frosch123> just don't add STR_nullptr :p
20:08:24  <LordAro> :p
20:08:41  <LordAro> did s/\bNULL\b/nullptr/, should be fine
20:12:14  *** synchris has quit IRC
20:29:21  <nielsm> hmm I want to save this one:
20:29:46  <TrueBrain> mark it as such :)
20:29:50  <nielsm> should I clone his branch into mine and make a new PR, or abuse github power to push to his branch and modify the PR?
20:30:01  <TrueBrain> (pinned label)
20:30:17  <TrueBrain> can you write in his branch?
20:30:20  <TrueBrain> sounds evil
20:30:24  *** CZTR has quit IRC
20:31:07  <nielsm> yes, that's a flag you can set when creating a PR, allowing users with enough permissions in the receiving repository to push to your branch
20:31:29  <nielsm> and it defaults enabled
20:31:34  <TrueBrain> funny
20:31:38  <nielsm> but I'll make a new PR :)
20:33:30  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7108: Feature: Group liveries, and livery window usability enhancements.
20:34:04  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7108: Feature: Group liveries, and livery window usability enhancements.
20:39:54  <peter1138> Ok, I don't think I need mercurial in my Jenkins install :p
20:40:04  <peter1138> Ah, you can't remove it.
20:44:04  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
20:44:14  *** andythenorth has quit IRC
20:44:25  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #6973: Add: Unique ID to savegames to prevent accidental overwriting
20:44:27  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh closed pull request #6973: Add: Unique ID to savegames to prevent accidental overwriting
20:44:38  <nielsm> hmm should we maybe have a tag for PRs that affect savegame version?
20:44:52  <LordAro> doesn't seem like a bad idea
20:46:59  <peter1138> Hmm
20:47:29  <peter1138> We should start using enums too, to avoid having to fix numbers everywhere.
20:48:05  <LordAro> what do you mean?
20:48:08  <peter1138>
20:48:08  <peter1138> ^
20:48:12  <LordAro> ah
20:48:56  <peter1138> When you rebase, the only part that conflicts is the current savegame version, so you have to check to make sure you got all the SL_COND stuff updated.
20:49:11  <LordAro> hmm
20:49:27  <peter1138> I encountered difficulties due to some savegame versions covering a range of commits :p
20:49:51  <LordAro> i don't like the `SLV_FOO - 1`, perhaps the latter parameter could be exclusive?
20:49:51  <peter1138> We don't need to back date it as such, but we could start to do it going forwards.
20:50:33  <glx> #ifndef NULL     #ifdef __cplusplus         #define NULL 0     #else         #define NULL ((void *)0)     #endif #endif
20:50:38  <peter1138> LordAro, possibly.
20:50:45  <glx> that's NULL for msvc
20:50:57  <peter1138> LordAro, that means we need to change every SL_COND line in one go. Not an issue.
20:51:33  <peter1138> The enum naming is crap too, of course.
20:51:40  <peter1138> I was just making it work :D
20:52:02  <peter1138> Need to see how everyone else feels?
20:52:13  *** andythenorth has joined #openttd
20:52:24  <Samu> nielsm dont forget about scenario saves
20:52:33  <Samu> UNNAMED is lame
20:52:46  <nielsm> what?
20:52:50  <Samu> doesn't even ask if i want to overwrite
20:52:58  <LordAro> peter1138: mm
20:53:17  <Samu> you're working on savegames, aren't you
20:53:19  <andythenorth> woo
20:53:21  * andythenorth tests
20:53:27  <LordAro> glx: interestingly, i can't find any definition of NULL in mingw, other than redefinitions in SDL & ICU
20:53:32  <nielsm> oh, does it carry the savegame unique id over from scenario to game when you start a new game from scenario?
20:53:34  <LordAro> ICU defines as nullptr :)
20:53:48  <andythenorth> peter1138: so which branch? o_O
20:54:12  <nielsm> Samu: I just imported someone else's patch and updated it to compile on current master
20:54:41  <peter1138> andythenorth, nrt?
20:54:49  <andythenorth> group-livery
20:54:51  <Samu> oh, i didn't look at it in detail, just hoping he didn't forget about scenario editor
20:55:03  <Samu> saving a scenario always defaults to UNNAMED
20:55:08  <peter1138> andythenorth, ah. yes. That one.
20:56:43  <glx> #ifndef NULL #ifdef __cplusplus #ifndef _WIN64 #define NULL 0 #else #define NULL 0LL #endif  /* W64 */ #else #define NULL ((void *)0) #endif #endif
20:57:06  <glx> there's this one in crtdgb.h
20:59:09  <peter1138> LordAro,
20:59:37  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
20:59:59  <peter1138> LordAro, so this doesn't attempt to solve the savegame version issue with lots of patch packs and all that bollocks
21:00:08  <peter1138> LordAro, just make things a little easier to maintain.
21:00:12  <LordAro> year
21:00:15  <LordAro> yeah*
21:00:52  *** sla_ro|master has quit IRC
21:01:00  <peter1138> I'm willing to go through and convert (most) previous versions if this is acceptable.
21:01:54  <LordAro> i wouldn't be unopposed
21:02:24  <LordAro> should probably be `enum SaveLoadVersion : uint16`
21:02:28  <LordAro> er
21:02:33  <LordAro> i wouldn't be opposed*
21:04:24  <peter1138> Can be tricky working out what each entry name should be :)
21:04:36  <glx> and the same preprocessor block in locale.h, minwindef.h, ntdef.h (also defining NULL64)
21:04:45  <glx> oh of course stddef.h
21:04:51  <peter1138> I guess, step 1, make COND exclusive, not inclusive.
21:07:38  *** Wormnest has joined #openttd
21:07:59  <peter1138>  * @param version_to   Highest version number that falls within the range.
21:08:05  <peter1138> Hmm, how do you reword a comment like that :p
21:09:57  <LordAro> "entirely"
21:14:50  <Samu> i have a question, I made this:
21:14:58  <Samu> now, I wanna call it
21:15:33  <Samu> visible_settings.swap(BuildVisibleSettingsList(slot));
21:15:42  *** Wormnest has quit IRC
21:16:00  <Samu> is swap what I'm looking for?
21:16:40  <Samu> it makes a swap, but what happens to the discarted list?
21:16:59  <Samu> i dont need it for anything
21:17:13  *** keoz has joined #openttd
21:17:14  <Samu> is it occupying memory
21:17:40  <Samu> ?
21:18:32  <nielsm> is it a pointer?
21:19:04  <Samu> VisibleSettingsList visible_settings;
21:19:11  <Samu> it's a vector?
21:19:12  <Samu> no idea
21:19:26  <nielsm> the object itself is destroyed when it goes out of scope, but if the object is a pointer then the pointed-to object is not touched
21:21:03  <Samu> oh boy, I don't know
21:22:44  <Samu> out of scope means, outside the brackets?
21:23:30  <peter1138> LordAro, hmm, maybe converting to exclusive before-hand is a bit error prone :/
21:24:01  <peter1138> lol
21:24:10  <peter1138> Ah, old_station_desc
21:24:11  <LordAro> haha
21:24:32  <peter1138> I thought we were still "reserving" space for a second.
21:24:50  <Samu> hold on nielsm
21:24:55  <Samu> copying code...
21:25:46  *** Progman has quit IRC
21:25:50  <Samu>
21:26:06  <Samu> i have the function outside the big one, which is where it's called
21:26:37  <Samu> line 35 initiates visible_settings;
21:26:39  <milek7> Samu: vector will be destroyed after swap call
21:26:42  <DorpsGek_II> [OpenTTD/OpenTTD] RoqueDeicide commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
21:26:57  <milek7> but is it valid code? (it doesn't complain about passing non-const temporary reference?)
21:27:18  <Samu> and line 78
21:27:53  <Samu> is where i made the swap, i don't know i want to use swap command or some other command
21:28:09  <Samu> because i only need to update visible_settings
21:28:49  <milek7> you could just use copy assignment, visible_settings = BuildVisibleSettingsList(slot);
21:28:59  <Samu> doesn't like it
21:29:09  <Samu> unless it likes it now, let me test
21:29:13  <milek7> hm
21:29:46  <Samu> visible_settings = BuildVisibleSettingsList(slot);
21:29:53  <Samu> funny... it wasn't working the first time
21:30:02  <Samu> now it works
21:30:11  <Samu> well, sorry
21:31:03  <Samu> yep, it built
21:31:09  <Samu> no error
21:31:39  <peter1138> LordAro, "git diff --word-diff-regex=." is magic!
21:32:10  <LordAro> ooh, very nice
21:32:31  <peter1138> Actually in this case, "git diff --word-diff-regex=[0-9]+" works better.
21:34:38  <peter1138> Ok, that blew it up :D
21:38:34  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
21:42:44  <peter1138> Oh god there's all the settings too :(
21:42:49  <LordAro> haha
21:42:51  <LordAro> oh yes
21:42:59  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
21:43:00  <peter1138> to      = ...
21:43:15  <peter1138> Hmm, not that many
21:43:18  <peter1138> grep ^to ...
21:46:16  *** frosch123 has quit IRC
21:46:51  <peter1138> Hmm, still doesn't load.
21:47:50  <peter1138> Ah, another test. Sigh.
21:47:55  <peter1138> Code duplication, eh?
21:48:16  <LordAro> who would do such a thing
21:49:56  *** Gja has quit IRC
21:50:59  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
21:51:30  <peter1138> I'm not joking about that comment. I have no idea how to reword it.
21:52:10  <LordAro> "Exclusive savegame version upper bound. SL_MAX_VERSION if no upper bound" ?
21:54:58  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
21:55:51  <Samu> peter1138, that window you're quoting is the list of available AIs, not the list of AI settings, unless you really mean what you say
21:57:22  <peter1138> Ok, then s/settings/list/
21:57:54  <peter1138> I don't know the change does.
21:58:18  <peter1138> But it looks like it'll close the window if the slot is a valid AI.
21:58:21  <peter1138> But I dunno.
21:58:41  <Samu> yes, that window is called when a company starts
21:58:49  <Samu> that invalidate command*
21:59:06  <Samu> if it's human, no need to close
21:59:15  <Samu> if it's ai, then yes, must be closed
21:59:33  <Samu> can't risk changing the ai config list into another
21:59:51  <andythenorth> nice group hierarchy \o/
22:00:00  <andythenorth> I made a group called 'The Rainbow'
22:03:14  <andythenorth> peter1138: if I have a child group with 'default', AND the parent has different value to company AND I then move child out of parent, 'default' doesn't update to the one set in company
22:04:15  <peter1138> Err
22:04:20  <andythenorth> also same if I move the child into parent
22:04:59  <peter1138> Maybe I broke it when simplifying :(
22:05:13  <andythenorth> or is it just the 2nd CC
22:05:14  <andythenorth> odd
22:05:16  * andythenorth testing more
22:05:26  <peter1138> Oh. 2CC might be a bit odd :/
22:05:32  <peter1138> Did test that.
22:05:52  <andythenorth> I can't repro now
22:05:59  <andythenorth> but I repro-ed it twice before
22:06:02  <andythenorth> maybe I am wrong
22:06:18  <andythenorth> nope got a repro again
22:06:38  <nielsm> hmm well working better, but not quite right
22:06:52  <nielsm> it's not printing the warning text in the save window info pane
22:07:21  <andythenorth> peter1138: dunno, it's a savegame from previous version of patch, making a clean one
22:07:24  <andythenorth> might be stale data
22:09:11  <andythenorth> can't repro on fresh game
22:12:41  <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7108: Feature: Group liveries, and livery window usability enhancements.
22:12:59  *** HerzogDeXtEr has quit IRC
22:14:14  <peter1138> LordAro,
22:14:18  <peter1138> LordAro, that effort ;(
22:14:19  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7084: Change: AI/GS Config GUI overhaul
22:15:54  <peter1138> I just ate a jam doughnut. It was not satisfying. It was 2 days old :/
22:16:35  <andythenorth> crunchy
22:21:14  <Samu> is this working?
22:22:24  <Samu> settings.cpp has a much more complex methodology of syncronizing parameters
22:23:20  *** CZTR has joined #openttd
22:23:54  <nielsm> that's better
22:24:25  *** Supercheese has joined #openttd
22:24:38  <peter1138> nielsm, nice. That's separate to the unique-id stuff, right?
22:25:05  <nielsm> it uses it
22:26:55  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
22:29:13  <Samu>
22:29:22  <Samu> what shall I do?
22:30:29  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
22:30:57  <Samu> besides, in the Config window it's called Configure, in the AI Debug window it's called Settings, and they're openning the exact same window
22:33:32  <LordAro> peter1138: very nice
22:33:44  <DorpsGek_II> [OpenTTD/OpenTTD] RoqueDeicide commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
22:33:46  <Samu> it's an english issue
22:34:06  <Samu> consistency + english
22:34:10  <peter1138> LordAro, making big progress currently converting numbers to SLV_numbers
22:34:28  <peter1138> once that's done a few little one liners can convert the numbers to something meaningful.
22:34:49  <Samu> into PR numbers
22:34:56  <Samu> commit numbers
22:34:58  <Samu> or something
22:35:42  *** CZTR has quit IRC
22:35:49  <Samu> tell me what to do peter1138
22:36:02  <Samu> you're the englishman
22:36:14  *** Chrill has joined #openttd
22:36:39  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
22:37:36  <andythenorth> Samu: is it a pre-existing inconsistency?
22:39:34  <Samu> yes
22:40:38  <Samu> but it's non functional, doesn't change anything, it's just what to display
22:43:47  *** Wormnest has joined #openttd
22:50:01  <Samu> alright, i'm going to revert those
22:50:13  <Samu> less work needed from translators
22:50:21  <Samu> if it ever gets accepted
22:50:32  <andythenorth> string consistency is a nice issue to handle separately
22:50:52  <Samu> oh
22:50:57  <Samu> ok, im undecided
22:51:35  <andythenorth> someone very experienced might just change the string and it's all fine
22:51:56  <andythenorth> but you need to keep the changeset for your patches as small as you can, to aid reviewing
22:52:18  <andythenorth> good luck!
22:52:18  *** andythenorth has left #openttd
22:52:49  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7129: Add: allow opening of one TextfileWindow per type
22:53:20  <Samu> something like revert but keep the changes
22:53:26  <Samu> ok, i think i can do that
22:59:35  *** Wolf01 has quit IRC
22:59:55  <glx> and while testing that I noticed GameOptionsWindow doesn't close textfile window when it's closed
23:00:21  <LordAro> heh, figures
23:00:34  *** gelignite has quit IRC
23:00:35  <glx> so many windows having issues with window closing
23:00:47  <glx> at least it doesn't crash ;)
23:02:17  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
23:02:18  <nielsm> controversial opinion: the in-game wrench button should be changed to open the Settings window rather than Game Options
23:02:39  <nielsm> Game Options is so rarely needed, all the useful stuff is in Settings
23:03:07  <Samu> does it need to close?
23:03:19  <Samu> what if i want to delight in the readme.txt :)
23:03:25  <glx> it's still in the dropdown so why not
23:04:05  <glx> when you close the option menu I think you don't care about the licenses or changelog of basesets
23:04:21  <Samu> GameOptionsWindow, which one is this
23:04:27  <Samu> brb googling
23:04:44  <glx> the one where you set language and other stuff
23:05:33  <Samu> ah, that one
23:05:38  <nielsm> huh, Options and Settings can't be opened at the same time, never noticed that before
23:05:49  <glx> same class :)
23:06:03  <glx> but you can work around it using window_number
23:06:12  <nielsm> (also, some of the options in Options should be moved to Settings, like the town names)
23:06:37  <nielsm> hmm I should move myself to bed :P
23:06:37  <nielsm> gn
23:07:41  <glx> indeed options related to game play should move to settings
23:07:53  <Samu> is it just me or the number of changed files keep decreasing everytime I update?
23:08:21  <Samu>  Files changed 70 nvm, it increased
23:08:34  <LordAro> are you expecting it to stay constant?
23:08:48  *** Chrill has quit IRC
23:08:49  <Samu> i edited one more file, it was 69
23:08:56  <peter1138> Ok... what the fuck is SLE_WRITEBYTE?
23:09:01  <glx> you change a lot of files for just a window ;)
23:09:18  <Samu> it's more than 1
23:09:23  <peter1138> glx, languages.
23:09:56  <glx> oh of course
23:10:03  <glx> forgot that one
23:10:49  <glx> anyway removing outdated strings is useless if the string is still in english.txt
23:10:57  <glx> we saw that recently :)
23:12:56  <peter1138> Yes :(
23:13:11  <peter1138> Used to work with WT, IIRC?
23:14:41  <glx> yes it worked with the old system
23:14:42  *** nielsm has quit IRC
23:18:22  <Samu>
23:18:27  <Samu> LIVERY_CAPTION?
23:18:35  <Samu> I didn't touch that
23:18:47  <peter1138> As glx wrote about 8 minutes ago...
23:18:48  <LordAro> Samu: yeah, not your issue, peter1138 broke it :p
23:18:55  <peter1138> I did not.
23:19:05  <peter1138> Not my fault that EINTS is dumb.
23:19:20  <LordAro> peter1138: glx: frosch pointed at a line of code in eints yesterday, but i don't understand enough about it to do anything with it (easily)
23:20:14  *** keoz has quit IRC
23:24:55  <peter1138> OMG it linked.
23:25:18  <peter1138> And it loaded a saveload
23:25:48  <peter1138> Hmm.
23:26:01  <peter1138> vehicle types aren't messed up.
23:27:23  <glx> and it's bad ?
23:27:34  <peter1138> I had to fiddle with SLWRITEBYTE.
23:27:36  <peter1138> Because that is... wtf.
23:28:49  <peter1138> It's used for writing a fixed value to the savegame, but the value is stored in the version from and version to fields.
23:29:13  <peter1138> Which causes issues when I make them an enum.
23:29:20  <peter1138> It's horrible.
23:30:11  <peter1138> Also it takes about translating a value, but I can't see any translation.
23:37:18  <peter1138> Hmm, I ought to check saving a game.
23:39:06  *** Wormnest has quit IRC
23:39:51  <peter1138> It could just write the value of the variable it references, but...
23:40:58  <glx> ah yes it's weird
23:41:59  <peter1138> I suspect it's kinda legacy and doesn't really do what the comment says any more.
23:42:48  *** Flygon has joined #openttd
23:42:59  <peter1138> Rubidium tried to remove it in 2007 :-)
23:43:13  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7129: Add: allow opening of one TextfileWindow per type
23:43:22  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7129: Add: allow opening of one TextfileWindow per type
23:43:46  <Samu> #include "../strings_func.h" - removed this line and it still builds!
23:45:41  <glx> hmm it writes something in the savegame, and discard it on load if I read correctly
23:46:19  <peter1138> It's read directly with SlReadByte() in the loading code, in say vehicle_sl.cpp
23:46:30  <peter1138> Ok. It currently does not do translation
23:47:07  <peter1138> eab8ac49cee is where rubidium removed it
23:47:21  <glx> I'm reading in SlObjectMember
23:47:22  <peter1138> 622a4d10b92 is where it is put back
23:47:24  <peter1138> BUT
23:47:29  <peter1138> it's differente
23:47:40  <peter1138> Before, it had 2 values, after it doesn't.
23:48:03  <glx>                 case SLA_SAVE: SlWriteByte(sld->version_to); break;
23:48:03  <glx>                 case SLA_LOAD_CHECK:
23:48:03  <glx>                 case SLA_LOAD: *(byte *)ptr = sld->version_from; break;
23:48:10  *** Thedarkb-T60 has quit IRC
23:48:13  <peter1138> glx, yup
23:48:27  <glx> write, and discard on load
23:48:31  *** Thedarkb-T60 has joined #openttd
23:48:52  <peter1138> in Load_VEHS() there's VehicleType vtype = (VehicleType)SlReadByte();
23:49:03  <peter1138> Which is reading that value directly.
23:49:46  <glx> I think it was to automatically convert vehicle types to the right value
23:50:04  <glx> but was changed since
23:50:31  <peter1138> Yes, we changed the enum.
23:50:36  <peter1138> IIRC it was +0x10 originally.
23:52:07  *** Thedarkb1-T60 has joined #openttd
23:52:17  <peter1138> So discard on load...
23:52:29  <peter1138> It assigns that value to the pointer, but is that ecessary?
23:52:46  <peter1138> Nope.
23:53:09  <glx> well discard the saved data and replace by what's in the source
23:54:29  <peter1138> It's always read directly with SlReadByte(), rather than through the description system.
23:55:52  *** supermop_Home has joined #openttd
23:55:59  <supermop_Home> yo
23:57:07  *** Thedarkb-T60 has quit IRC
23:59:36  <glx> SLE_WRITEBYTE is used only for types it seems (vehicles and station)
23:59:41  <peter1138> Yes.

Powered by YARRSTE version: svn-trunk