Log for #openttd on 29th January 2019:
Times are UTC Toggle Colours
00:00:16  <peter1138> Looking at both cases, it could actually just write the value of the variable, instead of storing it from/to.
00:00:39  <glx> indeed
00:03:33  *** Thedarkb2-T60 has joined #openttd
00:06:04  *** Thedarkb1-T60 has quit IRC
00:08:59  <glx> oh was about to say I wasn't understanding how loading could work, but it's ok it read the byte before SlObject, and SlObject just does "nothing" for SLE_WRITEBYTE
00:09:06  <peter1138> Yup
00:09:13  <peter1138> That's what I was trying to say but wasn't clear :)
00:10:32  <glx> indeed it could just write for SLA_SAVE and break for other cases
00:10:36  <peter1138> It's slightly different for stations as the fixed value may not be the value stored in facilities, but in any case we're only looking for a specific bit, so it doesn't hurt to write the proper value.
00:11:58  <Samu> bug in scenario editor
00:12:22  <glx> SLE_WRITEBYTE is just a hack to write a constant
00:12:46  <glx> abusing SLE_GENERAL fields
00:12:49  <Samu> if i set up a GS in the scenario editor, save the scenario and load it back, the GS is loaded as active
00:12:51  <peter1138> Yes, and that hasn't been necessary since we changed the enum.
00:13:47  <glx> special load handling is still required, we still want to ignore the field on load
00:13:57  <glx> as we read it before
00:14:10  <peter1138> SlReadByte still needs to stay, but that's fine. That isn't abuse.
00:14:20  <Samu> oh, you're also dealing with saving stuff
00:14:26  <Samu> coincidence
00:15:22  <glx> yes but SLE_WRITEBYTE still needs to be a special case, we can't use SLE_VAR there
00:15:35  <peter1138> Yup.
00:15:42  <peter1138> It's a "write only" part of the description :)
00:15:43  <glx> because we read the var before the _desc
00:15:54  <peter1138> But it's possible to write the var's value, not a fixed value.
00:16:02  <glx> true
00:16:25  <glx> and discard the SLE_GENERAL abuse
00:16:38  <peter1138> 037d6367349afa5a27ddf2cf015f6490167cf786
00:16:43  <peter1138> bjarni you STAR!
00:16:46  <glx> allowing SLE_CONDWRITEBYTE if needed one day
00:16:55  <peter1138> That's the commit that renumbered the types.
00:17:11  <glx> not clickable ;)
00:17:22  <peter1138> git show 037d6367349afa5a27ddf2cf015f6490167cf786
00:17:23  <peter1138> ;)
00:17:52  <peter1138>
00:17:55  <peter1138> There you go.
00:18:00  <peter1138> 2007. Quite late.
00:19:30  <glx> "Surprisingly this can be done without changing the savegame format" <-- of course SLE_WRITEBYTE did its job ;)
00:19:49  <peter1138> :-)
00:20:15  <peter1138>
00:20:49  <glx> and at that time we weren't reading the byte before SlObject
00:21:47  <glx> I wonder what happens if we try to load a savegame from before that commit with master
00:22:14  <peter1138> Like the titlegame that still loads?
00:22:32  <glx> it's been updated I think
00:22:38  <peter1138> Not in master.
00:23:30  <Samu> any GS expert around that uses scenario editor? I have... questions, doubts
00:23:31  <peter1138> Before then the data structure was static.
00:23:47  <peter1138> waypoints were actually stations.
00:23:56  <glx> if SlReadByte gets a pre enum change it will SlErrorCorrupt("Invalid vehicle type");
00:24:16  <peter1138> glx, the enum changed, the savegame value was correct already.
00:24:30  <peter1138> the enum was changed and it happens to make the savegame value that was being written before.
00:24:44  <peter1138> s/make/match/
00:26:44  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7130: Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.
00:28:07  <Samu> I have a delicate situation on my hands: on 1.8.0 and master, GS can be edited in scenario editor with no visual indication of its instance being active or not
00:29:06  <Samu> my gui stuff exposes that loading a scenario, will always activate the GS
00:29:23  <Samu> even if i saved it as a configuration
00:30:09  <Samu> i don't think it's intended for it to load as active, if it wasn't saved as active
00:30:26  <Samu> but I'm not sure
00:30:34  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7130: Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.
00:30:38  <Samu> need your thoughts on it
00:31:24  <peter1138> Nothing should really be active within the scenario editor.
00:32:12  <Samu> so, it's a bug? a very hidden one?
00:34:19  <Samu> how am I gonna report the steps for this... it's unnoticeable on 1.8.0
00:35:13  <peter1138> Nobody cares about 1.8.0 :p
00:35:25  <Samu> okay, it's the same as current master
00:35:33  <Samu> unnoticeable, but it's there
00:35:51  <peter1138> Anyway, I thought you said that it's *your* stuff that activates the GS.
00:36:11  <Samu> no, it's not activated by me
00:36:34  <peter1138> 00:29 < Samu> my gui stuff exposes that loading a scenario, will always activate the GS
00:36:41  <Samu> i simply made the gui to be able to detect what's active, and it's how I spotted the bug
00:36:45  <peter1138> Ok
00:36:55  <peter1138> So by "active" what does it do?
00:36:57  <peter1138> Actually run?
00:37:04  <Samu> the instance is running
00:37:07  <peter1138> Maybe it is meant to run? I don't kno!
00:37:08  <peter1138> +w
00:37:10  <Samu> doesn't seem to be doing anything
00:37:14  <Samu> but it's active
00:37:53  <Samu> the issue is that on master, the slot is always configurable, i can change to other gs
00:38:12  <Samu> that's gonna mix configs of GS's from each other
00:39:06  <Samu> saved data may be of one GS, but then loaded into the other, that's gonna conflict for sure and cause issues
00:40:41  <glx> oh after checking source from that time SLE_WRITEBYTE macro was indeed different :)
00:40:44  <Samu> i'm gonna try fill a report
00:41:11  <glx> but it's a pain to navigate in old files, everything is moved :)
00:41:28  <peter1138> git blame xxx -- filename
00:41:42  <peter1138> And xxx~1 is useful.
00:41:45  <glx> had to remember where the saveload stuff was stored
00:42:13  <peter1138> :-)
00:43:22  *** supermop_Home has quit IRC
00:44:19  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7120: Feature: Town Voronoi diagram
00:45:50  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened issue #7131: Possible GS issues in Scenario Editor
00:47:24  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7120: Feature: Town Voronoi diagram
00:51:58  *** sushibear has joined #openttd
00:52:58  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
00:54:00  *** snail_UES_ has joined #openttd
00:54:25  <glx> and indeed for stations the value can be anything as long as the flag is correct
00:57:12  <peter1138> Yup
01:08:47  *** glx has quit IRC
01:14:53  *** Wormnest has joined #openttd
01:31:57  *** Supercheese has quit IRC
01:52:51  *** Thedarkb-X40 has joined #openttd
01:59:12  *** Thedarkb2-T60 has quit IRC
02:07:02  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #6584: Preview GUI text drops text in German translation
02:17:17  *** supermop_Home has joined #openttd
02:30:36  *** Wormnest has quit IRC
02:59:31  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas opened pull request #7132: Fix #6584: text layout problem in engine preview dialog
02:59:50  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7132: Fix #6584: text layout problem in engine preview dialog
03:07:43  <nnyby> hehe am i the only one in here not in europe? :P this channel gets pretty dead silent at like 9pm my time
03:16:14  *** Thedarkb-X40 has quit IRC
03:20:58  *** Samu has quit IRC
03:22:04  <Eddi|zuHause> almost
03:42:11  *** D-HUND has joined #openttd
03:49:42  *** debdog has quit IRC
03:55:52  *** duck_ has quit IRC
03:58:58  *** luaduck has joined #openttd
04:04:16  *** Gustavo6046 has quit IRC
04:42:47  *** HerzogDeXtEr has joined #openttd
05:03:32  *** snail_UES_ has quit IRC
05:05:23  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7086: Change #6173: Update SDL driver to use SDL 2.0
05:13:47  *** HerzogDeXtEr has quit IRC
05:28:33  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7086: Change #6173: Update SDL driver to use SDL 2.0
05:30:31  <DorpsGek_II> [OpenTTD/OpenTTD] George-VB opened issue #7133: Graphics glitch with tunnels
06:05:08  *** keoz has joined #openttd
06:07:57  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on issue #7133: Graphics glitch with tunnels
06:33:13  *** andythenorth has joined #openttd
06:50:22  <Pikka> GarryG broke 64 cargos?
06:53:22  *** CZTR has joined #openttd
07:00:43  <andythenorth> nope
07:01:38  * andythenorth wonders why it doesn't work though :P
07:02:32  <andythenorth> maybe the vehicle refit overflows or something
07:03:04  <andythenorth> or maybe that test FIRS is wrong
07:10:10  <andythenorth> ugh, can't compile FIRS
07:10:11  <andythenorth> nml is broken
07:10:14  <andythenorth> FML newgrf
07:10:20  <andythenorth> :)
07:14:58  <Pikka> oops :)
07:15:09  *** keoz has quit IRC
07:15:38  <peter1138> Hmm
07:17:23  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #6584: Preview GUI text drops text in German translation
07:18:40  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7132: Fix #6584: text layout problem in engine preview dialog
07:18:51  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7132: Fix #6584: text layout problem in engine preview dialog
07:18:57  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed issue #6584: Preview GUI text drops text in German translation
07:23:36  <peter1138> So I made version numbers into an enum last night, and then started changing from numbers to names.
07:23:53  <peter1138> And then I typoed and converted all text in all files with a regex.
07:24:02  <peter1138> So that was lost :p
07:24:08  <LordAro> D:
07:24:16  <peter1138> The numbers are still there
07:24:24  <peter1138> It's a simple regex to replace though, so it hadn't taken long.
07:24:57  <peter1138>
07:25:10  <peter1138> ^ That's now the position I'm at.
07:25:27  <peter1138> The enum part was already commited, so nothing much lost.
07:26:09  <peter1138> There's definitely some alignment issues with those changes.
07:26:33  <peter1138> But if we start changing from numbers to names then there's not much point fixing yet.
07:31:46  <LordAro> mm
07:32:07  <peter1138> We lose the "git blame" support by dropping the old comment in saveload.cpp though.
07:32:18  <peter1138> Not sure how use that is anyway.
07:33:17  <andythenorth> hmm, how to fix nml :P
07:33:19  <andythenorth> let's see
07:33:35  <peter1138> What's up with it?
07:34:11  <andythenorth> local changes to try and add the 16 cargo in/out support
07:34:21  <andythenorth> but eh, it's in git, and we have branching
07:34:45  <peter1138> Oh, is that what's not working for Garry?
07:34:57  <andythenorth> no, it's vehicle refit that's broken
07:35:24  <peter1138> Hmm?
07:36:16  <andythenorth> with the test FIRS
07:36:28  <andythenorth> select a cargo like Acid in refit menu
07:36:31  <andythenorth> apply
07:36:35  <andythenorth> vehicle isn't refitted
07:36:45  <andythenorth> dunno if it's FIRS or not
07:37:15  * andythenorth notes to self
07:37:28  <andythenorth> newgrf features should get a reference grf in nml always
07:37:29  <peter1138> Oh, so that's a separate thing.
07:37:55  <andythenorth> testing with FIRS or whatever introduces a shitload more moving parts
07:42:26  <peter1138> CargoID new_cid = GB(p2, 0, 5);
07:42:27  <peter1138> Yeah...
07:42:42  <peter1138> CmdRefitVehicle limits it to 32 still. Oops.
07:42:57  <andythenorth> oops
07:43:03  <andythenorth> blame your tester :P
07:43:06  <peter1138> Fortunately there's space within the parameters to add made.
07:43:09  <peter1138> s/made/more.
07:43:23  <peter1138> No, I think you for testing. I didn't at all.
07:43:59  <andythenorth> oops, I fixed nml and FIRS :P
07:44:06  <andythenorth> activated a virtualenv :P
07:45:08  <andythenorth> too many pythons, I delete some
07:45:23  <andythenorth> 13 different versions
07:48:41  <peter1138> Ok but I have duck egg on toast.
07:49:03  <andythenorth> winning
07:49:09  <andythenorth> I have porridge
07:49:33  <andythenorth> ha ha
07:49:38  <andythenorth> python2.4 is no longer my default
07:49:43  * andythenorth mega bash skills
07:51:23  *** gelignite has joined #openttd
08:05:11  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
08:05:19  <peter1138> andythenorth, can you try that out? ^
08:05:25  <peter1138> Or I could. Hmm.
08:05:26  <andythenorth> sure
08:07:33  <peter1138> Gotta make lunch and then go to work :/
08:07:47  <peter1138> Also I burnt the roof of my mouth on the egg yolk, damn it.
08:09:34  <andythenorth> works for me
08:10:21  <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
08:16:34  *** andythenorth has quit IRC
08:38:54  *** WWacko1976-work has joined #openttd
08:43:39  <Markk> peter1138: I thought your work comprised of answering questions and chatting here in #openttd?
08:45:07  <peter1138> "Waiting for the compiler"
08:46:43  <Markk> Ah, that's your excuse :)
08:47:13  <peter1138> Not much waiting with the 6-core i7s these days, though.
08:55:35  <DorpsGek_II> [OpenTTD/OpenTTD] Gabda87 commented on pull request #7120: Feature: Town Voronoi diagram
08:57:31  *** andythenorth has joined #openttd
08:57:37  <peter1138> He is back.
08:59:12  <andythenorth> yes he's back
08:59:22  <andythenorth> "Tropic is broken" v
08:59:23  <andythenorth>
08:59:49  <andythenorth> but today I need to make a UI library and some enterprise software
08:59:52  <andythenorth> maybe also fix my keys
09:01:00  <peter1138> Hmm?
09:01:03  <peter1138> What's broken?
09:02:48  <andythenorth> everything :)
09:03:05  <andythenorth> I fix my keys first though
09:03:16  *** CZTR has quit IRC
09:03:31  <peter1138> That's not helpful.
09:03:49  <andythenorth> TGP flattens sub-tropic horribly
09:03:57  <andythenorth> which leads to flat desert maps
09:04:53  <peter1138> "Tropic is broken" -> "TGP generates shit maps for tropic", right?
09:05:10  <andythenorth> yes
09:05:31  <andythenorth> ha ha can't type, took my key caps off
09:05:38  <andythenorth> dirty under here
09:05:40  <peter1138> That's not exactly "Everything" then.
09:05:59  <LordAro> peter1138: everything is always broken
09:06:04  <LordAro> andythenorth: that was fast
09:06:07  <andythenorth> especially my keys
09:06:21  <peter1138> You can switch to the original generator...
09:06:23  <andythenorth> wonder if this is crumpett
09:06:25  <andythenorth> or nachos
09:06:32  <peter1138> Anyway, I did find my map generator code, eventually.
09:06:38  <peter1138> Maybe I should relook into it.
09:06:42  <andythenorth> these keys are sci-fi
09:07:14  <andythenorth> ttttttttttttt
09:08:08  <andythenorth> oh they work now
09:13:38  <andythenorth> such stupid bugs I've done in Horse :)
09:13:46  <andythenorth> but not as stupid as Group Facetime bug
09:19:44  *** erratic has quit IRC
09:35:31  <andythenorth> eh
09:35:41  <andythenorth> wonder if we could make a double-track autorail tool :P
09:35:45  <andythenorth> would it suck?
09:45:52  <andythenorth> is air drag worth bothering with Pikka ?
09:53:53  *** Gustavo6046 has joined #openttd
09:57:13  <Pikka> not really, I don't think
09:57:26  <peter1138> Hmm?
09:57:29  <peter1138> It matters at high speed.
09:57:31  *** nielsm has joined #openttd
09:57:45  <Pikka> high speed is no fun though
09:57:51  <andythenorth> so this 186mph bendolino?
09:58:28  <Pikka> well, if it doesn't behave how you want it to, you could fiddle with it. Or you could just give it more powa
09:58:38  <peter1138> Fiddle with it to make it streamlined, etc.
09:58:41  <andythenorth> it has enough power
09:58:49  <andythenorth> THE SPEC EXISTS IT MUST ALL BE USED
09:58:50  <andythenorth> etc
09:58:54  <andythenorth> it's fast enough
09:59:22  <peter1138> Filling in a functional requirements spec for a client.
09:59:33  <peter1138> It's just been dumped on me with 150 requirements.
10:00:01  <peter1138> I was told by colleague "just fill in your bit, we've filled in the rest"
10:00:12  <peter1138> the "rest" comprises about a dozen questions.
10:00:14  <andythenorth> classic
10:00:23  <andythenorth> best way to design anything good
10:00:35  <peter1138> Anyway, there's loads which is marked as mandatory which we don't do.
10:00:43  <peter1138> And I'm not going to say we do, fuck that.
10:00:53  * andythenorth answers a lot of those
10:13:13  <peter1138> So I know the rest of the day is going to be saying "no" to "can we do that?"
10:14:59  <andythenorth> pretty much my entire job that
10:21:26  *** CZTR has joined #openttd
10:30:45  *** keoz has joined #openttd
10:47:08  *** WWacko1976-work has quit IRC
11:05:05  <planetmaker> <andythenorth> newgrf features should get a reference grf in nml always <-- yes-ish. However even an existing reference grf there does not ensure that it's actually working in OpenTTD as expected
11:05:20  <andythenorth> agreed
11:05:24  <andythenorth> simplifies testing though
11:05:26  <planetmaker> So test cases there ... are of limited value
11:05:32  <planetmaker> there I agree
11:05:37  * andythenorth has some basic ideas, will expand tonight, for feedback
11:05:55  <andythenorth> friction can't be eliminated, but can be reduced :)
11:05:56  <planetmaker> Yet, there's no problem with adding that to NML. It has regression tests, so that's a place to add these minimal test cases
11:06:10  <peter1138> Any approvals today?
11:06:29  <andythenorth> I can't, I am supposed to be making enterprise software
11:06:36  <andythenorth> also, you know, C++ clown shoes here
11:06:45  <peter1138> And does "Auto Reload Tab" break any T&Cs of Azure?
11:07:02  <andythenorth> o_O
11:12:03  * peter1138 awaits tea to brew.
11:13:09  <andythenorth> time for the KLF
11:21:15  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
11:21:35  <peter1138> Okay, skin just peeled off my mouth from that yolk burn.
11:21:41  <andythenorth> ow
11:21:46  <andythenorth> I am no longer jealous tbh
11:22:00  <peter1138> Yeah, stupid me. Microwaved an egg...
11:22:22  <peter1138> Should've done it for less time and let it sit to cook itself.
11:22:31  <andythenorth> always a winner that
11:24:20  <peter1138> Also I switch from "chocolate digestive thin" biscuit to "hazelnut cookie" for this mug of tea. It's about 8x as unhealthy, because there's about 8x as much of it. In a single serving.
11:39:24  <andythenorth> lunch yet?
11:39:52  <andythenorth> 3 minutes left on jenkins job
11:41:32  <andythenorth> duck pate
11:41:41  <andythenorth> ducks are getting the short end of life today
11:42:44  <peter1138> Not yet.
11:48:45  <peter1138> Speaking of ducks. Docks.
11:51:11  <andythenorth> docks
11:51:16  <andythenorth> function requirement?
11:52:25  <peter1138> Step 1) Look back at how that guy did that other patch.
11:52:28  <peter1138> Step 2) Ignore it
11:52:41  <peter1138> Step 3) Forget all about them when you get bored of OpenTTD developing again.
11:54:27  *** erratic has joined #openttd
11:58:35  *** Flygon has quit IRC
12:09:44  *** keoz has quit IRC
12:16:47  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7131: Possible GS issues in Scenario Editor
12:24:53  *** Gja has joined #openttd
12:39:30  *** FLHerne has quit IRC
12:44:34  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7133: Graphics glitch with tunnels
12:54:49  <peter1138> andythenorth, it is, of course, lunch time.
12:55:03  <andythenorth> second lunch
12:57:19  <Pikka> at least
12:57:47  <andythenorth> crumpets?
12:57:50  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7133: Graphics glitch with tunnels
12:57:51  <andythenorth> salad?
12:58:44  <peter1138> My staple, a cheese salad sandwich.
12:59:22  <andythenorth> cheese salad crumpet
12:59:32  <peter1138> Cheese today is mature gouda, which is nice but perhaps doesn't work as well as mature cheddar in a sandwich.
13:01:42  <peter1138> lol theresa, you mad
13:02:03  <LordAro> peter1138: nice find
13:02:16  * andythenorth watching parliament
13:02:55  <andythenorth> yeah crumpets ok
13:03:00  <andythenorth> marmite
13:05:03  <andythenorth> 10 downloads of Horse!
13:08:42  *** Gustavo6056 has joined #openttd
13:08:55  <peter1138> LordAro, the down sides of committing someone else's changes...
13:09:17  *** Gustavo6046 has quit IRC
13:09:17  *** Gustavo6056 is now known as Gustavo6046
13:09:44  <andythenorth> regressions savegame
13:09:51  <andythenorth> visual diff on giant screenshot
13:09:59  <peter1138> :D
13:10:19  <peter1138> But... is that a bug or a feature?
13:11:38  *** snail_UES_ has joined #openttd
13:12:35  <andythenorth> depends if you expected it or not :P
13:12:42  * andythenorth has been reviewing visual diffs for last hour
13:13:02  *** Gja has quit IRC
13:13:43  <peter1138> Problem with running Linux in a VM is I don't get to fully utilize my triple screen setup.
13:13:59  <peter1138> And MSVC is horrible for actually developing and navigating code in.
13:14:33  *** gelignite has quit IRC
13:27:46  *** Gja has joined #openttd
13:40:23  *** Pikka has quit IRC
13:45:16  *** Samu has joined #openttd
13:50:37  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid
13:52:22  *** Gja has quit IRC
13:54:49  *** glx has joined #openttd
13:54:49  *** ChanServ sets mode: +v glx
13:55:37  <andythenorth> hmm
13:55:41  <andythenorth> 3 minute visual diff cycles
13:55:46  <andythenorth> still faster than eyeballing it all :P
13:58:43  <andythenorth> how do we do translation?
13:58:47  <andythenorth> do we use gettext or something?
14:00:26  <peter1138> No, NIH.
14:00:28  <glx> not at all
14:03:41  <Samu> you close a lot, but then again, i'm not familiar with newgrf window
14:03:51  <Samu> can't say much
14:04:52  <glx> I just close when the selection changes
14:05:18  <glx> and selection can change in many places
14:08:39  <Eddi|zuHause> <peter1138> We lose the "git blame" support by dropping the old comment in saveload.cpp though. <-- but we get a new one by "git blame" on the enum, right?
14:10:39  <peter1138> Yes but it's new :p
14:12:33  <peter1138> Right, now logged in to Github on my tablet, but not in the Github app, as that won't accept my password.
14:13:28  <glx> github app doesn't OAuth ?
14:14:48  <peter1138> Seems not.
14:17:22  <glx> oh the "savegame upgrade" is recent
14:18:28  <Samu> getting a bit familiarized with newgrf, hmm... the design phisolophy is different
14:18:54  <Samu> by just clicking on a different newgrf, the parameters window is closed
14:19:34  <peter1138> I think that's how it should be.
14:19:39  <Samu> i went the opposite way
14:20:19  <Eddi|zuHause> peter1138: i assume git has a way to continue the blame from the old version, like svn did with "svn blame file@XXXX"
14:20:20  <Samu> keep everything open, until it's really necessary to close (it's gonna crash, or it's gonna cause issues)
14:20:32  <glx> the parameter window can't change the source
14:20:34  <Eddi|zuHause> peter1138: so i don't think that's a reason
14:20:41  <peter1138> Eddi|zuHause, yes, if you remember which version it is, in 10 years.
14:20:55  <peter1138> Not that it's a huge issue.
14:21:10  <peter1138> git history is all local and it's way way faster than searching svn history.
14:21:15  <glx> so if the source changes, close the window
14:21:50  <Eddi|zuHause> peter1138: well, regular git blame will result in the version when the enum is introduced, so as long as that's the same as when the comment was dropped?
14:22:11  <peter1138> True.
14:22:40  <peter1138> Samu, newgrf parameters staying open doesn't make much sense.
14:22:44  <glx> svn tracked file copy/move too
14:22:55  <glx> I don't think git does
14:23:14  <andythenorth> all these params windows should be modal imo
14:23:17  <peter1138> With AIs it's a bit more reasonable, as you may want to copy the settings over if the AI is the same type.
14:23:34  <peter1138> glx, it does, but I'm changing every line as it's converted to an enum.
14:23:34  <andythenorth> far less state crap if modality is enforced :D
14:24:09  <glx> still need a window per AI
14:24:27  <Samu> much google what modality means
14:24:38  <glx> instead of one window for all
14:24:38  <andythenorth> locks the application state while the window is open
14:24:44  <andythenorth> approximately
14:25:04  <andythenorth>
14:25:09  <glx> that should be easy, and close the window when the slot is changed
14:25:16  <andythenorth> modality is considered bad UI
14:25:24  <andythenorth> but it's very practicalt when state is complex
14:25:31  <andythenorth> and users do understand it afaict
14:25:44  <glx> we have modal windows, for newgrf scan
14:26:26  <glx> if lauched from newgrf window it hides all windows while it's running
14:26:29  <andythenorth> when you say window per AI, do you mean on screen?  Or a window object in a tree somewhere, holding state?
14:26:42  <glx> on screen
14:26:55  <glx> should be easy with window_number
14:27:55  <glx> you put the slot number in window_number and when you change the AI in a slot you call DeleteWindowById(class, slot)
14:28:38  <glx> but when you click on another line in the list the window is still valid
14:28:57  <andythenorth> sounds fair
14:29:14  <Samu> i do invalidate window data (class, slot)
14:29:23  <Samu> won't close it
14:29:32  <glx> but you have only one window
14:29:44  <glx> my idea is one window per slot
14:30:00  <glx> easier to manage
14:30:07  *** snail_UES_ has quit IRC
14:30:36  <Samu> there are 15 slots, the parameters window only display 1 window at a time, of one of those slots
14:30:57  <glx> yes but that can be changed so you have 15 windows
14:31:10  <glx> not very hard
14:31:27  <glx> I did it to allow 3 textfile windows
14:32:10  <Samu> ew... 15 windows open that's hmm ... interesting
14:32:30  <glx> will proably simplify your work too
14:33:41  <LordAro> Samu: no one said you should, just that you can :p
14:33:55  <glx> hmm AIConfigWindow already set a window_number
14:34:00  <Samu> it's an interesting proposition
14:34:01  <glx> too bad
14:34:26  <Samu> the AISettings window is parameters
14:34:40  <Samu> i could display up to 16 of those, if including the gs
14:34:49  <Samu> interesting proposition
14:36:47  <Samu> the names are quite similar, it's easy to get confused
14:37:49  <Samu> might need a better window title, to reflect which # it belongs to
14:37:54  <Samu> which slot
14:38:07  <glx>         this->FinishInitNested(slot);  // Initializes 'this->line_height' as side effect. <-- window_number is already setup in AISettingsWindow
14:39:00  <glx> so ShowAISettingsWindow() just need a little change and you get one window per slot
14:39:40  <glx> replace DeleteWindowByClass(WC_AI_SETTINGS); with DeleteWindowById(WC_AI_SETTINGS, slot);
14:39:52  <glx> and it should work
14:40:06  <Samu> is that in master code or in my code?
14:40:11  <peter1138> AI Settings (slot {JUST_INT})
14:40:12  <glx> that's in master
14:40:41  <glx> but I think you haven't touch this part :)
14:40:57  <Samu> i touched many stuff related to window closures
14:41:00  <Samu> i doubt it
14:41:21  <glx> that one is called when you click on config button
14:42:34  <Samu> static void ShowAISettingsWindow(CompanyID slot)
14:42:43  <Samu> ah, this one, yeah, i didn't touch this
14:42:45  <Samu> :p
14:43:30  <Samu> testing
14:44:02  <glx> and with one window per slot you just need to close a window when you change the AI in a given slot
14:44:24  <Samu> I don't close, I invalidate
14:44:39  <Samu> dont know what master do, it's been awhile
14:44:46  <glx> better to close it when you change the slot content
14:44:54  <glx> and easier too
14:48:06  <glx> hmm master invalidates it seems
14:48:46  <Samu> wow, this is something else
14:49:09  *** supermop_work has joined #openttd
14:49:21  <glx> ah yes the caption will need an update
14:49:33  <glx> to show slot and ai name :)
14:50:15  *** supermop_work_ has joined #openttd
14:52:37  <Samu> Comany Number
14:54:17  <Samu> this is incredible, i like it!
14:54:45  <Samu> i can visualize the entirety of parameters of all ais in gui mode
14:54:53  <peter1138> o_O
14:55:40  <andythenorth> have a big screen :o
14:56:22  <Samu>
14:56:23  <Samu> :)
14:56:34  <andythenorth> 4 of those windows fill my screen
14:56:38  <Samu> ok, needs some fixings indeed, company number
14:56:51  <Samu> AI name
14:56:59  <Samu> not sure about company name of the ai
14:57:06  <Samu> i guess ai name is better
14:57:12  *** supermop_work has quit IRC
14:57:29  <Samu> it's 1920x1080
14:57:35  <glx> just show the name the same way DrawWidget does
14:58:33  <glx> SetStringParameters() should be modified
14:59:35  <glx> first STR_AI_SETTINGS_CAPTION_GAMESCRIPT and STR_AI_SETTINGS_CAPTION_AI need an update adding a {STRING} for the script name
15:02:07  <glx> or something similar
15:02:32  <glx> and an extra stuff to also put the slot for AIs
15:03:00  <nielsm>  <-- unsure about if this is "done", it works as advertised but I think it ought to address the frame rate window in some way or other; also not sure I'm entirely on board with the wording of the strings
15:04:15  <glx> indeed if the frame rate doesn't count your added sleep something is wrong
15:04:54  <glx> hmm but link graph stuff is threaded
15:05:49  <nielsm> yes it's threaded
15:05:56  <nielsm> but syncs every N game days
15:06:20  <glx> and if it pauses openttd then no calculation happen
15:06:22  <nielsm> if the threaded calculation takes longer than the simulation of those N days, the game hangs atm
15:06:51  <nielsm> what this patch does is effectively just giving visual feedback what's going on
15:07:11  <glx> always nice to give feedback
15:08:21  <Eddi|zuHause> i'm not sure how you could meaningfully add threads to the framerate window
15:09:08  <nielsm> right now, the framerate window has a line for how long was last spent waiting for the link graph thread to join the main thread
15:09:15  <nielsm> which is usually near zero
15:09:16  <glx> well the delay is calculable from main thread
15:09:38  <nielsm> with this patch the number will always be zero, because the main thread does not hang while joining the link graph thread
15:11:09  <peter1138> It's still countable, just needs to be done differently.
15:11:15  <nielsm> so either remove that line from the framerate window, or change the calculation to either show total time spent on each link graph cycle, or rework how the delay is determined
15:11:40  <glx> but it could start a chrono on expected join and stop on effective join
15:11:47  <peter1138> ^
15:13:52  *** sla_ro|master has joined #openttd
15:17:05  <peter1138> Samu, careful what you copy & paste from IRC to github. You made an issue reference that is irrelevant and wrong.
15:17:46  <peter1138> Samu, better yet, don't copy & paste from IRC at all.
15:18:03  <peter1138> It's not your notepad.
15:25:56  *** andythenorth has quit IRC
15:29:36  <peter1138> glx, ah, the github app was discontinued ages ago.
15:30:51  <glx> btw I hate the guy that decided an integrated gps controlable only with a remote control was a nice idea
15:31:07  <peter1138> ...?
15:31:31  <nielsm> don't irc and drive!
15:31:35  <nielsm> :P
15:32:08  <glx> in the car the integrated navigation system is controled by remote, and this morning the remote batteries died
15:33:20  <nielsm> huh.. the {HEX} code for string formatting gives me a five byte value printed
15:33:35  <glx> I could set it for the first travel, but couldn't not stop it then set the return travel
15:33:56  <glx> luckily I had my phone
15:35:00  *** Wormnest has joined #openttd
15:35:28  <glx> return buff + seprintf(buff, last, "0x" OTTD_PRINTFHEX64, number);
15:35:45  <glx> we don't set padding
15:36:00  <nielsm> annoying
15:36:26  <nielsm> maybe I should just format to a 10 byte fixed buffer and print it as raw_string
15:36:40  <nielsm> since I don't want the 0x either
15:39:06  <glx> {HEX} is better than nothing ;)
15:39:12  *** Vasatko has joined #openttd
15:39:28  <glx> but yeah doesn't work for any possible case
15:45:34  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
15:46:19  *** CZTR has quit IRC
15:47:17  *** Vasatko has quit IRC
15:48:44  *** andythenorth has joined #openttd
15:50:00  <nielsm>  <-- should (different) be white or silver?
15:50:07  <nielsm> or red
15:51:07  <andythenorth> white is fine
15:51:16  <Samu> mismatch
15:51:17  <andythenorth> the red has contrast issue btw
15:51:18  <andythenorth> but eh
15:51:31  <peter1138> Why do we need game ID?
15:51:36  <Samu> the color or warning? yellow?
15:51:59  <nielsm> peter1138 I don't know, do we actually?
15:52:09  <nielsm> someone also brought it up in the PR comments
15:52:21  <nielsm> if it's really the right solution to the problem
15:52:25  <glx> no need to display the game ID, just tell it's different
15:53:10  <peter1138> Can't we just have the "overwrite this file?" prompt?
15:53:12  <nielsm> {SILVER}Game ID: {WHITE}Match   //  {SILVER}Game ID: {YELLOW}Different
15:53:13  <nielsm> maybe
15:53:41  <nielsm> different/mismatch?
15:53:46  <peter1138> I don't care if it's the same game or not, I probably don't want to accidentally overwrite an older save of the same game.
15:53:58  <Samu> the darn livery str is getting in the way
15:54:08  <peter1138> And I feel having a savegame bump for this is pretty weird.
15:54:16  <peter1138> Samu, ignore it, it doesn't hurt.
15:54:27  <Samu> i try
15:54:53  <glx> it's just noisy, but not blocking
15:55:16  <nielsm> peter1138 you mean just always warn when overwriting a savegame, regardless of which one it is?
15:55:22  <nielsm> yeah maybe that's good enough
15:55:23  <peter1138> Yes
15:55:26  <Samu> it's kinda blocking atm
15:55:30  <peter1138> I'm absolutely positive that's enough.
15:55:33  <glx> yes good enough
15:55:50  <Samu> my string edit could get lost inbetween all those livery
15:55:51  <glx> and similar too many other programs
15:55:57  <peter1138> And saves you a ton of effort you've, er, already spent :/
15:56:59  <glx> and maybe a setting to disable the warning for people not wanting it
15:57:24  <glx> can be annoying if you use one save only I guess
15:59:15  <glx> but on the other hand people don't save manully more frequently than autosave
16:00:46  <glx> Samu: no, if you make an error in english.txt compile stops
16:00:59  <glx> because english.txt is important
16:02:34  <glx> hmm or not, just tried it warns but continue
16:03:58  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7135: Update: Visual Studio 2019 insists on upgrading the solution file
16:04:09  <glx> maybe something to tweak
16:05:48  <Samu> hmm, something's wrong with the name for the random ai
16:06:01  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 approved pull request #7135: Update: Visual Studio 2019 insists on upgrading the solution file
16:06:05  <Samu> sometimes I get (none), some other times I get (random)
16:06:37  <Samu> i want it to be (random) in all cases
16:06:43  <Samu> what am I missing...
16:08:01  <glx> show your SetStringParameters and the strings
16:08:24  <Samu> seems to be an issue only in main menu
16:08:50  <Samu> how is the main menu save loaded? must find
16:08:59  <Samu> something in there is missing
16:09:18  <glx> ignore the saveload, main_menu doesn't care
16:10:17  <Samu> it didn't load the ai infos apparently
16:10:20  <DorpsGek_II> [OpenTTD/OpenTTD] orudge commented on pull request #7135: Update: Visual Studio 2019 insists on upgrading the solution file
16:10:27  <Samu> or something like that
16:11:04  <glx> and check how AIConfigWindow::DrawWidget draws the names
16:15:42  <glx> ignore the saveload in main menu, AIConfig is not from the save
16:18:14  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7135: Update: Visual Studio 2019 insists on upgrading the solution file
16:18:51  <glx> it seems you always jump in the wrong direction
16:20:26  <glx> every settings and options you see in main menu come from openttd.cfg, never from a savegame
16:23:40  *** andythenorth has quit IRC
16:30:43  <DorpsGek_II> [OpenTTD/OpenTTD] George-VB opened issue #7136: Sprite sorting issue with FIRS
16:31:03  <Samu> ok
16:31:44  <Samu> openttd.cfg has the name "none" for random ais, maybe it literally read the word "none" and im now using it as name
16:31:59  <Samu> :/
16:32:11  <Samu> let me check
16:32:41  <Samu> seems to be it
16:33:00  <Samu> it's "none", not "(none)", big small difference
16:33:40  <Samu> hmm, how to solve
16:33:44  <Samu> must think
16:33:54  <glx> yes because you haven't checked how it's done in AIConfigWindow::DrawWidget
16:35:10  <Samu> I'm editing the title for AI Settings Window, not AIConfigWindow
16:35:56  <glx> yes, but AIConfigWindow draws all the stuff you want to put in AISettings caption
16:36:17  <glx> and if it works there, you should see how it's done
16:36:23  <Samu> ah i see!
16:36:29  <Samu> i see, i see now, thx, my bad
16:37:18  <glx> always enlarge your vision :)
16:42:36  <Samu> that's the heavily modified part of my code
16:42:42  <Samu> how could i forget, lol
16:47:15  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on issue #7136: Sprite sorting issue with FIRS
16:49:15  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7136: Sprite sorting issue with FIRS
16:52:50  <Samu> ÌÌÌÌÌ...
16:52:54  <Samu> and crash
16:53:03  <Samu> can't do it that way :|
16:53:21  <LordAro> maybe don't paste that into irc?
16:54:25  <peter1138> Nor github.
16:54:56  *** Progman has joined #openttd
16:55:16  <peter1138> LordAro, I wonder if we need to have a note on "how to report a bug" on github?
16:55:28  <peter1138> It seems that people think just a title and an image is sufficient :/
16:55:49  <Samu> sorry, I was thinking
16:56:20  *** supermop_work_ has quit IRC
16:57:38  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7136: Sprite sorting issue with FIRS
17:01:44  <Samu> can't read the name directly, must check first if there's AIInfo or GameInfo
17:01:50  <nielsm> gah I'm having issues with VS converting line endings in files
17:01:55  <Samu> i can fix this
17:02:04  <nielsm> at this point I really want to convert my entire working copy to CRLF instead of LF
17:02:08  <Samu> or else it's gonna read the name from openttd.cfg
17:02:09  <nielsm> but not sure how to do that best
17:02:19  <planetmaker> exists... does it need amendment?
17:02:31  <planetmaker> ^^ peter1138
17:02:41  <peter1138> planetmaker, it needs to be actually READ by reporters :/
17:02:51  <planetmaker> *that* is a common problem :)
17:03:07  <peter1138> I wonder if there's a way to tweak the issue reporting page.
17:03:25  <peter1138> Just a template in the comments would be handy.
17:03:37  <planetmaker> hm
17:03:39  <planetmaker> yes
17:03:55  <peter1138>
17:04:00  <peter1138> ^ Example!
17:04:11  <peter1138> So we just need a .github/ file... in the repo?
17:04:18  <planetmaker> <-- there should be plenty of screen real-estate to give *some* hints
17:04:28  <peter1138> We already have a .github, so I guess it's fine :D
17:04:41  <peter1138> planetmaker, Yeah, I know :/
17:05:31  *** FLHerne has joined #openttd
17:06:16  <planetmaker> <-- hm... I shall try to create one
17:06:22  <peter1138> I'm on it.
17:06:26  <planetmaker> ok
17:06:36  <LordAro> peter1138: we can do things like image templates
17:06:36  <planetmaker> it is, so it seems
17:06:43  <peter1138> Oh
17:06:47  <LordAro> er
17:06:50  <LordAro> issue templates*
17:06:54  <peter1138> That's got more detail than what I was looking at.
17:07:09  *** keoz has joined #openttd
17:07:20  <LordAro>
17:07:52  <glx> nielsm: set autocrlf maybe
17:07:58  <peter1138> There's a template builder? o_O
17:08:10  <LordAro> apparently
17:08:22  <LordAro> set autocrlf is the first thing i do with any git stuff
17:08:32  <LordAro> (well, import my dotfiles with my git config, i guess)
17:08:58  <peter1138> Ah, I guess that needs admin rights to the repository.
17:09:34  <planetmaker> That could be done...
17:11:18  <planetmaker> we want it in .github, I guess
17:11:44  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7137: Add: [GitHub] Add issue template to encourage better issue reporting.
17:11:47  <peter1138> ^
17:13:56  <planetmaker> I guess I can only approve it w/o admin override when it finished building
17:14:54  <peter1138> Hmm, I need a Mac OS machine to test #7126 ;(
17:15:17  <peter1138> Shame my MacBook died, although that was running Debian anyway come to think of it.
17:15:57  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker merged pull request #7137: Add: [GitHub] Add issue template to encourage better issue reporting.
17:16:02  <planetmaker> let's see whether my admin power works :P
17:16:05  <peter1138> Well damn, no cycling today so I'm well over on my calories :/
17:16:13  <peter1138> No nee.. oh.
17:16:35  <planetmaker> was a dangerous-free test ;)
17:16:43  <peter1138> Uh, so much for markdown. Never mind.
17:16:57  <peter1138> But yes, there's a little template now :D
17:17:12  <peter1138> You can "preview" your issue and the MD works, but that's pretty dumb, heh.
17:17:20  <planetmaker> Well, no mark-down but that is actually a good topic indicator
17:17:35  <peter1138> It is markdown but not in the text editor, makes sense really.
17:19:12  <Markk> peter1138: Is the compiling of a new human done? So you can send that "human" to the workplace.
17:19:48  <LordAro> planetmaker: peter1138: nono, we must check that the PR compiles on all platforms before merging :p
17:19:52  <peter1138> This human doesn't need to be in the workplace at this time of day.
17:19:57  <planetmaker> hehe
17:19:59  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7138: Add: .gitattributes file
17:20:09  <Markk> peter1138: Wasn't this channel your workplace?
17:20:45  <planetmaker> nielsm, and *.h *,cpp text eol=lf ?
17:21:23  <peter1138> Markk, piss off
17:21:30  <Markk> :(
17:21:55  <Markk> It just seemed like you're with us in here all day.
17:22:10  <nielsm> planetmaker, left out for "user preference"
17:22:13  <peter1138> Yes, I am able to lurk here all day and then comment sometimes.
17:22:23  <Markk>  Ah, I see. Sweet :)
17:22:51  <peter1138> That sort of comment feels like "why aren't you working?" hence my rudeness. Sorry.
17:22:59  <planetmaker> how can the line endings in the tracked source files be a "user preference"?
17:23:04  <glx> nielsm: core.autocrlf is enough for me
17:23:32  <peter1138> planetmaker, git can convert, right?
17:23:41  <planetmaker> yes, it can. But should it?
17:23:48  <nielsm> glx: it becomes weird when using git in WSL :(
17:24:10  <nielsm> also, converting a working copy from one EOL style to another seems to be a major bother
17:24:12  <glx> I feel a problem with generate
17:24:47  <peter1138> Which files are generated 'wrong'?
17:25:06  <glx> an eol issue
17:25:21  <peter1138> [core] autocrlf = true
17:25:23  <peter1138> I have that.
17:25:32  <glx> yes I have it too, works well
17:25:40  <nielsm> the specific problem I'm having here is that vs2019 regenerates the .sln file every time I build, and that converts it from LF to CRLF, but no other changes
17:25:51  <nielsm> and git dislikes that
17:26:13  <glx> but why does it regenerate the .sln
17:26:21  <glx> that's stupid
17:26:22  <nielsm> no idea
17:26:30  <peter1138> nielsm, yes, set autocrlf.
17:26:41  <peter1138> Then your .sln files should start off as CRLF.
17:26:59  <nielsm> peter1138 no, because I'm running git in WSL where the eol is LF
17:27:02  <nielsm> >_>
17:27:11  <nielsm> so autocrlf will output LF files
17:27:17  <peter1138> glx, it's not running "generate" it's just saving the file its opened, with CRLF.
17:27:20  <peter1138> WSL?
17:27:32  <nielsm> windows subsystem for linux, aka "ubuntu bash on windows"
17:27:32  <glx> you can tell it to always use CRLF I think
17:27:41  <peter1138> Uh,,, kay
17:27:42  <nielsm> yeah, core.eol=crlf
17:27:48  <peter1138> I'm using... git-bash or powershell
17:27:55  <peter1138> But I don't think that's relevant.
17:28:05  <nielsm> but changing the git settings is one thing
17:28:19  <nielsm> how do I make git re-checkout every file to convert to the new eol style
17:28:26  <peter1138> Ah well...
17:28:41  <peter1138> I can't remember :-)
17:28:44  <LordAro> anyone care one way or another about #7124?
17:28:45  <peter1138> git checkout .? :)
17:28:48  <nielsm> just delete everything and 'git checkout .' maybe
17:28:50  <glx> it does it magically I think
17:29:12  <Eddi|zuHause> git reset --hard?
17:29:56  <glx> I don't understand how strgen reports errors
17:30:14  <planetmaker> LordAro, not much one way or another. He might have a point... dunno
17:30:22  <LordAro> nielsm: find -type f -exec unix2dos {} \;
17:30:24  <LordAro> :p
17:31:04  <Samu> STR_AI_SETTINGS_CAPTION                                         :{WHITE}{STRING} Parameters of {RAW_STRING}
17:31:07  *** HerzogDeXtEr has joined #openttd
17:31:24  <peter1138> why RAW_STRING?
17:31:30  <peter1138> Or is that how AI names are done?
17:31:30  <glx> it parses master, error count is 0, then it prints errors, but the test for error count is already behind
17:31:40  <Samu> not sure which one
17:32:13  <Samu> RAW_STRING crashes
17:32:22  <Samu> STRING crashes a different way
17:32:24  <nielsm> #7124 is... eh are anyone even going to ever see that string?
17:32:38  <nielsm> I mean it may as well be one of the first strings anyone translates
17:32:55  <nielsm> since it would be screaming at everyone trying out the translation while it's incomplete
17:33:29  <Samu> or is it STRING1 when i got 2 strings?
17:33:39  <planetmaker> nielsm, yes. As long as a translation is outdated or missing (or a threshold - dunno), it's visible
17:33:49  <peter1138> Samu, please read out the string system works.
17:33:53  <nielsm> RAW_STRING is for passing in a char* to SetDParamStr()
17:33:55  <peter1138> s/out/how/
17:34:03  <LordAro> looks related to the eints issue from the other day
17:34:03  <nielsm> STRING is for passing in a StringID to SetDParam()
17:34:06  <peter1138> ^
17:34:07  <LordAro> naturally it's 3 years old
17:34:18  <nielsm> STRING1 is for passing in a StringID that will reference another string that has one insert
17:34:35  <Samu> okay, so it's neither
17:35:07  <Samu> the name of the ai is read from AIInfo->GetName
17:35:09  <Samu> it's char
17:35:20  <Samu> but for random ai
17:35:20  <peter1138> Hmm
17:35:24  <Samu> there is no name
17:35:30  <Samu> there is no info at all
17:35:38  <Samu> i must read from StringID
17:35:49  <Samu> STR_AI_BLABLA_RANDOM
17:36:45  <Samu> {STRING} Parameters of ... {WHAT}?
17:37:16  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7138: Add: .gitattributes file
17:37:38  <glx> for AIInfo->GetName you need {RAW_STRING}
17:38:38  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh closed pull request #7138: Add: .gitattributes file
17:38:39  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7138: Add: .gitattributes file
17:39:15  <Samu> I have a way, the char[1024] way
17:39:37  <glx> see how it's done
17:40:44  <glx> and compare with your SetStringParameters()
17:40:48  <Samu> that only works when it's the only string
17:41:12  <Samu> i got a {WHITE}{STRING} Parameters of {RAW_STRING}
17:41:17  <glx> and ?
17:41:19  <Samu> as the string
17:41:39  <peter1138> And?
17:42:06  <Samu> and it crashes for randomai
17:42:23  <peter1138> You do know what the first parameter of SetDParam(Str) is for, right?
17:42:24  <glx> SetDParam(0, <the first string>); SetDParamStr(1, <the raw string>);
17:42:47  <glx> I see nothing hard here
17:43:21  <Samu> hmm, i must be doing something wrong then, brb
17:43:51  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7124: Fix: grammar in translator intro notice
17:43:55  *** Gustavo6046 has quit IRC
17:44:12  <glx> for random AI you are using a StringID, not a raw string
17:45:19  <glx> but you can still replace RAW_STRING with STRING1, and pass a StringID for random, or STR_JUST_RAW and the raw value for the rest
17:45:37  <glx> our string system can do a lot
17:46:13  <glx> you just need to know what you are doing
17:47:22  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed pull request #7124: Fix: grammar in translator intro notice
17:47:23  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7124: Fix: grammar in translator intro notice
17:47:41  <glx> and the link I gave above just does that
17:47:46  <glx> sort of
17:48:30  <glx> it's for a DrawString call but could be a SetDParam
17:48:34  <peter1138> Any chance #7134 can be looked at before this evening's nightly?
17:48:51  <peter1138> Would help a NewGRF developer ;)
17:48:54  <nielsm> I don't feel confident to review it
17:49:10  <Samu> i can't make it work
17:49:31  <peter1138> Hmm.
17:49:42  <peter1138> Just bit-packing. Nothing complex :)
17:49:44  <Samu>
17:49:48  <Samu> got this atm
17:50:13  <Samu> the commented out way works, but you don't like that method
17:50:36  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
17:50:52  <glx> line 9 should be 2 not 1
17:51:09  <Samu> ok let me try
17:51:27  <glx> and SetDParam(1, text) after the if block
17:51:48  <planetmaker> do we have so many bits actually in p2?
17:52:16  <glx> you just need to follow the logic Samu
17:52:41  <peter1138> 25 bits? It's a uint32 so I hope so.
17:52:49  <planetmaker> :)
17:52:55  <nielsm> any chance all the manual bitstuffing code could be replaced with C bitfield syntax structs? :(
17:53:12  <glx> and put the args in the right place, matching the string
17:53:16  <peter1138> nielsm, no, but I've got a PR in mind that creates a helper function to do all the bitpacking.
17:53:43  <peter1138> We already have CommandContainer which helps that.
17:54:24  <peter1138> nielsm, bitfields are very much compiler defined, and this one place where that can't be done.
17:54:44  <Samu> confusing
17:54:46  <nielsm> :(
17:55:07  <milek7> maybe #pragma pack?
17:55:13  <LordAro> nielsm: can't say i do either :p
17:55:48  <LordAro> crap, was scrolled: i feel comfortable reviewing*
17:55:51  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker approved pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
17:56:04  <peter1138>
17:56:07  <LordAro> luckily
17:56:19  <peter1138> ^ although the only one i've done so far doesn't actually have any bit packing, lol
17:56:22  <peter1138> But that's my concept.
17:56:43  <Eddi|zuHause> milek7: doesn't sound like anything i would trust without a pile of regression tests
17:56:51  <peter1138> planetmaker, thanks!
17:57:31  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
17:57:41  <planetmaker> np
17:57:50  <nielsm> 2-3 minutes until nightly triggers?
17:57:52  <Samu> can't make this work, crashes at Utf8Decode
17:57:57  <peter1138> nielsm, dunno!
17:58:17  <planetmaker> we shall see :)
17:58:37  <LordAro> peter1138: i've beem wondering about that as well, the best i could come up with was some vague idea of a templated function
17:59:04  <milek7> anyway, looks like pragma pack doesn't affect bitfields
17:59:08  <LordAro> some sort of compiletime error is obviously preferred
18:00:17  <peter1138> bitfields are very rarely used.
18:00:25  <peter1138> Probably in the Linux kernel :-)
18:00:45  <peter1138> LordAro, what I've done makes the parameters type-safe as well.
18:00:53  <planetmaker> how do bitfields break the game? Cross-platform command stuff?
18:01:03  <peter1138> LordAro, so it'll need different variants when the same command is used for, say, road types and railtypes.
18:01:25  <LordAro> peter1138: yeah, the boilerplate is probably going to add up
18:01:43  <glx> Samu: show your current SetStringParameters and the caption base string
18:01:54  <peter1138> "Allocation of bit-fields within a class object is implementation-defined. Alignment of bit-fields is implementation-defined. Bit-fields are packed into some addressable allocation unit."
18:02:01  <peter1138> ^ This is the spec for bitfields
18:02:17  <LordAro> "loldunno"
18:02:29  <peter1138> That says "don't use for network protocol stuff" to me!
18:02:35  <planetmaker> ugh
18:02:42  <planetmaker> indeed
18:03:02  <peter1138>
18:03:08  <Samu> ok
18:03:26  *** Gustavo6046 has joined #openttd
18:03:36  <peter1138> I'm gonna proceed with my packing helpers, sometimes it's just a bit difficult to find the right place to put a specific helper :p
18:06:30  <Samu>
18:07:59  <glx> I said to use {STRING1} earlier
18:08:11  *** Thedarkb2-T60 has joined #openttd
18:09:35  <Samu> testing
18:09:45  <nielsm>
18:09:49  <nielsm> how about something like that?
18:10:10  <nielsm> should also be possible to do with variadic templates
18:10:19  <nielsm> although that would cut out visual c++ 15 as well afaik
18:10:36  <glx> well 2017 is free ;)
18:11:29  <Samu> still crashing
18:11:46  <peter1138> nielsm, seems overly complex.
18:11:57  <Samu> crashing for random ai, not the others
18:12:06  <peter1138> nielsm, and also we have 2 bitpacked uint32s per command.
18:12:17  <nielsm> peter1138 it's not a complete example :P
18:12:21  <peter1138> Sure.
18:12:33  <glx> then try to find why using the debugger
18:12:57  <nielsm> the idea is to have a base BitpackedUint32 template that can handle a large number of fields, and then create specialisations of that for each value type
18:13:25  <nielsm> which would hopefully compile into equivalent code to the current
18:13:37  <Samu> it's NULL when it tries to read something in utfdecode function~
18:14:09  <Samu> s was nullptr.
18:14:19  <glx> check the call stack to check what slot it is
18:16:02  <Samu> slot 2, which is configured with random ai
18:17:29  *** andythenorth has joined #openttd
18:17:38  <Samu> the call stack is something about updatewindows, drawing dirty blocks
18:18:01  <Samu> external code, doesn't go back to where it originated
18:18:10  <Samu> let me copy
18:18:38  <Samu>
18:18:44  <peter1138> LOL
18:18:51  <peter1138> Okay so that change was incomplete ;(
18:20:33  <LordAro> wow testing
18:21:23  <glx> Samu: I'll try your code locally, will be easier for me to see what could be wrong
18:21:31  <peter1138> Just one place where the command was split across multiple lines.
18:21:38  <glx> because I think it should work
18:23:43  <peter1138> Oh, and another. Shit.
18:23:50  <peter1138> CT_AUTO_REFIT lol
18:24:21  <andythenorth> oopsie
18:24:27  <peter1138> Oh well.
18:24:41  <Samu> now my code fails too, wtf
18:25:00  <andythenorth> oh george found the FIRS bugs
18:25:06  <andythenorth> I assumed they were my fault
18:25:09  <andythenorth> been there for years
18:25:11  <Samu> ah, STRING1 is bad for my code
18:25:15  <Samu> STRING solves
18:25:24  <peter1138> andythenorth, in that case...
18:25:24  <andythenorth> @seen BrainTrue
18:25:25  <DorpsGek> andythenorth: I have not seen BrainTrue.
18:25:42  <andythenorth> @seen TrueBrain
18:25:42  <DorpsGek> andythenorth: TrueBrain was last seen in #openttd 21 hours, 54 minutes, and 7 seconds ago: <TrueBrain> funny
18:25:44  <peter1138> If it's old, it's something else.
18:25:47  *** Thedarkb2-T60 has quit IRC
18:27:01  <DorpsGek_II> [OpenTTD/OpenTTD] George-VB commented on issue #7136: Sprite sorting issue with FIRS
18:27:57  <Samu> this works:
18:28:01  <andythenorth> oh ha ha
18:28:02  <Samu> no crashes
18:28:03  <Samu> but
18:28:07  <Samu> it's not the way you wanted
18:28:10  <andythenorth> peter1138: you suggested the issue template I was going to suggest :)
18:28:29  <andythenorth> I do not love bureaucracy, but issue template FTW
18:28:56  <nielsm> peter1138: -- not sure if the syntax is correct at all :)
18:30:08  <Samu> oh, i dont need that text for anything too
18:30:12  <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7137: Add: [GitHub] Add issue template to encourage better issue reporting.
18:30:57  <peter1138> andythenorth ... it was already commited.
18:31:00  <peter1138> merged.
18:31:19  <Samu>
18:31:27  <glx> Samu: works for me
18:31:27  <LordAro> andythenorth: arbitrary #7109 reminder
18:32:26  <glx> some of your other changes probably, Samu
18:32:31  *** D-HUND is now known as debdog
18:32:37  <Samu> ah
18:32:49  <Samu> RAW_STRING to STRING1
18:32:57  <Samu> i changed STRING to STRING1 :(
18:33:00  <glx> yes that's what I said
18:33:04  <TrueBrain> @seen andythenorth
18:33:04  <DorpsGek> TrueBrain: andythenorth was last seen in #openttd 4 minutes and 35 seconds ago: <andythenorth> I do not love bureaucracy, but issue template FTW
18:33:09  <Samu> retrying
18:33:17  <andythenorth> @seen norththeandy
18:33:17  *** Wolf01 has joined #openttd
18:33:18  <DorpsGek> andythenorth: I have not seen norththeandy.
18:33:32  <Wolf01> o/
18:33:57  <glx> [18:45:20] <+glx> but you can still replace RAW_STRING with STRING1, and pass a StringID for random, or STR_JUST_RAW and the raw value for the rest
18:33:59  <Wolf01> <- theandynorth
18:33:59  <andythenorth> can I buy someone a mac? :P
18:34:07  <andythenorth> Wolf01: Liebherr :)
18:34:10  <andythenorth> 7 motors? o_O
18:34:17  <Wolf01> Yes
18:34:47  <Wolf01> And 2 control units, possibility to use touch screen to control it
18:34:54  <Wolf01> Mine at day 1
18:34:57  <andythenorth> lego might get on another good run
18:35:03  <andythenorth> past few years are mostly meh
18:35:22  <andythenorth> €400 though Wolf01 ?
18:36:33  <glx> btw Samu, STR_AI_CONFIG_NONE will probably never be displayed as you can't open the settings window in this case
18:36:59  <Samu> none is for GS
18:37:06  <Wolf01> 450€ for sure
18:37:19  <glx> I know, and if there's no GS, there's no settings
18:37:32  <Wolf01> But that's not a problem, I might afford a real one :P
18:38:25  *** keoz has quit IRC
18:38:40  <Samu> hmm game script parameters on (none), it's not closing
18:38:51  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
18:38:51  <Samu> looks like there's more stuff to fix
18:39:42  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7134: Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
18:39:46  <glx> anyway the script name is probably not enough, I would add the slot too for AIs
18:41:01  <Samu> yes, I know, I'm just not sure where to display, which order
18:41:56  <Samu> AI #xx Parameters of name
18:42:09  <Samu> AI Parameters of name (#xx)
18:42:18  <Samu> english
18:42:57  <Samu> AI Parameters of name for Company xx
18:43:27  <andythenorth> TrueBrain: so...issue templates? o_O
18:43:31  <Samu> AI Parameters of name (Company xx)
18:43:35  <glx> (#xx) at the end I think but that's not the easier choice
18:44:38  <Samu> there's COMPANY_NUM string i believe
18:44:53  <Samu> but it requires the company to already exist
18:45:01  <glx> just use {NUM} and give it the slot
18:45:29  <glx> but don't do it for GS
18:45:44  <glx> and that's where the complications start
18:48:17  <Samu> STR_EMPTY
18:49:13  *** Thedarkb2-T60 has joined #openttd
18:49:22  <glx> invalid for {NUM} but {NUM} can be {STRING1} and STR_JUST_INT
18:52:53  <glx> or easier, STR_JUST_RAW_STRING  for GS and a string containing "{RAW_STRING} ({NUM})" for AIs
18:53:13  <peter1138> Oh well, that fix is "no worse" than it was before.
18:53:28  <glx> and just add slot as DParam 3
18:53:49  <peter1138> How can I test autorefit?
18:55:25  <glx> working with strings is not that hard
18:58:03  <andythenorth> peter1138: make a train, send it to a station?
18:58:05  <andythenorth> refit order?
18:58:13  <peter1138> With the no NewGRFs?
18:58:17  <andythenorth> ough
18:58:23  <andythenorth> got a branch?  I can test
18:58:28  <peter1138> Well, I've never used autorefit, so I don't know how it's meant to behave, either.
18:58:30  *** keoz has joined #openttd
18:58:34  <peter1138> andythenorth, I *know* it's broken :-)
18:58:35  <andythenorth> it's faffy
18:59:05  <andythenorth> 'refit to fixed cargo' is trivial, you need a newgrf
18:59:21  <andythenorth> 'refit to available cargo' is super exciting magic
18:59:52  <peter1138> I might get away with just moving the last bit correctly. It was split over multiple lines so I missed it.
19:00:52  <peter1138> Hmm, rereading.
19:00:55  <peter1138> Autorefit should work.
19:01:27  <peter1138> GetCapacityString() for an auto-refit won't.
19:01:35  <peter1138> But I don't know where that's used.
19:02:06  <peter1138> It's in the RefitWindow itself.
19:02:25  <peter1138> So I need to get the GUI that opens the RefitWindow in auto-refit mode.
19:02:55  <peter1138> Any idea which set and which vehicle I can use to find it?
19:03:07  <peter1138> And should I throw away this deathdapter?
19:03:41  *** Gabda has joined #openttd
19:03:46  <Eddi|zuHause> throw everything away and buy new things, as often as possible.
19:03:57  <Eddi|zuHause> because the economy needs you
19:04:16  <peter1138> It's illegal :/
19:04:30  <peter1138> Has shielding on the earth pin.
19:04:51  <peter1138> Not enough space around the outside of the pins.
19:05:18  <TrueBrain> andythenorth: what about them?
19:05:22  <TrueBrain> (issue templates)
19:05:39  <Samu> my excelent copy pasting skills found a solution, let's see if it actually works
19:06:05  <andythenorth> TrueBrain: (a) +/-1 from you (b) know of any we can steal? o_O
19:06:27  <TrueBrain> not sure my opinion matters in this, but it is also already merged, isnt it? :)
19:06:41  <andythenorth> oof so it is
19:06:42  <TrueBrain> and no; all projects that I have seen that use it, are complete rubbish :P
19:06:50  <andythenorth> I am well behind in my notification :P
19:06:59  <andythenorth> keep up andythenorth
19:07:21  <TrueBrain> I disabled notifications :P
19:09:39  <Eddi|zuHause> notifications are evil...
19:10:53  <andythenorth> I like the web notifications
19:10:59  <andythenorth> obviously email notifications are evil
19:12:15  <peter1138> Nobody knows of a NewGRF that supports auto-refit?
19:13:54  <peter1138> Ok, found it in UKRS2.
19:18:12  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7139: Fix 11ab3c4ea2f: Fix showing cargo capacity for auto-refits (missed in #7134)
19:18:32  <andythenorth> Horse :P
19:18:35  <andythenorth> soz, too late
19:20:19  <peter1138> Hmm, maybe need to check one more case.
19:21:33  <peter1138> Oh, no, I already confirmed that.
19:21:50  *** Wormnest has quit IRC
19:24:18  <peter1138> Right, how to put nielsm's code into practice...
19:26:40  <nielsm> the template stuff?
19:27:31  <peter1138> Yeha.
19:27:38  <peter1138> Oh. BaseVehicle doesn't have index
19:32:42  * peter1138 tries a different tack
19:40:30  <Samu> why can't the Delete hotkey close windows in main menu
19:42:25  <peter1138> Hmm
19:43:48  <Samu> i can now open 16 configs at the same time
19:43:51  <Samu> :)
19:46:34  <nielsm> oh, the FieldOffset/FieldWidth functions really oughgt to be constexpr, but then they may have to be rewritten with specialization for N==0 instead of conditional, to be valid C++11
19:48:10  <Samu> :{WHITE}{STRING} Parameters of {STRING1} {STRING1}
19:48:20  <Samu> it werks!
19:49:32  *** erratic has quit IRC
19:49:39  <Samu> 					SetDParam(3, STR_FORMAT_COMPANY_NUM);
19:49:39  <Samu> 					SetDParam(4, this->slot + 1);
19:50:14  <Samu> else
19:50:15  <Samu> SetDParam(3, STR_EMPTY);
19:53:38  <Samu> if (visible_settings.empty()) delete this;
19:53:51  <Samu> the window now closes when there's nothing to display
19:57:17  *** Progman_ has joined #openttd
19:58:31  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7139: Fix 11ab3c4ea2f: Fix showing cargo capacity for auto-refits (missed in #7134)
19:59:55  <Samu> i dont know if it's sensible to allow 16 readmes + 16 licenses + 16 changelogs = 48 textfile windows open
20:00:01  <Samu> glx
20:00:13  <glx> it's not possible
20:00:31  <Samu> yeh, but it's what you suggested
20:00:33  <LordAro> Samu: it's not sensible to have 64 track types, it's still possible
20:00:58  <glx> no I suggested one settings window per AI
20:01:12  <glx> and one textfile per type
20:01:28  *** supermop_work has joined #openttd
20:02:18  <glx> (one textfile per type is in master btw)
20:02:27  *** Progman has quit IRC
20:02:38  *** Progman_ is now known as Progman
20:03:43  *** supermop_work_ has joined #openttd
20:09:32  *** supermop_work has quit IRC
20:12:07  *** HerzogDeXtEr has quit IRC
20:14:14  <nielsm> oh, the FieldOffset/FieldWidth functions really oughgt to be constexpr, but then they may have to be rewritten with specialization for N==0 instead of conditional, to be valid C++11
20:14:21  <nielsm> uh wrong window...
20:14:42  <nielsm> meant to press up+enter in console...
20:20:23  *** Gabda has quit IRC
20:30:39  <andythenorth> can we windowshade the station construction window? o_O
20:31:43  <Samu>
20:32:51  <Samu> (random) in that context looks weird
20:32:58  <Samu> Random AI would be better
20:34:13  <Samu> AI Parameters of Random AI
20:34:21  <Samu> repetitive
20:34:24  <Samu> hmm
20:36:15  <andythenorth> hmm
20:36:15  *** tokai has joined #openttd
20:36:15  *** ChanServ sets mode: +v tokai
20:36:23  <andythenorth> so I have made some enterprise software now
20:36:27  <andythenorth> OpenTTD time?
20:38:48  <peter1138> Always. Horses.
20:39:53  <andythenorth> Horse
20:40:08  <andythenorth> what was I fixing?
20:40:27  <andythenorth> replacing Tropic TGP? o_O
20:40:57  <peter1138> Easy, turn TGP off.
20:41:08  <andythenorth> it's an approach yes
20:41:19  <peter1138> Hmm, I could do with treat-warnings-as-errors.
20:42:27  <andythenorth> I like how original makes pyramids
20:42:55  <andythenorth> it does have a certain something
20:43:14  *** tokai|noir has quit IRC
20:44:59  <andythenorth> shall I just delete the crap transform?
20:45:09  *** Supercheese has joined #openttd
20:45:41  <peter1138> Should I buy ADR1FT for 75p?
20:45:59  <andythenorth> practically free
20:46:09  <andythenorth> is there 75p of entertainment in it?
20:46:25  <peter1138> Possible. It's one of these new-fangled VR things.
20:46:32  <peter1138> Yes, I have a VR headset.
20:46:40  <peter1138> Yes, I'd rather just sit and develop code for OpenTTD.
20:47:26  <peter1138>
20:47:30  <peter1138> That would've helped...
20:47:50  <LordAro> :)
20:48:27  <peter1138> Is this the future? I don't know.
20:48:31  <peter1138> Probably not.
20:49:12  <peter1138> Logically it could just call the DoCommandP() itself, but then there's also the DoCommand() instances.
20:49:15  <peter1138> So it can't.
20:49:31  <LordAro> i wonder whether it might be nicer to have a DoCommandFooRefit function that just calls through to DoCommand
20:49:49  <LordAro> which is basically what you just said
20:50:07  <peter1138> Yeah, you'd need two of them, so more duplication.
20:50:13  <andythenorth> let's just delete case LT_TROPIC
20:50:16  <andythenorth> and see
20:51:18  <peter1138> How about no.
20:52:08  <LordAro> bad andy
20:52:29  <andythenorth> 'probably fine'
20:53:41  <andythenorth> using the arctic generator gets more rainforest
20:54:04  <andythenorth> not sure it's really better eh
20:54:56  *** sla_ro|master has quit IRC
20:55:02  <andythenorth> can I reverse rivers so they flow from coast? :P
20:55:07  <peter1138> Try it.
20:56:06  <andythenorth> I am
20:56:25  <andythenorth> I crashed it
20:56:41  <andythenorth> oh no, just span the river gen for a bit
20:56:43  <andythenorth> trying to go up hill
20:57:08  <andythenorth> let's screenshot this :D
20:57:10  <Samu> what can I do with RAW_STRING?
20:57:21  <Samu> what does it let me do
20:57:53  <Samu> can {RAW_STRING} be turned into {STRING1}{STRING1} for example?
20:58:34  <nielsm> ahh finally got it _working_:
20:58:41  <LordAro>
20:58:43  <LordAro> Samu: ^
20:58:46  <Samu> first string1 for the script name, second string1 for which company slot it belongs?
20:58:52  <Samu> ah, thx
20:58:54  <LordAro> nielsm: oh no
20:59:05  <nielsm> LordAro bwahahahaha
20:59:19  <LordAro> Samu: there's not a lot of useful dev stuff on the wiki, but there is some :p
20:59:26  <nielsm> and it does build with --std=c++11
21:01:24  <LordAro> should probably have a static_assert for the fieldwidths being <=32
21:01:41  <LordAro> that is terrifying though
21:01:44  <LordAro> i'm impressed :)
21:01:49  <andythenorth> kind of stupid :)
21:01:51  <andythenorth> but cool
21:02:07  <andythenorth> 	return heightEnd >= heightBegin instead of 	return heightEnd <= heightBegin
21:02:14  <nielsm> LordAro, it does have that static_assert
21:02:24  <nielsm> in both accessors
21:02:34  <Samu> wow, rivers!
21:02:36  <andythenorth> all rivers are flat
21:02:46  <LordAro> be nice if it could somehow "autogenerate" the get/set functions (or at least validate them), but i suspect templates aren't powerful enough for that
21:02:51  <LordAro> nielsm: ah yeah, same effect
21:04:17  <LordAro> also arbitrary return/parameter for the get/set :p
21:05:40  <andythenorth> I think I made mangrove swamps :P
21:06:09  <Samu> oh, SetDParamMaxDigits(uint n, uint count)
21:06:11  <LordAro> andythenorth: nice
21:06:21  <Samu> this is useful for that 1-15 counter i have
21:06:26  <Samu> gonna fix
21:06:30  <nielsm>  <-- and gets very well optimized
21:06:56  <nielsm> so I think yeah this can be a good way to add type safety and enforced consistency to those bitpacks
21:08:03  <LordAro> nielsm: it is more code than peter1138's one or two line functions though
21:08:19  <LordAro> and i'm not sure it improves type safety *that* much more...
21:10:53  <andythenorth> hmm, rivers :P
21:10:54  <nielsm> well he's shown packing, but not unpacking yet
21:11:15  <nielsm> it's the unpacking that's really interesting imo, since you want individual field access in some way
21:11:32  <nielsm> and I think my solution offers better syntax there
21:12:17  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7140: Fix: make sure strgen fails when english.txt contains invalid commands
21:12:20  <nielsm> although it is boilerplatey
21:13:18  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7140: Fix: make sure strgen fails when english.txt contains invalid commands
21:13:27  <nielsm> looks good!
21:15:24  <peter1138> nielsm, we already have helpers for unpacking.
21:15:29  <peter1138> Extract
21:15:53  <glx> there's already an error check after parsing, but parsing doesn't check commands in strings.h phase, but they are checked when writing strings.h content, I just added a check after that
21:15:55  <nielsm> peter1138, the problem is keeping the bitfield addresses in sync everywhere that depends on them
21:16:10  <Samu> 		SetDParamMaxDigits(0, 20);
21:16:11  <Samu> 		uint widest_cid = GetStringBoundingBox(STR_JUST_INT).width;
21:16:17  <peter1138> nielsm, that's why in my patch I intend to place the Pack version directly before the command handler.
21:16:18  <Samu> it works! just 2 lines, no for cycle needed
21:16:23  <peter1138> (I didn't for Autoreplace, yeah)
21:16:36  <Samu> oops, it's not 20, it's 2, typo
21:16:38  <peter1138> Not perfect, but it's not spread out everywhere!
21:18:02  <peter1138> Also I don't see how you'd fit your stuff in at the moment.
21:18:15  <peter1138> ls -l
21:18:18  <peter1138> Er :D
21:19:04  <Eddi|zuHause> ENoConsole
21:19:56  <glx> windows tasks on CI are slow since the addition of baseset project ;)
21:20:03  <peter1138> Yes :/
21:20:37  <peter1138> I think I am spoiled by having lots of CPU cores.
21:20:56  <LordAro> someone should finish rewriting the build system into cmake
21:21:05  <peter1138> Yes. Who was working on it?
21:21:10  <LordAro>
21:21:19  <LordAro> more recently than TB, anyway
21:21:47  <peter1138> DO IT.
21:21:52  <LordAro> D:
21:22:28  <peter1138> Urgh, there's so many commands :D
21:22:32  <nielsm> the build on windows also stalls on the basesets with VS, since the baseset builds are single-threaded, and the main project is declared as depending on it
21:22:47  <peter1138> It should only build once.
21:23:00  <nielsm> well it rebuilds every time a language file changes :)
21:23:01  <peter1138> Hmm, I guess it's because we're getting a lot of language updates.
21:23:02  <peter1138> Yeah.
21:23:20  <peter1138> If the baseset translations were separate then that'd be better.
21:23:23  <peter1138> In fact...
21:23:31  <peter1138> Why *are* the baseset translations in the language files?
21:23:40  <glx> pff CI passed but failed to notify github
21:23:44  <LordAro> simplicity, i imagine
21:23:48  <peter1138> Just for ease of webtranslator/eints integration?
21:24:23  <peter1138> And also, if the strings are in our language packs...
21:24:32  <peter1138> Can't the baseset refer to them by string ID?
21:24:53  <peter1138> Oh right, we don't have a method to look up string ID by name.
21:25:00  <LordAro> the baseset itself doesn't refer to them, it's the metadata
21:25:02  <peter1138> Because that's compile time.
21:25:14  <peter1138> Yes of course, that's what I meant.
21:25:30  <peter1138> Ever so pedantic :)
21:25:36  <LordAro> :p
21:25:53  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 merged pull request #7140: Fix: make sure strgen fails when english.txt contains invalid commands
21:26:12  <glx> at least I can bypass CI ;)
21:26:13  <peter1138> glx, is this to "help" Samu? :p
21:26:18  <peter1138> glx, naughty!
21:26:29  <nielsm> hm better get to bed, back to work tomorrow
21:26:52  <Eddi|zuHause> some people can't be helped
21:27:03  <glx> don't know if it will help, but at least it cancels the build
21:27:10  <glx> as it should
21:28:54  <glx> and no string warnings spam when there's an error in english ;)
21:29:00  <Samu> i have the language files with STR LIVERY and now STR AI CAPTION blabla
21:29:09  <Samu> param idx stuff
21:29:20  <andythenorth> meh Horse 93%
21:29:22  <Samu> do i have to delete the strings from languages?
21:29:49  <nielsm> gn
21:30:44  <andythenorth> bye
21:31:20  <Samu> let's see how it complains now
21:32:24  <Samu> arg, can't rebase before commiting
21:32:29  <peter1138> So commit.
21:32:35  <peter1138> Or stash, then unstash
21:33:02  <glx> yes git stash, rebase, git stash pop
21:33:14  <glx> works well
21:37:51  *** nielsm has quit IRC
21:40:14  <andythenorth> never fails
21:44:15  <Eddi|zuHause> i love that the traffic light turns red but he still goes
21:45:20  *** Wormnest has joined #openttd
21:45:31  <Supercheese> good ol' 11foot8
21:47:00  <Wolf01> <Eddi|zuHause> i love that the traffic light turns red but he still goes <- is really traffic lights or an overheight indicator?
21:47:11  <Eddi|zuHause> yes
21:47:43  <Eddi|zuHause> it's apparently an overheight indicator disguised as a traffic light
21:48:03  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
21:48:08  <Samu> alright, let's see how it builds now
21:48:46  <Samu> still with warnings
21:48:55  <Samu> str livery and now str caption
21:49:16  <Samu> I hate editing existant strings
21:49:24  <Samu> always warnings
21:56:24  <Samu> I can't edit the TEXTFILE window caption the same way as you did for AI Settings window
21:57:17  <Samu> unless I break everywhere else it's used
21:58:16  <Samu> the livery error seems to be the same kind of error i'm getting, interesting
22:02:44  <andythenorth> hmm
22:02:47  <DorpsGek_II> [OpenTTD/OpenTTD] michicc merged pull request #7139: Fix 11ab3c4ea2f: Fix showing cargo capacity for auto-refits (missed in #7134)
22:02:49  <andythenorth> scaling run costs is a total PITA
22:03:32  <andythenorth> might be easier to set them manually, compared to the algorithm I have that applies them same to all vehicles
22:03:39  <andythenorth> but eh, manual :P
22:05:58  <LordAro> andythenorth: #7109 poke
22:06:03  <andythenorth> tomorrow yes
22:06:06  <LordAro> :p
22:06:20  <andythenorth> I am running savegames on FFWD watching costs :P
22:08:00  <andythenorth> very high speed trains are making less money than slightly high speed train
22:08:04  <andythenorth> on same route
22:08:12  * andythenorth must try hard
22:08:17  <andythenorth> also bed
22:08:53  <andythenorth> run costs might need to scale by game era, but that sucks for game start :P
22:09:05  <andythenorth> and might be inverse to RL, dunno
22:09:06  <Samu> inflation?
22:09:21  <andythenorth> inflation is definitely out of scope :)
22:10:06  <Samu> so, the only way these livery errors disappear is when all translators update them?
22:10:06  *** Thedarkb-X40 has joined #openttd
22:10:14  <Samu> that's gonna take time
22:10:18  <peter1138> Yup.
22:10:21  <peter1138> I did remove them.
22:10:34  <peter1138> But eints decided it knew better and put them back.
22:11:20  <Samu> uhm, i see {COMPANY} in english.txt
22:11:40  <Samu> STR_LIVERY_CAPTION                                              :{WHITE}{COMPANY} - Colour Scheme
22:11:52  <peter1138> And?
22:11:58  <Samu> you said you removed
22:12:11  <peter1138> Yes.
22:12:19  <peter1138> I removed the strings from the *other* language.
22:12:54  <Samu> ah, EINTS is the dude that edits strings in
22:13:02  <Samu> I see
22:13:55  <andythenorth> hmm, scale costs by type of train maybe?
22:13:58  <andythenorth> might work
22:14:10  * andythenorth was just using speed + power
22:14:15  <andythenorth> but it's too crude
22:14:28  <andythenorth> tomorrow!
22:14:28  *** andythenorth has left #openttd
22:15:01  *** Pikka has joined #openttd
22:17:27  *** Thedarkb2-T60 has quit IRC
22:21:10  <Samu> maybe because the string has still the same name?
22:23:29  <Samu> yeah, i dont know how eints machine decides what to do
22:35:15  <Samu> hmm the .lng file STR_LIVERY_CAPTION was compiled with the english version
22:35:35  <peter1138> What are you going on about?
22:36:09  <Samu> but the .txt file conatins the string with the other language
22:36:22  <Samu> .lng and .txt don't match
22:36:29  <Samu> maybe it's intended?
22:36:34  <peter1138> What are you going on about?
22:36:37  <Samu> to avoid crash?
22:36:56  <Samu> i'm going about this
22:37:44  <peter1138> Yes, but why?
22:37:47  <Samu> looking at the contents of portuguese.txt and portuguese.lng
22:38:14  <Samu> I don't know
22:38:27  <peter1138> I mean, why are you looking at it? What's the purpose?
22:39:05  <Samu>  - Colour Scheme
22:39:18  <Samu> in portuguese.lng
22:39:36  <Samu> {WHITE}Novo Esquema de Cores
22:39:40  <Samu> in portuguese.txt
22:39:48  <peter1138> Why are you bothering?
22:39:56  <Samu> uh, i dont know
22:39:56  <peter1138> We know the language files are wrong.
22:40:03  <peter1138> The language system is working as intended.
22:40:14  <Samu> but the mismatch is on purpose?
22:40:46  <peter1138> warning: STR_LIVERY_CAPTION: Param idx #0 '<empty>' doesn't match with template command 'COMPANY'
22:41:07  <peter1138> strgen knows the translations are wrong, so it can't use that translation.
22:41:25  <peter1138> If it can't use the translation, it'll use English.
22:41:50  <Samu> ah, I see, it avoids crashes
22:41:53  <Samu> interesting
22:42:18  <Samu> smart strgen
22:42:32  *** keoz has quit IRC
22:42:54  <peter1138> Yes, strgen didn't spend an hour or so pointlessly.
22:47:42  <LordAro> peter1138: well, who hasn't spend a pointless hour or so trying to work out how something works?
22:51:30  <peter1138> :)
22:51:55  <Samu> SetDParamMaxValue is actually better for what i need
22:52:03  <Samu> fixing yet again
22:53:44  <peter1138> I spend ages writing patches and then rewriting them and then just ditching them.
22:55:34  <Samu> 		SetDParamMaxValue(0, MAX_COMPANIES);
22:55:34  <Samu> 		uint widest_cid = GetStringBoundingBox(STR_JUST_INT).width;
22:56:02  *** Thedarkb-T60 has joined #openttd
22:56:09  <Samu> let's see if it works
22:56:49  <Samu> cool, works fine
22:57:02  <Samu> no more magic numbers
23:01:02  *** Wolf01 has quit IRC
23:06:51  *** Lejving_ has joined #openttd
23:14:19  *** Lejving has quit IRC
23:19:01  *** Flygon has joined #openttd
23:23:52  <Samu> hmm, looks like company_num is a COMMA
23:24:00  <Samu> STR_JUST_COMMA then
23:24:03  <Samu> fixing
23:28:35  <Samu> How do i change window priority of AI Settings
23:28:52  <Samu> it even gets in front of console window
23:29:07  <Samu> it doesn't need this much priority
23:35:07  *** Progman has quit IRC
23:44:47  *** Thedarkb-T60 has quit IRC

Powered by YARRSTE version: svn-trunk