IRC logs for #openttd on OFTC at 2023-01-19
            
00:01:02 <dP> finally managed to merge rc1 to cmclient...
00:04:46 <dP> now it's chunky too :p
00:04:59 <dP> laptop display is too small to test 2x though
00:18:03 <petern> Oh no
00:19:05 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065425128021839892/image.png
00:19:05 <petern> Such cheap
00:33:09 <TallTyler> I renamed that issue ๐Ÿ˜›
00:39:56 <reldred> โ€˜If you donโ€™t like it donโ€™t use itโ€™
00:40:02 <reldred> God he annoys me
00:40:24 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065430492301762600/image.png
00:40:24 <petern> Amn't convinced
00:41:50 <petern> (Excuse the bad fonts, that's because I only implemented 8bpp-simple, so there's no font antialiasing)
00:52:21 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #10376: Fix [Script]: Add missing precondition and ensure building/removing rail lines can't be backwards https://github.com/OpenTTD/OpenTTD/pull/10376#issuecomment-1396300974
00:56:22 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10376: Fix [Script]: Add missing precondition and ensure building/removing rail lines can't be backwards https://github.com/OpenTTD/OpenTTD/pull/10376#issuecomment-1396303380
01:15:31 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:25:26 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
01:25:49 *** WormnestAndroid has joined #openttd
01:56:08 *** Wormnest has joined #openttd
02:10:54 *** tokai has joined #openttd
02:10:54 *** ChanServ sets mode: +v tokai
02:17:51 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
02:48:50 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
03:12:23 *** debdog has joined #openttd
03:15:48 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:26:16 *** Wormnest has joined #openttd
03:45:05 *** andythenorth[d] has quit IRC (Remote host closed the connection)
03:45:05 *** Brickblock1 has quit IRC (Remote host closed the connection)
03:45:05 *** TheRisky_Bandit030 has quit IRC (Remote host closed the connection)
03:45:05 *** Heresy has quit IRC (Remote host closed the connection)
03:45:05 *** TallTyler has quit IRC (Remote host closed the connection)
03:45:05 *** EmperorJake has quit IRC (Remote host closed the connection)
03:45:05 *** JohnFranklin has quit IRC (Remote host closed the connection)
03:45:05 *** TrueBrain has quit IRC (Remote host closed the connection)
03:45:05 *** Gwyd has quit IRC (Remote host closed the connection)
03:45:05 *** dP has quit IRC (Remote host closed the connection)
03:45:05 *** luk3Z has quit IRC (Remote host closed the connection)
03:45:05 *** Thomas[d] has quit IRC (Remote host closed the connection)
03:45:05 *** Ellwill has quit IRC (Remote host closed the connection)
03:45:05 *** TonyPixel has quit IRC (Remote host closed the connection)
03:45:05 *** MnHebi has quit IRC (Remote host closed the connection)
03:45:05 *** petern has quit IRC (Remote host closed the connection)
03:45:05 *** Pruple has quit IRC (Remote host closed the connection)
03:45:05 *** glx[d] has quit IRC (Remote host closed the connection)
03:45:05 *** JGR has quit IRC (Remote host closed the connection)
03:45:05 *** DorpsGek_v has quit IRC (Remote host closed the connection)
03:45:05 *** frosch has quit IRC (Remote host closed the connection)
03:45:05 *** michi_cc[d] has quit IRC (Remote host closed the connection)
03:45:05 *** I-IUI-IBlakhole73I-I has quit IRC (Remote host closed the connection)
03:45:05 *** Olionkey has quit IRC (Remote host closed the connection)
03:45:05 *** scrubbles has quit IRC (Remote host closed the connection)
03:45:05 *** Kot has quit IRC (Remote host closed the connection)
03:45:05 *** reldred has quit IRC (Remote host closed the connection)
03:45:05 *** imlegos has quit IRC (Remote host closed the connection)
03:45:05 *** All_Heil_Lord_Pepe has quit IRC (Remote host closed the connection)
03:45:05 *** kamnet has quit IRC (Remote host closed the connection)
03:45:05 *** discord_user_f4a0790 has quit IRC (Remote host closed the connection)
03:45:05 *** MarcosBisbalMUFH|C1 has quit IRC (Remote host closed the connection)
03:45:05 *** Lemuria has quit IRC (Remote host closed the connection)
03:45:05 *** Xarick has quit IRC (Remote host closed the connection)
03:45:05 *** mlt has quit IRC (Remote host closed the connection)
03:45:05 *** Rico[d] has quit IRC (Remote host closed the connection)
03:45:05 *** Merni has quit IRC (Remote host closed the connection)
03:45:05 *** CplBurdenR3294 has quit IRC (Remote host closed the connection)
03:45:05 *** UnluckyDoge has quit IRC (Remote host closed the connection)
03:45:05 *** NotLuke has quit IRC (Remote host closed the connection)
03:45:05 *** Simo333 has quit IRC (Remote host closed the connection)
03:45:32 *** DorpsGek_v has joined #openttd
04:19:01 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
04:24:02 *** Wormnest has joined #openttd
04:25:21 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
04:25:21 *** keikoz has joined #openttd
04:25:22 *** Wormnest has quit IRC ()
04:26:10 *** WormnestAndroid has joined #openttd
05:43:48 *** HerzogDeXtEr has joined #openttd
06:40:23 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:53:54 *** nielsm has joined #openttd
06:55:21 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
07:07:23 *** nielsm has quit IRC (Ping timeout: 480 seconds)
07:12:17 *** Flygon has joined #openttd
07:39:57 *** sla_ro|master has joined #openttd
07:58:34 *** andythenorth has joined #openttd
07:58:34 <andythenorth> moin
08:24:16 <andythenorth> petern: svg **all** the pixels
08:24:27 <andythenorth> get dalle to do it
08:26:13 *** GLaDOS has joined #openttd
08:26:13 <GLaDOS> Hi Iโ€™m working on a patch to replace sdl and sdl2 with a x11 implementation if i was to submit it would it be accepted?
08:35:11 *** reldred has joined #openttd
08:35:11 <reldred> The SDL implementation I believe is also used for the Android port (maintained by Pelya who I believe also maintains the Android SDL port)
08:36:39 <reldred> Pelya last I heard was busy dealing with some unwanted Russian speaking visitors in his garden.
08:39:19 <andythenorth> bah GS is so frigging slow
08:43:56 <andythenorth> ok so testing GS is really quick when it's isolated functions at game start
08:44:11 <andythenorth> but now every time I init the script, there's 5s of walking all the map tiles
08:44:18 <LordAro> GLaDOS: why would we want a native X11 driver instead of SDL ? (genuinely asking)
08:44:25 <andythenorth> then it inevitably crashes due to my syntax error
08:44:32 <andythenorth> suddenly this is less fun
08:44:49 <LordAro> SDL does all sorts of other platform abstractions for us, why should be lose those?
08:45:16 <GLaDOS> LordAro: Itโ€™s an extra dependency that is not used on windows and mac
08:45:23 <GLaDOS> We go native
08:45:33 <GLaDOS> So why not linux
08:45:42 <LordAro> ("replacing SDL" will never be accepted, "in addition to" *might* have slightly more luck)
08:46:07 <LordAro> but X11 is on its way out, no? (kinda, ish, eventually)
08:46:21 <LordAro> we already have bug reports that are specifix to wayland
08:47:35 <LordAro> i don't view an SDL dependency as a particular issue
08:47:41 <GLaDOS> i can implant way land but it dose not support open lower than egl3.0 in the protocal from what i read and the game looks to be using pre 3.0 gl
08:48:06 <LordAro> practically speaking it's just as "native" as the windows/macos libraries
08:48:33 <GLaDOS> Win32 and cocoa
08:48:34 <LordAro> (just as much as X11 is, anyway)
08:49:38 <LordAro> to summarise, i don't understand what problem you are trying to solve, and how an X11 driver would be a solution to that problem
08:50:28 <GLaDOS> It sets it up for me to write a vulkan backend later on
08:51:40 <reldred> Neat
08:51:57 <andythenorth> hmm I see no obvious way for GS to get the count of industries in a town
08:52:04 <LordAro> that would be neat... but why does that mean removing SDL?
08:52:11 <andythenorth> well other than writing it myself with primitives ๐Ÿ™‚
08:52:29 <GLaDOS> Sdl can be a pain to link vulkan to
08:52:45 <GLaDOS> Due to it not being designed for vulkan first
08:52:57 <LordAro> it's a pain to link to opengl as well :p
08:53:26 <GLaDOS> vulkan can be worse ๐Ÿค’
08:54:06 <LordAro> looks reasonable enough from a brief google
08:54:55 <GLaDOS> Might have changed from last i used the sdl but it was a nightmare when I tried last
08:55:33 <GLaDOS> Guess i can create a branch and check it out
08:55:39 <LordAro> a vulkan backend would absolutely be desirable, but i don't see SDL2 going anywhere
08:56:02 <andythenorth> FML can't get the town of an industry either
08:56:07 <andythenorth> have to get the tileindex
08:56:16 <andythenorth> none of this is awful, just fucking tedious
08:56:20 <GLaDOS> andythenorth: What are you talking about?
08:56:25 <andythenorth> GS
08:56:32 <GLaDOS> Gs?
08:56:52 <reldred> game script
08:57:21 <GLaDOS> ok tbh I thought that game used lua
08:58:33 <LordAro> i think you need to actually investigate what the state of play is, before deciding what to do
08:59:10 <andythenorth> wtf is the keyword for boolean true in squirrel?
08:59:22 <andythenorth> I am in both versions of the squirrel docs and can't find it
08:59:26 <LordAro> is it not "true" ?
08:59:50 <andythenorth> yes!
08:59:51 <andythenorth> thanks
09:00:06 <andythenorth> the actual question was really 'where are the reliable searchable squirrel docs'
09:00:23 <andythenorth> the 3.2 ones are the nicest http://squirrel-lang.org/squirreldoc/reference/language/statements.html
09:00:30 <andythenorth> but I think we're not on 3.2?
09:00:44 <LordAro> 2.0ish
09:01:05 <LordAro> (ish because it's been modified a certain amount)
09:01:40 <andythenorth> googling common terms, like 'squirrel table' just gets me mammals with fluffy tables ๐Ÿ™‚
09:01:48 <andythenorth> * tails
09:02:02 <GLaDOS> LordAro: I have been at the code for abit but have not really touched or lood at the scripting engine
09:02:47 <andythenorth> well we do welcome contributors ๐Ÿ™‚
09:03:00 <LordAro> :)
09:03:02 <andythenorth> it's just quite often that 'can we change all of X?' is a question
09:03:08 <andythenorth> and there's a lot of history and reasons
09:03:28 <LordAro> (the scripting engine hasn't really changed since... 2007?)
09:03:31 *** WormnestAndroid has quit IRC (Remote host closed the connection)
09:03:36 <LordAro> maybe 2009
09:06:13 <andythenorth> "probably fine"
09:06:24 <andythenorth> although in the long run, being on a patched dead squirrel
09:06:26 <andythenorth> isn't ideal
09:06:36 <andythenorth> we have fixed bigger problems before
09:10:41 <GLaDOS> Tbh the code feels a little weird to me as iโ€™m used you more descriptive layouts with more fileโ€™s partitioning the code more
09:13:12 <LordAro> andythenorth: i'm pretty sure we're the only remaining users of squirrel2
09:13:22 <LordAro> but we can never move to squirrel3, there are too many incompatibilities
09:13:40 <LordAro> iirc AdmiralAI uses a feature that was removed in 3
09:13:58 <andythenorth> so break it ๐Ÿ˜›
09:14:12 <GLaDOS> LordAro: And what feature is that?
09:14:13 <andythenorth> if someone found an exploitable CVE in squirrel 2 we'd have no choice anyway
09:14:26 <andythenorth> mods must die over time
09:14:39 <andythenorth> oh but we have the savegame forever promise
09:14:44 <andythenorth> yeah, that was naive
09:14:46 <LordAro> andythenorth: we've fixed plenty of other bugs over time
09:15:09 <andythenorth> how do I pick a random item from a GSList ๐Ÿ™‚
09:15:14 <andythenorth> feel like I did this before more than once
09:15:24 <andythenorth> GSBase.RandItem doesn't do it
09:15:54 <andythenorth> GSList doesn't have a method for it
09:15:55 <LordAro> GLaDOS: i can't remember exactly, i think it was something to do with slots
09:16:12 <LordAro> glx will probably remember
09:17:53 <andythenorth> ok I have to learn valuators
09:18:00 <andythenorth> it's a concept I've not seen anywhere else
09:18:13 <andythenorth> this is apparently how to get a random item
09:18:15 <andythenorth> ` // Randomize the station location
09:18:15 <andythenorth> tile_list.Valuate(GSBase.RandItem);
09:18:15 <andythenorth> `
09:18:49 <andythenorth> this is how to filter a list to remove water tiles
09:18:49 <andythenorth> ` tile_list.Valuate(GSTile.IsWaterTile);
09:18:49 <andythenorth> tile_list.KeepValue(0);
09:18:49 <andythenorth> `
09:19:08 <andythenorth> ^ that's really elegant, but also complete WTF compared to any other language I've used
09:22:59 <andythenorth> so can I valuate this somehow?
09:22:59 <andythenorth> ` foreach (industry, _ in industry_list) {
09:22:59 <andythenorth> if (GSIndustry.GetIndustryType(industry) == scrap_yard_id) {
09:22:59 <andythenorth> local industry_town = GSTile.GetClosestTown(GSIndustry.GetLocation(industry));
09:22:59 <andythenorth> towns_with_scrap_yards[industry_town] <- true;
09:23:00 <andythenorth> }
09:23:00 <andythenorth> }
09:23:02 <andythenorth> `
09:23:07 <andythenorth> seems like it would be shorter with a valuator
09:24:07 *** petern has joined #openttd
09:24:07 <petern> Is Valuate a squirel thing or a GS API thing?
09:24:35 <LordAro> script API, i believe?
09:24:36 <LordAro> maybe?
09:24:57 <LordAro> i don't know, i've not written squirrel in 10 years, and valuators were too advanced for me at the time
09:25:19 *** dP has joined #openttd
09:25:19 <dP> andythenorth: isn't that just a typical functional thing like map and filter in python?
09:25:46 <andythenorth> it is but I understand those ๐Ÿ˜›
09:26:13 <andythenorth> list comprehension is super obvious
09:26:29 <andythenorth> valuate is an abstracted function that has to be understood
09:26:40 <andythenorth> seems neat but eh
09:27:23 <andythenorth> I can't find the squirrel docs for it
09:27:39 <andythenorth> must be ours
09:27:45 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065563206564708373/image.png
09:27:45 <petern> Nice
09:27:52 <andythenorth> Mode 2
09:28:11 <petern> Yes, it's MODE 2 except it's meant to be MODE 13.
09:28:21 <andythenorth> quite christmasy
09:28:31 <petern> (Blitters inherit from other blitters, even though their backbuffers are incompatible.
09:29:48 <andythenorth> ok some valuator docs https://wiki.openttd.org/en/Development/Script/Lists
09:29:52 <andythenorth> I don't get lists
09:30:15 <andythenorth> they're like arrays?
09:30:33 <andythenorth> [(a, b), (c, d)]?
09:34:44 <dP> "They allow fast and easy manipulation of all kinds of data"
09:35:18 <dP> fast huh
09:35:37 <dP> looking at the code they seem disgustingly ineffecient :p
09:35:38 <andythenorth> so assuming it's pairs, when they're valuated, what happens?
09:36:08 <dP> ffs, it has a map by value but KeepValue still iterates all items and removes them individually
09:39:52 <andythenorth> why does the foreach pattern always have e.g. foreach (industry, _ in industry_list)
09:40:08 <andythenorth> the _ is just unpacking the second value, but it's usually empty?
09:40:12 <petern> _ usually means discard.
09:41:19 <petern> andythenorth: Yeah, that would look a lot better.
09:50:12 <andythenorth> hmm
09:50:17 <andythenorth> we can't write squirrel in the game?
09:50:28 <andythenorth> it would be nice having an interactive prompt, like python ๐Ÿ˜›
09:50:56 <andythenorth> seems like the best way to figure out GS is to actually just write loops, and log what methods are doing
09:52:17 *** Samu has joined #openttd
10:18:28 <petern> PR?
10:19:02 <petern> Hmm, there's some rounding errors here.
10:19:21 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #10376: Fix [Script]: Add missing precondition and ensure building/removing rail lines can't be backwards https://github.com/OpenTTD/OpenTTD/pull/10376#issuecomment-1396739774
10:30:38 <petern> When you deduplicate code, but it requires a function with 7 parameters...
10:32:09 <andythenorth> are there are also 7 if statements?
10:32:14 <andythenorth> but now it's all in one function?
10:33:49 <petern> Yes but only coincidentally. The function is 50 lines, so it's worth it.
10:34:18 <andythenorth> ๐Ÿ™‚
10:34:26 <andythenorth> hmm back to random item from list
10:34:35 <andythenorth> probably superlib does it ๐Ÿ˜›
10:39:48 <andythenorth> crashed the game again ๐Ÿ™‚
10:39:49 <andythenorth> lol
10:46:19 <andythenorth> ok GS now puts a scrap yard in every town with population above > n
10:46:22 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1065582988936617984/image.png
10:46:37 <andythenorth> the need to walk all the tiles at game start is....funky
10:46:50 <andythenorth> areas might be nice to prepopulate
10:46:57 <andythenorth> -> all tiles for each town
10:47:00 <andythenorth> -> all snow tiles
10:47:04 <andythenorth> -> all coast tiles
10:47:04 <andythenorth> etc
10:47:35 <andythenorth> there's probably some cool structure we could use, like voroni something ๐Ÿ˜›
10:48:10 <andythenorth> then the other areas can be arbitrarily extensible
10:48:11 <andythenorth> by GS
10:48:24 <dP> andythenorth: map array :P
10:48:37 <dP> voronoi is only for closest points like towns
10:48:50 <andythenorth> I defer to those with greater knowledge ๐Ÿ˜›
10:48:56 <andythenorth> I'm just here writing clown GS
10:49:23 <andythenorth> in some cases 'all' might not be needed
10:49:33 <andythenorth> 'most' would be enough
10:49:57 <andythenorth> uuuuf
10:50:09 <andythenorth> if e.g. all the water areas were individual areas
10:50:19 <andythenorth> I could solve FIRS ports stupidity just by measuring the length of the list
10:50:40 <andythenorth> I don't actually care if they connect to edge of map, they just look stupid in small lakes
10:51:46 <dP> andythenorth: so you want map_size*4 byte structure just to measure length? ๐Ÿ˜œ
10:51:59 <andythenorth> 'could' not 'want'
10:53:13 <andythenorth> but different case: if you wanted to plant industries on water, then a list of water regions has utility
10:53:31 <andythenorth> if you wanted to limit e.g. fishing grounds to one per region, then same
10:53:39 <andythenorth> area / region /s
10:56:41 <andythenorth> hmm
10:56:49 <andythenorth> `Communication during game-initialisation. NewGRFs are loaded first. They cannot query GS information at this point. GS can then also not influence placement of initial industries etc.` from frosch spec
10:57:11 <andythenorth> but when loading the grf, we know what GS settings are in OpenTTD?
10:57:21 <andythenorth> i.e. we know if a GS is selected or not, and which one?
10:57:47 <andythenorth> and we know what GS is in a savegame / scenario file?
10:58:21 <andythenorth> currently my GS needs to clean up where FIRS grf has tried to place industries accurately during map gen, but can't always do it
10:58:26 <Samu> there is a long standing bug about GS's in scenario editor
10:58:50 <andythenorth> I can't default to FIRS not placing any industries, because the GS needs to be optional
10:59:50 <Samu> and the recent fixes to allow changing GS's in scenario editor makes it worse
11:01:06 <andythenorth> see also https://gist.github.com/TrueBrain/976cab3b6c88f208636653191ba5c420
11:01:45 <Samu> the scenario file, when loaded, will lack information whether the GS has already started or not, it just assumes it did, but that's not always the case for scenario files
11:02:06 <Samu> it is for savegames though
11:04:57 <andythenorth> eh, Truebrain vision https://gist.github.com/TrueBrain/51d914880f1090ea574aa40db748c1a7
11:07:12 *** andythenorth is now known as Guest1828
11:07:13 *** Guest1828 is now known as andythenorth[d]
11:28:25 <FLHerne> Squirrel is pretty tiny, can we upgrade to 3.2 for new scripts while keeping the old version as a fallback?
11:29:02 <petern> Such URL previews
11:30:35 <petern> Samu: TBH for scenarios we should start the GS fresh.
11:31:23 <petern> *For playing scenarios.
11:31:37 <petern> For editing scenarios, the GS probably shouldn't be loaded.
11:33:20 <Samu> what when you rename a .sav to .scn and load it in the scenario editor? the GS was already started before
11:45:17 <andythenorth[d]> petern: I should delete them eh ๐Ÿ˜
11:46:01 <petern> Samu: It be started again, as you have converted a savegame to a scenario.
12:04:54 <andythenorth[d]> squirrel tables eh?
12:05:11 <andythenorth[d]> so if I walk everything on the map at game start
12:05:20 <andythenorth[d]> I can put it all into squirrel
12:05:22 <andythenorth[d]> ๐Ÿ˜›
12:05:30 <andythenorth[d]> towns, industries, tiles
12:05:34 <andythenorth[d]> 'what could go wrong?'
12:05:46 <andythenorth[d]> do we memory limit script API?
12:10:45 *** glx has joined #openttd
12:10:45 <glx> We do
12:11:25 *** glx is now known as Guest1831
12:11:26 *** Guest1831 is now known as glx[d]
12:11:38 <glx[d]> LordAro: I can't remember, it was a long time ago
12:14:13 <petern> Mortgage gone from 2.1% to 5% over the past year, joy.
12:14:53 <glx[d]> https://github.com/OpenTTD/OpenTTD/pull/7708#issuecomment-526169121
12:18:44 <andythenorth[d]> oo
12:18:59 <andythenorth[d]> at some point carrying around our own dead Squirrel is a bit weird
12:19:13 <andythenorth[d]> stuff and things ๐Ÿ™‚
12:20:38 <petern> It's impossible to update old scripts, don't you know?
12:22:00 <petern> I fixed an issue with my updated js and it now has exactly the same problem as the original. So that rewrite was totally worth it.
12:25:22 <petern> Is it breakfast time yet?
12:27:17 <andythenorth[d]> petern: someone on the forums might complain
12:27:33 <petern> No change there.
12:27:49 <andythenorth[d]> petern: that is perfectly executed refactoring, do all your tests fail exactly the same?
12:28:17 <andythenorth[d]> goes it OpenTTD PeterPP?
12:28:53 <Eddi|zuHause> as long as PeterN doesn't go PeterT :p
12:29:30 *** WormnestAndroid has joined #openttd
12:29:35 <andythenorth[d]> PP38
12:29:51 <glx[d]> We can redefine functions in compat scripts, but in this case it's a variable like language keyword
12:30:12 <andythenorth[d]> can we break things and see what happens? ๐Ÿ˜›
12:30:22 <andythenorth[d]> it's not like OpenTTD runs nuclear power stations
12:30:29 <andythenorth[d]> OTOH, I don't actually enjoy the drama at all
12:30:49 <andythenorth[d]> the people on one side of the drama are often the least equipped socially for it
12:31:37 <Eddi|zuHause> andythenorth[d]: breaking things if you previously promised to not break things generally is bad style
12:31:59 <andythenorth[d]> well the first thing to break is the promise not to break things ๐Ÿ˜›
12:32:07 <glx[d]> https://github.com/albertodemichelis/squirrel/blob/master/HISTORY#L209-210
12:32:32 <andythenorth[d]> someone pointed out recently I think
12:32:39 <Eddi|zuHause> andythenorth[d]: the problem with breaking things isn't the people who complain, but the people who aren't around anymore to update their stuff
12:32:40 <andythenorth[d]> the promise is that savegames will load
12:32:55 <andythenorth[d]> not that behaviour will be guaranteed
12:33:28 <glx[d]> Maybe it's possible to reintroduce vargc but as vargv usage is very different it's complicated
12:33:37 <petern> We should've updated to v3 10 years ago.
12:33:47 <Eddi|zuHause> that is true, we had that discussion with an acceleration change which "broke peoples networks"
12:33:59 <andythenorth[d]> disabling GS or AI
12:34:03 <andythenorth[d]> is not breaking the promise
12:34:19 <andythenorth[d]> in principle a game could be manually migrated to new version of script
12:34:44 <Eddi|zuHause> andythenorth[d]: that's like saying "making the map flat isn't breaking the promise"
12:35:03 <glx[d]> We have compatibility mechanism via API version to not break stuff
12:35:15 <andythenorth[d]> where is the promise, and which armchair layer wrote it? ๐Ÿ˜„
12:36:11 <Eddi|zuHause> andythenorth[d]: imagine we say "we don't load v6 grfs anymore"
12:36:34 <glx[d]> Because throwing away perfectly fine but not maintained scripts is wrong
12:37:13 <andythenorth[d]> Eddi|zuHause: imagine if we could go through the grf spec after that and delete some of it
12:37:43 <andythenorth[d]> scorched earth <-> sensible conservatism
12:37:55 <Eddi|zuHause> andythenorth[d]: you can perfectly well do that without dropping v6
12:38:09 <andythenorth[d]> TBH things like this are better as a triangle, not a single linear scale
12:38:32 <andythenorth[d]> dunno what the 3rd vertex would be
12:38:38 <andythenorth[d]> probably not 'progress'
12:39:12 <petern> Implement sq3 and keep sq2. That's work well ๐Ÿ˜‰
12:39:23 <andythenorth[d]> glx[d]: how many are there I wonder?
12:39:26 <Eddi|zuHause> be careful, you could end up in a 26 dimensional optimisation space very quickly
12:39:39 <andythenorth[d]> sometimes a survey shows the problem is very not real, or really very real
12:40:50 <andythenorth[d]> if only bananas had column count and date sort ๐Ÿ˜›
12:41:21 <dP> add WASM and make no promises :P
12:42:23 <andythenorth[d]> https://docs.google.com/spreadsheets/d/1l37yTJ-rI82ddY8p01WDxdb8RdXjakG6kOyLra93Lpc/edit?usp=sharing
12:42:50 <andythenorth[d]> could expand that with AIs, then plot update / release dates
12:43:29 <andythenorth[d]> I don't know how to google sheets properly ๐Ÿ˜„
12:43:30 <andythenorth[d]> oof
12:43:48 <andythenorth[d]> ok lunch
12:45:06 <petern> Tuna salad pot.
12:45:27 <Eddi|zuHause> andythenorth[d]: i don't think that list helps us in any way
12:45:49 <dP> tbf, making a new thing with no compatibility while keeping legacy newgrf and gs spec is the most reasonable way going forward imo
12:46:05 <petern> Easier to make a new game.
12:46:21 <dP> yeah, I already considered that
12:46:37 <dP> but life interfered :p
12:52:21 <Eddi|zuHause> people make new games all the time, yet people are also still here
12:53:54 <dP> they make wrong games :p
12:53:59 <Eddi|zuHause> loading extremely old stuff is the unique selling point of this game
12:55:01 <dP> not as much when your whole game is old stuff :p
13:11:43 <andythenorth[d]> Eddi|zuHause: you don't read reddit enough ๐Ÿ™‚
13:11:53 <andythenorth[d]> that is not a USP reddit is aware of
13:14:06 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10376: Fix [Script]: Add missing precondition and ensure building/removing rail lines can't be backwards https://github.com/OpenTTD/OpenTTD/pull/10376#issuecomment-1396958747
13:33:16 <petern> Want to play that old game with an old gamescript? Just play OpenTTD before version 13...
13:34:01 <petern> There. Guaranteed compatibility.
13:34:53 <dP> yep, menu is just a launcher, you open the save it picks the right version ;)
13:36:09 <dP> also, rust clone wen? even Vangers have one nowadays ๐Ÿ˜…
13:36:29 <petern> Can you mix C++ and rust?
13:37:16 <dP> I guess kinda...
13:37:20 <dP> same as mixing with c
13:38:07 <dP> well, if you consider c a separate language and now just write c in c++
13:41:03 <petern> It seems to be more "I mean you could, but" territory...
13:42:43 <dP> yeah, but `extern "C"` basically
13:43:37 <dP> makes sense as Rust is no oop
13:48:38 <petern> Okay so I can write `extern "C"` and then start writing code in rust, gotcha.
14:02:48 <LordAro> https://cxx.rs/
14:02:52 <LordAro> apparently.
14:05:19 <petern> Yeah, rust OOP is totally different, so that'll be fun ๐Ÿ™‚
14:15:08 <andythenorth[d]> was that WASM-everything?
14:15:24 <andythenorth[d]> we port to Rust, but inside a WASM container?
14:19:32 <dP> in container it's not exactly port, it's just that you can write mods in rust
14:19:36 <dP> like squirrel and grf
14:19:52 <andythenorth[d]> well
14:19:56 * andythenorth[d] back to FIRS GS
14:20:12 <andythenorth[d]> maybe I should move more of the logic into python compile
14:20:25 <andythenorth[d]> I don't like squirrel much, I keep falling over my own feet in it
14:21:01 <andythenorth[d]> then when you do the Rust version, I can just make new templates for FIRS GS
14:21:07 <andythenorth[d]> ๐Ÿ˜›
14:29:23 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065639114558427156/image.png
14:29:23 <petern> How much is this non-power-of-2 nearest-neighbour scaling hated?
14:33:58 <petern> I hate it less than I thought I would, but...
14:37:06 *** TallTyler has joined #openttd
14:37:06 <TallTyler> It looks fine until you look closely and notice that lines which are supposed to match (bar graph width) don't
14:39:12 *** gelignite has joined #openttd
14:45:37 <petern> That might be an obiwan, the right-most column/bottom-most row is missing currently.
14:46:11 <petern> But might not be ๐Ÿ™‚
14:47:57 <Samu> glx[d], https://gist.github.com/SamuXarick/e566722c7fa73555c8cd84edeaca5c75
14:48:04 <Samu> attempting compat conversion
14:48:19 <Samu> not sure if it can be simplified further
14:49:03 <LordAro> at the very least, you are allowed to use variables...
14:49:06 <Samu> also, it won't work 100%, because 'from' can become an edge tile, and when passing it to BuildRail, it will fail on IsValidTile
14:49:31 <Samu> so... not sure what to do at this point
14:49:53 <LordAro> petern: looks fine to me
14:49:58 *** nielsm has joined #openttd
14:50:04 <Samu> by edge tile, i actually meant void tile, my bad
14:50:05 <LordAro> but also... does the book look upsidedown to anyone else?
14:50:14 <Samu> let me fix that typo
14:50:59 <petern> `/* 14 ensures rail can't be built backwards */` What is backwards?
14:51:42 <LordAro> honestly, this feels like a bug fix to me
14:51:47 <LordAro> which doesn't need compatibility at all
14:51:59 <LordAro> if you were doing it before, it was wrong and was not doing what it was supposed to
14:53:07 <petern> What is backwards though?
14:53:17 <glx[d]> It made no sense to not have tile between from and to
14:54:08 <glx[d]> In map pov, not tileindex view
15:00:56 <glx[d]> And the screenshot shows it builds rail [tile,to) as the doc says
15:03:29 *** _aD has joined #openttd
15:03:43 <andythenorth[d]> petern: on a scale of 0-10 where 10 is most hated? 0
15:03:57 <glx[d]> Some constraints are not fully enforced but it seems to work as intended
15:04:26 <andythenorth[d]> why does the map start at 1,1 not 0,0?
15:04:37 <glx[d]> Void tiles
15:04:50 <andythenorth[d]> fair enough
15:05:11 <glx[d]> Easiest way to detect the border
15:05:13 <andythenorth[d]> I hate writing docs, but I forsee a 30% chance I volunteer to write GS docs
15:05:14 <LordAro> hysterical raisins
15:05:20 <andythenorth[d]> or expand the AI script guide
15:05:24 <andythenorth[d]> I hate writing docs
15:05:52 <andythenorth[d]> the fucking frustrating thing is that doxygen is pretty comprehensive ๐Ÿ˜„
15:06:01 <andythenorth[d]> but does not give you what you actually need
15:06:26 <andythenorth[d]> I think doxygen can have extra comments, occasionally there's an inline example
15:07:08 <andythenorth[d]> I still have NML docs with my name on them though ๐Ÿ˜
15:07:23 <glx[d]> Usually when looking for a function in script API the flow is to suppose what would be the logical class for it
15:08:04 <glx[d]> Then you look in the doc to see if something with a name matching what it would do exists
15:17:58 <Rubidium> andythenorth[d]: if you set freeform_edges to false, then you will have 0,0 ;)
15:18:34 <Rubidium> the whole map border will also implicitly become water
15:22:21 <Samu> hmm, 'from' and 'to' don't actually require IsValidTile check
15:22:29 <Samu> only 'tile'
15:22:33 <andythenorth[d]> sounds like a GS needs to know if freeform edges are set? ๐Ÿ˜›
15:22:37 <andythenorth[d]> oof
15:22:56 <petern> GS just needs to know if a TileIndex is valid.
15:23:03 <Eddi|zuHause> why would they need to know?
15:23:31 <andythenorth[d]> put it another way
15:24:10 <Eddi|zuHause> if any map border is freeform, the map is 1 tile smaller
15:24:11 <andythenorth[d]> when adding all valid tiles on the map to a TileList using AddRectangle, it's important to know whether to start at 0,0 or 1,1 for first vertex
15:24:21 <andythenorth[d]> which requires a test of 0,0
15:24:26 <Rubidium> andythenorth[d]: you can't really build anything useful on the 0 "row"/"column" in either case, so just ignore that "row"/"column" in your GS
15:24:44 <andythenorth[d]> oh are the water tiles non-buildable?
15:25:24 <andythenorth[d]> what I'm doing in the GS I shouldn't be doing anyway
15:25:28 <Rubidium> well, technically you can probably build on it but why add complications to your script to support it?
15:25:39 <andythenorth[d]> the GS is a lolz script to see what breaks
15:25:52 <andythenorth[d]> and learn what docs we might need, if I could face writing any
15:26:12 <andythenorth[d]> copying all the tiles in the map into a GSTileList is unwise
15:26:23 <andythenorth[d]> then I walk over all of them and put them in a table/slots structure
15:26:31 <petern> Have you PR'd areas/regions?
15:26:34 <andythenorth[d]> I have not
15:26:47 <andythenorth[d]> I think it's more likely that I'll write docs ๐Ÿ˜›
15:26:53 <andythenorth[d]> more chance of success
15:27:00 <andythenorth[d]> /me stats
15:27:34 <andythenorth[d]> ok Rubidium is still the winner https://github.com/OpenTTD/OpenTTD/graphs/contributors
15:28:00 <andythenorth[d]> I apparently have 29 commits, which is 23 more than I remember
15:28:47 <petern> I don't know if it knows about all commits from the SVN days.
15:28:53 <andythenorth[d]> 10% of my commits are GS
15:29:15 <petern> Hmm, starts early, so I guess it does.
15:29:32 <andythenorth[d]> yeah mostly I did docs commits
15:30:00 <andythenorth[d]> petern: you probably have a branch for areas/regions?
15:30:02 <andythenorth[d]> from last time?
15:30:18 <Eddi|zuHause> the svn accounts were matched to github accounts wherever that was known
15:30:46 <LordAro> assuming people have linked username@openttd.org to their GH account
15:30:57 <LordAro> if they're not linked, they don't show up at all
15:31:13 <Eddi|zuHause> no, there was a bit more effort put into that
15:31:58 <Eddi|zuHause> what was not matched was svn patch authors vs. committers...
15:32:55 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
15:33:07 *** Smedles has joined #openttd
15:33:58 <Eddi|zuHause> at least i removed more lines than i added... that must mean the code is better :p
15:34:38 <Samu> I got an idea!
15:35:03 <Samu> but involves changing the rules a bit
15:35:38 <Samu> if my prediction is correct, then conversion can be done afterwards!
15:38:55 <Samu> AIMap.DistanceManhattan complicates things a bit, it's not exactly equal to OpenTTD's own DistanceManhattan
15:40:25 <glx[d]> For me your are trying to fix a non-issue, yes some preconditions might be missing, but BuildRail seems to build what it's supposed to build
15:44:59 <andythenorth[d]> Samu is trying to fix everything, and I'm trying to break everything ๐Ÿ™‚
15:45:02 <andythenorth[d]> good combo
15:45:58 *** imlegos has joined #openttd
15:45:58 <imlegos> https://tenor.com/view/thanos-perfectlybalanced-gif-18301221
15:51:33 <Samu> there should be a AITile.IsVoidTile
15:52:00 <Samu> but I understand why there's not
15:53:29 <andythenorth[d]> it's testable no?
15:53:46 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #10227: Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI https://github.com/OpenTTD/OpenTTD/pull/10227#pullrequestreview-1262082014
15:54:15 <andythenorth[d]> IsValidTile?
15:55:25 <Rubidium> Samu: void tiles are an implementation detail about the map border, they serve no purpose to the end user (script, AI, player)
15:56:02 <Samu> IsValidTile returns false, but i can't assume just because it returned false, it was a void tile
15:56:31 <Rubidium> why do you want to know if it's a void tile?
15:56:42 <petern> GS don't need to know about void tiles, they are simply invalid tiles.
15:57:55 <Samu> well, if the tile is inside mapsize, and is not valid, i can assume it's a void tile, right?
15:58:16 <petern> You can assume an invalid tile is invalid.
15:59:22 <Samu> mapsize is something like 256*256 = 65536. so if tileindex is above 65535, then it can no longer be a voil tile, but if it's <= 65535 and is invalid tile, then it's a void tile
15:59:25 <Samu> is my logic correct?
15:59:49 <petern> Write-only mode again.
15:59:54 <andythenorth[d]> there are no useful cases for needing to specifically know a tile is void ๐Ÿ™‚
16:00:08 <andythenorth[d]> if it's void you can't do anything with it ๐Ÿ™‚
16:00:22 <andythenorth[d]> if the number of void tiles at map edge was variable, THEN we might need to check them
16:00:28 <LordAro> a human doesn't need to know if it's a void tile, why should an AI?
16:00:29 <andythenorth[d]> but ... it isn't really
16:01:12 <petern> I'll make a circle map with void tiles
16:01:15 <andythenorth[d]> oh is this some difference of approach. Duck-type, but defensively, vs. 'everything must be exactly specified'
16:01:37 <andythenorth[d]> petern: make pacman face
16:01:45 <petern> Repton face.
16:01:51 <andythenorth[d]> chuckie egg map
16:02:02 <Rubidium> Samu: I wouldn't even say that in case of map size 256x256 a tileindex above 65535 needs to be invalid. I can really imagine higher tiles being misused for stuff like corners/junctions/stations in tunnels and bridges
16:02:04 <andythenorth[d]> isn't there a hole in the middle of the Catan board?
16:02:09 <andythenorth[d]> oh donut maps might be a thing
16:02:13 <LordAro> troll face map
16:02:14 <andythenorth[d]> this a great idea
16:02:17 <andythenorth[d]> ok, more void tiles
16:02:26 <andythenorth[d]> donut maps mean you have to go round, not across
16:02:29 <LordAro> wasn't head2head implemented using void tiles?
16:02:34 <petern> Rubidium: PR please ๐Ÿ™‚
16:03:27 <petern> Sliced tileindexes?
16:05:21 <Rubidium> I Publicly Renounce the idea of corners/junctions/stations in tunnels and bridges ;)
16:05:51 <andythenorth[d]> oh...can we tunnel through the void though?
16:05:54 <andythenorth[d]> in the donut map?
16:05:59 <andythenorth[d]> donut? doughnut?
16:06:34 <petern> Mรถbius maps?
16:06:46 <Rubidium> would essentially be an infinite map
16:07:03 <LordAro> i feel like i've seen that suggestion before
16:07:24 <LordAro> if you could visually wrap a 4k map, would anyone ever know?
16:08:49 <petern> They might as well be.
16:08:59 <andythenorth[d]> Mรถbius maps, but you can fly your biplane around them
16:09:19 <andythenorth[d]> we've been way too conservative with OpenTTD ๐Ÿ˜›
16:09:28 <andythenorth[d]> we should add many more things
16:09:31 <andythenorth[d]> just not an email client
16:10:05 <andythenorth[d]> https://en.wikipedia.org/wiki/Jamie_Zawinski#:~:text=Zawinski's%20Law%20of%20Software%20Envelopment,replaced%20by%20ones%20which%20can.
16:10:15 <andythenorth[d]> well maybe an email client
16:11:03 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262113253
16:16:59 <DorpsGek> [OpenTTD/OpenTTD] FLHerne updated pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365
16:17:15 *** _aD has quit IRC (Quit: leaving)
16:18:48 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262126966
16:20:53 <FLHerne> macOS CI failed for some spurious reason :-/
16:21:08 <FLHerne> error: http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz: curl failed to download with exit code 7
16:21:28 <Samu> ah crap, i can't set AIError's
16:21:41 <Samu> ScriptObject is not accessible
16:22:24 <Samu> but! I can provoke a precondition fail
16:22:59 <Samu> gonna cheat the precondition fail in
16:23:20 <Rubidium> FLHerne: it's even worse :(
16:24:17 <FLHerne> Windows seems the same
16:24:52 <FLHerne> oberhumer.com is just broken atm
16:37:54 *** keikoz has joined #openttd
16:40:12 <petern> Works for me.
16:41:50 <FLHerne> It does for me now too
16:42:08 <FLHerne> Can someone rerun the CI?
16:43:21 <glx[d]> Looks like bad luck and new image so no cache yet
16:48:49 <glx[d]> Cancelled and re-run, seems better
16:50:11 <LordAro> FLHerne: also, opening { should be on its own line
16:51:14 <FLHerne> blah
16:51:21 <DorpsGek> [OpenTTD/OpenTTD] FLHerne dismissed a review for pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262126966
16:51:24 <DorpsGek> [OpenTTD/OpenTTD] FLHerne updated pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365
16:51:28 <LordAro> :)
16:53:43 <glx[d]> And I won't cancel again the previous CI (to cache vcpkg as it worked this time)
17:05:46 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262219671
17:11:23 <FLHerne> CodeQL is slooow
17:11:58 <LordAro> MSYS is sloooower!
17:14:29 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262229612
17:15:39 <petern> I rage-quit out of Doom yesterday, then realised I hadn't saved any progress on that level. Oops.
17:17:54 <FLHerne> petern: I don't understand your comment at all
17:18:10 <LordAro> FLHerne: Doom is a game from the early 90s
17:18:14 <FLHerne> the four STR_BRIDGE_SELECT_INFO_* strings are all used in the same place
17:18:20 <FLHerne> and nowhere else
17:18:44 <FLHerne> not all of them use all the parameters because that's the whole point of them being separate strings
17:18:53 <FLHerne> LordAro: that I understand
17:19:05 <petern> `STR_SELECT_BRIDGE_INFO` is used in scenario editor mode now.
17:19:17 <petern> Previously it was used in normal game mode.
17:19:46 <petern> Given the parameter change as well...
17:20:03 <FLHerne> oh, different from the old code
17:20:13 <FLHerne> I guess so
17:25:34 <DorpsGek> [OpenTTD/OpenTTD] FLHerne dismissed a review for pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262219671
17:25:37 <DorpsGek> [OpenTTD/OpenTTD] FLHerne updated pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365
17:33:10 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365#pullrequestreview-1262285667
17:53:11 <DorpsGek> [OpenTTD/OpenTTD] George-VB opened issue #10377: [Bug]: Sorting order is not correct - engine between wagons https://github.com/OpenTTD/OpenTTD/issues/10377
17:56:00 <dP> https://cdn.discordapp.com/attachments/1008473233844097104/1065691110879547462/Screenshot_from_2023-01-19_21-54-38.png
17:56:00 <dP> so, yeah, new game...
17:56:17 <dP> still needs a bit of work before finished ๐Ÿ˜†
18:11:19 <andythenorth[d]> model train layout? ๐Ÿ˜›
18:14:02 <dP> realism :p
18:22:48 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:26:30 <andythenorth[d]> wonder if I can crash GS some more
18:27:55 <andythenorth[d]> can the town for a tile change during game?
18:29:01 <andythenorth[d]> also, my OpenTTD normally runs around 500 MB RAM use
18:29:29 <andythenorth[d]> storing all the town tiles in GS pushes that to about 800 MB
18:29:31 <andythenorth[d]> probably fine?
18:29:49 <andythenorth[d]> 2048^2 map
18:30:01 <andythenorth[d]> 4 seconds to walk all the tiles at game start
18:36:31 <dP> andythenorth[d]: yes, you can found towns during the game
18:36:43 <Eddi|zuHause> andythenorth[d]: if you found a new town some tiles may change
18:37:24 <Eddi|zuHause> andythenorth[d]: also, towns that grow faster can grow into the area of other towns, so the town which "owns" the tile is not necessarily the "town authority" responsible for the town
18:37:45 <Eddi|zuHause> *last "town" should be "tile"
18:39:18 <dP> lol, I wonder what happens when you fund industry by replacing houses
18:39:27 <dP> does it get town of the tile or of the house
18:39:53 <andythenorth[d]> ok so we'll need to walk all the tiles periodically
18:39:55 <andythenorth[d]> maybe once a month
18:40:03 <andythenorth[d]> 4 seconds is fine?
18:40:16 <andythenorth[d]> do I get free opcodes if GS pauses the game?
18:40:21 <dP> if you just need to fund industries you don't need to store tiles at all
18:40:33 <andythenorth[d]> I need to put them in a specific town
18:40:48 <dP> e.g. chose town, chose random direction, find border in that direction and try funding
18:41:11 <andythenorth[d]> find border?
18:41:20 <andythenorth[d]> is town area of influence a regular shape?
18:42:14 <dP> may not even be convex in general
18:42:38 <dP> but don't think it matters much for this
18:43:28 <FLHerne> Can I get a merge on https://github.com/OpenTTD/OpenTTD/pull/10365 ? It's had two approvals, the CI passes, and people seem to have run out of nitpicks :p
18:44:53 <dP> actually should be convex by definition (for manhattan distance)
18:44:59 <andythenorth[d]> how does the town for an industry change?
18:45:06 <dP> it doesn't
18:45:08 <Samu> terrible conversion headache! https://gist.github.com/SamuXarick/e566722c7fa73555c8cd84edeaca5c75
18:45:10 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/3c80f2d14a73aee0bfda4a9c38049b93c5b38411
18:45:11 <DorpsGek> - Update: Translations from eints (by translators)
18:45:13 <andythenorth[d]> that is a pleasing answer
18:45:47 <Samu> from BuildRail side of things in OpenTTD code, I additionally allowed the tile 'from' and tile 'to' to be void tiles
18:46:13 <Samu> this allows building from and towards void tiles
18:47:11 <Samu> builds rails in their direction, that is! It does not really place rails on void tiles
18:49:49 <Samu> i will update the PR soon
18:53:29 <Samu> all the confusing code was needed so I could circumvent IsValidTile checks
18:53:54 <Samu> I'll try to tidy it nicely
18:54:31 <petern> Maybe adding lots of preconditions doesn't actually add anything of value?
18:55:16 *** Wolf01 has joined #openttd
18:56:49 <glx[d]> I still don't get what was the issue, based on the attached screenshot it worked fine
19:02:46 <andythenorth[d]> wonder what silly thing I can do next in GS
19:02:56 <andythenorth[d]> I guess walk all the tiles on a 4k^2 map ๐Ÿ˜›
19:03:01 <andythenorth[d]> so boring testing those
19:03:07 <andythenorth[d]> map gen so slow ๐Ÿ™‚
19:03:10 <andythenorth[d]> ooooo
19:03:30 <andythenorth[d]> petern: shall I write a terrain modifying GS? o_O
19:03:38 <andythenorth[d]> can I make mountains
19:05:49 <andythenorth[d]> hmm can't raise to target height in one command ๐Ÿ˜„
19:05:50 <andythenorth[d]> of course
19:06:00 <andythenorth[d]> lol this 4k map is still generating
19:06:02 <andythenorth[d]> 3 minutes later
19:07:53 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1065709198781992960/image.png
19:07:53 <andythenorth[d]> ha ha look closely
19:08:03 <andythenorth[d]> I called DemolishTile on every tile at map start ๐Ÿ˜„
19:17:08 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #10378: Fix #10377, Fix 94167df: bad sorting of rail vehicles when primary variant is missing https://github.com/OpenTTD/OpenTTD/pull/10378
19:19:33 <petern> Oh no
19:19:55 <andythenorth[d]> hmm mountain making is failing
19:19:58 <andythenorth[d]> `GSTile.RaiseTile(GSMap.GetTileIndex(1, 1), (GSTile.SLOPE_N | GSTile.SLOPE_W | GSTile.SLOPE_S | GSTile.SLOPE_E));`
19:20:04 <andythenorth[d]> just doesn't do anything
19:20:47 <andythenorth[d]> well, to be strict, it's returning false
19:21:49 <andythenorth[d]> oh I have to be in a company scope?
19:23:38 <andythenorth[d]> but there is no company at game start
19:23:51 <andythenorth[d]> why is modifying the landscape limited to companies?
19:24:33 <nielsm> towns can definitely modify the landscape
19:24:55 <Rubidium> andythenorth[d]: I think having all sides raised is not allowed
19:24:55 <petern> They do it directly though.
19:25:28 <petern> OWNER_DEITY is explicitly denied.
19:25:29 <petern> So...
19:25:44 <andythenorth[d]> no new map gen then
19:25:54 <petern> I'm not saying it should be...
19:25:58 <andythenorth[d]> goes it patching?
19:26:17 <andythenorth[d]> I'm already committed to a fork here, as the AI debug text colour change has been blocked
19:26:24 <andythenorth[d]> so that's me running a fork forever
19:26:51 <andythenorth[d]> `EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);`
19:27:05 <petern> AndyPP?
19:27:16 <andythenorth[d]> ugh
19:27:23 <andythenorth[d]> given that I can't even make the compile work
19:27:27 <andythenorth[d]> probably not
19:27:28 <petern> Blocked by Samu? lol
19:27:42 <andythenorth[d]> I think that was Samu doing a funny
19:27:51 <andythenorth[d]> as my PR said 'someone will object'
19:27:55 <nielsm> it seems strange to not allow OWNER_DEITY to modify the landscape tbh
19:28:11 <petern> GS can't plant trees either.
19:28:26 <andythenorth[d]> as I actually kind of understand the script API definitions
19:28:30 <andythenorth[d]> I am making local changes ๐Ÿ˜›
19:28:33 <petern> I think these are all a bit... arbitrary.
19:28:33 <andythenorth[d]> with godlike power
19:28:40 <andythenorth[d]> GS is arbitrary ๐Ÿ˜ฎ
19:28:42 <andythenorth[d]> you shock me
19:32:15 <andythenorth[d]> hmm change doesn't work though ๐Ÿ™‚
19:34:17 <andythenorth[d]> this is src, not compiled script dir? src/script/api/script_tile.cpp
19:36:02 * andythenorth[d] builds from clean
19:36:43 <petern> <https://github.com/petern/OpenTTD/commit/6734a6981cc70c13973ac0c5b3b179542fe6cd9c> maybe
19:39:37 <andythenorth[d]> ah ๐Ÿ™‚
19:39:43 <andythenorth[d]> ok I don't understand script API yet ๐Ÿ˜„
19:40:24 *** HerzogDeXtEr has joined #openttd
19:43:34 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065718177625014374/image.png
19:43:34 <petern> Do I hate non-integer scaling of sprites less more or less than this? Hmm.
19:44:57 <andythenorth[d]> less?
19:51:29 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065720173983703090/image.png
19:51:31 <petern> Hmm
19:52:02 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #10378: Fix #10377, Fix 94167df: bad sorting of rail vehicles when primary variant is missing https://github.com/OpenTTD/OpenTTD/pull/10378
19:52:45 <Rubidium> yeah, the missing dashed line doesn't make it look that pretty ;(
19:53:52 <andythenorth[d]> crashed openttd again ๐Ÿ™‚
19:54:16 <andythenorth[d]> `Log.Info(GSTile.RaiseTile(GSMap.GetTileIndex(1, 1), GSTile.SLOPE_N | GSTile.SLOPE_W | GSTile.SLOPE_S | GSTile.SLOPE_E));` hangs the client
19:54:36 <andythenorth[d]> * patched though so eh
19:54:38 <andythenorth[d]> all bets off
19:54:44 <petern> With my patch?
19:55:17 <andythenorth[d]> I don't think it's the patch that causes it
19:58:40 <andythenorth[d]> I think it's trying to level the entire map in one command
19:59:56 *** Wormnest has joined #openttd
19:59:58 <andythenorth[d]> seems to work if I demolish tiles first
20:00:02 <andythenorth[d]> not sure though, hard to repro
20:01:03 <andythenorth[d]> oh demolish doesn't demolish the tile
20:01:15 <andythenorth[d]> "Destroy everything on the given tile."
20:01:22 <andythenorth[d]> except buildings / industries / objects
20:02:27 <andythenorth[d]> seems that industries aren't removable by GS?
20:03:26 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1065723177155690496/image.png
20:03:26 <andythenorth[d]> "I heard you like mines on a hill"
20:05:54 <petern> RaiseTile should only do one tile, no?
20:06:47 <andythenorth[d]> yes but LevelTiles takes a rect ๐Ÿ™‚
20:06:59 <andythenorth[d]> seems to just use one command
20:07:16 <petern> Oh it wasn't RaiseTile that was hanging...
20:07:29 <petern> With GS there are no terraform limits.
20:07:37 <andythenorth[d]> yeah it was LevelTile, but unless I learn to use the debugger we'll never know
20:07:45 <andythenorth[d]> the GS crash handling is broken on my macOS build
20:08:02 <andythenorth[d]> so we don't get any crash log, it just hangs the client
20:08:02 <petern> Or rather, with OWNER_DEITY there are no terraform limits.
20:08:11 <petern> It hadn't crashed.
20:08:30 <petern> If you were levels the whole map...
20:08:30 <andythenorth[d]> just slow?
20:08:38 <petern> Maybe
20:08:39 <petern> Argh ๐Ÿ™‚
20:08:42 <andythenorth[d]> ah, the opcode limit won't kick in
20:08:57 <andythenorth[d]> but in other cases, the CPU use limit has kicked in
20:08:58 <andythenorth[d]> 'adventures'
20:09:05 <petern> Maybe it had, who knows.
20:09:10 <petern> Your debugger could tell you
20:09:28 <andythenorth[d]> if only I'd learn
20:09:36 <andythenorth[d]> only been doing this since I was 11
20:13:47 <dP> great, my pc is suddenly having some disk issue and i've nfi why
20:13:59 <dP> also i'm >2000km away from it so debugging is "fun"
20:16:20 <andythenorth[d]> oof
20:16:52 <andythenorth[d]> do I just miss the command for demolish industry?
20:17:01 <andythenorth[d]> or did stupid grf authors insist GS can't have that?
20:17:01 <dP> does anyone know with mirrored zfs pool is bad if I import it in degraded state and try to fix from there?
20:18:00 <dP> just demolish any tile, no?
20:18:51 <dP> iirc it was pr'ed to work in like 12.0 or smth
20:19:51 <dP> though having gs method to just remove it by id would make sense
20:21:20 <dP> hm, or maybe I'm confusing that with objects or smth
20:21:29 <dP> don't see in the code
20:21:47 <andythenorth[d]> I've called DemolishTile on every tile on the map
20:21:56 <andythenorth[d]> industries and objects are preserved
20:21:58 <andythenorth[d]> houses are not
20:22:09 *** JGR has joined #openttd
20:22:09 <JGR> What is the purpose of doing this?
20:22:26 <andythenorth[d]> reimplement map gen in GS
20:22:35 <JGR> Why would you want to do that?
20:22:37 <andythenorth[d]> 'purpose' is a strong word
20:22:43 <andythenorth[d]> think of it like Everest
20:23:05 <JGR> Seems like making a rod for your own back to me ๐Ÿ˜›
20:23:41 <dP> it's quite useful
20:23:43 <andythenorth[d]> stupid things are the best way to uncover where the API is crippled
20:23:51 <andythenorth[d]> which is 'some places, not all'
20:23:55 <dP> I'm having magic bulldozer on my servers just to be able to remove industries
20:23:56 <andythenorth[d]> also it throws up interesting things
20:24:11 <dP> well, and disable stupid authorities, but that's fixed
20:24:16 <JGR> I'd suggest trying with magic bulldozer enabled
20:24:20 <andythenorth[d]> like walking all the tiles and performing commands is perfectly possible at game start for 512^2 map or less
20:25:17 <andythenorth[d]> oh do we have GSCheat?
20:25:19 * andythenorth[d] looks
20:25:32 <andythenorth[d]> that's weird, we don't
20:25:34 <andythenorth[d]> we should
20:26:43 <dP> cheats don't even work in mp
20:26:56 <dP> which is kinda stupid
20:27:05 <JGR> That is easy to fix
20:27:20 <dP> yeah, just move them to settings ffs :p
20:31:31 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #10375: Change: improve legibility of AI/GS errors https://github.com/OpenTTD/OpenTTD/pull/10375#issuecomment-1397562920
20:32:49 <Rubidium> dP: can describe how the setting is going to work to cheat money?
20:33:40 <dP> for active cheats like money they won't
20:33:52 <dP> but all the toggles can go there
20:35:51 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #10375: Change: improve legibility of AI/GS errors https://github.com/OpenTTD/OpenTTD/pull/10375#issuecomment-1397569597
20:36:02 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1065731382862696490/image.png
20:36:02 <andythenorth[d]> ok drawn a smiley face with GS
20:36:13 <andythenorth[d]> quite a rudimentary pixel pattern
20:36:24 <andythenorth[d]> the more l33t way is to use a parametric equation
20:37:45 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #10375: Change: improve legibility of AI/GS errors https://github.com/OpenTTD/OpenTTD/pull/10375#issuecomment-1397571570
20:38:04 <andythenorth[d]> lol good job I see the funny side eh
20:38:15 <andythenorth[d]> literal example of bikeshedding, in pure form
20:38:26 <andythenorth[d]> 'GS is a bit crippled, how can we make it better?'
20:38:41 <andythenorth[d]> 'let's debate the error colour to death in the frigging illegible debugger'
20:39:18 *** TrueBrain has joined #openttd
20:39:18 <TrueBrain> let's remove the debugger completely, and think for a year for a better replacement?
20:39:24 <TrueBrain> reintroducing the same window, with a different colour
20:39:29 <andythenorth[d]> with drawings of UIs in photoshop
20:39:30 <TrueBrain> problem solved?
20:39:46 <andythenorth[d]> it's ok, I'm running a patchpack ๐Ÿ˜›
20:40:16 <andythenorth[d]> my OS is apparently crippled for building, so patch #1 just nerfs some things in the build
20:40:20 <andythenorth[d]> 'probably fine though'
20:40:50 <andythenorth[d]> what shall I make GS draw on the map next?
20:40:55 <andythenorth[d]> not Bebo things
20:41:42 <andythenorth[d]> maybe I can encode the pixel grid for roman charset
20:41:48 <andythenorth[d]> in a crude font
20:41:52 <andythenorth[d]> and write messages on the map
20:42:02 <andythenorth[d]> yes
20:42:14 <andythenorth[d]> python PIL can generate images including fonts
20:42:22 <andythenorth[d]> I can then read the pixel xy locations
20:42:33 <andythenorth[d]> I can then use those for map offsets
20:42:46 <petern> andythenorth[d]: No dev has actually commented ๐Ÿ˜›
20:42:48 <andythenorth[d]> the entire compile actually has this facility in place already ๐Ÿ˜›
20:42:54 <JGR> Crude(ly written) messages on the map sounds like the reddit servers
20:42:56 <andythenorth[d]> petern: I am aware, just moaning ๐Ÿ™‚
20:43:25 <andythenorth[d]> compile can write text to python Image โœ…
20:43:36 <andythenorth[d]> pixascan can scan pixels โœ…
20:43:46 <andythenorth[d]> python compile can generate GS โœ…
20:43:58 <andythenorth[d]> oh
20:44:05 <andythenorth[d]> I can write my own heightmap generator too
20:44:22 <andythenorth[d]> you get one heightmap, hard-coded to the GS ๐Ÿ˜›
20:44:35 <andythenorth[d]> ha no, this has real actual use
20:44:36 <petern> I would do it all, but I'm too busy playing Doom right now.
20:44:52 <andythenorth[d]> some industries need specific terrain layout
20:44:56 <petern> Trying to find that last secret.
20:45:15 <andythenorth[d]> I can draw the terrain, and use GS to sculpt tiles before placing the industry
20:46:04 <andythenorth[d]> petern: I am trying to find a 'Y' to complete the word 'RALLY' in an Art of Rally level
20:46:11 <andythenorth[d]> I could cheat...
20:48:04 <petern> Hmm, I can see on the map where the secret sector is, but I can't reach it.
20:50:39 <petern> Found it, and after all that, the level force-killed me back to 50 pistol rounds.
20:53:25 <petern> Okay what the hell was that.
20:54:29 <nielsm> it's doom, of course it's hell
20:54:32 <petern> Tackling this sprite clipping is less scary.
20:54:48 <petern> It was a very snowy map actually.
20:55:25 <Samu> Success!! https://i.imgur.com/iqKRmU4.png
20:55:56 <petern> Gotta love editors that show CRLF all the time.
20:56:25 <petern> I can tell it's a line break because there's a new line...
20:56:28 <Eddi|zuHause> it snowed today. there's a thin white film outside
20:56:58 <petern> Oops, I didn't cycle again.
20:57:12 <petern> I must be like 700-800km down already.
20:58:31 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:00:39 <petern> Alright so.
21:03:40 <petern> I think the GfxBlitter function works in sprite-coordatines, and then scales.
21:07:16 <supermop_toil> petern: bike in doom?
21:09:30 *** gelignite has quit IRC (Quit: Stay safe!)
21:10:53 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065740151734677535/image.png
21:10:53 <petern> I think I broke it ๐Ÿ˜„
21:11:23 *** Pruple has joined #openttd
21:11:23 <Pruple> OOOOOOO
21:12:22 <Samu> final revision! https://gist.github.com/SamuXarick/e566722c7fa73555c8cd84edeaca5c75
21:12:27 <Samu> i can't make it simpler
21:12:58 <Samu> and now i gotta repeat it for RemoveRail, then repeat both on all 27 compat_xx.nut files
21:14:42 <andythenorth[d]> supermop_toil: are those animated and floating around?
21:14:53 <petern> You're going to hit the op-code limit just calling that...
21:14:56 <andythenorth[d]> petern: are those animated and floating around?
21:15:07 <petern> They are, but not deliberately.
21:24:38 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on issue #10374: [Bug]: Auto-distributed timetabled trains leave depot in order different from timetable requirements https://github.com/OpenTTD/OpenTTD/issues/10374
21:24:41 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #10365: Fix #10362: NewGRF bridges without speed limits. https://github.com/OpenTTD/OpenTTD/pull/10365
21:24:44 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 closed issue #10362: [Bug]: Bridges cannot not have a speed limit https://github.com/OpenTTD/OpenTTD/issues/10362
21:25:04 <Pruple> ๐Ÿ‘
21:25:08 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:27:20 <petern> Stupid optimizing... 104 * 45053 is not 0.
21:32:00 <supermop_toil> petern: in grasshopper today i tried to set a param to infinity to test against and it set the param to 100,000,000
21:32:52 <petern> This is just the debug not being useful because the compiler optimized things away.
21:40:27 <andythenorth[d]> hmm more GS?
21:40:29 <andythenorth[d]> or bedtime
21:47:58 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:02:21 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10376: Fix [Script]: Add missing precondition and ensure building/removing rail lines can't be backwards https://github.com/OpenTTD/OpenTTD/pull/10376
22:03:40 <Samu> wow trailing whitestuff
22:04:13 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065753576170856509/image.png
22:04:13 <petern> Nope
22:05:18 <reldred> petern: OOOOOoooOooOOoOOoooo
22:19:18 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1065757371323916318/image.png
22:19:18 <andythenorth[d]> somehow this town was protected from DemolishTile ๐Ÿ˜›
22:19:44 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1065757482158399539/image.png
22:19:44 <andythenorth[d]> seems some buildings are protected ๐Ÿ™‚
22:19:51 <andythenorth[d]> I guess there's a house flag
22:20:07 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1065757575758491759/image.png
22:20:07 <andythenorth[d]> map
22:20:23 <FLHerne> will 10365 be backported to 13.0?
22:20:34 <FLHerne> I'm trying to decide which tag to use in grfspecs :p
22:22:20 <andythenorth[d]> do we use the RC as a freeze? or do we keep adding?
22:22:24 <andythenorth[d]> I never know ๐Ÿ™‚
22:23:17 <petern> Should be, so bug fixes only.
22:25:05 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10376: Fix: [Script] Ensure building/removing rail lines can't be backwards and allow building/removing rail lines coming from or heading to the void https://github.com/OpenTTD/OpenTTD/pull/10376
22:25:21 <Samu> trailing whitespace removed
22:25:24 <Samu> lol
22:25:53 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1065759026438213662/image.png
22:25:53 <petern> LOL
22:26:00 <Samu> why wouldn't the commit checker remove it for me?
22:26:33 <Samu> that's mostly copy paste
22:26:46 <TallTyler> Is that ITL? Looks like the building protection flags I set.
22:26:58 <Samu> there's no better way to edit compat_ files in
22:31:12 <Samu> oops changelog issue..
22:31:51 <FLHerne> petern: well, Pruple labeled 10362 as [Bug], so I labeled 10365 as [Fix]
22:32:13 <FLHerne> whether that makes it actually count as a bugfix is the question :p
22:32:19 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10376: Fix: [Script] Ensure building/removing rail lines can't be backwards and allow building/removing rail lines coming from or heading to the void https://github.com/OpenTTD/OpenTTD/pull/10376
22:35:22 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10375: Change: improve legibility of AI/GS errors https://github.com/OpenTTD/OpenTTD/pull/10375#issuecomment-1397701585
22:37:44 <FLHerne> I was optimistic and wrote "From [OTTD 13] set to "0" for no limit at all. " in the docs :p
22:42:36 <Samu> gah, found another typo! due to copy pasta
22:42:36 <andythenorth[d]> oof
22:47:45 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10376: Fix: [Script] Ensure building/removing rail lines can't be backwards and allow building/removing rail lines coming from or heading to the void https://github.com/OpenTTD/OpenTTD/pull/10376
22:47:59 <Samu> copy paste error fixed :)
22:48:16 <Samu> 27 compat files!
22:48:21 <Samu> and next year it's 29
22:48:28 <Samu> and etc...
22:48:40 <Samu> it's turning into a boring copy paste task
22:49:15 <Samu> someone should come up with a better way to deal with compat files
22:56:30 <petern> O
22:58:30 <Rubidium> I just did
23:00:38 <Rubidium> and another idea ;)
23:01:07 <Rubidium> let's sleep on them...
23:01:29 <andythenorth[d]> good idea ๐Ÿ™‚
23:01:32 * andythenorth[d] nap
23:02:24 *** Etua has joined #openttd
23:04:45 <petern> Sucks to be a 3rd party Twitter client developer.
23:05:31 *** _aD has joined #openttd
23:24:34 *** Samu has quit IRC (Quit: Leaving)
23:27:56 *** Etua has quit IRC (Quit: Etua)
23:37:53 *** sla_ro|master has quit IRC ()
23:51:42 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)