IRC logs for #openttd on OFTC at 2025-11-04
            
00:33:05 <_glx_> adding/removing items while iterating is rarely a good idea, but the code does its best to handle it (it can be wrong)
00:57:10 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
01:05:09 *** SigHunter has joined #openttd
01:07:32 *** lobster has joined #openttd
01:33:26 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #14753: Fix: [Script] ScriptList sorter remove when the next item is the end https://github.com/OpenTTD/OpenTTD/pull/14753
02:02:05 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #14753: Fix: [Script] ScriptList sorter remove when the next item is the end https://github.com/OpenTTD/OpenTTD/pull/14753#issuecomment-3483393661
02:07:32 <_glx_> we really need some regression tests about that 🙂
02:27:16 *** Wormnest has quit IRC (Quit: Leaving)
02:53:45 *** SigHunter_ has joined #openttd
02:55:50 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
03:26:09 *** Flygon has joined #openttd
03:27:43 <DorpsGek> [OpenTTD/nml] audigex commented on pull request #359: Add: Support for NewGRF badges. https://github.com/OpenTTD/nml/pull/359#issuecomment-3483614785
03:31:21 *** jsb250203 has joined #openttd
03:31:21 <jsb250203> all: https://media.discordapp.net/attachments/1435101348839297036/1435101440040501308/image.png?ex=690abdde&is=69096c5e&hm=e316323740b21f7e71f99b7628df0a2ac5f370d40ebb1674ecfc97b950d86bb6&=&format=webp&quality=lossless&width=529&height=705
03:31:21 <jsb250203> https://media.discordapp.net/attachments/1435101348839297036/1435101467362070659/image.png?ex=690abde4&is=69096c64&hm=287004bf9a2c1d643da220acec0faa8532eab2cd43dba480879570de1055ac15&=&format=webp&quality=lossless&width=529&height=705
03:31:21 <jsb250203> https://media.discordapp.net/attachments/1435101348839297036/1435101495485009980/image.png?ex=690abdeb&is=69096c6b&hm=cce720ad43a6c173caa9f3841e183271c5d27aa8055cc6a3053ac0e19b7c830d&=&format=webp&quality=lossless&width=529&height=705
03:31:21 <jsb250203> https://media.discordapp.net/attachments/1435101348839297036/1435101514774609950/image.png?ex=690abdf0&is=69096c70&hm=7048054c39547b9a1b25bcf337b87c5e1505c5b7445f28bbd1ebb4a0b8a38d48&=&format=webp&quality=lossless&width=529&height=705
03:52:07 *** gnu_jj_ has joined #openttd
03:55:29 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
04:34:11 *** Zathras_1 has joined #openttd
04:34:17 *** Zathras has joined #openttd
04:37:30 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
04:37:50 *** Zathras_11 has quit IRC (Ping timeout: 480 seconds)
04:38:54 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/3befbdd52fa9273d25a0f677484be113478ea803
04:38:55 <DorpsGek> - Update: Translations from eints (by translators)
04:53:24 *** WormnestAndroid has quit IRC (Remote host closed the connection)
04:53:29 *** WormnestAndroid has joined #openttd
05:13:56 *** keikoz has joined #openttd
06:48:59 <andythenorth> Why do we even allowing deleting iterable items within an iterator?
06:49:15 <andythenorth> Why not just nope it? 🙂
07:05:32 <vondpc> funny you say that because i've seen many people want to do it or try to do it 😄
07:10:03 <andythenorth> I've often tried to do it in scripting languages like python
07:10:14 <andythenorth> but it's not possible for good reasons
07:10:20 <vondpc> yeh
08:26:06 <peter1138> How many scripts will break if we prevent it?
08:29:53 <LordAro> the reasons it breaks everything are not always intuative
08:30:04 <LordAro> peter1138: probably many
08:32:31 <andythenorth> there aren't that many 😛
08:32:46 <andythenorth> we "could" audit them on bananas with grep
08:33:00 <LordAro> get xarick to do it
08:33:06 <andythenorth> obvs we probably won't just break all the scripts 🙂
08:33:34 <LordAro> i've said many times, xarick is very good at testing things
08:33:41 <LordAro> the other stuff... varies
08:34:38 <andythenorth> there are 61 GS and 74 AIs on Bannas
08:34:48 <andythenorth> I didn't count the libs though
08:34:53 <peter1138> "good"?
08:35:43 <LordAro> i didn't say good at testing the right thing :p
08:36:09 <LordAro> we've all followed rabbit holes that turned out to be pointless
08:37:23 <andythenorth> pray and spray testing? 🙂
08:51:45 <locosage> pray&slop :P
08:52:51 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #14753: Fix: [Script] ScriptList sorter remove when the next item is the end https://github.com/OpenTTD/OpenTTD/pull/14753#issuecomment-3484674204
10:35:06 <xarick> hmm, gonna test 14753
10:35:21 <xarick> strange you decided to solve it the opposite way
10:39:00 <peter1138> Opposite way?
10:40:49 <xarick> master -> all correct, JGR -> half wrong
10:40:49 <xarick> solution -> all wrong, JGR -> all wrong
10:41:02 <xarick> or depending on perspective, swap correct with wrong
10:44:38 <xarick> okay, I see
10:45:22 <xarick> the other perspective:
10:45:22 <xarick> master -> all wrong, JGR -> half correct
10:45:22 <xarick> solution: master -> all correct, JGR -> all correct
10:46:04 <xarick> it all points down to me (not) understanding how a for loop works
10:51:16 * peter1138 mumbles something about exception.
10:57:20 *** SigHunter_ has quit IRC (Remote host closed the connection)
10:57:36 *** SigHunter has joined #openttd
11:02:30 <xarick> test number 4 in the sorter types produces some strange results
11:02:48 <xarick> the pre-swap/post-swap test
11:04:51 <xarick> if the interval = 3, being starts at item 3, pre-swap nexts return 2 then 1
11:05:18 <xarick> post swap nexts should in my opinion return 0, 0 ( invalid, invalid)
11:05:29 <xarick> but it's returning 1, 0 (valid item, invalid item)
11:07:10 <xarick> i made sure the list to never have items with value = 0
11:07:19 <xarick> neither item = 0
11:07:38 <xarick> so, when i see a 0 being printed from Next, it's the invalid item marker
11:11:19 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #14753: Fix: [Script] ScriptList sorter remove when the next item is the end https://github.com/OpenTTD/OpenTTD/pull/14753#issuecomment-3485391463
11:15:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435225892933734420/image.png?ex=690b31c6&is=6909e046&hm=a22688ed2f78c854583437ba61de69b2ade722248bd7c7355ac16ab7d0b3d736&
11:15:18 <xarick> oh... list has 3 items [ 3, 2, 1 ]. First call Begin, puts it at 3. The next 4 Next calls: 2 / 1 / 1 / 0 - sounds like a bug
11:15:38 <xarick> shouldn't it be 2 / 1 / 0 / 0 ?
11:15:47 <xarick> 0 meaning invalid item marker
11:16:57 <peter1138> If a list has 3 items, calling Next 4 times should also be an error.
11:32:44 <xarick> let me check what scriptlist vector produces
11:32:48 <xarick> just curious
11:38:51 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435231820856823901/image.png?ex=690b374b&is=6909e5cb&hm=3064221febdb0c8c717d5c98e344d1f2d6b85c4d0bf4f2410b28299e223d3b75&
11:38:51 <xarick> script list vector jumps from 3 to 1
11:39:15 <xarick> forgots about item 2 existance
11:41:53 <xarick> test number /* 7 */ the RemoveItem test
11:50:08 <xarick> seems to be a sort by value problem, both ascending and descending
11:50:16 <xarick> let me verify sort by item
11:51:00 <xarick> nop, it's also happening in there too
11:51:09 <xarick> all sorters bugged
12:39:27 * peter1138 tells uBlock to block the stupid "AI summary" on YouTube. What a crock of shit.
12:54:20 <DorpsGek> [OpenTTD/OpenTTD] Rau771 commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#issuecomment-3485861348
13:02:46 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#issuecomment-3485903263
13:14:01 <DorpsGek> [OpenTTD/OpenTTD] Rau771 commented on pull request #10034: Feature: Button to honk a vehicle's horn https://github.com/OpenTTD/OpenTTD/pull/10034#issuecomment-3485953728
13:17:59 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10034: Feature: Button to honk a vehicle's horn https://github.com/OpenTTD/OpenTTD/pull/10034#issuecomment-3485969406
13:18:28 *** Flygon has quit IRC (Read error: Connection reset by peer)
13:33:26 *** Borg has joined #openttd
13:42:42 *** Zathras_1 has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
13:56:25 <ahyangyi> I thought YouTube won over blogs because people prefer watching videos to text
14:22:24 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14754: Codechange: Use std-find instead of for-loops in strgen. https://github.com/OpenTTD/OpenTTD/pull/14754
14:22:31 <DorpsGek> [OpenTTD/nml] audigex commented on pull request #359: Add: Support for NewGRF badges. https://github.com/OpenTTD/nml/pull/359#issuecomment-3486257005
14:34:48 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #14754: Codechange: Use std-find instead of for-loops in strgen. https://github.com/OpenTTD/OpenTTD/pull/14754#pullrequestreview-3416809689
14:49:21 <xarick> funny interesting thing I noticed
14:50:19 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435280005239275643/image.png?ex=690b642b&is=690a12ab&hm=3d1fe8f1b4e6f2c585c4a80577cc193095f23f3747bd3f0e4f0fee9af6dc1998&
14:50:19 <xarick> Value Descending is the only one that repeats the same items as it iterates over list.Next/list.IsEnd
14:50:33 <xarick> SetValue
14:50:52 <xarick> let me point that in the picture
14:53:07 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435280709521637607/Captura_de_ecra_2025-11-04_144947.png?ex=690b64d3&is=690a1353&hm=a8bbd13158f0ea7591243b91ca825e9de3318c1017b28121a4067d24f2527331&
14:55:03 *** Wormnest has joined #openttd
14:57:56 <xarick> maybe... just maybe we could fix the repeating issue in value descending
15:22:18 <xarick> about this line again:
15:22:18 <xarick> <https://github.com/JGRennison/OpenTTD-patches/blob/jgrpp/src/script/api/script_list.cpp#L740> with that fix last night, this could be removed
15:26:20 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14754: Codechange: Use std-find instead of for-loops in strgen. https://github.com/OpenTTD/OpenTTD/pull/14754
15:27:05 <xarick> something tells me we're fixing this the wrong way
15:27:11 <xarick> but...
15:27:27 <xarick> I dunno, it's just a feeling
15:33:36 <_jgr_> xarick: No, that wouldn't be correct
15:37:01 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic commented on pull request #14752: Change: Iterate tiles in 16x16 pattern to improve tile loop speed https://github.com/OpenTTD/OpenTTD/pull/14752#pullrequestreview-3417153919
15:44:19 <xarick> yeah, it can be removed
15:44:44 <xarick> im testing
15:47:42 <xarick> let me test the Valuate
15:48:39 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #14753: Fix: [Script] ScriptList sorter remove when the next item is the end https://github.com/OpenTTD/OpenTTD/pull/14753#issuecomment-3486682315
15:59:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13303: Change: Implement side-by-side font cache, allowing use of multiple fonts. https://github.com/OpenTTD/OpenTTD/pull/13303
16:04:07 <DorpsGek> [OpenTTD/OpenTTD] Rito13 opened issue #14755: [Bug]: Inconsistent selection markings in build station window. https://github.com/OpenTTD/OpenTTD/issues/14755
16:07:47 <Borg> with TileIterator should I use? from quick look at class definitions.. Diagonal sounds about right.. its square w/ x,y size
16:07:50 <Borg> right?
16:17:03 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435301832003031090/image.png?ex=690b787f&is=690a26ff&hm=9ccde9011254c5afca95ef7cc0b2387c2cd268412736d41d6e52d04dcf95ecb8&
16:17:03 <xarick> foreach ordering is kinda bogus...
16:17:47 <rito12_51026> Yey, I've reproduced segfault on the master branch.
16:18:17 <xarick> note this Valuate is my SlowValuate with foreach (item, _ in this)
16:18:29 <xarick> and i assign 3 to all items just to make sure
16:21:43 <xarick> ScriptList::_nexti problem maybe?
16:29:55 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#pullrequestreview-3417456768
16:33:49 <xarick> ah no, it's fine
16:34:02 <xarick> false alarm
16:34:19 <xarick> item 1 was added with value 0
16:34:40 <xarick> and item 0 has a value 3
16:34:42 <DorpsGek> [OpenTTD/OpenTTD] Rito13 opened issue #14756: [Crash]: Segmentation fault when using badges for stations. https://github.com/OpenTTD/OpenTTD/issues/14756
16:35:05 <xarick> so, for a value descending sorter, it begins with item 0
16:35:14 <xarick> which has the highest value 3
16:36:29 <xarick> item 1 comes next, changing its value from 0 to 3 only now
16:36:30 *** Beer has joined #openttd
16:44:21 <_glx_> that's why Valuate always use ascending by item
16:45:27 <_glx_> I think you should try <https://github.com/OpenTTD/OpenTTD/compare/master...glx22:OpenTTD:suspendable>
16:45:38 <mmtunligit> I'm thinking of changing my PR so the waypoint sign can also be placed freely in it's StationRect. If i do this should i try and get the highlight function to be agnostic as to wether its a station or a waypoint, or should i just add a second identical function for waypoints
16:58:14 <mmtunligit> im gonna do two seperate functions for now and if im requested to merge them later I will
16:59:27 <mmtunligit> not entirely sure how to get basestation pointer from window ID and dont want to get sidetracked trying to figure that out rn, i suspect its just adding some constant but i dont know where to find that constant
16:59:57 <peter1138> The sign should be on one of the tiles of the station/waypoint.
17:00:42 <mmtunligit> i thought you were the one who suggeted that the sign should be anywhere in the stationrect (for stations at least) in the first place?
17:01:33 <mmtunligit> oh ok no it wasnt
17:01:53 <mmtunligit> but you can have the sign not on a station tile at current
17:02:25 <mmtunligit> just requires some tedious placement shenanigans
17:02:49 <mmtunligit> so i dont see why you shouldnt be able to just move it to that tile instead
17:02:50 <peter1138> Apparently so. That's probably a bug.
17:04:49 <mmtunligit> i mean i dont see any issue with it personally, if you have a station split across the edge sides of a 4 track mainline being able to have the name in the middle would be nice
17:20:47 <tabytac> mmtunligit: agreed
17:33:56 <mmtunligit> and if its a bug its a bug that's been there for 19 years at the minimum, ever since moving the sign was a thing at all, which I suspect means that in original TTD, the sign was perfectly happy sitting on a non-station tile, since the blame for removing station tiles goes all the way back to the original commit without ever checking for that
17:35:04 *** Wolf01 has joined #openttd
17:56:20 <LordAro> it's making it a load more difficult, but perhaps something involving drawing lines between the "default position" and all the station tiles, rather than just the blanket "anywhere within the rectangle"
17:57:26 <LordAro> avoids the extreme case of having two station tiles 64 tiles apart on opposite corners and putting the station label in the 3rd corner
18:00:04 <_jgr_> These sorts of restrictions sound easily bypassable by building a station tile and then just removing it when the station tile is where you want
18:00:27 <LordAro> i was sort of assuming any modification to the station would reset the label
18:00:30 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
18:01:19 <mmtunligit> id be amenable to something like "within 2 or 3 tiles of the station tile" though id probably want to do it in a seperate PR since id also be modifying the behavior of the sign when removing tiles, i dont think it should update on adding tiles ever
18:01:53 <mmtunligit> *2-3 tiles of a station tile
18:02:46 <LordAro> perhaps not on add, but definitely reset on remove
18:03:00 <mmtunligit> removing for sure, it would have to
18:04:28 <mmtunligit> but also i dont really know how much we should even be worrying about the extreme case, the only real reason to do something like that is trolling on MP servers and experimentation with infinite money or whatever, i dont think youre ever really gonna have a player unable to find the sign if theyre just playing normally
18:13:55 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:15:01 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #14757: Fix: BaseBitSet bit iteration for values which don't fit in 32 bits https://github.com/OpenTTD/OpenTTD/pull/14757
18:15:07 *** WormnestAndroid has joined #openttd
18:27:58 <andythenorth> salmon for lunch?
18:28:08 <andythenorth> hmm FIRS seafood economy
18:28:12 <andythenorth> 47 types of fish
18:28:15 <andythenorth> then fish pie
18:28:16 <andythenorth> fish fingers
18:28:22 <andythenorth> 3 kinds of sushi
18:28:32 <andythenorth> sardine paste
18:28:36 <rito12_51026> andythenorth: only 3 ?
18:31:47 <andythenorth> got to be cautious about the cargo limit
18:31:48 <xarick> should the sorters need to indicate next_item to be valid or invalid?
18:32:38 <xarick> because 0 is ambiguous
18:34:44 <xarick> gonna experiment something about it
18:37:25 *** SigHunter has quit IRC ()
18:40:21 *** SigHunter has joined #openttd
19:22:50 <DorpsGek> [OpenTTD/OpenTTD] michicc approved pull request #14757: Fix: BaseBitSet bit iteration for values which don't fit in 32 bits https://github.com/OpenTTD/OpenTTD/pull/14757#pullrequestreview-3418317689
19:23:22 <DorpsGek> [OpenTTD/OpenTTD] michicc merged pull request #14757: Fix: BaseBitSet bit iteration for values which don't fit in 32 bits https://github.com/OpenTTD/OpenTTD/pull/14757
19:27:18 <peter1138> Oops.
20:03:39 *** Flygon has joined #openttd
20:13:57 <xarick> I wanna try the suspendable branch
20:14:43 <xarick> but looking at the result.txt being different about the randomized values... doesn't feel right
20:26:42 <andythenorth> more cheese cargos?
20:26:49 <andythenorth> how many types of wine are there?
20:35:25 <_zephyris> Only 2 (rose is a con)
20:36:57 <andythenorth> "rose is just red and white mixed"
20:45:14 <_glx_> xarick: it's perfectly fine, the random values change because every Valuate call is now spread over multiple ticks
20:46:45 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
20:47:06 *** WormnestAndroid has joined #openttd
20:49:00 <_glx_> and actually in the huge block of changes in result it's only a single removed random (the one for 1003, others are just offset
20:51:06 <_glx_> reason is when valuating 1003 limit is reached, so on next tick 1003 is valuated again
20:51:58 *** Borg has quit IRC (Quit: leaving)
20:53:21 <_glx_> and the limit for the first pass can be lower than the next pass, because limit is always the remaining ops allowed for the tick
20:53:33 *** gelignite has joined #openttd
20:53:57 <_glx_> so first pass has less due to whatever is done before the Valuate call
20:54:51 *** Wormnest has joined #openttd
20:57:11 <_glx_> the idea is a Valuate call spread over multiple ticks and the ticks not using more ops than allowed
20:57:59 <_glx_> so the size of the list can't affect the framerate
20:58:52 <_glx_> the only penalty is the script taking more ticks
21:01:17 *** tokai|noir has joined #openttd
21:01:17 *** ChanServ sets mode: +v tokai|noir
21:02:42 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435373718108115005/image.png?ex=690bbb72&is=690a69f2&hm=b492817592908287c742cc5b493e0b7c1ab5e014403173f09cae27e66361e863&
21:02:42 <xarick> trying to fix the Next(4) on a list with 3 items isn't going well
21:08:15 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:17:29 *** Beer has quit IRC (Quit: Leaving)
21:33:11 <xarick> question, is the regression test on github running with asserts enabled?
21:33:46 <kuhnovic> andythenorth: Can't wait for Cheesetown!
21:34:06 <andythenorth> 255 types of cheese
21:34:12 <andythenorth> Cheeseshop GS
21:34:21 <_glx_> it's a debug build so of course asserts are enabled
21:34:24 <andythenorth> what will the new cargo limit be? 4096?
21:38:27 <xarick> thx
21:41:27 <xarick> Oops, I finally have proof that this line is required <https://github.com/JGRennison/OpenTTD-patches/blob/jgrpp/src/script/api/script_list.cpp#L740> got a nice crash about different iterator types
21:43:16 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435383924460093461/image.png?ex=690bc4f3&is=690a7373&hm=7eb0ee28c803eae32212b8601b5439fcdb413badad352e8bb5d9f6af6ed41719&
21:43:55 *** Flygon has quit IRC (Remote host closed the connection)
21:45:50 <_zephyris> 🧀
21:46:00 <_zephyris> I can imagine cheese working quite well in toyland...
21:49:25 <andythenorth> wrong trousers
21:50:04 <_zephyris> interesting vehicle idea
21:50:41 <andythenorth> hmm self-laying train track?
21:50:55 <_zephyris> Haha
21:51:04 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1435385886941511892/gromit-wallace-and-gromit.png?ex=690bc6c7&is=690a7547&hm=95fef0a3f69022be359ed1c9a1fb7f582677499b58fba5c930e46464311f36dd&
22:02:51 <xarick> interesting
22:03:33 <xarick> trying the same test that crashes on safe btree -> doesn't crash. not so safe as it name implies
22:24:10 *** gelignite has quit IRC ()
22:31:00 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:45:58 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435399707185905884/image.png?ex=690bd3a6&is=690a8226&hm=4fed211af2524b590efcf864eb2f5efa259a67d59cec784348e223472a054f6c&
22:45:58 <xarick> I pulled a peter
22:46:26 <xarick> while trying to fix the Next(4) on lists with 3 items
22:48:20 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:59:52 <xarick> renewed village growth skipping the Begin?
23:00:09 <xarick> ah no
23:13:47 <xarick> renewed village growth does look correct
23:14:13 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435406813460697228/image.png?ex=690bda44&is=690a88c4&hm=190e981e32f6cdbe02b5106ce761be07eb70ca5f28fe60612a04990d14e50b37&
23:15:39 <xarick> last value for cargo from raw_list.Next() is not used
23:23:24 <_glx_> we need to write test cases for different usages of Begin(), IsEnd() and Next(), and also with different Remove() while iterating
23:44:32 <xarick> <https://github.com/SamuXarick/OpenTTD/commit/004610d1c02491677612614124939edb4c95dc32> I have a tentative fix for list.Next past the end repeating the last item. But regression is touched.
23:47:57 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1435415304846184511/image.png?ex=690be22d&is=690a90ad&hm=360dac6ade6cc3ffb7ab1a13fe40092abc29800e60b0550bf153a41dd4b1ccf0&
23:48:32 <xarick> list has 3 items.
23:49:28 <xarick> local i = list.Begin(); -> i = 3
23:49:28 <xarick> i = list.Next(); -> i = 2
23:49:28 <xarick> i = list.Next(); -> i = 1
23:49:28 <xarick> i = list.Next(); -> i = 0 (invalid item)
23:49:28 <xarick> i = list.Next(); -> i = 0 (invalid item)