IRC logs for #openttd on OFTC at 2018-12-25
            
00:11:51 *** Progman has quit IRC
00:19:38 <glx> TrueBrain: I added /VERBOSE option, zlib symbols are correctly found for libpng references, but not for openttd references
00:28:27 *** chomwitt has quit IRC
00:42:09 *** Wacko1976 has quit IRC
00:44:05 <glx> TrueBrain: seems related to calling convention, if I change to cdecl freetype links fine, but zlib still fails
00:46:10 *** lugo has joined #openttd
00:49:18 *** ekcja has quit IRC
01:12:15 *** Wolf01 has quit IRC
01:38:31 *** gelignite has joined #openttd
01:58:03 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUip
02:14:03 *** lugo has quit IRC
02:28:41 *** gelignite has quit IRC
03:04:14 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUip
03:50:27 *** glx has quit IRC
04:00:51 *** cboyd_ is now known as wodencafe
04:16:14 <Samu> https://imgur.com/O012suQ
04:16:56 <Samu> pretty stuff. I wonder if there are more questions that could be asked around Company Value
04:25:10 *** Samu has quit IRC
07:34:03 *** Laedek_ has joined #openttd
07:34:16 *** Laedek has quit IRC
07:34:21 *** Laedek_ has quit IRC
07:51:19 *** peter1138 has quit IRC
08:27:04 *** sla_ro|master has joined #openttd
09:07:36 *** tokai|noir has joined #openttd
09:07:36 *** ChanServ sets mode: +v tokai|noir
09:14:32 *** tokai has quit IRC
09:15:48 *** Wacko1976 has joined #openttd
09:16:56 *** nielsm has joined #openttd
09:35:55 *** lugo has joined #openttd
09:36:04 *** Wacko1976 has quit IRC
09:43:18 *** Wacko1976 has joined #openttd
09:51:04 *** Progman has joined #openttd
10:03:28 *** Wolf01 has joined #openttd
10:03:37 <Wolf01> Moin
10:13:54 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain requested changes for pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUHC
10:14:24 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUHl
10:36:37 *** Wolf01 is now known as Guest945
10:36:39 *** Wolf01 has joined #openttd
10:38:50 *** sla_ro|master has quit IRC
10:44:18 *** Guest945 has quit IRC
10:45:02 <Wolf01> Ho ho ho, merry Brianmas
10:50:26 <Eddi|zuHause> you mean Winteryolo?
10:54:52 *** sla_ro|master has joined #openttd
10:55:38 <Wolf01> I mean to look on the bright side of life
11:00:32 <TrueBrain> now I have a whistle in my head
11:03:50 *** gelignite has joined #openttd
11:05:29 <Eddi|zuHause> https://www.youtube.com/watch?v=QejyBUwxXU4 <- concerning Winteryolo [german]
11:16:47 <TrueBrain> whoho, I can produce 32bit/64bit Windows binaries; one is 4 MiB, the other 5 MiB :D That is much better than the 20 MiB of last time :D
11:16:55 <Wolf01> :o
11:17:39 <nielsm> ICU was quite problematic for binary sizes :)
11:17:57 <TrueBrain> yes it was
11:18:06 <TrueBrain> and with glx's PR, vcpkg works perfectly now too :D
11:18:07 <LordAro> TrueBrain: nice
11:18:24 <TrueBrain> meaning no more magic precompiled binaries that are .. some version :D
11:19:07 <TrueBrain> next step is to get the CI working via Azure Pipelines. That should be easy.
11:19:26 <TrueBrain> After that ... I need to start a very old machine to find out how we did the Windows stuff again :D
11:19:29 <TrueBrain> (for releases)
11:20:14 <TrueBrain> if the CI is done, also means I can shut down Jenkins :D \o/
11:26:09 *** andythenorth has joined #openttd
11:26:14 <andythenorth> moin
11:28:01 <Wolf01> o/
11:29:09 <TrueBrain> howdy andythenorth
11:39:58 <nielsm> hmm, thinking about nml industry feature cargo_types table again, maybe the accept_cargo() expression shouldn't take an array as 2nd parameter, but instead just take 1+ parameters
11:40:06 <nielsm> so instead of:
11:40:08 <nielsm> accept_cargo("COAL", [produce_cargo("MAIL", 1), produce_cargo("GOOD", 1), produce_cargo("STEL", 1), produce_cargo("VALU", 1)])
11:40:09 <nielsm> you'd do:
11:40:15 <nielsm> accept_cargo("COAL", produce_cargo("MAIL", 1), produce_cargo("GOOD", 1), produce_cargo("STEL", 1), produce_cargo("VALU", 1))
11:45:03 <TrueBrain> @calc 0.01 * 3000 + 5
11:45:03 <DorpsGek> TrueBrain: 35
11:45:09 <TrueBrain> (I am lazy)
11:49:59 <Eddi|zuHause> nielsm: how do you think this unpacking of a list helps anyone understand or write the code better?
11:50:33 <Eddi|zuHause> (i'm not finding a strong argument for or against either version)
11:50:56 <nielsm> maybe it doesn't, but I think it would make implementation more regular
11:52:20 <Eddi|zuHause> <TrueBrain> (I am lazy) <-- i think anyone who isn't lazy doesn't end up working with programming/automation/...
11:52:53 <Eddi|zuHause> it is that very laziness that sparks the sense of "there must be a better way"
12:04:23 *** chomwitt has joined #openttd
12:10:55 *** peter1138 has joined #openttd
12:10:55 *** ChanServ sets mode: +o peter1138
12:11:18 <andythenorth> I am +/-0 to the syntax there nielsm :)
12:11:26 <andythenorth> it's all potatoes to me on that one
12:12:47 *** tycoondemon has joined #openttd
12:13:22 * nielsm adds a tomato to the mix
12:13:40 <Eddi|zuHause> potato salad was yesterday...
12:22:09 * andythenorth considers moving all of nml to python syntax :P
12:22:17 <andythenorth> industry.add_callback()
12:22:23 <andythenorth> callback.add_switch()
12:22:25 <andythenorth> blah blah
12:22:39 <andythenorth> probably horrid
12:23:09 <Eddi|zuHause> i don't think i like that approach (it's not "syntax", btw)
12:23:46 <andythenorth> what is it? interface?
12:24:05 <Eddi|zuHause> a design pattern?
12:24:06 <andythenorth> "it's just declared in python"?
12:24:10 <andythenorth> words
12:24:58 <andythenorth> Eddi|zuHause: wasn't CETS a pure python interface, using nlmc to write out the grf?
12:25:33 <Eddi|zuHause> yeah
12:25:36 <nielsm> and are we going forward with this syntax for the prod cb?
12:25:36 <nielsm> produce(test_produce, [COAL: 5; IORE: 7;], [STEL: 5;], 1)
12:26:28 <Eddi|zuHause> but you won't find a "callback.add_switch()" in there
12:27:01 <andythenorth> Eddi|zuHause: imho object.add_anything is weird anyway
12:27:05 <andythenorth> I just didn't find a better way
12:27:08 <andythenorth> seems clunky
12:27:13 <andythenorth> nielsm: I would like to please
12:27:25 <nielsm> mmk
12:27:28 <andythenorth> the numbers in the array are expressions?
12:27:45 <nielsm> the numbers should be register expressions
12:29:58 <nielsm> I'm basically just going to cargo-cult the v0/v1 code but update it to generate the new grf syntax
12:30:55 <andythenorth> +1
12:40:48 <nielsm> I don't think it would make sense to have a produce block with zero inputs and zero outputs?
12:40:58 <nielsm> or what?
12:49:56 <andythenorth> nielsm: zero inputs OR zero outputs is fine
12:50:02 <andythenorth> AND seems redundant
13:00:06 *** Progman_ has joined #openttd
13:03:34 *** Progman has quit IRC
13:03:47 *** Progman_ is now known as Progman
13:13:50 *** Progman has quit IRC
13:24:48 <nielsm> partway there... https://0x0.st/sdUf.png
13:25:15 <nielsm> produce(test_produce1, [COAL: 5; IORE: 7;], [STEL: 5;], 1)
13:25:15 <nielsm> produce(test_produce2, [COAL: 5; IORE: 7;], [STEL: 5;])
13:25:15 <nielsm> produce(test_produce3, [], [], 0)
13:34:09 <planetmaker> moin
13:34:33 <nielsm> I'm going to need some help understand what's going on here: https://github.com/OpenTTD/nml/blob/master/nml/actions/action2production.py#L63
13:35:31 <nielsm> as far as I understand, the general idea is to take the expressions given and produce a chain of actions that load the parameter values into registers and chain those in front of the real prod cb
13:37:54 <planetmaker> yep
13:42:29 <planetmaker> shall we try jointly?
13:44:53 *** Samu has joined #openttd
13:45:29 <nielsm> pushed my WIP code: https://github.com/nielsmh/nml/tree/indcargonum
13:47:13 <nielsm> since there are now two lists of assignments (name: expression pairs) and a stand-alone expression, I'm thinking first assembling a single master list of expressions, generating evaluators for those, then ??? to get the final prod cb register numbers
13:48:46 <nielsm> or maybe I need some intermediate representation for this
13:49:32 <nielsm> also need to resolve the cargo labels to cargotypes list index
13:49:58 <planetmaker> the latter can be done by using the cargotype() thing.
13:51:06 <planetmaker> I'd think you first try to reduce the expressions as much as they need to be. So yes... a master list.
13:51:07 <nielsm> have you seen the builtin_cargotype() function implemented in expression/functioncall.py ? :)
13:51:17 <nielsm> it's not really suited for calling from inside other code
13:51:35 <planetmaker> indeed not yet. But that's what I mean. But we need sth like that
13:57:16 <planetmaker> but we could postpone that problem - and argue that the player must provide cargotype('LABL'), cargotype('FRUT'),...
13:59:01 <nielsm> that would change the syntax completely
14:02:06 <planetmaker> hm... ok, yes-ish
14:02:37 <planetmaker> let's stick with the labels. It's the much nicer syntax. So we need our own cargotype thing for internal use
14:05:50 <planetmaker> ctt_list in action0properties.py:283
14:08:23 <nielsm> https://gist.github.com/nielsmh/0bb2555e75c6b2a65ebfefba08b4fd58
14:08:53 <nielsm> (I made the gist with the previous wip version first, then edited with the new, so there's a revision with diff)
14:10:26 <nielsm> the act6 thing seems to only be relevant for version 0 of the prod cb, so I can skip everything with that?
14:10:55 <planetmaker> in principle action6 can overwrite any action
14:11:34 <nielsm> but it only gets filled for the v0 case here
14:12:17 *** synchris has joined #openttd
14:17:22 <nielsm> hmm, maybe like this https://gist.github.com/nielsmh/0bb2555e75c6b2a65ebfefba08b4fd58
14:21:17 <planetmaker> action6... they are actually *written* / generate there, aren't they? in action2production:80 and :113-114?
14:26:30 <nielsm> updated gist again
14:31:19 *** andythenorth has quit IRC
14:32:33 <nielsm> and again
14:32:37 <nielsm> now it runs!
14:33:00 <nielsm> but I have no idea if it's correct :D
14:36:41 <nielsm> pushed this
14:36:45 <nielsm> "maybe it works"
14:36:54 <planetmaker> :D
14:38:37 <nielsm> of course andy leaves just as you need him
15:04:27 <Eddi|zuHause> usually 3 seconds before i finished typing my reply to him
15:05:50 <planetmaker> he's genius in that respect
15:07:56 <Eddi|zuHause> ships in TF are awesome, but i have trouble upping their capacity... just buying more ships will just make them queue up at the port
15:08:36 <nielsm> does it work adding more docks?
15:09:24 <nielsm> although I guess you can't share routes then since you have to points to a specific dock
15:20:53 *** Flygon has quit IRC
15:40:26 <Eddi|zuHause> i've currently opted to send some routes A-B-A-B with different terminals at each stop
15:40:50 <Eddi|zuHause> it's a bit awkward as this also seemingly randomly distributes the cargo between the different halves of the route
15:41:42 <Eddi|zuHause> next problem is that you don't see capacity upgrades working for quite a while
15:41:48 <nielsm> yeah it's a shame there isn't a solution to multiple platforms serving the same destination, so just pick the one with the next expected departure (or less crowded one)
15:42:19 <Eddi|zuHause> and 3rd problem is that if many different types of cargo get sent along you don't have much influence on what cargos are picked, as a ship can only load 2 different kinds of cargo at a time
15:49:52 *** seatsea has quit IRC
15:50:25 <Eddi|zuHause> yeah, this lack of dynamic platform reservation means you effectively need one platform per line
15:51:32 *** seatsea has joined #openttd
16:04:40 <Eddi|zuHause> problem with multiple docks is you need them to be in range of each other, otherwise you'd have to do awkward truck shuttles
16:05:56 <Eddi|zuHause> or worse: ship shuttles
16:10:05 <Eddi|zuHause> you can usually do that with 2 docks, but 3 docks is tricky, as the 1-3 connection usually doesn't work (too far)
16:12:12 <Eddi|zuHause> i definitely need better ships
16:32:57 <nielsm> time to look at that issue with found industry strings being wrong
16:40:29 <nielsm> yeah it's definitely present: https://0x0.st/sd0D.png
16:41:52 <nielsm> https://0x0.st/sd0k.png
16:57:48 *** Wormnest has joined #openttd
17:00:50 *** Wormnest_ has joined #openttd
17:04:38 <Samu> buy exclusive transport rights mechanics are flawed
17:05:07 <Samu> if company 1 buys it, it doesn't stop other companies from buying it either
17:05:33 <Samu> company 2 can buy it even if company 1 is currently under the effect
17:05:39 <Samu> is that intended?
17:05:59 <Samu> it even costs the same
17:06:45 <nielsm> that's probably not intended
17:07:20 <Samu> or is this because im playing in single player? haven't tried in multiplayer
17:07:36 *** Wormnest has quit IRC
17:07:42 <Samu> brb gonna try
17:14:12 <Samu> yeah, it's available too
17:14:45 <nielsm> hmm, it's this: https://github.com/OpenTTD/OpenTTD/blob/master/src/lang/english.txt#L3353-L3357
17:15:10 <nielsm> two ways to solve this problem, either extend that list to 16 strings with different number of cargos
17:15:22 <nielsm> or rework it to generate a list instead in code
17:15:27 <nielsm> (I'm voting for second option)
17:15:43 <Samu> for a moment, i thought you were talking to me :(
17:16:35 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO_CARGO would be silly
17:17:10 <Samu> reduce it to _C_C_C?
17:17:13 <Samu> :p
17:21:22 <nielsm> thinking of changing the layout to something like this: https://0x0.st/sdGT.png
17:23:46 <Samu> oh, nice
17:34:01 <planetmaker> that looks like a nice layout for such varying number of cargoes @ nielsm
17:36:40 <nielsm> I'll have to calculate a new min size based on max number of cargoes
17:37:23 <nielsm> and not sure what to do about window min width
17:50:08 <nielsm> hmm is there a way for a newgrf to add even more text to the build industry window? apart from just cargo suffixes
17:50:22 <nielsm> or are cargo suffixes exactly the way to do it?
17:50:33 <nielsm> because I think this might break it then :s
17:51:01 <planetmaker> cargo subtypes?
17:51:27 <planetmaker> not sure whether industries can do that. Vehicles can for sure
17:52:27 <nielsm> yeah like the Location text here from FIRS 3: https://0x0.st/sdG4.png
17:52:46 <nielsm> I think that text might actually be a cargo suffix for Livestock (produces)
17:53:04 <planetmaker> Ah, the extra info
17:53:34 <Eddi|zuHause> <nielsm> or rework it to generate a list instead in code <-- there certainly are places that display a list of cargos already
17:53:56 <Eddi|zuHause> like the refit list
17:54:17 <Eddi|zuHause> and other places that maybe should display one, like the town cargo delivery
17:58:22 <nielsm> ah the joy of keeping birds... finding dried poop in your hair
18:01:50 <nielsm> anyway, this "abuse" of cargo suffixes kills the two column idea
18:10:29 *** Wormnest_ has quit IRC
18:11:19 <nielsm> and the string system doesn't really provide a good/simple way to chain multiple strings does it...
18:12:37 <planetmaker> "{STRING} {STRING}"
18:13:10 <planetmaker> or {RAW_STRING}
18:13:17 <nielsm> yes but in the infinite
18:13:32 <planetmaker> yes, you need to know how many to chain
18:13:34 <nielsm> arabic_egypt.txt:
18:13:39 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}، {STRING}{STRING}
18:13:39 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}, {STRING}{STRING} , {STRING}{STRING}
18:13:45 <nielsm> the two strings use different commas...
18:14:20 <planetmaker> hm? How 'different'?
18:14:55 <nielsm> different codepoints, different glyphs
18:15:24 <planetmaker> ah. Well. An arabic-speaking person might know
18:15:44 <nielsm> https://0x0.st/sdGU.png
18:16:11 <planetmaker> the upper one is no comma. It's a quotation mark
18:16:21 <planetmaker> a single one
18:16:40 <Eddi|zuHause> that sounds wrong
18:16:42 <planetmaker> At least that's what it looks to me
18:16:58 <planetmaker> however... that's translator task
18:17:13 <Eddi|zuHause> yes, it's a different character, but it sounds wrong that it should be different
18:17:29 <nielsm> THANK YOU japanese for ruining my plan
18:17:30 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING}と{STRING}{STRING}
18:17:30 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}必要資源: {YELLOW}{STRING}{STRING}、{STRING}{STRING}、{STRING}{STRING}
18:17:40 <nielsm> "A and B" and then "A, B, C"
18:18:06 <Eddi|zuHause> really, {CARGOLIST}
18:18:30 <nielsm> Eddi|zuHause no, that does not support cargo suffixes
18:18:47 <Eddi|zuHause> then that's the thing to improve
18:18:58 <nielsm> cargo suffixes being arbitrary formatted strings that a newgrf industry can tack on the end of each cargo it handles
18:24:01 <nielsm> spanish.txt:
18:24:20 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requiere:...
18:24:20 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Necesita:...
18:24:20 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requiere:...
18:25:27 <nielsm> ah there was what I was looking out for, in turkish.txt:
18:25:28 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}İstenen: {YELLOW}{STRING}{STRING}
18:25:28 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}İstenenler: {YELLOW}{STRING}{STRING}, {STRING}{STRING}
18:25:28 <nielsm> STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}İstenenler: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING}
18:25:45 <nielsm> what looks like singular/plural differences in the translation of "Requires" itself
18:27:18 <Samu> Requirement, Requirements
18:29:14 <nielsm> hmm does the string system have a way to form a plural towards a numeric value that isn't actually printed in the string?
18:29:57 <nielsm> I was thinking of making a base string "Requires{optionally plural}: {STRING:first cargo}
18:30:33 <nielsm> and then in code concatenate it with any number of additional ", {STRING:next cargo}{RAW_STRING:cargo suffix}"
18:31:28 *** andythenorth has joined #openttd
18:31:56 <nielsm> hi andy, update your nml and make some production cb's
18:31:59 <Samu> wow, advertisement campaign radius only considers the main tile of the station.... DistanceManhattan(tile, st->xy) <= radius)
18:32:16 <Samu> seems wrong
18:32:31 <Samu> not what I expected
18:32:51 <nielsm> I have come to expect the station sign to be all that matters for most economic purposes
18:33:30 <Samu> i was expecting all stations found within a radius of "radius"
18:33:31 <andythenorth> hi hi
18:33:37 <planetmaker> \o
18:33:39 <Samu> station parts*
18:34:43 <Samu> oh well, this makes my AI decisions require less code
18:34:44 <planetmaker> nielsm, but what about what Eddi|zuHause said before? {CARGO_LIST} exists
18:34:59 <planetmaker> STR_JUST_CARGO_LIST
18:35:58 <Eddi|zuHause> <nielsm> hmm does the string system have a way to form a plural towards a numeric value that isn't actually printed in the string? <-- yes, but if you make it a {CARGOLIST}-ish thing, the plural could be chosen from the number of items in the list
18:36:50 <nielsm> CARGO_LIST takes a bitset of cargoes and puts them in definition order
18:36:53 <Eddi|zuHause> as for the not-printed part, there is {SKIP}, but i think we tried to eliminate that
18:37:26 <nielsm> what industry windows wants is to take a list of cargoes and an optional attached suffix string and list them in supplied order
18:37:47 <nielsm> so completely different from CARGO_LIST
18:38:23 * andythenorth faffing about with failed rebase, again
18:38:43 <Eddi|zuHause> how about trying for a successful rebase for a change?
18:38:48 <nielsm> i.o.w. the inpur to CARGO_LIST is an uint64, the input to hypothetical INDUSTRY_CARGO_LIST is vector<pair<StringID,const char*>>
18:38:58 <nielsm> input*
18:39:38 <planetmaker> sounds to me really like it also should become an uint64
18:39:54 <planetmaker> otherwise it's re-inventing the wheel. Just differently
18:40:21 <planetmaker> speaking of INDUSTRY_CARGO_LIST
18:41:08 <andythenorth> produce is weird eh?
18:41:13 <andythenorth> it's not specifically scoped
18:41:18 <andythenorth> reminds me of nfo :P
18:43:35 * andythenorth has rebased, with manual merge resolution
18:44:18 <andythenorth> Eddi|zuHause: can you provide a url to a guide for successful rebase? o_O
18:44:20 <andythenorth> I googled
18:44:33 <andythenorth> the only thing I found said "don't work with upstream contributors"
18:46:09 <Eddi|zuHause> andythenorth: "try smaller steps"?
18:46:39 <nielsm> lol, misplaced hands on keyboard and typed "tid fiff" instead of "git diff"
18:47:01 <nielsm> (have relocated my hands again)
18:48:00 <andythenorth> Eddi|zuHause: I could ask the other contributors to not touch the same lines of code as me?
18:48:06 <andythenorth> maybe some kind of lock system on the files?
18:48:09 <andythenorth> webdav? o_O
18:48:22 <Eddi|zuHause> playing the "where the hell is the missing piece of electrification" game currently
18:48:29 <andythenorth> TF?
18:48:39 <nielsm> yes let's use MS SharePoint for source control
18:51:08 <andythenorth> I am +1
18:51:24 <andythenorth> we could use an excel sheet to track who's working on what
18:53:12 <Eddi|zuHause> yes, TF
18:53:53 <Eddi|zuHause> andythenorth: approaching https://xkcd.com/1667/ ?
18:58:14 <nielsm> Requirement{P 2 "" s}: {0:STRING}{1:RAW_STRING}
18:58:18 <nielsm> that could work I suppose
18:59:11 <nielsm> Necessit{P 2 y ies}: {0:STRING}{1:RAW_STRING}
19:09:56 <nielsm> argh does not work ;_;
19:10:14 <nielsm> strgen does not want a plural for an insert that does not actually get inserted
19:10:35 <nielsm> and there is no {SKIP}
19:17:14 <Eddi|zuHause> well, there used to be {SKIP}
19:34:22 <Eddi|zuHause> i need a bigger boat...
19:35:07 *** Samu has quit IRC
19:43:27 *** Wacko1976 has quit IRC
19:45:02 <nielsm> let's see if this works...
19:51:01 <nielsm> https://0x0.st/sdDy.png https://0x0.st/sdDt.png
19:51:03 <nielsm> that's better
19:51:16 <nielsm> just need a way to get rid of the number :)
19:54:18 *** Samu has joined #openttd
19:55:44 <nielsm> https://github.com/nielsmh/OpenTTD/tree/fix-fund-industry
19:56:54 <nielsm> ideas to not print the number: don't support plurals? re-add {SKIP}?
20:03:25 <andythenorth> Eddi|zuHause: if you ever want to make corporate ransomware
20:03:38 <andythenorth> just target holiday_calendar.xlsx
20:04:00 <andythenorth> you can get a lot of bitcoins for ransoming that
20:04:47 *** Progman has joined #openttd
20:05:47 <andythenorth> nielsm: are you trying to remove the plural entirely, or just handle the singular case? o_O
20:06:37 <nielsm> I'm trying to support plurals without the number the pluralization is based on being printed
20:07:16 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #6990: Fix: Correct display of industry requires/produces in Build Industry window https://git.io/fhTef
20:07:58 <andythenorth> in GB english, 'requires' is correct for both plural and non-plural
20:08:03 <andythenorth> dunno about other languages
20:08:13 <nielsm> yeah it's other languages that need support
20:08:43 <nielsm> right now, turkish is the lone language that has a separate singular form for "requires"
20:09:43 <planetmaker> nielsm, you can re-use the same code as used for the CARGO_LIST, if you don't query the name, but CargoSpec->bitnum
20:10:22 <planetmaker> instead of composing a string from all CargoSpec->name
20:10:36 <nielsm> planetmaker, no, because of cargo suffixes
20:13:18 *** wodencafe has quit IRC
20:14:47 <planetmaker> §$%&DJ$ cargo suffixes :P
20:16:11 *** wodencafe has joined #openttd
20:17:18 *** wodencafe has quit IRC
20:23:11 *** wodencafe has joined #openttd
20:25:00 <Samu> is Zuu around?
20:25:04 <Samu> someone call him
20:25:32 <Samu> im getting weird behaviour with SCP in the master version
20:25:38 <Samu> that dont happen in 1.8.0
20:27:42 <Samu> weird
20:27:50 <Samu> doesn't happen in the non-debug version
20:27:54 <Samu> only in the debug version
20:29:09 <Samu> in debug version, SCP is spamming signs
20:32:53 *** Wacko1976 has joined #openttd
20:41:15 <Samu> Zuu, come online ploz
20:48:47 <Samu> in english what is correct? "Found Town X" or "Founded Town X"?
20:49:27 <nielsm> "found" is "discovered the location of", while "founded" is "laid the ground stone for"
20:49:54 <Samu> thx, then I had it wrong, fixed
20:50:33 <Samu> AILog.Warning("Founded town " + AITown.GetName(AITile.GetTownAuthority(town_tile)) + ".");
21:01:04 <gelignite> why is that a warning?
21:12:00 <Samu> to stand out
21:12:21 <Samu> i can't pick colours
21:14:23 <Samu> AILog.Warning("Funded the construction of new buildings in " + AITown.GetName(town) + ".");
21:14:34 <Samu> funded is correct in this context?
21:18:05 <nielsm> that's "paid for", so yes
21:18:45 <Samu> im still surprised my AI still has money in the bank
21:18:50 <Samu> with all this spendings
21:24:11 *** Thedarkb-T60 has joined #openttd
21:25:05 *** sla_ro|master has quit IRC
21:30:36 <Samu> this is actually interesting
21:31:01 <Samu> 5 LuDiAI AfterFix's competing for company value
21:31:28 <Samu> the one at the stop will perform these fundings, foundings or whatnot
21:31:38 <Samu> the others restrain themselves from doing so
21:31:55 <Samu> the balance
21:32:03 <Samu> between them
21:32:09 <Samu> hmm it's interesting
21:32:25 <Samu> the one at the top*
22:02:50 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #6990: Fix: Correct display of industry requires/produces in Build Industry window https://git.io/fhTJk
22:23:53 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #6990: Fix: Correct display of industry requires/produces in Build Industry window https://git.io/fhTef
22:24:29 <nielsm> TrueBrain, random note: Remember to also publish the PDB files from windows CI builds, for debuggability :)
22:52:27 <Eddi|zuHause> nielsm: really, if it's such an issue, scrap the feature of cargo subtypes...
22:53:41 <nielsm> I don't know what uses suffixes if anything
22:53:42 <Eddi|zuHause> nielsm: you can count the people who would even notice on one hand.
22:58:16 <planetmaker> I'm sure it's two hands :P
22:58:25 <planetmaker> but not really many more
22:59:06 <planetmaker> the train set creators for german, french, russian, british and japanese sets would notice ;)
23:03:29 *** Thedarkb-T60 has quit IRC
23:08:13 *** glx has joined #openttd
23:08:13 *** ChanServ sets mode: +v glx
23:10:52 *** Zuu has joined #openttd
23:17:55 <Zuu> nielsm: Is "requires" a good word for industry window? Maybe it is used today already, but to me it imposes that all the input cargoes are required, while from what I unedrstand usualyl it is enough to supply one of them.
23:18:18 <Samu> ah, zuu is online
23:18:21 <nielsm> it's the current wording yes
23:18:47 <nielsm> and yes I agree it should not be "requires" when for some newindustries they are strictly optional
23:18:49 <Zuu> sourc/input seems more neutral in that the cargoes are inputs but not neccessary.
23:19:03 <Zuu> source*
23:19:16 <planetmaker> Accepts
23:19:21 <nielsm> Accepts or Takes
23:19:27 <Zuu> But well, if the window uses it already then it is not in the scope of the change you are working on.
23:19:27 <planetmaker> is the word used in other context with the same meaning in OpenTTD
23:19:42 * Zuu accepts Accepts :-p
23:19:47 <planetmaker> :D
23:20:04 <Samu> Accepts seems correct
23:20:45 <Samu> (industry) requires
23:20:51 <Samu> (industry) accepts
23:20:53 <Samu> meh
23:20:54 <Samu> maybe not
23:21:57 <Zuu> But then yes, requires make it more clear that at least one need to be supplied in order for the industry to produce any output.
23:22:18 <planetmaker> I think that is self-explanatory
23:22:43 <planetmaker> if you want to go to that level, you need to call some more details which a NewGRF can supply in the industry's "extra text"
23:22:44 <Samu> zuu, i have a new list of functions, let me copy paste
23:23:23 <nielsm> that's one of the things a newgrf could use the cargo suffixes for, to call attention to what cargoes are strictly required and what is optional
23:23:33 <Samu> https://paste.openttdcoop.org/pmacpimxt
23:23:53 <planetmaker> not really. Suffixes are just eye candy which help differentiate a cargo
23:24:39 <planetmaker> and the same suffix should work for vehicles, too.
23:24:51 <nielsm> it's specifically a callback on industries
23:24:53 <nielsm> not on cargo types
23:25:29 <nielsm> and the industry receives a flag for whether the suffix is requested for an industry window or the build industry window
23:25:30 <planetmaker> easier in the extra text
23:26:14 <planetmaker> or let's say: I've never seen it used in that way in any NewGRF
23:28:08 <planetmaker> but would make an interesting use case for them
23:29:45 <Zuu> Samu: Looks good. No need to add more methods than these which is already quite many. One thing I notice on lire 344-357 you build a string s, but it is only used when the if-statement on line 359 is true. So perhaps move the calculation on line 344-357 into the if-block so that you don't execute it and then throw away the result when the if-stamement doesn't yields true.
23:30:31 <Samu> there could be some more questions. now that i'm implementing it on my AI, i'd like to get the difference in value to the company that is after me in rank or before me in rank
23:30:54 <Samu> so that i could decide to perform some money wasting
23:31:00 <Samu> and still keep the lead
23:31:27 <Samu> ok let me fix that part
23:32:16 <Zuu> IMHO you should offer GetRankingList, but then keep the amount of methods that parse it to a minimum. If AIs want something further than mimimum/standard, they can parse the rank list into their variant.
23:33:04 <Zuu> If you offer 10 different variants, the AI authors will have to figure out which one maches their need and you get more code to maintain.
23:38:31 <Samu> was thinking of... GetCompanyIDDiffToMine
23:38:35 <Samu> hmm
23:38:54 <Samu> less is better, what would you do at this point?
23:39:07 *** synchris has quit IRC
23:40:22 <TrueBrain> nielsm: ack; also I have to remember running NSIS ... somehow :D
23:40:26 <TrueBrain> we will get there :)
23:41:08 <Samu> i guess the AIList would have to suffice
23:42:24 <Zuu> Samu: If it is ready, release it. Ready being usable to others. Not necessary complete. Once released you will want to maintain basic compability and not break AIs using v1 of your client lib on newer versions of your GS and the other way around. So if you think you might want to have a 3rd mode it may be a good idea to already now not use a boolean for modes but actually use a enum/integer for that in data communication.
23:42:44 <Zuu> I see your AI interface is arleady prepared for a 3rd mode.
23:43:45 <Zuu> Of course, it is your thing, so if you want to break compability you are free to do so, but it is a good idea to strive towards not having to do so when it is possible to avoid it.
23:45:03 <Zuu> Of course AIs using v1 of the client lib will need to update to v2 of the lib to be able to get the ability to support your future functionality.
23:46:23 <Samu> what 3rd mode do you have in mind?
23:46:44 <Zuu> I don't know.
23:47:08 <Samu> be the most valuable before the end of xxxx?
23:47:12 <Zuu> But you have two already. Rank and goal. So I suppose you could come up with a third one?
23:47:22 <Samu> ah, i see what you mean
23:47:59 <Samu> boolean is bad idea if i then create a 3rd mode, due to compatibility with the previous version
23:48:01 <nielsm> largest profit or largest revenue over last 12 months?
23:48:43 <Zuu> It is no problem if old AIs cannot play the new third mode, but it is nice if they can still function in the old modes assuming they are unchanged.
23:49:43 <Samu> btw, here's my AI testing the functions https://imgur.com/O012suQ
23:50:41 <Zuu> *thumbs up*
23:54:35 <Samu> okay, gonna change the boolean into int
23:54:46 <Samu> i may yet create more modes indeed
23:54:55 <Samu> just not atm
23:55:56 <Samu> oh, and the scp.nut on the GS side, let me copy paste that too
23:56:47 <Samu> https://paste.openttdcoop.org/po0sy3phj
23:56:49 <Zuu> Btw, if you want to summon a Zuu in the future, it is a good idea to leave out 'him'.
23:57:31 <Zuu> Do you have a quesiton on scp.nut?
23:57:46 <Samu> i actually have
23:58:14 <Samu> the command i have is AI > GS > AI but also GS > AI
23:58:26 <Samu> it works both ways, apparently
23:59:52 <Samu> sometimes this doesn't work, i have to use self, it's rather confusing
23:59:59 <Samu> 'this' vs 'self'