Config
Log for #openttd on 11th August 2021:
Times are UTC Toggle Colours
02:02:43  *** Tirili has quit IRC
02:35:36  *** Gustavo6046 has quit IRC
02:35:54  *** Gustavo6046 has joined #openttd
02:57:04  *** debdog has joined #openttd
03:00:26  *** D-HUND has quit IRC
03:11:07  *** glx has quit IRC
03:38:23  *** Flygon has joined #openttd
05:51:24  *** nielsm has joined #openttd
06:15:55  *** sla_ro|master has joined #openttd
06:31:28  *** HerzogDeXtEr has joined #openttd
06:35:58  *** crem has quit IRC
06:37:35  *** crem has joined #openttd
07:03:15  *** HerzogDeXtEr has quit IRC
07:14:49  *** Wolf01 has joined #openttd
07:25:13  *** andythenorth has joined #openttd
07:30:42  <andythenorth> yo
07:31:35  <andythenorth> Timberwolf I'd probably just pretend the current stock model doesn't exist :P
07:31:49  <andythenorth> it's a minor horrorshow
07:41:47  <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #9468: Fix 8706dcd9: [Script] Byte-swap grfids to match normal expectations. https://git.io/JRivW
08:28:36  <andythenorth> hmm
08:29:44  <andythenorth> for GS to place industry I have to give a tile index
08:29:59  <andythenorth> seems I need to write some kind of tile search function
08:33:09  <andythenorth> I need a tile that (1) belongs to specific town (2) contains houses (industry replaces houses)
08:37:14  <andythenorth> can I just index all the tiles on the map?
08:38:17  <andythenorth> then do random tile from list?
08:40:17  <andythenorth> GSTileList.AddRectangle((0,0,), (max_x, max_y)) ?
08:40:36  <andythenorth> then walk every tile checking town, and index those
08:40:46  <andythenorth> 'this is fine' right?
08:41:27  <andythenorth> GS can probably log timing info :P
09:22:55  <DorpsGek> [OpenTTD/team] CptMcWill opened issue #238: [fa_IR] Translator access request https://git.io/JRiED
09:30:07  *** andythenorth has quit IRC
10:02:43  *** Samu has joined #openttd
11:00:11  <DorpsGek> [OpenTTD/team] Calvitix opened issue #239: [fr_FR] Translator access request https://git.io/JRi5g
11:03:30  *** virtualrandomnumber has joined #openttd
11:05:25  *** virtualrandomnumber has quit IRC
11:38:38  <DorpsGek> [OpenTTD/team] glx22 commented on issue #237: [id_ID] Translator access request https://git.io/JRwsn
11:39:41  <DorpsGek> [OpenTTD/team] glx22 commented on issue #238: [fa_IR] Translator access request https://git.io/JRiED
11:41:06  <DorpsGek> [OpenTTD/team] glx22 commented on issue #239: [fr_FR] Translator access request https://git.io/JRi5g
12:46:15  *** glx has joined #openttd
12:46:15  *** ChanServ sets mode: +v glx
13:11:51  <peter1138> Urgh so unfit
14:13:40  *** andythenorth has joined #openttd
14:21:46  <andythenorth> yo
14:21:53  <Wolf01> oy
14:23:20  <LordAro> lo
14:24:53  <andythenorth> in which I now try deliberately stupid things in GS
14:25:02  <andythenorth> can the number of map tiles even fit into uint 32?
14:25:31  <glx> your lucky numbers are 64bits in scripts
14:25:37  <glx> *you're
14:26:51  <andythenorth> @calc 16 * 16
14:26:51  <DorpsGek> andythenorth: 256
14:27:04  * andythenorth should know that
14:27:09  <andythenorth> jgrpp has 16 ^ 2 maps
14:27:22  * andythenorth has discovered GetTick() for timing
14:29:08  <andythenorth> hmm can't find docs, I'm assuming tile index is an (x, y) pair
14:29:59  <glx> https://docs.openttd.org/gs-api/classGSMap.html#af6f67891630768b10eda045c6def5aaa
14:30:28  <andythenorth> thanks
14:30:31  <glx> tile index is the same as openttd
14:33:17  <andythenorth> oof 4k map generation is soooooo slow
14:37:53  <Timberwolf> I got a bug report once for an 8k * 8k with high industry and town density. (JGR, natch)
14:38:26  <andythenorth> super :)
14:38:36  <glx> high town density may have issue with town names
14:38:41  <andythenorth> ok now I need some kind of table or something
14:39:07  <andythenorth> for every town, I need to store a list of the tiles
14:39:15  <andythenorth> can I nest a list in a list or something?
14:40:04  <glx> hmm a table of arrays
14:41:48  <Timberwolf> I definitely have an optimal map size/density combination.
14:42:17  <Timberwolf> Those enormous and dense maps I get bored quickly because I feel like I'm never going to connect even a tiny amount of what's there.
14:42:59  <Timberwolf> But I'm playing one of the original game scenarios at 256x256 currently, and that's getting too much, "er... okay, so is there anything left to do now?"
14:43:38  <Timberwolf> I blame all those quality of life features.
14:44:14  <andythenorth> so I can't store a list a in list?
14:44:19  <Timberwolf> The standard maps were fine when you couldn't clone anything, auto-signal or indeed place diagonal track more than one tile at a time :)
14:44:27  <andythenorth> '2nd parameter must be integer'
14:44:29  <andythenorth> meh
14:44:45  <glx> yes lists use integers only
14:44:55  <glx> for key and value
14:45:15  <andythenorth> hmm
14:45:56  <glx> on list creation only keys are set, to fill value you use a valuator
14:46:07  <glx> then you can apply filters on the values
14:46:47  <andythenorth> so for this I need a squirrel table? {}
14:46:58  * andythenorth just wants the tiles belonging to a town
14:47:01  <glx> https://wiki.openttd.org/en/Development/Script/Lists
14:47:20  <andythenorth> oh this is useful
14:47:22  <andythenorth> the missing docs :)
14:52:30  <andythenorth> searching 'squirrel' stuff on google gets me a lot of rodents :P
14:52:32  <andythenorth> oof
14:53:02  <andythenorth> 'slots have to be created' wtf?
14:53:17  <glx> there's also http://squirrel-lang.org/doc/squirrel2.html (not the best doc, but well)
14:57:14  <andythenorth> ach my brain
14:57:47  <andythenorth> I think I play solitaire for a bit
15:03:02  <andythenorth> so I see no way to use the town ID as a key in the table
15:03:15  <andythenorth> keys seem to be literals
15:03:30  <andythenorth> so there's no way to have arbitrary keys
15:03:39  <andythenorth> only the ones you define in advance
15:03:43  <andythenorth> https://developer.electricimp.com/squirrel/squirrel-guide/variables-collections#tables
15:04:20  <glx> http://squirrel-lang.org/doc/squirrel2.html#d0e1326
15:04:46  <andythenorth> wow that's an exciting notation :)
15:07:20  <andythenorth> "Can't create a local slot"
15:07:24  *** Tirili has joined #openttd
15:07:25  * andythenorth must read docs better
15:08:56  <glx> local t = {}; t[townID] <- your list;
15:14:37  <andythenorth> https://gist.githubusercontent.com/andythenorth/ab47c69b1d2883ed4b44af123055b285/raw/b1c8be937a62034a17e52c65cf0bd68ffaa9f695/gistfile1.txt
15:14:47  <andythenorth> I've got lists of length 0 currently :P
15:16:14  <andythenorth> this is lol mistake
15:16:15  <andythenorth> GSTile.GetClosestTown()
15:16:29  <andythenorth> might help to give that a tile
15:17:49  <andythenorth> hmm
15:17:56  <andythenorth> my all_map_tiles list might be empty :(
15:18:54  <andythenorth> yeah it is
15:19:09  <andythenorth> ouch
15:20:49  <andythenorth> hmm how do I add tiles to GSTileList then?
15:20:54  <glx> your last tileindex in AddRectangle is probably invalid
15:21:40  <andythenorth> so many syntax errors there :)
15:22:07  <glx> I think AddRectangle(0, GSMap.GetMapSize() - 1) should work
15:23:08  <glx> GSMap.GetTileIndex(GSMap.GetMapSizeX(), GSMap.GetMapSizeY()) <-- this one fails by precondition
15:24:06  <andythenorth> does this work?
15:24:07  <andythenorth> all_map_tiles.AddRectangle(0, GSMap.GetMapSize() -1);
15:24:11  <andythenorth> or do I have to do assignment?
15:24:22  <glx> should work
15:26:29  <andythenorth> hmm
15:26:50  <andythenorth> GSMap.GetMapSize() returns 65535 fine
15:26:53  <andythenorth> if logged
15:27:05  <andythenorth> but the list is not being extended
15:27:37  * andythenorth reads openttd src
15:28:13  <andythenorth> ScriptTileList::AddRectangle looks very simple
15:30:56  <andythenorth> do I need to valuate instead?
15:37:29  <glx> maybe 0 is not valid either
15:41:02  <andythenorth> I tried e.g. all_map_tiles.AddRectangle(10, 20)
15:41:53  <andythenorth> is TileIndex a specific type, not just an int?
15:42:22  <glx> it's just an int, but depending on settings there are invalid tiles around the map
15:46:44  * andythenorth looking how Industry_Constructor-3 does it
15:47:17  <glx> hmm I think it's easier to not use a TileList for this, you can just do for (tile = 0; tile < GSMap.GetMapSize(), tile++) { if !IsValidTile(tile) continue; <do your town stuff and add>; }
15:47:42  <andythenorth> ok
15:47:59  <andythenorth> Industry Constructor uses a spiral walk, I don't really want to do that
15:48:22  <andythenorth> seems to be a library function though SpiralWalker()
15:49:01  <andythenorth> maybe SpiralWalker() is more correct for this
15:49:09  <andythenorth> the case is forcing 1 industry into every town
15:49:20  <andythenorth> somewhere near the town sign tile
16:10:14  <andythenorth> python spoils me :P
16:19:18  <andythenorth> result :D
16:19:27  <andythenorth> got a GS that forces an industry into every town
16:26:24  <andythenorth> hmm
16:26:34  <andythenorth> move all industry placement from grf to GS?
16:31:59  <andythenorth> probably unwise :P
16:37:48  <andythenorth> so do GS have any uuid?
16:37:56  <andythenorth> my grf needs to disable if the GS is not present
16:38:03  <andythenorth> probably also using the GS version string
16:46:05  *** andythenorth has quit IRC
16:50:18  *** andythenorth has joined #openttd
16:50:22  *** Wormnest has joined #openttd
16:52:01  *** Progman has joined #openttd
17:00:03  *** bitdoer has joined #openttd
17:03:58  *** bitdoer has quit IRC
17:05:59  *** bitdoer has joined #openttd
17:17:58  <Samu> damn, i stumbled upon the capacity bug
17:18:32  <Samu> merge plz https://github.com/OpenTTD/OpenTTD/pull/9393
17:18:34  <Samu> :)
17:21:38  <DorpsGek> [OpenTTD/OpenTTD] glx22 closed issue #9392: AIVehicle.GetBuildWithRefitCapacity returns -1 when at the max num of vehicles https://git.io/JnPbi
17:21:41  <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #9393: Fix #9392: Return a valid value with GetBuildWithRefitCapacity when AIs are maxed out in vehicles https://git.io/JnXWb
17:21:50  <glx> totally forgot it was approved
17:23:05  <Samu> cool nice!
17:26:02  <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #8468: Fix #8316: Make sort industries by production and transported with a cargo filter possible https://git.io/JLHah
17:26:05  <DorpsGek> [OpenTTD/OpenTTD] glx22 closed issue #8316: Sorting of produced cargo for industries with multiple products are inaccurate https://git.io/JUaUm
17:26:09  <glx> oh this one was too
17:39:36  *** Tirili has quit IRC
17:48:26  <Samu> i think i may have conflicts on 2 PR's
17:48:47  <Samu> 9462 and 8390
17:48:52  <Samu> will check later
17:57:04  <andythenorth> so Action D or something to detect GS from grf?
18:03:00  *** Flygon has quit IRC
18:04:38  <TrueBrain> No
18:04:41  <TrueBrain> :p
18:12:38  <andythenorth> not even 'or something'? :P
18:22:46  *** Progman has quit IRC
18:30:21  <andythenorth> maybe there's a not-good way
18:32:18  <andythenorth> can GS run anything before grfs are instantiated?
18:34:05  <andythenorth> seems not
18:37:17  <andythenorth> hmm, that makes disabling the grf very hard
18:37:23  <andythenorth> uuf
18:45:15  <andythenorth> hmm how does OpenTTD handle deps for content?
18:45:25  <andythenorth> can a GS be a dep for a grf?
18:50:17  *** gelignite has joined #openttd
18:54:44  *** jottyfan has joined #openttd
19:22:24  <TrueBrain> A derp? :D
19:24:06  <andythenorth> duhp
19:31:08  *** Progman has joined #openttd
19:37:44  <TrueBrain> Invalid response
19:37:49  <TrueBrain> Resend entry
19:45:09  *** nielsm has quit IRC
19:48:25  <andythenorth> 404
19:57:57  *** gelignite has quit IRC
20:11:57  <andythenorth> what GS adventure shall I have next? :P
20:19:16  <Rubidium> control via IRC
20:19:49  <andythenorth> admin port?
20:19:55  <andythenorth> matrix bridge :P
20:20:20  <andythenorth> they can spend their m investment on a matrix <-> OpenTTD admin port
20:35:56  *** andythenorth has quit IRC
20:51:15  *** HerzogDeXtEr has joined #openttd
21:06:43  *** Progman has quit IRC
21:34:49  *** Samu has quit IRC
21:42:15  *** sla_ro|master has quit IRC
22:01:27  *** Wolf01 has quit IRC
22:04:10  *** V453000 has quit IRC
22:04:25  *** avdg has quit IRC
22:06:46  *** V453000 has joined #openttd
22:06:47  *** avdg has joined #openttd
22:12:42  *** SmatZ has quit IRC
22:12:55  *** XeryusTC has quit IRC
22:12:56  *** tneo has quit IRC
22:15:41  *** ^Spike^ has quit IRC
22:21:28  *** Webster has joined #openttd
22:23:04  *** Hazzard has joined #openttd
22:23:47  *** tneo has joined #openttd
22:26:00  *** SmatZ has joined #openttd
22:26:30  *** Yexo has joined #openttd
22:26:30  *** XeryusTC has joined #openttd
22:38:25  *** Ammler has joined #openttd
22:46:24  *** XeryusTC has quit IRC
22:47:00  *** planetmaker has quit IRC
23:01:45  *** HerzogDeXtEr has quit IRC
23:04:25  *** WormnestAndroid has quit IRC
23:05:07  *** WormnestAndroid has joined #openttd
23:08:22  *** planetmaker has joined #openttd
23:08:22  *** Hirundo has joined #openttd
23:08:22  *** ChanServ sets mode: +o planetmaker
23:11:51  *** virtualrandomnumber has joined #openttd
23:12:07  *** virtualrandomnumber has quit IRC
23:12:35  *** WormnestAndroid has quit IRC
23:12:43  *** ^Spike^ has joined #openttd
23:12:43  *** Osai has joined #openttd
23:12:59  *** WormnestAndroid has joined #openttd
23:15:11  *** avdg has joined #openttd
23:18:48  *** V453000 has joined #openttd
23:29:20  *** WormnestAndroid has quit IRC
23:29:45  *** WormnestAndroid has joined #openttd
23:41:56  *** XeryusTC has joined #openttd

Powered by YARRSTE version: svn-trunk