⏴ go to previous day
00:28:39 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #15250: Codechange: unify documentation and parameter names of sorters https://github.com/OpenTTD/OpenTTD/pull/15250#pullrequestreview-3782336897
00:33:09 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
00:42:23 *** WormnestAndroid has joined #openttd
02:45:22 *** Wormnest has quit IRC (Quit: Leaving)
03:53:44 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #15250: Codechange: unify documentation and parameter names of sorters https://github.com/OpenTTD/OpenTTD/pull/15250
04:24:43 *** Zathras_7 has joined #openttd
04:24:55 *** Zathras_4 has joined #openttd
04:28:05 *** Zathras_11 has quit IRC (Ping timeout: 480 seconds)
04:28:15 *** Zathras_1 has quit IRC (Ping timeout: 480 seconds)
04:36:57 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #15256: Codechange: document undocumented functions and remove duplicate documentation https://github.com/OpenTTD/OpenTTD/pull/15256
04:48:23 *** WormnestAndroid has quit IRC (Remote host closed the connection)
04:48:27 *** WormnestAndroid has joined #openttd
05:13:43 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/04436b740180e7927559f4e266a923db40ec25fc
05:13:44 <DorpsGek> - Update: Translations from eints (by translators)
05:44:20 *** Flygon has joined #openttd
08:41:55 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #15256: Codechange: document undocumented functions and remove duplicate documentation https://github.com/OpenTTD/OpenTTD/pull/15256#pullrequestreview-3783497750
09:15:08 <ahyangyi> Oops.
09:32:08 <LordAro> oops
11:02:39 <xarick> document undocumented
11:02:48 <xarick> isn't document enough
11:17:49 <xarick> my brain needs help <https://wiki.openttd.org/en/Manual/Game%20Mechanics/#vehicle-speeds>
11:22:47 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213#pullrequestreview-3784205345
11:43:30 <xarick> visual studio 18.3.0 released
11:44:16 <xarick> more copilot features :|
11:46:32 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471110150629756999/image.png?ex=698dbd97&is=698c6c17&hm=a58b4cfa064f266f5c719beaf89013fe253afda227d5dc96bd765fd325b17422&
11:46:32 <xarick> oh, seems that they finally fixed clang
11:46:39 <xarick> gottta test
11:53:52 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471111995678916752/image.png?ex=698dbf4f&is=698c6dcf&hm=4107d82ed33a2bfea8292ff48c727db4f2d2c506f7d2db0ebe3a9540574c0e65&
11:53:52 <xarick> nop
11:56:14 <_glx_> Changelog said nothing about that
11:59:28 <xarick> maybe PR? https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:clang-manifest-workaround
11:59:28 <xarick> they're taking too long to fix it
12:15:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471117377851756695/image.png?ex=698dc452&is=698c72d2&hm=8ba7cd4ea159c886eb9024162e58eda642ac60cbe74c6a0f25f1abde254eabeb&
12:15:15 <xarick> still works
12:56:44 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #15242: [Crash]: 15.1, EXCEPTION_ACCESS_VIOLATION, click on a town name close to the edge of the map https://github.com/OpenTTD/OpenTTD/issues/15242
12:56:47 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #15242: [Crash]: 15.1, EXCEPTION_ACCESS_VIOLATION, click on a town name close to the edge of the map https://github.com/OpenTTD/OpenTTD/issues/15242
14:20:56 <xarick> I'm sad this was closed <https://github.com/OpenTTD/OpenTTD/pull/12087>
14:21:31 <LordAro> do you find frosch's solution inadequate?
14:21:35 <xarick> while this was merged <https://github.com/OpenTTD/OpenTTD/pull/12085>
14:31:05 <andythenorth[d]> open source is inconsistent
14:31:08 <andythenorth[d]> such is life
14:31:38 <LordAro> you're welcome to point out the inconsistency
14:31:48 <LordAro> but whinging here definitely does nothing other than make people hate you
14:34:50 *** Zathras_4 has quit IRC (Quit: Connection reset by beer!)
14:39:25 *** Wormnest has joined #openttd
14:58:00 <peter1138> "Hate" is a bit strong.
15:00:04 <andythenorth[d]> it's more a sort of disinclination to be in the channel
15:00:14 <andythenorth[d]> and not do anything with any PRs
15:00:27 <andythenorth[d]> speaking as someone who also isn't perfect 😛
15:22:39 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #15256: Codechange: document undocumented functions and remove duplicate documentation https://github.com/OpenTTD/OpenTTD/pull/15256
15:23:03 <LordAro> yeah, sorry, that was too much
15:23:06 <xarick> WrightAI uses AIVehicle.GetAge, <https://github.com/OpenTTD/OpenTTD/pull/13476>
15:23:07 <LordAro> it's been A Day
15:23:20 <xarick> can i has 13476?
15:24:40 <xarick> glx was attempting something
15:37:07 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #13476: Add: [Script] GetEconomyAge and GetWagonEconomyAge https://github.com/OpenTTD/OpenTTD/pull/13476
16:37:40 *** gelignite has joined #openttd
16:47:01 <xarick> why can't we valuate docommands in test mode?
17:42:56 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213
18:21:53 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #15257: Codechange: move documentation to super class and add missing documentation https://github.com/OpenTTD/OpenTTD/pull/15257
18:48:16 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213#issuecomment-3886272934
18:49:53 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #15257: Codechange: move documentation to super class and add missing documentation https://github.com/OpenTTD/OpenTTD/pull/15257#pullrequestreview-3786639171
18:56:39 <talltyler> Rubidium, you're doing thankless work, so here's a thank-you from me 🙂
19:01:42 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213#issuecomment-3886340895
19:02:53 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213#issuecomment-3886347761
19:06:51 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #15257: Codechange: move documentation to super class and add missing documentation https://github.com/OpenTTD/OpenTTD/pull/15257#pullrequestreview-3786730932
19:07:57 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #15257: Codechange: move documentation to super class and add missing documentation https://github.com/OpenTTD/OpenTTD/pull/15257#pullrequestreview-3786738553
19:08:03 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #15257: Codechange: move documentation to super class and add missing documentation https://github.com/OpenTTD/OpenTTD/pull/15257#pullrequestreview-3786739152
19:11:04 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213#issuecomment-3886398585
19:12:40 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213#pullrequestreview-3786770945
19:40:44 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
19:42:03 *** MinchinWeb[m] has joined #openttd
19:43:28 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #15213: Codechange: move documentation to declaration, when there are multiple implementations https://github.com/OpenTTD/OpenTTD/pull/15213
19:43:34 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #15257: Codechange: move documentation to super class and add missing documentation https://github.com/OpenTTD/OpenTTD/pull/15257
19:54:49 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #15258: Codechange: use size_t for glyph/run counts, remove unneeded glyph count instance variable https://github.com/OpenTTD/OpenTTD/pull/15258
19:56:45 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #15258: Codechange: use size_t for glyph/run counts, remove unneeded glyph count instance variable https://github.com/OpenTTD/OpenTTD/pull/15258#pullrequestreview-3787061327
19:59:30 <xarick> this function feels incomplete :( <https://docs.openttd.org/ai-api/classAICargo#a933c5a62da0e37ab20e047f76d14d5bd>
19:59:39 <xarick> what about the amount?
20:06:29 <_glx_> Script can do return value * amount
20:06:53 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471236068513677312/image.png?ex=698e32dc&is=698ce15c&hm=ea647361e92fab3221355304afe951e4a6e26cd01411bcb348c599869fbfa92c&
20:06:53 <xarick> what is this clamp...
20:07:40 <xarick> ah
20:07:58 <_glx_> Easy to prevent overflow
20:08:20 <_glx_> And max days is 637
20:09:02 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471236610560622806/image.png?ex=698e335e&is=698ce1de&hm=cda235ecfa2f9d587d6f877a59af9a2009449541cdb2887b355a0a7317879fcd&
20:10:30 <xarick> clamps to uint16_max, not 637 :p
20:11:04 <xarick> oh, my maths
20:11:21 <xarick> 255, should be wint8_max?
20:13:12 <xarick> GetTransportedGoodsIncome doesn't clamp to 255
20:15:12 <xarick> let me see what happens if i put 1000 days in transit
20:28:58 *** Wolf01 has joined #openttd
20:34:28 <xarick> it worked
20:34:50 <xarick> that 637 figure is outdated?
20:39:51 <xarick> > The distance the cargo travels from begin to end. The value will be clamped to 0 .. MAX(int).
20:39:51 <xarick> Is this distance manhattan?
20:40:01 <xarick> it's not clear
20:40:54 <xarick> distance square in case of aircraft?
20:44:39 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #15258: Codechange: use size_t for glyph/run counts, remove unneeded glyph count instance variable https://github.com/OpenTTD/OpenTTD/pull/15258
20:51:18 <xarick> there's rounding issues if I multiply GetCargoIncome * number of pieces
20:59:10 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471249224698957969/image.png?ex=698e3f1d&is=698ced9d&hm=fa22388259bbb645619cfdfd77675fa36f4e146f256ad4daeb293ccfaa103637&
20:59:10 <xarick> there's a problem with this Clamp
20:59:27 <xarick> Clamp returned 0
21:01:59 *** Smedles has joined #openttd
21:03:33 *** Smedles_ has joined #openttd
21:03:40 *** Smedles___ has quit IRC (Read error: Connection reset by peer)
21:10:52 *** Smedles has quit IRC (Ping timeout: 480 seconds)
21:12:01 <_glx_> huge overflow
21:14:22 <xarick> > Amount of (game) days the cargo is in transit.
21:14:22 <xarick> this supposed to be economy days nowadays right?
21:23:23 <xarick> The max value of this variable is 163838. Any value higher returns the same as 163838 would.
21:23:39 <xarick> does it even matter to mention this?
21:24:51 <xarick> how many years are 163838
21:25:04 <xarick> 448 years
21:43:57 <DorpsGek> [OpenTTD/OpenTTD] risethetechnician opened issue #15259: [Bug]: Unable to decompress online content for some reason https://github.com/OpenTTD/OpenTTD/issues/15259
21:50:43 <DorpsGek> [OpenTTD/OpenTTD] James103 commented on issue #15259: [Bug]: Unable to decompress online content for some reason https://github.com/OpenTTD/OpenTTD/issues/15259
22:04:42 <xarick> hmm how to properly fix the underflow
22:26:18 *** Flygon has quit IRC (Read error: Connection reset by peer)
22:39:49 <xarick> `days_in_transit = Clamp(static_cast<uint64_t>(Clamp<SQInteger>(days_in_transit, 0, std::numeric_limits<SQInteger>::max())) * 2 / 5, 0, UINT16_MAX);`
22:39:57 <xarick> how do i make this prettier
22:46:41 <xarick> `days_in_transit = Clamp(static_cast<uint64_t>(std::max<SQInteger>(days_in_transit, 0)) * 2 / 5, 0, UINT16_MAX);`
22:51:32 <xarick> Clamp is int...
22:51:54 <xarick> overflow on overflow
22:53:17 <xarick> final form:
22:53:17 <xarick> `days_in_transit = Clamp<uint64_t>(static_cast<uint64_t>(std::max<SQInteger>(days_in_transit, 0)) * 2 / 5, 0, UINT16_MAX);`
23:02:06 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:10:19 *** gelignite has quit IRC ()
23:11:14 <_glx_> easier to limit days_in_transit according to the doc
23:11:43 <_glx_> `days_in_transit = min(days_in_transit, 637);
23:13:24 <xarick> 637 is outdated
23:15:07 <_glx_> it's not
23:16:18 <_glx_> third arg for `GetTransportedGoodsIncome` can't be over 255
23:16:34 <_glx_> it's clamped to uint8 for newgrf callback
23:19:02 <_glx_> so `637 * 2 / 5` is the max if a newgrf provided the cargo and income calculation
23:23:43 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471285605341200404/image.png?ex=698e60ff&is=698d0f7f&hm=560f23f3602a28766ed29d0fa2a1403384a4080e6fdd1550c81e26e7b2780ef1&
23:23:43 <xarick> I got an idea
23:25:06 <_glx_> still wrong, the result of `days_in_transit * 2 / 5` can't exceed 255 for newgrfs
23:27:06 <xarick> what about vanilla?
23:27:33 <xarick> how to solve
23:27:50 <_glx_> limit to 637, it always works
23:28:11 <xarick> UINT8_MAX
23:29:15 <xarick> It feels .... incorrect, i mean...
23:30:31 <xarick> i tried bigger than 637, periods_over_max > 0 becomes true
23:36:01 <xarick> testing GetTransportedGoodsIncome(1, 4092, 638, cargo_type)
23:36:18 <xarick> theoretical max distance
23:36:38 <xarick> even though i can put a giant number there
23:37:10 <_glx_> well 638 here means 638*2.5 days
23:37:52 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1471289166728790233/image.png?ex=698e6450&is=698d12d0&hm=93f77d6a7e142f42f6c8f66bbf850b374cc2c6c5f0d5b06c6e730a3a5ef563f4&
23:40:24 <xarick> tried 1000 days in transit:
23:40:24 <xarick> bigmuls returns 4
23:40:34 <_glx_> xarick: seems to be a correct way to prevent `days_in_transit * 2 / 5` to overflow
23:41:59 <xarick> are vehicles actually limited to those 637 days in transit yet?
23:42:52 <xarick> or the cargo in transit
23:43:05 <xarick> didn't dig enough to find out
23:47:22 <xarick> I got this so far: <https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:improve-GetCargoIncome>
23:47:44 <xarick> I was looking into adding an extra num_pieces
23:48:32 <xarick> better than multiplying by num_pieces from the outside
23:48:38 <xarick> more correct value
23:49:15 <_glx_> external muliplication won't really affect the result
23:54:14 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
continue to next day ⏵