IRC logs for #openttd on OFTC at 2018-12-25
⏴ go to previous day
00:19:38 <glx> TrueBrain: I added /VERBOSE option, zlib symbols are correctly found for libpng references, but not for openttd references
00:44:05 <glx> TrueBrain: seems related to calling convention, if I change to cdecl freetype links fine, but zlib still fails
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
03:04:14 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUip
04:00:51 *** cboyd_ is now known as wodencafe
04:16:56 <Samu> pretty stuff. I wonder if there are more questions that could be asked around Company Value
07:34:03 *** Laedek_ has joined #openttd
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:15:48 *** Wacko1976 has joined #openttd
09:43:18 *** Wacko1976 has joined #openttd
09:51:04 *** Progman has joined #openttd
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: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: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:17:39 <nielsm> ICU was quite problematic for binary sizes :)
11:18:06 <TrueBrain> and with glx's PR, vcpkg works perfectly now too :D
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: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: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:08 <nielsm> accept_cargo("COAL", [produce_cargo("MAIL", 1), produce_cargo("GOOD", 1), produce_cargo("STEL", 1), produce_cargo("VALU", 1)])
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: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: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:58 <andythenorth> Eddi|zuHause: wasn't CETS a pure python interface, using nlmc to write out the grf?
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:13 <andythenorth> nielsm: I would like to please
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:40:48 <nielsm> I don't think it would make sense to have a produce block with zero inputs and zero outputs?
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:47 *** Progman_ is now known as Progman
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: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:42:29 <planetmaker> shall we try jointly?
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: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:21:17 <planetmaker> action6... they are actually *written* / generate there, aren't they? in action2production:80 and :113-114?
14:33:00 <nielsm> but I have no idea if it's correct :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: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: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: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: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:14:12 <Samu> yeah, it's available too
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: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:27 <planetmaker> not sure whether industries can do that. Vehicles can for sure
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: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:17 <nielsm> yes but in the infinite
18:13:32 <planetmaker> yes, you need to know how many to chain
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:16:11 <planetmaker> the upper one is no comma. It's a quotation mark
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: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: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: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: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: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:22 <Eddi|zuHause> playing the "where the hell is the missing piece of electrification" game currently
18:48:39 <nielsm> yes let's use MS SharePoint for source control
18:51:24 <andythenorth> we could use an excel sheet to track who's working on what
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:45:02 <nielsm> let's see if this works...
19:51:16 <nielsm> just need a way to get rid of the number :)
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:14:47 <planetmaker> §$%&DJ$ cargo suffixes :P
20:16:11 *** wodencafe has joined #openttd
20:23:11 *** wodencafe has joined #openttd
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: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: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: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:24:11 *** Thedarkb-T60 has joined #openttd
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
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: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: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: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: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: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: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: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:54 <Samu> less is better, what would you do at this point?
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: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: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:54:35 <Samu> okay, gonna change the boolean into int
23:54:46 <Samu> i may yet create more modes indeed
23:55:56 <Samu> oh, and the scp.nut on the GS side, let me copy paste that too
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: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
continue to next day ⏵