IRC logs for #openttd on OFTC at 2019-10-05
            
00:00:35 *** Samu has quit IRC
00:00:43 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCvN
00:02:06 *** Compu has joined #openttd
00:03:45 *** Progman has quit IRC
00:05:09 <LordAro> nielsm: of course technically, there could be a difference between operator< & operator>=
00:05:10 <glx> indeed newgrf can return custom errors, that can be displayed during DoCommand()
00:08:06 <nielsm> LordAro oh yes, someone might have defined >= as a "funnel operator"
00:08:21 *** Arveen has quit IRC
00:09:12 <nielsm> and <= might be the "bowl and faucet" operator
00:09:22 <LordAro> lol
00:11:56 <nielsm> also need to find a way to define -!- as the "broken minus" operator
00:12:46 <nielsm> or maybe you could call it a closed valve operator
00:13:05 <nielsm> -*- would be the turn valve operator
00:14:18 <LordAro> hmm
00:17:14 <LordAro> nielsm: https://godbolt.org/z/1kaTlZ
00:21:10 *** gelignite has quit IRC
00:23:27 *** nielsm is now known as Guest4138
00:24:16 *** nielsm has joined #openttd
00:24:22 *** Guest4138 has quit IRC
00:25:10 <Eddi|zuHause> then what's the ^.^ operator?
00:25:32 <Eddi|zuHause> or the =^^= operator?
00:25:48 <frosch123> we already had the elvis operator this week
00:25:52 <nielsm> I don't think those are possible syntax
00:26:32 <LordAro> alas, the '.' cannot be overridden
00:28:13 <nielsm> and there is no prefix or suffix unary operator=
00:28:30 <LordAro> ^-^ is possible though
00:29:15 <LordAro> ah, no, must be binary
00:29:51 <frosch123> at some point there was a patch/suggestion to add "%" for mirroring roadbits
00:30:02 <frosch123> luckily it was rejected
00:30:26 *** Arveen has joined #openttd
00:32:25 <nielsm> bool operator >= (std::vector<CargoPacket> &cargo, Industry &ind) { /* deliver cargo to industry */ }
00:32:49 <LordAro> :D
00:32:56 <LordAro> (also oh god no)
00:32:58 <Eddi|zuHause> wouldn't >> be more fitting for that?
00:33:18 <LordAro> would be more in keeping with the STL
00:33:21 <nielsm> no the cargo needs to go through a funnel
00:33:39 <LordAro> :D
00:35:10 <nielsm> the main issue with the interrobang operator is that you need a colon somewhere later
00:36:40 <nielsm> and I can't think of a good use for it
00:37:47 <Eddi|zuHause> ?! or !?
00:37:53 <nielsm> ?!
00:37:59 <nielsm> you can't place a ! before a ?
00:38:25 <nielsm> vehicle == nullptr?! a : b
00:39:24 <nielsm> vehicle == nullptr?! haha :D
00:39:45 <nielsm> for appropriate declarations of haha and D
00:45:08 *** firewire1394 has quit IRC
00:45:14 *** Wolf01 has quit IRC
00:45:30 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
00:45:52 <frosch123> oh, did i already rant about c++20 adding "october/5/2019" for setting dates in source
00:46:53 <nielsm> yeah uh... that's dumb
00:57:44 <glx> yeah and using the silly order
00:57:57 <glx> mdy is the worse
00:58:36 <nielsm> it's just to allow suffixless numbers to be used
00:59:16 <nielsm> when you start with a constant that represents a month you can overload operator / to create a yearless date
01:00:01 <nielsm> 2019Y-10M-5D
01:00:05 <nielsm> how about that
01:00:25 <frosch123> how often do you need fixed dates in the source? date(y, m, d) would suffice
01:00:33 <nielsm> (I forget if that's the possible syntax or if you need the _ before the suffix)
01:00:50 <nielsm> yeah it seems a very pointless exercise all in all
01:01:09 <LordAro> https://godbolt.org/z/DM3kjs this is definitely getting silly now
01:01:25 <nielsm> a dumb trick being codified into the standard library, like std::vector<bool>
01:02:26 <LordAro> nielsm: you don't *need* it, but literals starting without a _ are reserved for the STL
01:02:36 <LordAro> unless you turn that warning off, of course
01:02:39 <milek7> 2019Y-10M-5D looks like subtraction
01:05:23 <LordAro> the above godbolt link requires gcc trunk, and clang just falls over entirely
01:05:48 <LordAro> i'm not entirely sure who's parsing x² correctly...
01:07:43 * glx is trying to understand what is <=> operator usage
01:08:29 <frosch123> when you want to distinguish <, == and >
01:08:38 <frosch123> and comparing twice is too expensive
01:09:02 <LordAro> old c-style -1, 0, 1
01:09:07 <frosch123> LordAro: i am still wondering what x² is doing exactly
01:09:11 <LordAro> essentially
01:09:22 <LordAro> frosch123: i was trying to make a square operator
01:09:26 <LordAro> works in gcc
01:09:51 <frosch123> well, i understand the 56² and "sqrt(7)"²
01:10:05 <frosch123> but what is x² in a declaration
01:10:09 <glx> oh <=> is like the C compare style
01:10:22 <LordAro> frosch123: that was a different attempt
01:10:45 <LordAro> that's probably a variable name
01:10:48 <LordAro> probably.
01:11:08 <glx> or x = 9²
01:11:15 <frosch123> oh, right, unicode variable names
01:12:13 <LordAro> seems like my ² only works with literals
01:12:40 <glx> unicode variable names will be fun with all the unicode spaces :)
01:13:22 <frosch123> nothing commit-hooks can't fix :p
01:13:54 <glx> let's replace _ with NBSP in names :)
01:15:44 <frosch123> i am more worried about compile-time debuggers, when they actually add metaclasses
01:17:41 <nielsm> wow look at the time
01:17:42 <nielsm> gn
01:17:46 *** nielsm has quit IRC
01:18:15 <glx> oh the new keywords will probably break some existing programs
01:19:07 <glx> I can see "concept" and "requires" as existing variable names in some source code
01:19:19 <frosch123> they are no global keywords
01:19:39 <frosch123> they are only special in the place where they can be used
01:19:54 <glx> ha like override
01:19:56 <LordAro> be nice if they went all in and used yield and await instead of co_yield & co_await
01:20:00 <LordAro> which is ugly as hell
01:20:17 <glx> it's to mark coroutines I guess
01:23:58 <frosch123> LordAro: #define yield co_yield
01:24:12 <LordAro> probable
01:24:19 <LordAro> same as _Bool :p
01:27:52 *** tokai has joined #openttd
01:27:52 *** ChanServ sets mode: +v tokai
01:34:41 *** tokai|noir has quit IRC
01:47:42 *** frosch123 has quit IRC
02:04:35 <DorpsGek_III> [OpenTTD/OpenTTD] kernigh opened issue #7761: www.openttd.org is offline via IPv6 https://git.io/JeCJa
02:05:58 <Eddi|zuHause> they should just abandon IPv6 as a failed experiment </andy>
02:08:17 <DorpsGek_III> [OpenTTD/website] kernigh opened issue #101: www.openttd.org is offline via IPv6 https://git.io/JeCJi
02:08:24 <LordAro> (i transferred it)
02:11:38 <glx> I can confirm it's broken for me
02:11:55 <LordAro> give TB a poke in the morning
02:12:04 <LordAro> though he's probably got an email
02:13:14 <glx> and it's probably the proxy again
02:13:19 *** avdg has quit IRC
02:13:23 *** Ammler has quit IRC
02:14:18 *** tneo has quit IRC
02:14:18 *** Yexo has quit IRC
02:14:26 *** ^Spike^ has quit IRC
02:14:29 *** V453000 has quit IRC
02:14:33 <LordAro> uhoh
02:14:39 *** Osai has quit IRC
02:15:14 *** Hirundo has quit IRC
02:15:16 *** Webster has quit IRC
02:15:16 <glx> bouncer is dead :)
02:15:28 *** Hazzard has quit IRC
02:16:12 <glx> and so is logging of the channel
02:16:30 <LordAro> quick, stop talking
02:16:47 *** Terkhen has quit IRC
02:16:48 *** planetmaker has quit IRC
02:16:48 *** SmatZ has quit IRC
02:16:48 *** fonsinchen has quit IRC
02:16:50 <glx> we can say some secret stuff
02:16:54 *** XeryusTC has quit IRC
02:19:17 <glx> haha your "Add: Me" commit
02:40:39 *** WormnestAndroid has quit IRC
02:41:13 *** WormnestAndroid has joined #openttd
03:25:18 *** Hazzard has joined #openttd
03:25:59 *** ^Spike^ has joined #openttd
03:26:07 *** Webster has joined #openttd
03:26:14 *** Hirundo has joined #openttd
03:26:14 *** SmatZ has joined #openttd
03:26:44 *** Terkhen has joined #openttd
03:26:44 *** Yexo has joined #openttd
03:26:44 *** ChanServ sets mode: +o Terkhen
03:27:08 *** planetmaker has joined #openttd
03:27:08 *** ChanServ sets mode: +o planetmaker
03:27:15 *** avdg has joined #openttd
03:28:15 *** tneo has joined #openttd
03:28:15 *** V453000 has joined #openttd
03:28:17 *** XeryusTC has joined #openttd
03:28:45 *** Ammler has joined #openttd
03:29:15 *** fonsinchen has joined #openttd
03:29:45 *** Osai has joined #openttd
03:38:24 *** WormnestAndroid has quit IRC
03:38:36 *** WormnestAndroid has joined #openttd
03:44:35 *** Flygon has joined #openttd
03:48:59 *** tokai|noir has joined #openttd
03:48:59 *** ChanServ sets mode: +v tokai|noir
03:53:25 *** glx has quit IRC
03:55:44 *** tokai has quit IRC
03:59:12 *** Wormnest__ has joined #openttd
04:02:05 *** HerzogDeXtEr has quit IRC
06:19:58 *** Pikka has joined #openttd
07:29:19 *** Smedles has quit IRC
07:34:34 *** Smedles has joined #openttd
07:41:46 *** Smedles has quit IRC
07:55:59 *** Smedles has joined #openttd
07:57:49 *** Smedles has joined #openttd
08:04:23 <DorpsGek_III> [OpenTTD/OpenTTD] joestringer commented on pull request #7057: Fix: A few minor compile warnings under MinGW https://git.io/JeCkl
08:15:57 <DorpsGek_III> [OpenTTD/website] TrueBrain closed issue #101: www.openttd.org is offline via IPv6 https://git.io/JeCJi
08:15:58 <DorpsGek_III> [OpenTTD/website] TrueBrain commented on issue #101: www.openttd.org is offline via IPv6 https://git.io/JeCJi
08:20:12 *** nielsm has joined #openttd
08:22:39 <nielsm> morning...
08:49:38 *** Progman has joined #openttd
09:03:37 *** sla_ro|master has joined #openttd
09:14:22 *** Samu has joined #openttd
09:28:49 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #7057: Fix: A few minor compile warnings under MinGW https://git.io/JeCkQ
09:30:11 *** andythenorth has joined #openttd
09:32:00 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCk7
09:32:51 <andythenorth> o/
09:33:29 <LordAro> sup
09:33:56 <andythenorth> IPv6 again? :)
09:36:18 *** stefino has joined #openttd
09:37:25 <andythenorth> oof should I join reddit?
09:37:44 <andythenorth> so many opinions that need...engaging with
09:39:23 <stefino> hi all. Is possible to code industry tile which will have variable graphics dependent of amount of cargo in idustry?
09:40:06 <stefino> like Dutch stations tiles
09:41:50 <andythenorth> yes, which variable would be used for 'cargo in industry'?
09:41:52 <andythenorth> stockpile?
09:41:58 <andythenorth> some value in a perm storage?
09:44:22 <stefino> is possible to have both of them at once?
09:45:01 <andythenorth> yes
09:45:05 <andythenorth> are you using NML?
09:45:27 <stefino> yes NML :)
09:45:47 <andythenorth> ok
09:46:10 <andythenorth> in the graphics chain, you can use a switch to check any of the available variables or load values from storage
09:46:47 <andythenorth> the switch will decide which spritelayouts to use
09:47:42 <andythenorth> industry has all the 'waiting cargo' vars https://newgrf-specs.tt-wiki.net/wiki/NML:Industries#Industry_variables
09:48:12 <andythenorth> oh those docs might be outdated
09:48:57 <stefino> ooohI tried to find these informations in industry tile page :)
09:49:38 <andythenorth> tiles can read from their industry
09:49:38 <stefino> outdated..you mean update where is possible to have more produces and income cargos?
09:49:48 <andythenorth> yes
09:49:55 <andythenorth> if you have nmlc 0.4 the docs are accurate
09:50:16 <andythenorth> if you have newer unreleased nmlc with 16-cargo industry support, new docs need writing
09:50:56 <stefino> so 16 income and 16 produced cargos now?
09:51:23 <andythenorth> OpenTTD supports that
09:51:48 <andythenorth> and nmlc has support for that coded, but not in a released version
09:51:55 <andythenorth> https://github.com/OpenTTD/nml/commits/master
09:53:35 <stefino> okay okay...we have prepared our industry chains for older 3/2 version so there is no problem for us. But in the future we will use more cargo I think :)
09:54:02 <andythenorth> 16 is good
09:54:11 <andythenorth> the 3/2 is a very nice creative constraint
09:54:21 <andythenorth> but sometimes more is just better
09:57:02 <stefino> yes yes I know :)
09:57:24 *** WormnestAndroid has quit IRC
09:59:08 <stefino> and maybe one question from different part of OTTD. I´m finishing NRT graphics and have a question about bus stops and cargo stops. Will be possible to code different graphics for each roadtype?
10:04:37 *** WormnestAndroid has joined #openttd
10:07:45 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCIf
10:26:03 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
10:27:36 <nielsm> hmm... would be it possible to replace the memcpy() and memset() functions with ones that verify whether the type they're writing to is POD or should actually be handled by C++ ?
10:30:23 <nielsm> it would probably make everything fail to compile
10:32:41 <_dp_> idk what you're doing but pretty sure using any mem function is a bad practice :p
10:32:51 <nielsm> in C++ yes
10:33:31 <nielsm> when std::is_pod<T>::value == false then memset() and memcpy() on the object is definitely UD
10:36:34 <_dp_> why do you even need to check for pod? why not just use std::copy and std::fill and such everywhere?
10:38:00 <nielsm> I suppose those are an option...
10:38:31 <nielsm> oh wait, for some reason std::copy is C++17
10:38:39 <nielsm> while std::copy_if is C++11
10:39:04 <nielsm> std::copy_n exists in C++11
10:40:15 <nielsm> also need std::fill_n for C++11
10:40:46 <nielsm> oh... wait no I'm reading wrong
10:41:10 <nielsm> they do exist since C++98 or something similarly early
10:43:43 <_dp_> yeah, copy should be pre c++11
10:48:31 <nielsm> argh, cheat.cpp and cheat_type.h treat a struct of same-type members as an array
10:50:24 <_dp_> cheaters :p
10:51:29 *** arikover has joined #openttd
10:53:18 <_dp_> looks like ub tbh
10:54:09 *** Etua has joined #openttd
10:54:54 <LordAro> nielsm: ew
10:57:24 *** WormnestAndroid has quit IRC
11:18:13 *** firewire1394 has joined #openttd
11:20:59 *** Etua has quit IRC
11:25:53 *** WormnestAndroid has joined #openttd
11:28:50 *** Samu has quit IRC
11:33:11 <Heiki> http://bananas.openttd.org/en says “You can browse through all available files by selecting one of the four main categories at the top of this page”, apparently that assumes a quite large value of “four”
11:37:24 <andythenorth> bananaramas
12:07:24 *** tokai has joined #openttd
12:07:24 *** ChanServ sets mode: +v tokai
12:08:38 *** Etua has joined #openttd
12:14:13 *** tokai|noir has quit IRC
12:17:58 *** stefino has quit IRC
12:32:33 *** Etua has quit IRC
12:33:24 *** WormnestAndroid has quit IRC
12:33:38 *** WormnestAndroid has joined #openttd
12:37:14 *** firewire1394 has quit IRC
12:58:47 *** frosch123 has joined #openttd
13:09:37 <Eddi|zuHause> <andythenorth> so many opinions that need...engaging with <-- is there someone wrong on the internet?
13:09:46 <andythenorth> not wrong
13:09:54 <andythenorth> but maybe requiring enlightenment
13:10:05 <DorpsGek_III> [OpenTTD/OpenTTD] generateui opened issue #7762: Emoji results in question mark https://git.io/JeCLb
13:11:31 <frosch123> planetmaker: are you doing something on devzone?
13:14:13 <andythenorth> oof it took me 3 hours to write 4 lines of code
13:14:33 <andythenorth> 2 hours 55 minutes of that was figuring out what not to write :P
13:14:36 <Eddi|zuHause> maybe that means you're becoming a better programmer? :p
13:14:43 <andythenorth> I doubt it
13:14:54 <andythenorth> I think my programming skill is like my win rate in Blitz
13:14:58 <andythenorth> stuck at 53.16%
13:15:11 <andythenorth> I program about as well now as I did when I was 7
13:15:31 <Eddi|zuHause> my professor used a rule of thumb: "a bad programmer writes 100 LOC in an hour, a good programmer writes 10 LOC in an hour"
13:15:52 <andythenorth> if someone had taught me both hex and binary when I was a kid, I might have been better
13:16:03 *** HerzogDeXtEr has joined #openttd
13:16:19 <andythenorth> I used to copy out basic programs with "&ff" etc in and no clue what that meant
13:20:45 <andythenorth> devzone is having a lie down eh?
13:23:06 <frosch123> it rebooted at 3am
13:23:14 <frosch123> no idea why
13:23:22 <frosch123> no status from the hoster
13:25:48 <Eddi|zuHause> i should dig out some programs that i wrote as a kid
13:26:05 <Eddi|zuHause> i might still have a diskette with them
13:27:01 <andythenorth> do you a 5" drive?
13:28:59 *** Webster has quit IRC
13:30:45 *** Webster has joined #openttd
13:33:20 <Eddi|zuHause> i have disk drives, but they're not hooked up to anything
13:48:06 <Eddi|zuHause> i don't think i have enough drives to make a floppotron, though
13:56:52 <frosch123> andythenorth: looks like i found the right container to restart
13:56:58 <andythenorth> hurrah
13:58:06 <andythenorth> thanks
13:58:30 * andythenorth wonders about the github migration for the repos
13:58:39 <andythenorth> oh but eints :)
14:20:12 *** tokai|noir has joined #openttd
14:20:12 *** ChanServ sets mode: +v tokai|noir
14:27:08 *** tokai has quit IRC
14:27:53 *** Etua has joined #openttd
15:03:01 *** Pikka has quit IRC
15:06:45 *** glx has joined #openttd
15:06:45 *** ChanServ sets mode: +v glx
15:17:12 <glx> hmm for me #7762 is not a bug
15:21:31 <DorpsGek_III> [OpenTTD/OpenTTD] glx22 commented on issue #7762: Emoji results in question mark https://git.io/JeCLb
16:33:57 <supermop_Home> yo
16:38:58 <supermop_Home> time to give up on this game, made a mess of getting round a mountain and it looks naff
16:39:07 <DorpsGek_III> [OpenTTD/OpenTTD] planetmaker commented on issue #7762: Emoji results in question mark https://git.io/JeCLb
16:40:23 <supermop_Home> planetmaker how about petitioning to get the TT font vehicle symbols added as emoji instead?
16:42:50 <planetmaker> supermop_Home, it doesn't need so much petitioning... more creating glyphs
16:44:19 <supermop_Home> I meant petitioning Unicode consortium
16:44:34 <planetmaker> ah :D :D
16:45:22 *** Flygon has quit IRC
17:17:46 <frosch123> i wonder what our font rendering does with emoji
17:17:54 <frosch123> out fonts are definitely monochrome
17:19:00 <frosch123> planetmaker: devzone rebooted at 3 am, i restarted the proxy container around noon. then stuff appeared to work again
17:19:13 <frosch123> no idea what happened otherwise
17:22:57 <glx> I tried some with arial unicode they don't look too bad
17:23:43 <glx> ❤ and ✔work for me
17:24:14 <glx> but the smileys are not in the font :)
17:25:28 <frosch123> 🦰🦲🦳🏻🏼🏽🏾🏿
17:25:34 <frosch123> no idea how to combine them :)
17:27:08 <frosch123> damn, no unicode nicknames, i tried 🐸
17:35:16 *** Etua has joined #openttd
17:35:21 <andythenorth> hmm
17:35:23 <andythenorth> very Blitz
17:35:31 <andythenorth> did I need to do some newgrf?
17:35:45 <frosch123> have you considered replacing firs cargo names with emojis?
17:35:53 <frosch123> there are various fruit and food emojis
17:36:58 <supermop_Home> "Onigiri Wagon"
17:40:02 <andythenorth> o_O
17:42:27 *** tokai has joined #openttd
17:42:27 *** ChanServ sets mode: +v tokai
17:47:23 *** Progman has quit IRC
17:49:23 *** tokai|noir has quit IRC
17:54:10 <nielsm> could we convert the opengfx sprite fonts into truetype and ship with the game? :D
17:57:01 <nielsm> (regardless of that, we really ought to make some truetype versions of the various icon glyphs so they can scale and look good together with other vector fonts)
18:04:26 <frosch123> i think junajo tried that
18:04:32 <frosch123> no idea how far
18:04:41 <frosch123> but he started with making svg icons
18:05:03 <nielsm> full svg seems like overkill really
18:05:28 <nielsm> since svg has insanely many feature
18:06:00 <frosch123> oh, also the android port did something
18:06:15 *** firewire1394 has joined #openttd
18:11:47 <andythenorth> svg for a pixel game :P
18:11:49 <andythenorth> lol
18:13:49 <frosch123> https://dev.openttdcoop.org/projects/jjgui/repository/show/gfx/svg <- there are lots of them
18:13:56 <frosch123> not pretty, but a start if you want to go that way
18:19:12 *** Progman has joined #openttd
18:47:33 *** Etua has quit IRC
18:53:50 <nielsm> hmm why does this break with some but not all industries
18:58:33 <Eddi|zuHause> what is that, a bohr bug?
19:05:54 <andythenorth> what breaks? o_O
19:07:25 <nielsm> it rejects the definition of the General Store in FIRS 2
19:08:33 <nielsm> okay figured out why
19:09:36 <andythenorth> does anyone know how to use railtype prop 11? and what the expected result is? https://newgrf-specs.tt-wiki.net/wiki/Action0/Railtypes#Curve_Speed_advantage_multiplier_.2811.29
19:10:40 <Eddi|zuHause> andythenorth: it's probably not useful because lack of fractional values?
19:12:23 <nielsm> allright, made everything more complicated for no gain so far
19:12:26 <nielsm> and it seems to work
19:12:53 <LordAro> :)
19:13:01 <nielsm> should probably implement the new grf properties first so I can generate some test data!
19:13:52 <andythenorth> Eddi|zuHause: I don't really understand what it does
19:13:55 <andythenorth> I can read the docs fine
19:14:09 <Eddi|zuHause> andythenorth: it makes trains faster in curves
19:14:52 <andythenorth> not really
19:14:57 <andythenorth> that's just what it says it does
19:15:03 <andythenorth> it doesn't actually do that
19:16:05 <Eddi|zuHause> andythenorth: who knows, maybe nobody tested in the last 15 years? :p
19:16:33 <andythenorth> I did look for it in src, I'm sure it's there
19:16:41 <andythenorth> and I did look in nml, it looked correct
19:16:57 <andythenorth> but with curve_speed_multiplier I get 98mph in a 2 tile curve
19:17:05 <andythenorth> curve_speed_multiplier 1 *
19:17:14 <andythenorth> curve_speed_multiplier 2 I get 98mph in a 2 tile curve
19:17:22 <andythenorth> maybe I should try 255 :P
19:17:24 <Eddi|zuHause> and 0?
19:17:44 <andythenorth> I'll test some more :)
19:18:04 * andythenorth wonders where in src it will be
19:18:52 <Eddi|zuHause> rti->curve_speed?
19:20:03 <andythenorth> yup
19:20:30 <andythenorth> L354 train_cmd.cpp
19:21:34 <Eddi|zuHause> with a little bit of squinting that sorta looks like what the docs said
19:22:51 <andythenorth> so unless rti->curve_speed isn't set correctly
19:22:54 <andythenorth> the error must be me
19:23:38 <andythenorth> oh
19:23:46 <andythenorth> what does "if max_speed != absolute_max_speed" do here?
19:23:55 <andythenorth> my test trains are entering the curves at full speed
19:24:16 <Eddi|zuHause> that's UINT16_MAX
19:24:28 <Eddi|zuHause> aka "infinite"
19:27:39 <Eddi|zuHause> sum += pos - lastpos; <-- that seems a little bit nonsense to me? because the +pos will cancel out with the next iteration's -lastpos, so essentially you get verylastpos-firstpos?
19:29:34 <frosch123> andythenorth: how fast is your train at max?
19:29:40 <andythenorth> 186mph
19:29:46 <andythenorth> and it has tilt bonus FWIW
19:30:10 <frosch123> so you should notice a big slow down with 2x 45° curves
19:30:22 <frosch123> property 11 should reduce that slowdown
19:30:58 <frosch123> oh, i remember, that property somewhat fails with articulated parts
19:31:30 <frosch123> articulated parts make the train "longer" and the curve less sharp
19:31:55 <Eddi|zuHause> imho, it should be a property of the track layout, and independent from the train length
19:32:25 <frosch123> it's more or less how many curves the train is on
19:32:34 <Eddi|zuHause> probably a bit easier: be calculated from the reserved path
19:32:34 <frosch123> so very short trains are also not affected
19:34:05 <Eddi|zuHause> frosch123: sure, but that wouldn't explain the values he's (not) seeing?
19:34:08 <andythenorth> I need twitch L:P
19:34:51 <frosch123> there are also art streams, so you can also stream licking pixels into shape
19:35:21 <andythenorth> anyway, I have set curve_speed_multiplier: 255;
19:35:35 <andythenorth> but I get the same speed through 2 45º curves as with elrail
19:35:50 <andythenorth> I'm sure it's user error, but I can't see where
19:37:10 <andythenorth> https://dev.openttdcoop.org/attachments/download/9503/termite.grf
19:37:13 <andythenorth> 'TEST' railtype
19:37:22 <andythenorth> I guess I should decompile it and check prop 11
19:39:49 <nielsm> https://0x0.st/zwSq.txt <- the good commit messages
19:40:25 <andythenorth> got an 11 followed by 255
19:42:30 <andythenorth> nielsm: :)
19:45:06 <Eddi|zuHause> andythenorth: might be an nml bug?
19:46:14 <andythenorth> well the prop appears to be there
19:46:25 <andythenorth> in-game newgrf debug doesn't show props for railtype
19:46:31 <nielsm> oh well, guess I'll have to dig out grfcodec now
19:46:42 <nielsm> and make some fun new industries
19:46:46 <andythenorth> o_O
19:46:50 <nielsm> (original industries with new layouts)
19:47:19 <Eddi|zuHause> andythenorth: well, but 255 sounds like a wrong value
19:47:37 <andythenorth> nah I set that to be sure I hadn't misunderstood the spec
19:50:19 <andythenorth> well it's a mystery
19:52:46 <andythenorth> I tested with non-articulating, non-tilting trains, same result
19:54:25 *** Wormnest__ has quit IRC
19:59:37 *** Lejving has joined #openttd
20:05:51 *** WormnestAndroid has quit IRC
20:06:47 *** WormnestAndroid has joined #openttd
20:16:50 <nielsm> will it blend?? https://0x0.st/zwSJ.png
20:17:55 <nielsm> at least somewhat https://0x0.st/zwSt.png
20:20:28 <nielsm> oh, forgot my endian a bit :P
20:22:59 *** WormnestAndroid has quit IRC
20:28:07 <nielsm> good, it's loading as it should!
20:30:42 <andythenorth> \o/
20:45:51 <Eddi|zuHause> next step: it should actually do something? :p
20:47:09 <andythenorth> anyone tried my grf? :D
20:50:52 <nielsm> sorry to busy with my own one
20:51:02 <nielsm> and yeah need to make it actually do something with all the extra data :P
20:51:19 <nielsm> will have to rip out a lot of the industry creation code now :(
20:53:25 <nielsm> https://github.com/OpenTTD/OpenTTD/compare/master...nielsmh:indproclayout2 <- working branch, not going to PR that one ;)
21:06:28 *** Samu has joined #openttd
21:14:07 <nielsm> oh, so that's what INDUSTRYBEH_ONLY_NEARTOWN means
21:14:27 <nielsm> distance 9 or less from town sign for the industry north corner
21:14:52 <nielsm> what even uses that?
21:15:13 <Eddi|zuHause> bank?
21:15:20 <nielsm> I don't think it does, no
21:15:29 <Eddi|zuHause> water tower?
21:15:30 <frosch123> toyshop or something
21:15:37 <nielsm> bank just needs town pop > 1200 and replace buildings
21:15:40 <nielsm> hm maybe those yes
21:15:44 <frosch123> bank and water tower both build over houses iirc
21:17:07 <Eddi|zuHause> distance 9 to town sign and not overbuild houses might get tricky?
21:17:18 <frosch123> yes
21:18:02 <frosch123> though i think there are two flags: may build over houses and mus build over houses
21:25:00 <andythenorth> there are
21:25:19 <nielsm> andythenorth: for the industry "can this be built here?" callback, what would make more sense to pass as the layout used? the master layout index selected, or the tile layout index selected for the main building?
21:25:31 <andythenorth> oof
21:25:38 <nielsm> I'm leaning towards master layout
21:25:51 <andythenorth> master layout seems closer to current implementation?
21:25:57 <nielsm> I think so yes
21:26:12 <frosch123> localtion check mostly tests slopes
21:26:29 <frosch123> so it must know the same thing as the resulting graphics would now
21:26:44 <nielsm> since the master layout choice also affects what sub-buildings will appear, but the same tile layout for main building could be used in multiple master layouts
21:27:21 <nielsm> frosch123 does it? I think the slope requirements are defined in the tile graphics and not the callback
21:27:51 <frosch123> there are two callbacks, one for the whole industry, and one per tile. not sure which you meant
21:28:05 <nielsm> the one for whole industry, callback 28
21:28:39 <frosch123> i guess i would have to read your draft :p
21:29:27 <nielsm> https://newgrf-specs.tt-wiki.net/wiki/Action0/Industry_Tiles#Land_shape_flags_.280D.29
21:29:47 <nielsm> pretty sure that's all the control over land shape the grf has
21:30:21 <nielsm> oh... right there _is_ callback 2F
21:30:23 <nielsm> hm
21:30:37 <frosch123> i would expect cb28 to be called only once, so for the master layout
21:30:44 <frosch123> the sublayouts would only get the tile check
21:31:33 <nielsm> I should probably just introduce an extra variable for those two callbacks
21:31:49 <nielsm> the existing variable remains the tile layout, the new variable is master layout
21:31:56 <frosch123> wasn't cb28 the horrible one? with all custom variables
21:32:07 <nielsm> yes
21:33:17 <frosch123> cb2f has the layout in bits 0..7 of var18, so sublayout would go into bits 8..15 or similar
21:33:56 <frosch123> for 28... well, i guess we do not care about ttdp anymore, so same could be done with var 86
21:34:27 <frosch123> oh wait, if cb28 is called only once, there is no sublayout at all, right?
21:34:27 <nielsm> andythenorth: how about we figure out a way for rail stations to build up slopes (only for newgrf railtypes), that could be a special feature for narrow gauge!
21:34:37 <andythenorth> o_O
21:34:42 <nielsm> there is a sublayout for the main building
21:34:42 <andythenorth> what about on water also?
21:35:01 <Eddi|zuHause> didn't wolf01 have a patch for sloped road stations?
21:35:20 <frosch123> yes, 10 years old or so :)
21:36:02 <frosch123> andythenorth: iirc when airports are flooded: when water reaches the airports, all planes crash. the airport remains until the planes expire
21:36:43 <Eddi|zuHause> didn't we allow airport layouts with water tiles?
21:36:57 <frosch123> have there ever been other games which have the water-flooding behaviour of ottd sea?
21:37:37 <nielsm> dward fortress? :D
21:37:53 <nielsm> -d+f
21:38:58 <frosch123> doesn't water have an amount there? so it does not flood infinitely
21:39:45 <nielsm> yeah, unless it's an infinite source (edge of map, or aquifer tile)
21:42:31 <nielsm> hm, okay callback 28 gets master layout, callback 2F gets tile layout
21:46:02 *** gelignite has joined #openttd
21:50:52 <DorpsGek_III> [OpenTTD/OpenTTD] FLHerne commented on issue #7762: Emoji results in question mark https://git.io/JeCLb
21:55:50 * andythenorth wants stations on water
21:55:50 <andythenorth> on foundations that look like piers
21:57:23 <andythenorth> https://live.staticflickr.com/5268/5867031883_a4c86c810c_b.jpg
21:58:49 <andythenorth> or I could just do this :P https://www.tt-forums.net/download/file.php?id=209002
22:18:13 <nielsm> hmm, it compiles
22:24:37 <nielsm> https://0x0.st/zwQ1.png <-- one industry!
22:25:20 <andythenorth> :D
22:29:56 <nielsm> https://github.com/nielsmh/OpenTTD/compare/indproclayout...nielsmh:indproclayout2
22:30:56 <nielsm> fetch, build, fill the map with produral power plants!
22:32:36 <andythenorth> I had a lolz idea
22:32:41 <andythenorth> can we build perimeter fences?
22:32:59 <nielsm> that would be difficult
22:33:32 <nielsm> you mean like some kind of generated fence around the built area?
22:34:35 <frosch123> most ogfx+ industries do that
22:34:53 <frosch123> they test adjacent tiles whether they belong to the same industry
22:36:11 <nielsm> ah, callback for graphics selection after construction?
22:37:02 <frosch123> yes
22:37:03 <nielsm> so it wouldn't work for disjoint buildings
22:37:05 <andythenorth> FIRS has fences around the industry
22:37:12 <andythenorth> but I am thinking we put it into tiles
22:37:35 <frosch123> nielsm: why?
22:37:37 <andythenorth> so it's not on the industry tiles, but enclosing all the sub-layouts
22:39:47 <nielsm> frosch123: since the industry can't put fences on tiles it does not own
22:40:14 <frosch123> ah, yes, each part would be fenced on their own
22:40:48 <frosch123> but i would not consider that wrong
22:40:56 <frosch123> you can build a road between them
22:41:29 <nielsm> https://0x0.st/zwQO.jpg
22:41:41 <nielsm> that's the kind of thing I was going for :D
22:42:16 <andythenorth> I'm curious about connecting them visually somehow
22:42:33 <andythenorth> I don't use gaps in FIRS much because it's confusing if the industry is one or several
22:43:02 <andythenorth> magic neighbouring ground tiles? o_O
22:43:03 <frosch123> pikka oilrigs were scattered
22:43:16 <andythenorth> some kind of special ground texture?
22:43:34 <frosch123> it probably does not work for all industries, but some industries are fine if they are disconnected
22:44:03 <andythenorth> is there an option to force sublayouts to be contiguous? o_O
22:44:09 <andythenorth> oh I could do it in the tile check maybe
22:44:17 <frosch123> andythenorth: wouldn't that defeat the point of them being build on different height levels?
22:44:37 <frosch123> isn't this stuff suited for firs farms?
22:44:45 <nielsm> I haven't done much with smart positioning yet
22:45:12 <nielsm> it just makes a range and places the sublayouts inside that
22:45:14 *** Etua has joined #openttd
22:45:24 <frosch123> in the last picture, the part at the bottom is somewhat too far away, but the other 3 parts are fine
22:45:25 <nielsm> trying to place them adjacent would be much more work :)
22:46:13 <nielsm> yeah like, this is a single plant: https://0x0.st/zwQ4.png
22:46:35 <nielsm> in this case it doesn't look wrong to have a single transformer station separate
22:46:40 <nielsm> but it could be weird with other building types
22:48:01 <andythenorth> it would suit farms well, the fields help keep it together
22:49:01 * andythenorth considers setting n nearby tiles to some other sprites
22:49:15 <andythenorth> wasteland :P
22:49:25 <andythenorth> half-brown earth would do it :P
22:49:46 <frosch123> hmm, so a variable area of tiles, some buildings placed randomly, and the rest filled with fields for stockpile tiles
22:49:57 <andythenorth> o_O maybe
22:50:02 <frosch123> s/for/or/
22:53:33 <andythenorth> I found with more in-out cargos, more room is needed for stations :)
22:53:40 <andythenorth> which implies bigger industries
22:54:15 <andythenorth> just the gaps are a bit confusing? https://www.tt-forums.net/viewtopic.php?f=26&t=41607&start=4460#p1225818
22:58:40 * andythenorth invents giant industries
22:58:55 <frosch123> 8kx8k ?
22:59:54 <nielsm> tried doing oilwells too: https://0x0.st/zwQn.png https://0x0.st/zwQ5.png https://0x0.st/zwQR.png https://0x0.st/zwQ7.png
23:02:44 <andythenorth> yeah they're good
23:02:56 <Samu> hi
23:03:04 * andythenorth wonders about defining a perimeter around industries
23:03:14 <andythenorth> something like
23:03:45 <andythenorth> * define a perimeter compose of tiles in an (x,y) list
23:04:04 <andythenorth> * for each tile, iff empty, provide graphics
23:04:11 <nielsm> I think "infill" for disjoint proclayout industries would best be handled by the industry-generated newobjects idea
23:04:23 <andythenorth> can we build rails over objects?
23:04:34 <nielsm> I suppose that depends on the object?
23:04:51 <andythenorth> maybe :)
23:04:54 <andythenorth> never made any :)
23:06:04 <nielsm> https://newgrf-specs.tt-wiki.net/wiki/Action0/Objects#Object_flags_.2810.29
23:06:14 <nielsm> bit 2 "anything can remove" perhaps?
23:06:25 <nielsm> I think that means "you can build on top of it"
23:09:08 <Samu> i want to test AIs in NewGRFs maps
23:09:24 <Samu> FIRS?
23:11:43 *** sla_ro|master has quit IRC
23:11:49 *** Samu has quit IRC
23:14:16 <andythenorth> nielsm: farms? o_O
23:14:48 <nielsm> they grow stuff
23:17:09 <frosch123> if you allow building on them, they won't regenerate
23:17:58 <andythenorth> sorry, I was mean, have you tried sublayouts farms?
23:18:08 * andythenorth words, sense make
23:18:14 <nielsm> in locomotion, most industries have a perimeter of bare tiles that can be built over by the player, but are placed by the industry
23:18:38 <nielsm> I think that worked reasonably well
23:19:34 <andythenorth> like? https://www.myabandonware.com/media/screenshots/c/chris-sawyer-s-locomotion-klt/chris-sawyer-s-locomotion_3.png
23:19:48 <nielsm> yes
23:20:17 <andythenorth> https://alchetron.com/cdn/chris-sawyers-locomotion-93fbfcd6-a534-4d3b-b1a4-30274bb42ac-resize-750.jpeg
23:20:45 <andythenorth> yeah that looks helpful
23:22:10 <andythenorth> could be placed algorithmically?
23:23:07 <nielsm> if you could set a flag on a tilelayout or the industry for "expand with perimiter objects, radius N" and then one (or perhaps multiple) newobject ids, yes
23:27:47 <andythenorth> it doesn't need full control over field building etc
23:27:55 <andythenorth> the only nice thing would be auto-fencing
23:28:11 <andythenorth> rest could be random from a list? :P
23:28:46 <Eddi|zuHause> <nielsm> yeah like, this is a single plant: https://0x0.st/zwQ4.png <-- spacing might be a little over the top?
23:28:58 <nielsm> Eddi|zuHause we covered that :P
23:29:09 <nielsm> yes, I haven't tried to improve the positioning yet
23:29:45 <Eddi|zuHause> <andythenorth> on foundations that look like piers <-- stations can have custom foundations
23:35:03 *** firewire1394 has quit IRC
23:42:03 <andythenorth> good thoug eh nielsm :)
23:42:07 <andythenorth> though *
23:42:27 * andythenorth plots large steel mills
23:42:46 <nielsm> also consider how it'll look when you build a large train station smack in the middle of the spread-out industry
23:43:24 <Eddi|zuHause> in my experience, that space is never enough :p
23:58:30 *** frosch123 has quit IRC