Config
Log for #openttd on 12th March 2023:
Times are UTC Toggle Colours
00:46:23  *** Wormnest has quit IRC
01:00:53  *** pickpacket2 has joined #openttd
01:08:12  *** pickpacket has quit IRC
01:08:12  *** pickpacket2 is now known as pickpacket
01:24:51  *** Wormnest has joined #openttd
02:09:08  *** lobstarooo__ has quit IRC
02:18:07  *** Wormnest has quit IRC
02:47:58  *** WormnestAndroid has quit IRC
02:48:05  *** WormnestAndroid has joined #openttd
02:49:44  *** WormnestAndroid has joined #openttd
02:55:01  *** Wormnest has joined #openttd
03:20:42  *** godbed has joined #openttd
03:24:07  *** debdog has quit IRC
03:24:32  *** Wormnest has quit IRC
04:07:46  *** HerzogDeXtEr has quit IRC
04:34:45  *** keikoz has joined #openttd
05:49:24  <DorpsGek> [OpenTTD/OpenTTD] rodonmanes opened issue #10564: [Crash]: Selling a train https://github.com/OpenTTD/OpenTTD/issues/10564
05:50:25  *** Flygon has joined #openttd
07:27:01  *** nielsm has joined #openttd
08:41:23  *** Wolf01 has joined #openttd
08:59:00  <dP> don't you love the smell of crashed openttd in the morning...
08:59:36  *** gelignite has joined #openttd
09:07:32  <Kuhnovic> Then again, who in their right mind would ever sell a train at this hour!
09:20:05  *** Arty has joined #openttd
09:22:11  *** Artea has quit IRC
09:40:24  *** gelignite has quit IRC
10:33:08  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084423826584125440/image.png
10:33:08  <andythenorth> eh a new way to break it ๐Ÿ˜„
10:34:02  <andythenorth> ok so the language only supports a very limited number of local vars?
10:34:06  <andythenorth> lol that can't be
10:35:26  <andythenorth> wow no, it really is a thing
10:35:27  <andythenorth> FML
10:36:22  <andythenorth> I have a feeling it might be limited to 255 locals
10:41:51  <andythenorth> every day a new way for me to look stupid in Squirrel ๐Ÿ™‚
10:45:22  <andythenorth> the limit might be either 252 or 255
10:45:30  <andythenorth> I didn't write an isolated test ๐Ÿ˜›
10:55:28  <JGR> Squirrel has lists and tables, you don't need to make every little thing it's own local variable
11:08:03  *** D-HUND has quit IRC
11:11:07  <michi_cc[d]> I think every code design guide everywhere will tell you that 255 locals just means your function is too big ands needs to be split.
11:18:21  *** lobstarooo__ has joined #openttd
11:35:11  *** lobstarooo has joined #openttd
11:38:23  *** Artea has joined #openttd
11:40:23  *** Arty has quit IRC
11:41:37  *** lobstarooo__ has quit IRC
11:44:16  *** lobstarooo has quit IRC
11:56:26  *** lobstarooo has joined #openttd
11:56:26  *** lobstarooo is now known as lobstarooo__
11:57:02  *** lobstarooo has joined #openttd
12:00:38  *** lobstarooo_ has joined #openttd
12:02:09  *** lobstarooo___ has joined #openttd
12:03:32  *** godbed is now known as debdog
12:04:01  <andythenorth> I was trying to assign table slot values from a python loop
12:04:35  <andythenorth> `local foo = ${some_value}; my_table[foo] = foo;` was a failed attempt
12:04:36  *** lobstarooo__ has quit IRC
12:04:40  *** lobstarooo___ is now known as lobstarooo__
12:04:53  <andythenorth> I've written a python generator for squirrel tables as strings instead
12:04:58  <andythenorth> shame our squirrel can't json, but eh
12:05:25  <andythenorth> the loop had hundreds of slot assignments, now it has....many fewer ๐Ÿ˜›
12:07:19  <JGR> If you're writing your squirrel code using python, why do you need all this strange indirection at all?
12:07:40  <JGR> Just have your python output the right code first time?
12:08:11  *** lobstarooo has quit IRC
12:08:42  *** lobstarooo_ has quit IRC
12:09:46  <andythenorth> yes
12:10:03  <andythenorth> unfortunately, due to [skill issues], achieving that is mistakes and blind alleys ๐Ÿ™‚
12:10:46  <andythenorth> I am not filing the lack of json under "skill issues" ๐Ÿ˜›  but not much we can do about that
12:11:31  <andythenorth> I have written my own serialiser to squirrel tables, which will keep finding new issues with type detection and formatting ๐Ÿ˜›
12:22:28  *** lobstarooo has joined #openttd
12:30:12  *** lobstarooo__ has quit IRC
12:30:40  *** lobstarooo_ has joined #openttd
12:30:42  *** lobstarooo_ is now known as lobstarooo__
12:31:47  *** lobstarooo_ has joined #openttd
12:34:17  <andythenorth> now can I be arsed to write more debug display output?
12:34:32  <andythenorth> I probably can, and it's probably a learning exercise with no real purpose ๐Ÿ˜›
12:36:25  *** lobstarooo___ has joined #openttd
12:36:35  <JGR> Extending the script debug window would probably be useful for script developers in general
12:37:41  <JGR> The things that you're trying to do via storybooks is likely a good signal of what functionality is missing
12:38:01  *** lobstarooo has quit IRC
12:38:23  <nielsm> something to dump objects for semi-interactive exploration, similar to how javascript debug consoles in browsers work, would probably be useful
12:38:42  *** lobstarooo__ has quit IRC
12:38:45  *** lobstarooo___ is now known as lobstarooo__
12:38:45  <andythenorth> JGR: agree, I am quite a big fan of story book for prototyping ๐Ÿ™‚
12:39:03  <andythenorth> abusing story book is somewhat akin to browser dev tools
12:39:06  <andythenorth> just less complete ๐Ÿ˜›
12:39:36  <andythenorth> TBH if there was a fast way to repr() a squirrel object
12:39:41  <andythenorth> or the equivalent of dir
12:40:44  <andythenorth> simple logging often isn't useful because it just produces strings like `Instance(0x1231)` or similar, from the object refs
12:40:54  <andythenorth> walking them when logging is quite involved
12:41:17  <andythenorth> given that the whole environemt appears to be one namespace, made of table slots
12:41:21  <glx[d]> Tried print(object) ?
12:41:32  <andythenorth> we could just have a UI for traversing the global table
12:41:34  *** lobstarooo has joined #openttd
12:41:37  <andythenorth> 'just'
12:41:42  <andythenorth> these things are usually dog slow ๐Ÿ˜›
12:42:12  <JGR> That's not such a big problem for debugging
12:42:38  <glx[d]> Traversing a table is not hard, we do it for saving
12:43:32  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084456643510685716/image.png
12:43:32  <andythenorth> glx[d]: no I hadn't tried print() ๐Ÿ™‚ gets me a different output
12:43:49  <andythenorth> that's printing a slot with an object in it
12:43:58  <glx[d]> Not very useful
12:43:58  <andythenorth> I wasn't expecting it to magically recurse ๐Ÿ™‚
12:44:01  *** lobstarooo_ has quit IRC
12:44:24  <andythenorth> also logging isn't the solution for inspecting state anyway ๐Ÿ™‚
12:44:35  <andythenorth> we have the + tree view from settings, groups etc
12:44:52  <andythenorth> maybe we can just display the tree with that
12:45:29  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084457134978252800/image.png
12:45:29  <andythenorth> is what I'm doing in storybook
12:45:48  <andythenorth> I was about to write a recursive version, so I can expand when the value is a table / object
12:46:21  *** lobstarooo_ has joined #openttd
12:46:22  <glx[d]> Recursive reading of table is already existing for the save function
12:46:50  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084457474125479946/image.png
12:46:50  <andythenorth> so we'd maybe just add a view here?
12:47:08  <JGR> The code suggests that you can define your class method for conversion to strings
12:47:25  <andythenorth> that sounds plausible
12:47:38  <andythenorth> Squirrel seems quite well thought through, just rather unpolished
12:48:22  *** lobstarooo__ has quit IRC
12:48:22  *** lobstarooo_ is now known as lobstarooo__
12:48:38  <andythenorth> I keep hoping to find the equivalent of python dir() which is one of the ways I can learn interfaces ๐Ÿ˜›
12:49:52  <glx[d]> <http://squirrel-lang.org/doc/squirrel2.html#d0e3933>
12:49:57  <glx[d]> Interesting
12:50:34  <glx[d]> As usual documentation is sparse
12:51:25  <andythenorth> do we already use that for the breakpoint setting?
12:51:32  * andythenorth doesn't understand debugging much
12:51:34  *** lobstarooo_ has joined #openttd
12:51:59  *** HerzogDeXtEr has joined #openttd
12:52:40  <glx[d]> No breakpoint is very basic, just filtering log output
12:52:50  <andythenorth> ok
12:53:56  *** lobstarooo has quit IRC
12:54:41  <andythenorth> well a read-only inspection of state would be nice to have ๐Ÿ™‚
12:54:52  <andythenorth> we could add a 'danger' version later, where state can be changed ๐Ÿ˜›
12:56:22  *** lobstarooo has joined #openttd
12:56:50  <nielsm> possibly add a new pause condition to the game, for "script is being singlestepped" pause
12:58:17  *** lobstarooo__ has quit IRC
12:58:23  *** lobstarooo is now known as lobstarooo__
12:58:40  <JGR> You can define a "_tostring" method on a class, this gets called by print/GSLog instead of the default "instance: ..."
12:59:16  <andythenorth> I need to remember that
12:59:33  <andythenorth> I have been trying .tostring() built in method, but results can be mixed
13:00:00  <glx[d]> Tostring() calls _tostring()
13:00:12  <nielsm> I think the debugging interface in squirrel is already being used for the script step limiting per game tick
13:00:17  <glx[d]> Else it just displays instance:addr
13:01:33  *** lobstarooo has joined #openttd
13:03:00  <andythenorth> oh _tostring() is going to be super helpful for my classes
13:03:02  <andythenorth> thanks
13:03:57  *** lobstarooo_ has quit IRC
13:06:10  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084462339346137218/image.png
13:06:10  <andythenorth> works
13:06:19  <andythenorth> the null ones are expected
13:06:19  *** lobstarooo_ has joined #openttd
13:08:17  *** lobstarooo__ has quit IRC
13:08:19  *** lobstarooo_ is now known as lobstarooo__
13:11:53  *** lobstarooo_ has joined #openttd
13:13:56  *** lobstarooo has quit IRC
13:14:44  <andythenorth> wonder how I force a linebreak
13:15:32  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084464696977014824/image.png
13:16:20  *** lobstarooo has joined #openttd
13:17:08  <andythenorth> ok, not going down a string formatting rabbit hole today ๐Ÿ˜„
13:17:10  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084465108069130351/image.png
13:18:17  *** lobstarooo__ has quit IRC
13:18:20  *** lobstarooo is now known as lobstarooo__
13:19:59  <glx[d]> Hmm GSText should support color commands
13:20:49  <glx[d]> Ha but it's a raw string here
13:21:52  *** lobstarooo has joined #openttd
13:23:56  *** lobstarooo_ has quit IRC
13:25:18  <andythenorth> yes
13:25:35  <andythenorth> it's not a today problem ๐Ÿ™‚
13:26:19  *** lobstarooo_ has joined #openttd
13:28:17  *** lobstarooo__ has quit IRC
13:28:19  *** lobstarooo_ is now known as lobstarooo__
13:31:34  *** lobstarooo_ has joined #openttd
13:33:56  *** lobstarooo has quit IRC
13:36:21  *** lobstarooo has joined #openttd
13:38:16  *** lobstarooo__ has quit IRC
13:38:22  *** lobstarooo is now known as lobstarooo__
13:41:35  *** lobstarooo has joined #openttd
13:43:57  *** lobstarooo_ has quit IRC
13:46:22  *** lobstarooo_ has joined #openttd
13:48:14  *** lobstarooo_ has quit IRC
13:48:21  *** lobstarooo__ has quit IRC
13:53:57  *** lobstarooo has quit IRC
13:59:45  <petern> THIS WEEK 199.5 / 200 km
13:59:50  <petern> God damn it
14:00:21  <Eddi|zuHause> close, but no cigar.
14:00:36  <andythenorth> petern: when does the week cut off?
14:08:01  <petern> I'll guess at midnight tonight.
14:08:26  *** grossing has quit IRC
14:12:41  <glx[d]> 500m should not be too hard
14:13:03  <discord_user_f4a0790> ^^
14:21:50  <TrueBrain> I did something silly: https://games.truebrain.nl/GameThree.html. Next step, rebuilding OpenTTD? ๐Ÿ˜›
14:21:50  <TrueBrain> This just to offset the endless GS talk in this channel .. so boring ๐Ÿ˜›
14:22:26  <glx[d]> some points about GS are valid though
14:22:49  <TrueBrain> who said / suggested they weren't?
14:23:43  <glx[d]> hardcoded WASD, not nice for my ZQSD layout
14:23:59  <TrueBrain> haha, lol, I keep forgetting those people exist ๐Ÿ˜„ Sorry ๐Ÿ˜›
14:24:05  <glx[d]> (windows+space works of course)
14:25:41  <glx[d]> lol alt key has a weird effect
14:26:08  <TrueBrain> `ALT` contains `A`
14:26:11  <TrueBrain> it is a silly issue
14:26:16  <glx[d]> haha
14:26:48  <TrueBrain> I broke my own game by moving while the exit animation was playing
14:26:56  <TrueBrain> that clearly shouldn't happen .. owh well, silly game being silly ๐Ÿ˜„
14:27:20  <andythenorth> glx[d]: ๐Ÿ˜› yes
14:27:34  <andythenorth> but the two contribs talking about it most are also the worst programmers
14:27:51  <TrueBrain> pff, speak for yourself
14:27:58  <andythenorth> pff I did
14:28:07  <TrueBrain> ๐Ÿ˜„ Which is why it was funny ๐Ÿ˜›
14:28:13  <andythenorth> pls send more lolz
14:28:20  <TrueBrain> I tried
14:28:22  <TrueBrain> it wasn't well received
14:28:31  <andythenorth> pff it was
14:28:39  <TrueBrain> I made you a game? ๐Ÿ˜„
14:28:56  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084483168591159327/image.png
14:28:56  <andythenorth> guess I need a new browser?
14:29:00  <andythenorth> unless that's the game ๐Ÿ˜›
14:29:11  <andythenorth> is it a 'find a new browser' game?
14:29:30  <andythenorth> nvm, Safari works
14:29:35  <andythenorth> stopped clock, is correct twice a day
14:30:31  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084483566978736168/image.png
14:30:31  <andythenorth> oh it's sad
14:30:53  <andythenorth> oh FF maybe works
14:30:56  <andythenorth> loading...
14:32:35  <andythenorth> ok nice
14:32:38  <andythenorth> how do I hit stuff?
14:32:59  <TrueBrain> so aggressive
14:33:12  <andythenorth> it's so pretty
14:33:23  <glx[d]> it's a short loop ๐Ÿ˜‰
14:33:30  <andythenorth> you have been drawing?
14:33:32  <TrueBrain> you can't win, that is for sure ๐Ÿ™‚
14:33:44  <glx[d]> level 1 is not easy
14:33:52  <TrueBrain> andythenorth: haha, fuck no. That would be the hidden talent of the centry ๐Ÿ˜›
14:34:07  <JGR> It took me quite a while working out that you needed to use the 'e' key to open doors
14:34:07  <TrueBrain> https://pixelfrog-assets.itch.io/kings-and-pigs
14:34:07  <TrueBrain> Some people are just too kind
14:34:27  <TrueBrain> JGR: yeah ... I should make a popup telling you to press E .. got lazy ๐Ÿ˜›
14:35:14  <andythenorth> how about fall damage? ๐Ÿ˜›
14:35:29  <TrueBrain> andy can't handle a peaceful game, lol
14:35:58  <andythenorth> character is carrying a stone hammer ๐Ÿ˜›
14:36:12  <andythenorth> ok this is my new goto
14:36:22  <andythenorth> it's approximately as rewarding as 2048
14:36:31  <andythenorth> which is what I play when I want to reset my brain for 10 mins
14:36:43  <andythenorth> I really enjoy that it just circles around
14:36:51  <TrueBrain> or does it?
14:36:58  <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic updated pull request #10543: Feature: Region-based pathfinder for ships https://github.com/OpenTTD/OpenTTD/pull/10543
14:37:45  <andythenorth> or does it? o_O
14:38:00  <andythenorth> is gravity a local var?
14:38:05  <andythenorth> I miss making games ๐Ÿ˜›
14:38:21  <TrueBrain> I am surprised how easy it really is, if you set your mind to it .. I mean, this was 2 days of work
14:38:56  <andythenorth> you're working on the procedural level generator I assume?
14:39:15  <TrueBrain> nah; just wanted to test most of the important aspects ..
14:39:26  <TrueBrain> from time to time I have been trying Unity, but I never got anything useful out of it
14:39:36  <TrueBrain> but with Godot, it seems I can actually understand how to do things
14:40:08  <andythenorth> oh it has an editor? ๐Ÿ˜ฎ
14:40:11  <andythenorth> GUI app
14:41:01  *** virtualrandomnumber has joined #openttd
14:41:07  <TrueBrain> I just really have to learn how to draw .. which will be interesting ๐Ÿ˜›
14:41:18  *** virtualrandomnumber has quit IRC
14:41:33  <glx[d]> so you were waiting for Godot
14:41:38  <andythenorth> lol
14:41:41  <andythenorth> WP
14:41:59  <andythenorth> skimming the intro, it looks like Flash / Director
14:42:05  <andythenorth> compose scenes
14:42:52  <andythenorth> seems like it can have scenes in scenes
14:43:05  <andythenorth> presumably each scene runs a main loop
14:44:51  <andythenorth> oh scripts on nodes?
14:45:23  <andythenorth> yeah this is basically flash, without the vector drawing tools ๐Ÿ™‚
14:45:42  <andythenorth> and then the bit where Adobe wanted the entire web rebuilt in Flash ๐Ÿ˜›
14:45:51  <andythenorth> does it have the same security holes?
14:45:55  <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1084487442003918989/image.png
14:45:55  <petern> That thumb...
14:47:07  <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic updated pull request #10543: Feature: Region-based pathfinder for ships https://github.com/OpenTTD/OpenTTD/pull/10543
15:35:47  *** Wormnest has joined #openttd
15:45:05  <dP> glx[d]: still better than my dvorak ๐Ÿ˜œ
15:51:00  <andythenorth> are still in GS purdah?
15:51:21  <andythenorth> https://en.wikipedia.org/wiki/Purdah_(pre-election_period)
15:56:15  <discord_user_f4a0790> dP: dvorak?
15:56:40  <discord_user_f4a0790> i guess that's the russian version of qwerty/ั™ัšะตั€ั‚ะท
15:57:36  <dP> discord_user_f4a0790: no, russian layout is its own thing, dvorak is a qwerty replacement
15:58:03  <dP> <https://en.wikipedia.org/wiki/Dvorak_keyboard_layout>
15:58:13  <discord_user_f4a0790> ะฐั…ั…
15:58:15  <discord_user_f4a0790> ahh*
16:00:39  <dP> I just don't fancy layout designed for archaic typewriters ๐Ÿ˜œ
16:04:17  <dP> it's actually amazing how despite all the progress keyboards are still designed with limitations that aren't relevant for almost a century
16:06:12  <LordAro> dP: as opposed to dvorak, the design of which is based on very flawed experiments? :p
16:08:04  <dP> still better than designing for quirks of typewriter mechanics :p
16:08:29  <dP> also, I tried  workman layout as some point too, didn't like it
16:09:25  <discord_user_f4a0790> dvorak would be interesting to try
16:10:41  <discord_user_f4a0790> i have a custom layout kinda
16:11:52  <discord_user_f4a0790> it is the danish qwerty layout but with some adjustments that allow me to write letters like ลก, ฤ, ลพ, ฤ‡, ฤ‘, ล‚, รต, etc
16:11:55  <Brickblock1> I have added a few things to my layout one of them being this เถž
16:12:02  <discord_user_f4a0790> :Rly:
16:12:31  <dP> I have a programmable keyboard with a separate layout for openttd xD
16:12:37  <Brickblock1> lol
16:12:50  <discord_user_f4a0790> i could easily switch layouts
16:13:02  <discord_user_f4a0790> thats how i can do ั™ัšะตั€ั‚ะท
16:13:16  <discord_user_f4a0790> its just start key plus space
16:13:52  <dP> it's not that easy with custom layouts when you need to use other os or pc
16:14:03  <discord_user_f4a0790> oh god
16:14:06  <discord_user_f4a0790> yeah
16:14:07  <dP> at least with programmable keyboard I can just plug it in
16:14:27  <dP> and it does all the job of faking right keypresses on its own
16:14:33  <discord_user_f4a0790> i remember in college i had to actually look at the keyboard to find some things like the @ key because the uk layout is different
16:14:59  <petern> Hmm, shall I crack open a whisky.
16:15:45  <discord_user_f4a0790> @ for me is alt gr + 2, on the uk keyboard it is shift plus the second key right L
16:15:55  <discord_user_f4a0790> shift plus that key makes ร˜ for me
16:16:07  <discord_user_f4a0790> i think my keyboard may be programable
16:16:16  <discord_user_f4a0790> i have a corsair k68
16:16:43  <petern> LordAro, hills are so hard :/
16:16:45  <discord_user_f4a0790> its great, deals with my heavy key presses when i type pretty well
16:16:58  <petern> And not even proper hills like you have.
16:17:50  <LordAro> petern: ikr
16:18:14  <LordAro> sandbagging myself with heavy mudguards doesn't help
16:18:21  <LordAro> also probably a pound of mud
16:20:03  <LordAro> though i don't think i've done any of the proper hills (20%+) in over 6 months
16:51:20  <andythenorth> seems MinimalGS implies monthly processing runs at end of month, which I think often coincides with auto save
16:51:37  <andythenorth> might change that
16:51:55  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084519150132662293/image.png
16:52:27  * andythenorth wonders how often towns are visited in default game, for e.g. growth rate etc
16:53:53  <andythenorth> /me guesses at `UpdateTownGrowthRate`
16:54:49  <andythenorth> TownsMonthlyLoop
16:56:05  <andythenorth> ok so this runs on `OnNewMonth`
16:58:12  <petern> Logical.
16:59:40  <andythenorth> not sure if it matters that a save happens midway through processing monthly stuff
17:00:01  <andythenorth> seems like a higher chance of weird state, but maybe not
17:23:25  <DorpsGek> [OpenTTD/OpenTTD] ShlokJswl commented on issue #8932: Maximum initial loan amount does not match Game Settings https://github.com/OpenTTD/OpenTTD/issues/8932
17:23:44  *** tokai|noir has joined #openttd
17:23:44  *** ChanServ sets mode: +v tokai|noir
17:24:02  <andythenorth> has anyone ever thought of dividing water into regions of connected tiles?
17:24:22  <andythenorth> ๐Ÿ˜›
17:24:24  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084527328140468354/image.png
17:24:29  <andythenorth> silly FIRS ports
17:25:50  <dP> didn't we discuss that at some point
17:25:58  <dP> some kind of dsu would do the trick
17:26:06  <dP> may also help ship pathfinding
17:26:07  <andythenorth> I am considering doing it GS
17:26:15  <andythenorth> but it will bloat RAM and be dog slow
17:26:16  <dP> to instantly tell there is no path
17:29:59  <dP> hardest part is the update after terra
17:30:15  <andythenorth> could just be slow?
17:30:31  *** tokai has quit IRC
17:30:43  <dP> well, yeah, slow is simple
17:30:45  <andythenorth> doesn't need to update for every player raise / lower
17:30:52  <andythenorth> or dynamite
17:35:07  <andythenorth> oh seems GS can handle events from arbitrary widget clicks ๐Ÿ˜ฎ
17:35:08  <andythenorth> https://docs.openttd.org/gs-api/classGSEventWindowWidgetClick.html
17:35:16  <andythenorth> this is abusable...
17:35:21  <andythenorth> maybe in a good way
17:35:24  <petern> Probably not in mulitplayer.
17:35:30  <andythenorth> lol
17:35:34  <petern> Random clicks aren't sent to the server.
17:35:37  <andythenorth> nor if we update the UI in a version
17:35:44  <andythenorth> widget might change
17:37:08  <petern> Well, we did get "the menu has changed" as a bug report...
17:40:31  <glx[d]> most of window stuff in GS is intended to be used for tutorials
17:47:12  <petern> SLEG_CONDSTRUCTLIST("speclist", SlRoadStopTileData,                          SLV_NEWGRF_ROAD_STOPS, SL_MAX_VERSION),
17:47:19  <petern> Why is that named "speclist" ๐Ÿ˜ฎ
17:48:56  <glx[d]> copied from another feature probably
17:49:09  <petern> For sure.
17:50:36  <petern> Presumably it doesn't conflict with the other one. They're both in stations, but the other one is under another struct.
18:11:05  <andythenorth> wonder if story page IDs get shuffled when I remove one
18:11:16  <andythenorth> or what happens if there's a gap, and I add one
18:12:21  <andythenorth> guess I'll find out the amusing way ๐Ÿ˜„
18:12:55  <DorpsGek> [OpenTTD/OpenTTD] ldpl opened issue #10565: [Bug]: Train can't find the route to local depot https://github.com/OpenTTD/OpenTTD/issues/10565
18:15:00  <andythenorth> ok now I've written some sort of debugging tools and crap
18:15:15  <andythenorth> I can maybe try some actual gameplay in GS ๐Ÿ˜›
18:15:31  <andythenorth> what if I get bored and drop the idea in 10 mins? ๐Ÿ˜›
18:17:09  <andythenorth> would we like a crash? https://gist.githubusercontent.com/andythenorth/7dcd381a442933b70c01436339d5373c/raw/5f973a4c924a2b694cb951ddb2a03f506848f7c8/gistfile1.txt
18:17:34  <andythenorth> seems opening story book whilst adding / removing pages might not always work
18:17:39  <andythenorth> le surprise? ๐Ÿ™‚
18:34:18  <glx[d]> hey at least the call stack is easy to read ๐Ÿ™‚
18:35:09  <glx[d]> anyway you can report the issue
18:35:16  <glx[d]> GS should not crash openttd
18:38:19  <andythenorth> it is Story Book page widget causing it?
18:38:25  <andythenorth> I need to title the issue
18:45:58  <DorpsGek> [OpenTTD/OpenTTD] andythenorth opened issue #10566: [Bug]: GS story book crash - possibly due to page selection while GS adding/removing pages https://github.com/OpenTTD/OpenTTD/issues/10566
18:51:09  *** pickpacket has quit IRC
18:52:15  *** pickpacket has joined #openttd
18:54:54  *** gelignite has joined #openttd
19:11:08  <petern> Hmm, if I sync the S&H rate to MIDI clock, can I get a suitable rhythm going on this bizarre noise generator..
19:11:18  <petern> Maybe with a gate as well.
19:18:12  <andythenorth> can you connect OpenTTD train smoke generation to midi?
19:18:19  <andythenorth> chuffchuff
19:29:36  <andythenorth> to sum all cargo delivered to a town, I'd have to walk all companies?
19:29:36  <andythenorth> https://docs.openttd.org/gs-api/classGSCargoMonitor.html#acdb0bb567ec48ca1ecb24683ec777e11
19:30:08  *** Flygon has quit IRC
19:44:40  <TrueBrain> andythenorth: they have a name for this .. let me think .. owh yeah: SOUND EFFECTS
19:44:43  <TrueBrain> ๐Ÿ˜›
19:48:56  <andythenorth> hmm MIDI -> admin port -> GS -> train control petern
19:49:11  <andythenorth> Blue Monday, but in trains
19:49:23  <TrueBrain> see, order of words is important! ๐Ÿ˜›
19:49:54  <andythenorth> midi is just 0s and 1s?
19:49:56  * andythenorth looks
19:50:50  <petern> It is serial, yes.
19:50:54  <andythenorth> oh Midi Machine Control, I'd forgotten about that
19:52:38  <andythenorth> hmm seems midi -> model train control has been done
19:53:19  <TrueBrain> and mice -> train?
19:53:28  <andythenorth> I have a mouse in my house
19:53:41  <andythenorth> I caught it, but then it escaped
19:53:49  <TrueBrain> just one? I doubt that ๐Ÿ˜›
19:54:08  <andythenorth> well I only caught one
19:54:46  <andythenorth> I can't find a web based 808 emulator ๐Ÿ˜›
19:54:59  <andythenorth> not even sure if an 808 has midi out
20:15:02  <petern> The remake (TR-08) does.
20:15:21  <petern> But there is trigger outs on the 808
20:17:16  *** TonyPixel has joined #openttd
20:17:16  <TonyPixel> So, people of C++,
20:17:16  <TonyPixel> Is there a simple way to open a open file dialogue? Does WinAPI CommonItemDialog work?
20:18:02  <TonyPixel> This is not much on topic, but I have no purpose to turn it into a discussion either
20:19:14  <TrueBrain> not really C++ related, more Windows related ๐Ÿ˜› Which means there are only few of us here who might know ๐Ÿ˜„
20:19:55  <TonyPixel> I'm planning to transition Sprite Editor project from Unity to SDL
20:19:59  <TrueBrain> (and since when did we ever care if things in here are on-topic ๐Ÿ˜› :D)
20:20:29  <petern> Unity to SDL seems a step backwards?
20:21:06  <TonyPixel> Unity has an extremely bloated workspace
20:21:35  <TonyPixel> It outputs 32mb project for literally creating one mesh and 3 buttons of UI
20:21:55  <TonyPixel> I'm still not sure if I want to do that
20:23:16  <petern> Fair
20:23:23  <TonyPixel> Yet you know that every C# binding for Windows API is essentially a winapi function under the hood, so I wondered if anyone here had an experience on implementing that
20:23:45  <TonyPixel> I'm currently using WinForms implementation
20:24:08  <TonyPixel> Sure it works, yet I don't quite know how right it is to use WinForms in 2022
20:25:00  <michi_cc[d]> Not worse than using the Win32 API directly. I'd just stick with .NET, raw Win32 UI programming is annoying as heck.
20:25:32  <TonyPixel> Fair too
20:27:00  <TonyPixel> I think I'll stick to Unity until (if even) I encounter a challenge not quite possible to beat in its environment
20:27:48  <andythenorth> hmm can Godot output files?
20:29:21  <andythenorth> it might have a general purpose file writer
20:29:26  <andythenorth> https://docs.godotengine.org/en/stable/classes/class_fileaccess.html#class-fileaccess
20:30:13  <glx[d]> michi_cc[d]: yeah we define 2 Win32 windows in openttd, it's enough to dislike that ๐Ÿ™‚
20:30:36  <glx[d]> (well it's one window and a dialog, but still)
20:42:57  <andythenorth> lol, writing python with ; line endings
20:42:58  <andythenorth> silly me
20:51:13  *** bryjen has joined #openttd
20:55:03  *** nielsm has quit IRC
20:58:03  <andythenorth> ok I need to read the memo
20:58:14  <dP> is there some way to print std::function ?
20:58:16  <andythenorth> is GSList bad or not?
20:58:20  <dP> I just want to see if it changes
20:58:24  <andythenorth> and is Valuate() bad or not?
20:59:26  <glx[d]> valuate is good, but limited if you use custom valuator
21:00:04  <glx[d]> especially if custom valuator is complex
21:00:33  <andythenorth> I just want tables of {cargoID: cargo_label} and {cargo_label: cargoID}
21:00:42  <andythenorth> might just cache them at init
21:01:26  <glx[d]> cargoID: label is simple, cargo list then valuate with label
21:02:07  <TonyPixel> glx[d]: what's the dialog for?
21:02:11  <TonyPixel> Errors?
21:02:18  <glx[d]> crash
21:02:21  <TonyPixel> Yeah
21:02:40  <glx[d]> it's defined in .rc
21:04:38  <glx[d]> andythenorth: ```
21:04:38  <glx[d]> cargolist = GSCargoList();
21:04:38  <glx[d]> cargolist.Valuate(GSCargo.GetCargoLabel);
21:05:02  <andythenorth> thanks
21:05:58  <glx[d]> for the other list you'll need a GSList() and fill it from iteration of cargolist
21:06:43  <glx[d]> `foreach idx, value in cargo list { list.AddItem(value, idx); }` or something like that
21:10:30  *** gelignite has quit IRC
21:16:53  <dP> I freaking hate c++
21:17:19  <dP> how the quack does it manage to corrupt variable captured by copy when just passing lambda around
21:18:10  <dP> and it's impossible to debug this shit, can't print std::function and gdb shows junk
21:19:14  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1084586425611202580/image.png
21:19:14  <andythenorth> hmm
21:19:50  <andythenorth> cargo_list.Valuate(GSCargo.GetCargoLabel); should be fine
21:20:01  <andythenorth> returns a string though, is that valid?
21:20:07  <andythenorth> ach I just write a foreach loop TBH
21:20:10  <andythenorth> valuate is too magical
21:24:04  <FLHerne> TonyPixel: https://github.com/btzy/nativefiledialog-extendedsw
21:24:57  <FLHerne> er, https://github.com/btzy/nativefiledialog-extended seems like a nice lib to abstract that stuff, specifically mentions use with SDL
21:36:19  <glx[d]> my bad andythenorth, lists only works with integers
21:36:31  <andythenorth> it's ok, I need to limit to FIRS cargos anyway ๐Ÿ™‚
21:36:39  <andythenorth> so I can't trivially use GSCargoList
21:36:49  <glx[d]> so another option is to get the list, the iterate it and create your tables
21:37:01  <andythenorth> yeah I'm writing my own table generator for this
21:37:18  <andythenorth> other grfs add cargos sometimes, that will confuse the results ๐Ÿ™‚
21:38:51  <andythenorth> hmm how to check if an item is in an array, in squirrel 2
21:39:11  <andythenorth> if ("foo" in ["foo"]) seems to evaluate false
21:40:26  <andythenorth> ok back to old school array.find then
21:41:39  <andythenorth> lol no array.find in squirrel 2
21:42:33  <andythenorth> this is so stupid
21:42:35  <andythenorth> ๐Ÿ˜„
21:47:21  <glx[d]> yeah arrays are not very usable
21:49:51  *** keikoz has quit IRC
22:01:01  <andythenorth> wrote a silly loop instead ๐Ÿ™‚
22:05:53  *** lobstarooo__ has joined #openttd
22:07:15  *** lobstarooo has joined #openttd
22:09:17  <andythenorth> Squirrel 3 port? ๐Ÿ˜›
22:09:22  <andythenorth> I think that was ruled out
22:09:31  <andythenorth> compatibility maybe?
22:09:57  <glx[d]> yeah vargc and vargv are removed in squirrel 3
22:10:09  <glx[d]> and at least one script uses them
22:10:43  <andythenorth> do we have a version compatibility system?
22:12:00  <andythenorth> savegames though ๐Ÿ˜›
22:13:57  *** lobstarooo__ has quit IRC
22:14:06  *** lobstarooo is now known as lobstarooo__
22:15:41  <glx[d]> ah vargv still exists, but vargc not
22:17:48  *** lobstarooo has joined #openttd
22:19:37  <andythenorth> could we patch it back? ๐Ÿ˜›
22:20:53  *** lobstarooo_ has joined #openttd
22:24:37  *** lobstarooo__ has quit IRC
22:24:43  *** lobstarooo_ is now known as lobstarooo__
22:25:51  *** lobstarooo has quit IRC
22:34:09  *** bryjen has quit IRC
22:35:48  <dP> fantastic, apparently lambda can't assign the variable that was used to invoke it
22:35:55  <dP> is that a standard thing or gcc bug?
22:36:51  <dP> <https://godbolt.org/z/Mx15sfGYG>
22:39:55  <andythenorth> we have made the channel grumpy
22:40:19  <andythenorth> rename it 'complaining about languages' ? ๐Ÿ˜›
22:43:13  <Xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1084607561300463727/Unnamed_1938-12-25.png
22:43:13  <Xarick> I've been working on my AI, it's doing some trains
22:44:07  <Xarick> I have a big smile on my face, I was able to do it
22:44:27  <Xarick> still needs work, but at least it can have trains running
22:44:36  <glx[d]> double track ?
22:44:43  <Xarick> yes
22:46:07  <Xarick> it's still extremely slow
22:46:23  <Xarick> need high number of opcodes
22:48:54  <andythenorth> multi-threading AIs ๐Ÿ˜›
22:49:09  <andythenorth> give them as much thinking time as they want, on another thread / core
22:49:37  <andythenorth> but give them turn based play for actual DoCommand stuff
22:55:36  *** Wolf01 has quit IRC
23:13:18  <DorpsGek> [OpenTTD/OpenTTD] szczot3k opened issue #10567: [Bug]:  https://github.com/OpenTTD/OpenTTD/issues/10567
23:16:12  *** lobstarooo has joined #openttd
23:17:32  <DorpsGek> [OpenTTD/OpenTTD] szczot3k opened issue #10568: [Bug]: Dedicated server: Loading a scenario, or a save with NewGRF https://github.com/OpenTTD/OpenTTD/issues/10568
23:21:11  *** lobstarooo_ has joined #openttd
23:23:38  *** lobstarooo__ has quit IRC
23:25:06  *** lobstarooo has quit IRC
23:46:48  *** bryjen has joined #openttd

Powered by YARRSTE version: svn-trunk