Back to Home / #openttd / 2019 / 01 / Prev Day | Next Day
#openttd IRC Logs for 2019-01-28

---Logopened Mon Jan 28 00:00:40 2019
01:00-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
01:00-!-keoz is "Grmph" on #openttd
01:32-!-sla_ro|master [] has joined #openttd
01:32-!-sla_ro|master is "slamaster" on #sla #openttd
02:15-!-Pikka [] has joined #openttd
02:15-!-Pikka is "realname" on #openttd
02:19-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
02:23-!-andythenorth [] has joined #openttd
02:23-!-andythenorth is "andythenorth" on #openttd
02:31-!-CZTR [~Vasatko@] has joined #openttd
02:31-!-CZTR is "realname" on #openttd
02:36<@peter1138>Yes no
02:37<Pikka>why not?
02:58<andythenorth>Pikka: the strayan contingent need help with 64 cargos :)
02:59<Pikka>is it that his NML is out of date and doesn't allocate more than 32 ids?
03:00<DorpsGek_II>[OpenTTD/OpenTTD] PeterN updated pull request #7108: Feature: Group liveries, and livery window usability enhancements.
03:00<Pikka>that was my first thought, but I don't use NML so I wouldn't know
03:02<@peter1138>Maybe it doesn't work ;p
03:03<andythenorth>I did test it :P
03:03<andythenorth>maybe I did it wrong
03:03<andythenorth>Pikka: so are you the last remaining nfo coder? :)
03:08-!-nielsm [] has joined #openttd
03:08-!-nielsm is "Niels Martin Hansen" on #openttd
03:08<Pikka>maybe... who knows, maybe coding industries will convince me to switch :)
03:12*peter1138 pokes at azure./
03:16*Pikka bbl
03:16-!-Pikka [] has quit [Quit: Leaving]
03:17<andythenorth>we should preserve pikka for the nation
03:17-!-andythenorth [] has quit [Quit: andythenorth]
03:17-!-Thedarkb1-X40 [] has quit [Ping timeout: 480 seconds]
03:58-!-supermop_Home [] has quit [Ping timeout: 480 seconds]
04:01-!-andythenorth [] has joined #openttd
04:01-!-andythenorth is "andythenorth" on #openttd
04:12<DorpsGek_II>[OpenTTD/OpenTTD] Gabda87 commented on pull request #7120: Feature: Town Voronoi diagram
04:29-!-Pikka [] has joined #openttd
04:29-!-Pikka is "realname" on #openttd
04:35<andythenorth>draw a new website pikka? o_O
04:36<andythenorth>99 Designs
04:44<nielsm>birds, making confetti from newspapers...
04:44*nielsm has taken two days off work
04:47-!-sla_ro|master [] has quit []
04:58-!-Samu [] has joined #openttd
04:58-!-Samu is "..." on #openttd
05:09<Samu>why is this so confusing
05:09<Samu>aligning text with images
05:10<@peter1138>What now?
05:10<Samu>can you tell me if the alignment on AI SETTINGS is ok?
05:10<Samu>AI CONFIG i mean
05:10<Samu>hold on, i'll link to code directly
05:12<Samu>uint cid_right = rtl ? cid_left + widest_cid : cid_left + widest_cid;
05:12<@peter1138>That's wrong.
05:12<andythenorth>did anyone release a new Horse yet?
05:12<@peter1138>Because you're selecting the same value regardless of rtl.
05:12<Samu>the value is defined just above
05:12<nielsm>andythenorth, aren't horses usually kept in captivity?
05:12<andythenorth>wild horses
05:13<@peter1138>Samu, how is it different from"uint cid_right = cid_left + widest_cid; ?
05:13<Samu>cid_left is not the same value for rtl than ltr
05:13*andythenorth is actually listening to 'runaway horses' by pure coincidence
05:13<Samu>uint cid_left = rtl ? rai_left - 10 - widest_cid : rai_left + rai.width + 10;
05:14<@peter1138>But you're setting cid_right on the line you showed, not cid_left.
05:14<Samu>but cid_left is defined above
05:14<@peter1138>How is that relevant?
05:16<Samu>im confused
05:18-!-Heiki [] has quit [Remote host closed the connection]
05:18-!-Heiki [] has joined #openttd
05:18-!-Heiki is "Heikki Piirainen" on #debian-offtopic #debian-next #debian #openttd
05:18<Samu>uint cid_right = rtl ? r.right - WD_MATRIX_RIGHT - widest_icon - 1 - rai.width - 10 - widest_cid + widest_cid : r.left + WD_MATRIX_LEFT + widest_icon + 1 + rai.width + 10 + widest_cid;
05:18<Samu>with everything expanded
05:18<@peter1138>Why would you "expand" it?
05:18<nielsm>when layouting in RTL, you do exactly the same as when layouting in LTR mode, except you start from the right-hand edge and subtract lengths, instead of starting from left-hand edge and adding lengths
05:19<@peter1138>uint cid_right = rtl ? cid_left + widest_cid : cid_left + widest_cid;
05:19<andythenorth>do we handle that explicitly every time we draw text?
05:19<@peter1138>cid_left and widest_cid are the same values regardless of rtl, within that line.
05:19<andythenorth>it's not just a widget tree, and we run reverse order?
05:20<@peter1138>Yeah, it's a bit shitty when we have text and icons mixed.
05:20<@peter1138>By mixed I mean drawn within the same widget.
05:21<nielsm>andythenorth, the window layout stuff does handle most of that automatically
05:21<nielsm>except for self-drawn things, like list items combined from text and graphics
05:21<nielsm>those aren't layouted automatically, but "owner-drawn"
05:22<andythenorth>anyone find a narrow-guage version of this?
05:23<Samu>uint cid_right = rtl ? cid_left + widest_cid;
05:23<Samu>just this
05:23<Samu>oh wait no
05:23<Samu>uint cid_right = cid_left + widest_cid
05:23<@peter1138>I wrote exactly that line earlier.
05:24<Samu>ok, let me fix that already
05:25<@peter1138>I'm glad it took 10 minutes to resolve that.
05:25<Samu>done, but i'm still wondering... if everything else is correct
05:25<@peter1138>I'm not saying the rest is right.
05:25<@peter1138>But that is obviously wrong.
05:26<Samu>let me copy paste
05:26<@peter1138>I'm busy at the moment, tbh.
05:26<nielsm>what am I doing here?
05:26<Samu>i've edited it so far to try avoid repetition
05:27<Samu>i'm only wondering if i have the rlt stuff correct
05:27<andythenorth>IRL narrow gauge is probably too small for ladle wagons
05:27<andythenorth>such realism
05:27<Samu>it's the part I have most difficulty
05:28<nielsm>Samu, get some graph paper and try working out the layout calculations for LTR and RTL separately, with pen and paper
05:29<nielsm>draw how the window _should_ look, and work backwards from that to figure out how to calculate the dimensions and positions of things
05:32<nielsm>TrueBrain: how about building a docker of the dedicated server along with the nightlies?
05:32<Samu>that's actually a good idea
05:42<Samu>dang, the counting of image widths is what's confusing me in the right to left approach
05:43<nielsm>not a whole lot of distance from north to east...
05:44<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog
05:48<Samu>sprites are drawn from left to right only?
05:49<nielsm>they are drawn at the position you give
05:49<nielsm>they are never mirrored on screen, and the screen coordinate system is always left edge as zero
05:49<nielsm>with X values increasing towards the right
05:51<Samu>left edge as zero
05:51<andythenorth>usually flipping things is just a transform, with faff
05:51<Samu>so I see they're only drawn left to right
05:51<Samu>hence the whole confusion
05:51<Samu>trying to apply them on a right to left text
05:52<nielsm>you can maybe think of it as arranding a bunch of boxes in a row, in RTL the order of the boxes is reversed, but the contents of each box is not
05:52<nielsm>(except that the text is drawn from the right edge of the box in RTL mode, but that's beside the point)
05:55<Samu>wondering if i needed to measure company id string
05:55<Samu>the 1-15 text being displayed
05:56<Samu>need it to align
06:01<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog
06:04<@peter1138>You can measure just "99"
06:05<Samu>i measured all numbers from 1 to 15
06:05<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
06:05<Samu>this was much easier to visualize with pen and paper, kudos
06:05<@peter1138>I know you did.
06:06<Samu>and peter1138 too, much thx
06:06<@peter1138>Samu, back in the day, pen and paper was used to figure out the program logic too.
06:07<nielsm>in 2003 and 2004 the exams I took in computer science included pen-and-paper coding problems, no textbooks, computers, or even pocket calculators, allowed
06:08<Samu>everything is correct, the only exception being uint cid_right = rtl ? cid_left + widest_cid : cid_left + widest_cid; which i fixed
06:08<Samu>which isn't wrong per se, but ... just ... meh, nvm
06:08<@peter1138>I mean, it wasn't "wrong" but it was pointless.
06:08<@peter1138>But now, is it correct and simple, or is it correct and complex?
06:09<@peter1138>Can o' worms there.
06:10<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
06:11<nielsm>okay I think that patch is done now
06:20<@planetmaker>meh... cc1plus: error: unrecognized command line option "-std=c++11"
06:20<@planetmaker>make[1]: *** [string.o] Error 1
06:20<@planetmaker>make[1]: *** Waiting for unfinished jobs....
06:20<@planetmaker>cc1plus: error: unrecognized command line option "-std=c++11"
06:20<@planetmaker>cc1plus: error: unrecognized command line option "-std=c++11"
06:20<@planetmaker>make[1]: *** [alloc_func.o] Error 1
06:20<@planetmaker>make[1]: *** [strgen_base.o] Error 1
06:20<@planetmaker>make[1]: Leaving directory `/home/openttd/git-publicserver/objs/lang'
06:20<@planetmaker>make: *** [all] Error 1
06:20<@planetmaker>[root@publicserver-new git-publicserver]# gcc --version
06:20<@planetmaker>gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
06:20<@planetmaker>ups.. .sorry
06:21<@planetmaker>so... what gcc do I need?
06:24<@planetmaker>6.x I guess
06:31<Samu>unrelated, I am wondering if it's okay to let ai settings be editable in SE if the instance is active and alive
06:31<Samu>for some reason, I decided it was not okay
06:31<Samu>now I must remember why
06:32<andythenorth>planetmaker: clang? o_O
06:32*andythenorth not serious
06:32<@planetmaker>not on that version of centos
06:32<Eddi|zuHause>i have 7.3.1
06:33<@planetmaker>centos has astonishing long lifetime... but stuff gets old nonetheless
06:33<Eddi|zuHause>well, you might want a version that is less than 7 years old
06:34<@planetmaker>2.6.32-042stab130.1 #1 SMP Tue May 22 09 <-- probably :)
06:34<@planetmaker>EOL is next year for that distro
06:36<LordAro>planetmaker: i think 4.9 will work, still
06:37<LordAro>4.8, even -
06:37<LordAro>4.9 for c++14
06:39<@planetmaker>I must upgrade the HV this year :|
06:42<nielsm>Samu, don't change settings behind an already started AI, they probably won't be coded to assume settings can change under their feet
06:44<andythenorth>based on my limited experience coding GS I would strongly concur
06:44-!-Pikka [] has quit [Read error: Connection reset by peer]
06:47<Samu>the issue is this: I save a game with ais. I rename .sav to .scn and i open it in the editor
06:47<Samu>what can be allowed and what can't be allowed on ais
06:48<Samu>what will happen once i save the scenario and play it
06:48<nielsm>don't change settings behind the back of an already started AI, but feel free to add or remove players?
06:49<Samu>that's apparently my current decision, was only trying to remember why I did it this way
06:49<Samu>my poor brain
06:50<nielsm>this is why documenting your software and keeping the documentation updated is a good idea :)
06:54<@planetmaker>devtoolset seems to be a centos/rhel thing to get newer tools...
06:57<Samu>what will be saved in relation to AI data when the save is done in the scenario editor
06:57<Samu>something that i must explore
07:04<@peter1138>planetmaker, wow, that's an ancient machine.
07:08<Samu>just found out
07:08<Samu> /* Save the data that was just loaded. */
07:08<Samu>this is great!
07:09<Samu>that partially explains why I'm not letting its settings to be altered in SE
07:13<Samu>I could improve this part a bit, though. Currently, I'm simply disabling the Settings window.
07:13<Samu>Perhaps I could access the window, but have everything grayed out
07:14<Samu>at least I could see how they are atm
07:15<Samu>less restrictive
07:15<Samu>more friendly
07:17<@planetmaker>peter1138, yep. As long as there's security updates and it works... no need to upgrade ;)
07:21<Eddi|zuHause>well, i think the time has come where one of those things doesn't apply anymore :p
07:25<@peter1138>Grr, my monodevelop is not updating references or whatever it is properly.
07:27*peter1138 tries a clean.
07:33<@planetmaker> <-- TrueBrain for a nightly server I need this info to be current
07:35<@peter1138>Is there another URL that does similar? I'm sure I saw one that had current info on it.
07:35<@peter1138>But yes.
07:56<Arveen2>word on the internet is nightly builds are back ?
07:57<Arveen2>fantastic :D
07:57<@peter1138>Cos TrueBrain is a magician.
07:57<Arveen2>I tried to build a recent version on VS like 2 weeks ago and it failed when trying to use the ottd useful 6.0 package
07:57<@peter1138>Don't need to use that any more.
07:58<@peter1138>Latest build instructions use vcpkg.
07:58<Arveen2>i didn't notice there was a change
07:59<Arveen2>seems like it's time to get some ottding going tonight, heh
08:03-!-D-HUND is now known as debdog
08:04<nielsm>I kinda want to set up a server running nightly, and auto-upgrading at some point a few hours after each new build
08:07<@planetmaker>such server used to exist... maybe it should be revived :)
08:07<@planetmaker>coop always used manual updates, usually between games. But there was for a time a server by dihedral which updated every day.
08:08<@planetmaker>Was fun :)
08:08<@planetmaker>Seeing that about no-one plays on coop servers regularily anymore... maybe a good idea to put it to such use
08:10<nielsm>I'm thinking writing a small GS that sends newspapers/other messages to players when the daily update is about to be installed so they can get ready
08:10<nielsm>then pause the game for the last 5-10 minutes before kicking everyone off and installing the new version
08:11<@planetmaker>I don't think it needs a GS for that purpose. You can send to ingame via admin port which you need anyway
08:11<nielsm>well could do silly things like putting the latest changes in the storybook? :D
08:12<@planetmaker>or adding an extended tutorial script as GS... hm... OpenTTD tutorial server
08:13<nielsm>ask players starting a new company "do you want a tutorial?" and if they do, it finds route suggestions and shows what to do?
08:13<nielsm>could be neat
08:13<@planetmaker>something like that, yes
08:13<@peter1138>Who needs a GS when you can just make AIs cheat!
08:14<@peter1138>Hmm, shall I work on group liveries some more? Like making this hierarchy thing work.
08:14<@peter1138>It's kinda a pain :/
08:15<Arveen2>i'd play coop again without hesitation if there would be a new game
08:15<@peter1138>Cos at the moment "scheme not in use" means use-the-default-vehicle-type-specific scheme, rather than use-the-parent-group scheme.
08:15<Arveen2>i was playing frequently but you are right, seems not much is going on there
08:16<@peter1138>OpenTTDCoop was never my build style.
08:16<Eddi|zuHause>peter1138: needs more OOP?
08:16<Eddi|zuHause>LiveryResolver object
08:17<@peter1138>Eddi|zuHause, no, it's just, which is preferable, use type-specific or parent?
08:17<@peter1138>it could possibly even be either, "default" or "inherit"
08:17<@planetmaker>Arveen2, it needs people who actually help with running that
08:17<Eddi|zuHause>peter1138: spontaneously i'd say parent
08:18<@planetmaker>I'm about the only person currently who is somewhat around and has access to the servers. But it needs people playing. Moderating ingame,... updating the server
08:18<@planetmaker>not difficult. Not much to do. But needs doing
08:18<@planetmaker>I'm happy to grant access to people who want to carry on with that
08:18<Arveen2>yeah, i see
08:18<@planetmaker>"the old people" seem to have gone mostly
08:18<Eddi|zuHause>peter1138: say, i'm making tram networks, and one group per line in a town, then it might be useful to have a parent group for each town that handles the livery
08:19<Arveen2>the last couple of games it was already hard to get a plan going
08:19<nielsm>peter1138: vehicle is asked for its livery, vehicle asks its group for livery, group asks parent group for livery, etc., until vehicle receives a group livery configuration, and then it applies default liveries for its types for any "default" values in the group livery config?
08:19<@peter1138>planetmaker, they moved on to that other game on steam?
08:19<Eddi|zuHause>fortnite? :p
08:19<@planetmaker>Maybe it needs to be handled a bit different than before... dunno. Making a plan... could be done alone, if need be
08:19<@peter1138>the one V is involved in
08:20<@planetmaker>peter1138, factorio? Possibly. It's addictive :P
08:20<nielsm>and the same group livery check could be used to draw the default values in the livery config window
08:20<@planetmaker>and they have nice MP servers, too
08:21<@peter1138>Are we going to try to put OpenTTD on Steam?
08:21<@peter1138>Was it you talking about it?
08:21<@planetmaker>Not making progress on getting 'openttd' as username. But will go forward with another
08:22<@peter1138>I dunno, Steam's social aspect is useful.
08:22<@peter1138>"$Friend is now playing OpenTTD, click to join!"
08:22<@peter1138>(Sort of)
08:22<nielsm>that would imply adding some steam api stuff into the game
08:22<@peter1138>planetmaker, openttd already gone? :/
08:22<@planetmaker>Not using that really much myself... but possibly.
08:22<@planetmaker>some guy has it ... and wasn't online for 4 years... but yeah
08:23<@peter1138>nielsm, maybe. You get a notification starting just a shortcut in steam as well.
08:23<@peter1138>Send a tweet to Gabe himself lol
08:23<@planetmaker>but username != display name I think
08:23<@peter1138>Yeah, can we just set up an openttd developer account
08:24<@planetmaker>nielsm, maybe it would imply that... but it could be a special steam version... like --with-steam-api on config
08:24<@peter1138>Hmm, is it actually single-user or some kinda of organisation system? Never looked of course.
08:24<@planetmaker>peter1138, yes, that's why I wanted openttd. But will or so
08:24<nielsm>peter1138, if we want "click here to join their game" there would need to be something that announces to steam that you have started/joined a network server and what its address is
08:24<@peter1138>nielsm, yup
08:25<nielsm>also possibly a way to convert a singleplayer game to multiplayer in "one click"?
08:25<@peter1138>Anyway that's a long way off
08:25<@peter1138>First step is just get it on Steam.
08:25<nielsm>i.e. not save, quit, reload on multiplayer mode
08:25<@peter1138>I know people have asked for it for years.
08:25<@peter1138>nielsm, PR it ;D
08:25<@planetmaker>opinion used to be quite against it, I think. But... seems to have changed
08:26-!-snail_UES_ [] has joined #openttd
08:26-!-snail_UES_ is "Jacopo Coletto" on #openttd
08:28<@peter1138>Hmm, of course if the app needs some kind of key (credentials) to access features on the platform then that's kinda awkward.
08:28<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh opened issue #7125: Convert singleplayer game to multiplayer server
08:29<nielsm>peter1138, that's basically a compile-time option right?
08:29<@peter1138>Means user-compiled builds won't work?
08:30<nielsm>eh let's look at how it actually works:
08:30<@peter1138>Nah, speculate!
08:31<@planetmaker>wtf... "Ihr Account konnte nicht eingerichtet werden. Versuchen Sie es bitte später noch einmal." could not create account. Try again later
08:33<nielsm>someone requested a while ago a feature to broadcast "joined network game" etc to discord/similar too, that could maybe be wrapped in similar code
08:34<Eddi|zuHause>nielsm: i suggested to them to try an admin port wrapper
08:34<nielsm>does a network client have an admin port?
08:35<@peter1138>Mmm, Earl Grey.
08:37<@planetmaker>nielsm, coop runs an admin port to irc bridge for OpenTTD. That same could easily be done with discord as well
08:37<@planetmaker>and all joins etc are broadcast as well as ingame chat
08:38<nielsm>yeah but this is about a player connecting their client to a server they do not control, and have their client tell a local application about which server they joined
08:39<@planetmaker>admin port is currently only available for... servers
08:39<@peter1138>That was nielsm's point :)
08:40<@planetmaker>sorry, read it as question
08:45<@peter1138>Oh. My Jenkins isn't running. Odd.
08:45<@peter1138>That explains why the CI isn't running I suppose.
08:49<@peter1138>Is pngcodec relevant at all?
08:49<@peter1138>All those extras seem pretty out of date.
08:53-!-snail_UES_ [] has quit [Quit: snail_UES_]
08:54<DorpsGek_II>[OpenTTD/OpenTTD] paulcobbaut opened issue #7126: custom font settings in openttd.cfg seem to be ignored
08:55<@planetmaker>uh... no. pngcodec is the old 32bpp era, not the current
08:56<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
08:56<@planetmaker>grfcodec is actually correct
08:56<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
08:56<@planetmaker>and catcodec probably, too
08:56<@peter1138>planetmaker, that's what I thought.
08:57<@planetmaker>osie likely, too
08:57<nielsm>oh shit, if ottd gets on steam people are going to demand achievements!
08:57<@planetmaker>open??x ... checking :D
08:57<@planetmaker>nielsm, not a bad thing, is it?
08:57<@planetmaker>opengfx is a bit out-of-date
08:58<DorpsGek_II>[OpenTTD/OpenTTD] paulcobbaut commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
08:58<nielsm>"enemy of nature: raise 100 sea tiles to land in one operation"
08:58<@planetmaker>openmsx and opensfx are ok
08:58<@peter1138>Any Mac OS users around? :D
08:59<@planetmaker>nforenum is also ok
08:59<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on issue #7126: custom font settings in openttd.cfg seem to be ignored
08:59<nielsm>(the problem with achievements is that you need to litter checks for them around the code everywhere)
09:00<@planetmaker>so in summary: everything in finger.o.o is fine - except OpenTTD nightlies. And somewhat OpenGFX, but no big deal there.
09:01<milek7>steam api stuff could be incompatible with GPL
09:02<nielsm>milek7 it's not
09:02<@planetmaker>I checked. It should be ok
09:02<nielsm>the api is public, nothing is secret about it
09:02<@peter1138>If it's just a web api, then no.
09:03<nielsm>the game integration is a dynamic library you link and call into, which does IPC with the running steam client
09:03<@planetmaker>well... yes. no. The SDK has some NDA included
09:03<@planetmaker>but going to check that carefully
09:04<@peter1138>Then strictly speaking, yeah, that's not usable.
09:05<@planetmaker>Not sure that is needed, though. At least not for bringing it on steam in the first place
09:06<nielsm>yeah no, not needed to just be published
09:06<nielsm>only for the integration with "join my server" etc
09:06<DorpsGek_II>[OpenTTD/website] planetmaker opened issue #48:
09:08<milek7>hm, i thought GPL extended also to dynamic libraries
09:09<milek7>yes, at least this is FSF interpretation
09:09<nielsm>yeah technically you're violating GPL by making a binary that depends on an external library that isn't GPL compatible
09:09<nielsm>(unless that library is arguably part of the operating system)
09:10<@peter1138>Hence the C runtime on Windows is "okay".
09:10<nielsm>because you're not allowed to infect the proprietary code with GPL
09:10<@planetmaker>vice versa?
09:10<nielsm>then your own code becomes a license violation
09:12<nielsm>the way I understand it, a single chunk of GPL code in a loaded and running binary "infects" all other code in that same process with GPL-ness, and if that would be a violation of the license of any of that other code, then that original chunk of GPL code is used without permission
09:13<nielsm>i.e. if you write an in-process COM server for windows file explorer shell API, then it can't actually run because it's not allowed to be loaded in the explorer process
09:13<nielsm>pretty dumb
09:13<@planetmaker>"Generally, any license that has a so-called “copyleft” element will be problematic when combining code with the Steamworks SDK. The best-known example is GPL."
09:14<@planetmaker>the SDK is not the web API, though
09:14<nielsm>I've seen that argument used for a foobar2000 plugin integrating FFTW, fb2k itself it closed software, the plugin SDK is BSD 2-clause or 3-clause license (iirc), and FFTW is GPL
09:15<nielsm>and the author of FFTW, or maybe it was a resampling library?, claimed it was illegal use
09:16<@planetmaker>fftw = fastest fourier transform of the west?
09:16<nielsm>actually it was probably not that
09:16<@peter1138>That would be a violation, yes.
09:16<@peter1138>But ergh, we don't need to discuss that :)
09:24<DorpsGek_II>[OpenTTD/OpenTTD] glx22 commented on issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
09:24<DorpsGek_II>[OpenTTD/OpenTTD] glx22 opened pull request #7127: Fix #7112, fef8b831a9: incorrect precondition check
09:25-!-supermop_work [~supermopw@] has joined #openttd
09:25-!-supermop_work is "A CIRC user" on #openttd
09:26-!-glx [] has joined #openttd
09:26-!-mode/#openttd [+v glx] by ChanServ
09:26-!-glx is "Loïc GUILLOUX" on @#openttd.noai #openttd.notice +#openttd
09:36-!-Mahjong2 [~qq@2a00:23c5:6526:4400:864:a6eb:71c9:de4c] has quit [Remote host closed the connection]
09:39-!-Mahjong [~qq@2a00:23c5:6526:4400:864:a6eb:71c9:de4c] has joined #openttd
09:39-!-Mahjong is "realname" on #openttd #ohnx
09:39-!-andythenorth [] has quit [Quit: andythenorth]
09:39-!-Mahjong [~qq@2a00:23c5:6526:4400:864:a6eb:71c9:de4c] has quit [Remote host closed the connection]
09:39-!-Mahjong is "realname" on #openttd #ohnx
09:39-!-Mahjong [~qq@2a00:23c5:6526:4400:864:a6eb:71c9:de4c] has joined #openttd
09:41-!-Flygon [] has quit [Quit: A toaster's basically a soldering iron designed to toast bread]
09:45-!-Arveen2 [] has quit [Quit: I like trains]
09:46<Samu>who's a bool expert? need to simplify/optimize/avoid repetition:
09:46<@planetmaker>indeed. I think we all know what GPL allows and what not :) And make decisions according to that wrt steam
09:47<Samu>IsConsideredDead is repeated, just wondering if there's a way to not have it twice
09:48<+glx>Samu: you may want to add parenthesis around your || and && groups, it's easier than trying to remember the evaluation order
09:49<Samu>oh, right, i keep forgeting
09:50<+glx>IIRC it's first && then || but may be the other way
09:52<@peter1138>Always specify the order you want, heh.
09:52<nielsm>no, that can't be simplified with regard to IsConsideredDead
09:53<+glx>_game_mode == GM_NORMAL && (IsConsideredDead(this->slot) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0) <-- you really mean (normal && dead) || flags ?
09:54<+glx>oups forget it, wrong reading :)
09:54<+glx>too many parenthesis for me
09:54<@peter1138>Problem is it may not be right ;)
09:54<Samu>in a normal game do this check: IsConsideredDead(this->slot) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0
09:54<nielsm>it's a really complex condition and should not be a single line to begin with
09:55<nielsm>write it as a function that accepts/rejects via early returns
09:55<@peter1138>nielsm, indeed.
09:55<Samu>in main menu, do check in line 1
09:55<Samu>in scenario editor, do check line 3
09:58<Samu>IsConsideredDead isn't flexible enough to deal with scenario editor :|
09:58<+glx>maybe split in "editable |= ...;" lines hoping the compiler optimises "true |= ..." stuff
09:58<@peter1138>Or editable &=
09:58-!-andythenorth [] has joined #openttd
09:58-!-andythenorth is "andythenorth" on #openttd
09:58<nielsm>something like that
09:58<nielsm>is how I read the condition
09:58<nielsm>and that's easier to read and argue about
09:58-!-andythenorth [] has quit []
09:59<@peter1138>nielsm, yes
09:59<nielsm>it won't win contests for being short, but we're not here to code golf, we're here to write bug-free code
09:59<+glx>indeed the function is self explain
09:59<Samu>if (!IsValidAiID(slot)) return true; is only for non deity
10:00<nielsm>Samu I don't know, your code is not clear because you're not using enough parentheses
10:00<Samu>oh :(
10:00<nielsm>?: conditional expressions are another place there operator precedence rules are really difficult to remember
10:01<nielsm>and you should really not use ?: expressions with anything but simple values or singular conditionals in each slot
10:01<nielsm>(foo == bar) ? x : y
10:01<nielsm>is good
10:01<+glx>indeed ?: has less priority than ||
10:01<nielsm>(foo == bar || foo == baz) ? (x+5) : (y*6)
10:01<nielsm>is too complex
10:02<Samu>let me edit
10:04<+glx>so (a ? b : c || d) is (a ? b : (c || d)) when you may want it to be ((a ? b : c) || d)
10:04-!-andythenorth [] has joined #openttd
10:04-!-andythenorth is "andythenorth" on #openttd
10:05<+glx>that's why it's better to use parenthesis, ensure it does what you want
10:05<nielsm>or just split up conditionals into multiple statements
10:06<nielsm>a modern compiler is probably going to generate identical code
10:06<@planetmaker>yep... the ternary operator is... too complex with anything bigger than very simple stuff
10:06<@planetmaker>not reader-friendly. And compilers...are good enough, I guess, too
10:06<@peter1138>ternary is okay for rtl ? ;-)
10:06<@peter1138>(That was not a question)
10:07<+glx>when it's not in the middle of some complex stuff it's ok :)
10:07<@planetmaker>rtl = read_from_left ? no : yes
10:07-!-andythenorth [] has quit []
10:08<+glx>but mixing || and && is already complex enough to not add ?: in it
10:08<Samu>it was working
10:08<+glx>but it was not doing what you expected I think
10:08<Samu>just wanted to make it simpler, i guess
10:09<Samu>no, it was doing as I intended
10:09<nielsm>well, we couldn't figure out what you intended
10:09<nielsm>so it was bad code
10:09<+glx>even (this->slot == OWNER_DEITY ? Game::GetInstance() == NULL : !IsValidAiID(this->slot) || Company::Get(this->slot)->ai_instance == NULL) ?
10:09<Samu>hehe, the game did understand
10:09<+glx>ah yes you really wanted (c || d)
10:09<+glx>you were lucky
10:10<nielsm>the compiler does exactly what you tell it to, even when you misspeak
10:10<nielsm>(then it just doesn't do what you intended)
10:11<+glx>hehe like using if (a = b) instead if (a == b)
10:11<Samu>a && (b ? (c) : (d || e))
10:12<+glx>it's valid but not what you usually want
10:12<Samu>becomes a && (c), or a && (d || e)
10:12<@planetmaker>Samu, in that case I very much prefer a && IsThisFunctionTrue(b,c,d,e)
10:13<+glx>hey use a lamba function ;)
10:13<Samu>something like the private that glx used to fix the widgets?
10:14<Samu>what's a lambda?
10:14<@planetmaker>I'm not exactly on good terms with lambda functions :P
10:14<Samu>ah, ^
10:15<Samu>i call it circumflex accent
10:16<@peter1138>planetmaker, better review my group-livery PR then ;)
10:16<nielsm>^ is not involved in C++ lambda syntax
10:16<nielsm>(it's just the bitwise xor operator)
10:17<@peter1138>Oh yes, hierarchy. Hmm.
10:17<+glx>but a normal function is ok too
10:17<@peter1138>Maybe I can lambdaise that and make it generic.
10:18<Samu>"Constructs a closure: an unnamed function object capable of capturing variables in scope. " not english enough for me
10:20<+glx>btw Samu I guess your editable calculation happens for DrawWidgets and OnClick
10:20<Samu>yes, that which you fixed recently
10:20<Samu>the private idea
10:20<+glx>so indeed you should use an external function
10:21<Samu>whatever private is
10:21<+glx>that way you'll be sure draw and click are similar
10:21<+glx>even if the conditions are changed later
10:22<+glx>and with the external function it's possible to get rid of the expression complexity
10:23-!-Taede [] has quit [Read error: Connection reset by peer]
10:23-!-Taede [] has joined #openttd
10:23-!-Taede is "Taede Werkhoven" on #openttd #oftc @#Turbulent #supybot @#Soapy #/r/openttd
10:23<+glx>I didn't in my fix, but for your complex stuff it's needed
10:24<Samu>gonna learn from it
10:26<+glx>the return line can be spit in 3 if (...) return true, then a final return false, so 4 lines instead of 1, but easier to follow
10:27<@planetmaker>Samu, and the function itself: it is much more readable in the form which niels suggested earlier: early returns instead of one complex expression
10:28<@planetmaker>if _game_mode == GM_MENU return true;
10:29<+glx>indeed, once something in ... || ... || ... is true it won't change
10:29<@planetmaker>if (this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot) return true;
10:29<@planetmaker>if (config_item.flags & SCRIPTCONFIG_INGAME) != 0 return true
10:29<@planetmaker>return false;
10:30<+glx>hey that's my stuff ;) (and yes I could have split it)
10:30<@planetmaker>sorry. was it you? Ok, Sam u, take glx' advice :)
10:32<+glx>and this one is not that complex, but indeed as it's in a function it's easy to split it to simplify the reading
10:32<@peter1138>45 minutes later...
10:34<Samu>what is nullptr?
10:34<Samu>should be NULL
10:34-!-Wormnest [~Wormnest@] has joined #openttd
10:34-!-Wormnest is "Wormnest" on #openttd
10:34<nielsm>nullptr is the same as NULL
10:34<nielsm>except it's a pointer type
10:34<nielsm>and a keyword
10:34<+glx>and if you see nullptr you failed somewhere ;)
10:34<nielsm>while NULL is a #define'd constant
10:35<nielsm>new C++ code should use nullptr instead of NULL or 0 when working with pointer types
10:35<+glx>but in openttd we still use NULL
10:35<Samu>hmm it was working with NULL, not sure I'd change to nullptr
10:36<nielsm>they're functionally identical
10:36<nnyby>Google's C++ style guide is an interesting read btw,
10:37<nnyby>openttd seems to follow a more C-like style which I kinda like cause I don't know too much C++ >_<
10:38<@planetmaker>well... OpenTTD cannot deny its C heritage
10:38<nielsm> ugh CI stuck :(
10:38<@planetmaker>its style guide works extremely well, IMHO
10:39<crem2>nullptr is safer than NULL. nullptr cannot be converted to integer. So if `int *p;`, you cannot mistakenly do `*p = nullptr`, but can `*p = NULL`.
10:40<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog
10:42<@planetmaker>is there a way to re-trigger the CI?
10:42<crem2>There once was this particular typo which caused some very large outage in one of major services of one of well-known software companies. :)
10:42<@peter1138>Probably needs TB to log in again. Shitty azure :/
10:42<@planetmaker>or should I simply merge that commit and hope it compiles? :P
10:43<@peter1138>Well you can test it locally.
10:43<+glx>ah yes #7106 is stuck too
10:43<Samu>oh crap, i need to actually enable the configure button too
10:43<+glx>force pushed 15h ago
10:44<Samu>enabled in one place, left it unenabled in the other
10:44<@planetmaker>the CI seems somewhat unreliable :|
10:44<+glx>hey it's free
10:44<@planetmaker>the other didn't cost us anything either ;)
10:45<@planetmaker>(but time / maintenance)
10:45-!-sla_ro|master [] has joined #openttd
10:45-!-sla_ro|master is "slamaster" on #sla #openttd
10:46<@peter1138>Need TB to login on a cron, heh
10:46<@peter1138>Or maybe just get logins for other devs so they can do it.
10:46<@planetmaker>a bot checking issues to have completed and re-trigger a built, if not
10:46<@planetmaker>like the stale issue checker
10:47<Samu>this->SetWidgetDisabledState(WID_AIC_CONFIGURE, this->selected_slot == INVALID_COMPANY || GetConfig(this->selected_slot)->GetConfigList()->size() == 0);
10:47<nielsm>some more people with login-access to the azure org would help too
10:47<Samu>this->SetWidgetDisabledState(WID_AID_SETTINGS, ai_debug_company == INVALID_COMPANY || GetConfig(ai_debug_company)->GetConfigList()->size() == 0);
10:47<nielsm>I don't think you even need any special permissions for it, just ability to log in as a member of the org to "keep it alive"
10:47<Samu>it's funny, in one place it's called settings, in the other it's called configure, and yet they refer to the exact same window
10:48<@planetmaker>do we have some keepass database with login & stuff? Would make sense IMHO
10:48<@peter1138>Don't think it needs to be a single login, in this case.
10:48<nielsm>just add more members to the org?
10:48<@planetmaker>also true probably, yes
10:49<@planetmaker>always need 2 with complete access to every service
10:49<nielsm>ping orudge?
10:49<@planetmaker>at least
10:49<@peter1138>Or, we could pay for it?
10:49<nielsm>I think paid accounts have the same rule
10:50<Samu>i need a GS with no parameters, for testing
10:50<Samu>testing button state
10:50<@peter1138>Ah, right, this page I'm looking at is 5 years old :/
10:50<nielsm>unless you pay for your own azure build hosts
10:50<Samu>do u know of any?
10:51<+glx>write one
10:52<+glx>it's often easier to write an "empty" script than to search for one matching your test case
10:52<@peter1138>Urgh, now I have to invalidate colours when changing a group's parent.
10:52<@planetmaker>Samu, tutorial-GS?
10:54-!-andythenorth [] has joined #openttd
10:54-!-andythenorth is "andythenorth" on #openttd
10:54<+glx>Samu: you can probably adapt into a GameScript with no difficulty
10:55<+glx> <-- maybe easier
11:00<@peter1138>And traversing parents is easy, but children not so much.
11:01<@peter1138>Maybe I should just not support group heirarchy :p
11:05-!-WWacko1976-work [] has quit [Ping timeout: 480 seconds]
11:06-!-Pikka [] has joined #openttd
11:06-!-Pikka is "realname" on #openttd
11:06<Samu>editing minimalGS brb
11:09<Samu>interesting, just found a bug
11:09<Samu>if the parameter is DEVELOPER
11:09<Samu>the list of settings isn't empty
11:09<Samu>it's not considering whether they're visible or not
11:10<Samu>technically, the list has items, but since they're hidden...
11:10<Samu>it should disable the button
11:10<Samu>dont u think?
11:11<+glx>if nothing is displayed, disabling makes sense I guess
11:11<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh approved pull request #7127: Fix #7112, fef8b831a9: incorrect precondition check
11:16<DorpsGek_II>[OpenTTD/OpenTTD] planetmaker merged pull request #7127: Fix #7112, fef8b831a9: incorrect precondition check
11:16<DorpsGek_II>[OpenTTD/OpenTTD] planetmaker closed issue #7112: Commit fef8b83 broke GSTown.SetGrowthRate
11:24<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh approved pull request #7101: Fix #6636: Airplanes could be sent to helicopter station depots
11:24<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh merged pull request #7101: Fix #6636: Airplanes could be sent to helicopter station depots
11:24<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh closed issue #6636: airplane going for helistation depot
11:28-!-Gja [] has joined #openttd
11:28-!-Gja is "Martin" on #ceph #bcache #openttd
11:31<nielsm>hmm :P
11:31<nielsm>I think that's the result of savegame version incrementing past that I used in another branch :)
11:41-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
11:41-!-keoz is "Grmph" on #openttd
11:44<Samu>GetConfig(ai_debug_company)->GetConfigList()->size() == 0
11:44<Samu>this check isn't enough to determine whether Settings button is to be enabled or disabled
11:44<Samu>need another private function?
11:45<Samu>and it's used both for AI Congig and AI Debug
11:45<Samu>hmm so... can't be private?
11:45<Samu>something a-la IsConsideredDead, I suppose
11:46<andythenorth>we need a mac-in-cloud for testing :P
11:46<andythenorth>currently I have to be mac-in-cloud personally, it's getting demoralising :D
11:47<@peter1138>But do your fonts work?
11:47<andythenorth>I have NFI
11:47<andythenorth>I would never use a weird font
11:47<andythenorth>so now I have to learn how to do that
11:48<+glx>you just have to set fonts in the config
11:51<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7081: Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)
12:01<nielsm>it's annoying testing things that really need a release/optimized build for performance
12:01<nielsm>since those take rather long to make
12:04<Samu>I am inventing ^_^static bool IsGUIConfigListEmpty(CompanyID slot)
12:05<Samu>mostly copy pasting code around into it
12:06*andythenorth wonders how bad the page load here really is
12:07<Samu>insta loaded for me
12:08<andythenorth>my browser brings it down in about 500ms, uncached
12:11<andythenorth>the openttd website is 100ms
12:12<nielsm>time to compare!
12:15<LordAro>nielsm: neither of those are fast
12:17<nielsm>I don't see any particular improvement in this scene at least
12:21<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7083: Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
12:27-!-frosch123 [] has joined #openttd
12:27-!-frosch123 is "frosch" on #openttd
12:32<TrueBrain>nielsm: cool idea for nightly docker. we first need a template for that .. interested? :)
12:33<nielsm>I'd have to learn those things from the ground up first then
12:34<Samu>hmm, is it okay to close the window on me if there are no more visible settings when I set ai_developer_tools off?
12:34<Samu>would I like that to happen?
12:36<Samu>i wouldn't mind, because i know there are no more visible settings anymore, but what if someone doesn't know of this?
12:36<nielsm>doesn't matter imo
12:36<nielsm>whatever is easier to do
12:37<nielsm>it's such a rare occurrence it really doesn't matter, as long as you don't crash
12:38-!-synchris [~synchris@] has joined #openttd
12:38-!-synchris is "Synesios Christou" on #openttd
12:40<Samu>ok, gonna close it on me
12:40<Samu>behave similar to textfile, also closes on me when there's nothing to display
12:43<TrueBrain>nielsm: bah :P So we need to find someone to contribute a Dockerfile :D
12:43<TrueBrain>as it really is a good idea
12:44-!-Progman [] has joined #openttd
12:44-!-Progman is "Peter Henschel" on #openttd
12:46<Samu>crap, the debug window is also relevant, i keep forgetting it exists :p
12:49<DorpsGek_II>[OpenTTD/website] TrueBrain commented on issue #48:
12:50<TrueBrain>okay, Azure Pipelines is really annoying. It really has to be a logged-in user to dequeue the builds ..
12:50<TrueBrain>it also fails to cancel jobs because newer versions are available
12:50<TrueBrain>(which it normally does)
12:50<TrueBrain>so it really is buggy
12:52<TrueBrain>CPython uses the old-style Azure Pipelines webhook .. possibly that is more stable or something
12:56-!-supermop_work [~supermopw@] has quit [Ping timeout: 480 seconds]
12:57<andythenorth>new website design then?
12:58<andythenorth>probably not right now imho
12:58<andythenorth>also BBL
12:58-!-andythenorth [] has quit [Quit: andythenorth]
12:58<@peter1138>When you buy too much veg to fit in your fridge...
12:59<@peter1138>nielsm, might see more of a difference with a 32bpp blitter.
13:05-!-Gja [] has quit []
13:05<nielsm>peter1138 ah good idea
13:05<+glx>animated blitter maybe
13:06<nielsm>force_full_redraw = false <- flip that?
13:08-!-Gja [] has joined #openttd
13:08-!-Gja is "Martin" on #ceph #bcache #openttd
13:10-!-Wolf01 [] has joined #openttd
13:10-!-Wolf01 is "Wolf01" on #openttd
13:10<Samu>how to check if a window is open
13:11<nielsm> seeing a tiny difference now
13:11<Samu>need to re-open to refresh widgets plane
13:11<Samu>debug window is a big buggy
13:12<@peter1138>BringWindowToFrontById() will return the window pointer if it's open, and highlight it.
13:12<@peter1138>Might not be what you want.
13:12<Samu>i guess invalidatedata would be more appropriate, but it involves hidden widgets
13:12<Samu>dont know how to do this
13:12-!-tokai|noir [] has joined #openttd
13:12-!-mode/#openttd [+v tokai|noir] by ChanServ
13:12-!-tokai|noir is "Christian Rosentreter" on +#openttd
13:13<Wolf01>So, I just asked to activate FTTH up to 200M (my area isn't covered by the 1000M), let's see how much they take to do it
13:14<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh approved pull request #7083: Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
13:15<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh merged pull request #7083: Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
13:15<LordAro>Wolf01: that's a bit better than you've currently got, i think? :p
13:15<Wolf01>Just a little boost from 4M
13:16-!-andythenorth [] has joined #openttd
13:16-!-andythenorth is "andythenorth" on #openttd
13:16-!-Wormnest [~Wormnest@] has quit [Ping timeout: 480 seconds]
13:19-!-tokai [] has quit [Ping timeout: 480 seconds]
13:19<TrueBrain>peter1138: I keep looking for ways to automatically log myself in every hour or so .. but for that it first needs to stall, so I can check if my fix works :P But yeah, it would help if one or two of you also got an account so you can dequeue if I am not here
13:20<TrueBrain>I have two more attempts lined up .. we will see tomorrow if either one works :)
13:21<@peter1138>What sort of account does one need?
13:22<Samu> does this look alright? it looks strange to see typedef outside
13:22<Samu>may i have it outside?
13:23<@peter1138>It needs to be outside because it's the return type.
13:23<Samu>and why can't it be static?
13:23<TrueBrain>peter1138: euh .. I think orudge can sign you up on your email, I guess
13:23<@peter1138>What can't what be static?
13:23<Samu>static typedef
13:23<TrueBrain>but you have to signup to Azure Pipelines
13:23<TrueBrain>(right top corner, Sign Up)
13:23<@peter1138>Hmm, I can probably add that to my existing account.
13:23<Samu>im only using it for ai_gui.cpp file
13:24<+glx>a typedef is always static
13:24<Samu>oh, ok
13:24<+glx>unless it's in a header
13:24<@peter1138>a typedef does not have any storage, so it can't be static.
13:24<TrueBrain>peter1138: easiest is the address, as that keeps the Team simple and clean
13:25-!-Thedarkb-T60 [] has joined #openttd
13:25-!-Thedarkb-T60 is "realname" on #openttd #oolite
13:25<Samu>im gonna need the function for some of the windows'es
13:26<Samu>AI Settings, AI Debug, AI Config
13:26<nielsm>(btw "windows" is already plural, it doesn't need any 'es suffix or otherwise)
13:27<Samu>it was an exclusive of AI Settings
13:27<Samu>but i realized i need it outside of it
13:28<Samu>to determine some widgets enableness
13:37<andythenorth>oof eints :P
13:37<andythenorth>that UI is horrid
13:38<andythenorth>too many things to fix andythenorth :P
13:38<andythenorth>have a break
13:42<Samu> visible_settings.clear();
13:42<Samu> visible_settings.swap(BuildVisibleSettingsList(this->slot));
13:42<Samu>is swap what i really want?
13:42<Samu>i want to transfer the items from a list to the other, and then discard it
13:43<Samu>swap doesn't seem to be what i want
13:45<@peter1138>Damn, I really should remove stashes when I'm done with them.
13:46<Samu>swap is working though
13:47<andythenorth>git stash apply oops
13:47<andythenorth>git stash unapply :P
13:47<Samu>nop it's not working
13:47-!-HerzogDeXtEr [] has joined #openttd
13:47-!-HerzogDeXtEr is "purple" on #openttd
13:48<Samu>well, screw it
13:48<DorpsGek_II>[OpenTTD/OpenTTD] George-VB commented on issue #6907: Cargo capacity should be recalculated on TRIGGER_VEHICLE_NEW_LOAD
13:50<@peter1138>git stash pop
13:50<@peter1138>git stash drop, etc
13:50-!-gelignite [] has joined #openttd
13:50-!-gelignite is "gelignite" on #openttd
13:50<@peter1138>^ 6907...
13:51<@peter1138>Capacity can only be changed in a depot, right?
13:53<andythenorth>station trigger, possibly others
13:53<@peter1138>So is 6907 valid?
13:53<andythenorth>wiki is vague, and I didn't read the trigger code
13:54<andythenorth>being candid, fuck knows
13:54<andythenorth>I am having sense of humour failure about newgrf stuff :P
13:54<@peter1138>Don't need to read the code, is it *meant* to do what he wants, heh
13:54<@peter1138>I've never used autorefit, and don't know where it even came from.
13:54<andythenorth>it was a nice misguided idea
13:55<andythenorth>on the plus side I rarely use the refit GUI any more, just set station refit order
13:55<andythenorth>on the negative side, spiders
13:56<@peter1138>Hmm, newgrf cache is invalidated before and after the trigger is done.
13:57<@peter1138>Ok, so the trigger happens, and then the cache is invalid.
13:57<@planetmaker>autorefit... is that the refit which you can tell a train to do at a station?
13:58<@peter1138>I think so.
13:58<@planetmaker>so you can ship wood to a factory and the same train ships back a few supplies?
13:58<@planetmaker>advanced, but useful stuff
13:58<TrueBrain>andythenorth: I understand you jump to 'bootstrap' in the news-post-topic, but realise it is a solution, instead of telling the requirements. You limit the possible solutions immediately, without clear benefits. Possibly it is good to rethink it to something like: well-known-and-established framework which has no dependencies on javascript
13:58<TrueBrain>that would be much more preferred to me
13:59<TrueBrain>(as if someone makes a Bootstrap site with Javascript bla, I am not going to be really happy about it)
13:59<@peter1138>Bootstrap is Meh.
13:59<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on issue #6907: Cargo capacity should be recalculated on TRIGGER_VEHICLE_NEW_LOAD
14:00<TrueBrain>havent used Bootstrap in years; but I guess it is easy to make good websites which have all the modern solutions
14:00<TrueBrain>just ... not depending on Javascript is much more valuable, in my opinion :)
14:00<andythenorth>dunno, can we talk about it another day
14:00<andythenorth>I am having sense of humour failure
14:00<TrueBrain>(and you can make Bootstrap not depend on Javascript :P)
14:00<andythenorth>about my OpenTTD jobs list
14:00<TrueBrain>sense of humour failure?
14:00<TrueBrain>wtf is that? :)
14:01<andythenorth>too many things I need to sort out, and everything seems to be an argument :P
14:01<andythenorth>need to reset perspective :P
14:02<andythenorth>specifically to Bootstrap, I agree with your wording
14:02<andythenorth>but FFS, we already shipped all this in eints, and nobody commented
14:03<andythenorth>eints possibly has jquery in it pointlessly even, and nobody checked
14:03<@planetmaker>andythenorth, sounds like the point at which I felt like ~2...3 years ago where I basically needed to take a break... scaling things down
14:03<andythenorth>so does that 100ms really matter enough that we have to throw out all possibility of ever using a framework
14:03<andythenorth>seems a bit not-invented-here
14:04<andythenorth>pointless jquery load on eints ;)
14:04<andythenorth>I can't remember if it's used, but I don't know what would use it
14:05<TrueBrain>ah; I am not too fuzzed about the loading times etc
14:05<TrueBrain>and eints can use Javascript, that is fine
14:05<TrueBrain>just our main page is loaded by non-javascript geeks
14:05<TrueBrain>it should not break because someone didnt load javascript :)
14:05<andythenorth>yeah I get that
14:05<TrueBrain>different set of requirements :)
14:05<andythenorth>just these irrational fears people have
14:05<andythenorth>same BS every time
14:05<andythenorth>anyway, let's put my smiley face on :)
14:06<andythenorth>fucking css coders who insist on hand-crafted BS
14:06<andythenorth>but don't even know what a macro is
14:07<andythenorth>so things I am supposed to be doing
14:07<andythenorth>- fixing whatever is broken with 64 cargos for GarryG, who I like
14:07<TrueBrain>there, I wrote a tiny list of requirements with why we want it :)
14:07<andythenorth>- testing the mac scrollwheel stuff, which I never use, so I don't know what's correct there
14:07<andythenorth>- testing mac font regression, which I don't understand, cos I use the pixel font, instead of weird things
14:08<TrueBrain>but yeah, to reiterate what was said by planetmaker, I guess, paraphrased: don't make this your second job, plz :)
14:08<andythenorth>innit :)
14:08<TrueBrain>we all tried that :P
14:08<andythenorth>- making a test grf for 5006, because if I don't who will, despite that george will keep demanding it
14:09<andythenorth>err actually that's it
14:09<@peter1138>George is usually good with test GRFs
14:09<@peter1138>At least, sort of.
14:09<andythenorth>well I'm going to wait and see then :P
14:09<TrueBrain>just 4 things? you slacker! :P
14:10<@peter1138>Usually it's a massive GRF containing everything and no instructions on what is meant to happen.
14:12<andythenorth>"I like trains"
14:12<andythenorth>if we could have more of a newgrf maintainer, that would be super
14:12<andythenorth>but that's not how open source works :D
14:13<TrueBrain>we can at least make it more accessible
14:14<@planetmaker>andythenorth, they look superb. And I can't help to feel reminded on V's rainbow snails :)
14:15<andythenorth>me too
14:15<andythenorth>FML newgrf :)
14:15<andythenorth>actually the thing that is bugging me most is the new industry / cargo / house stuff
14:16<andythenorth>it will probably be shipping in 1.9.x, but we don't have the nml support or docs
14:16<andythenorth>that's kinda lame imo :)
14:16<andythenorth>feels like I should fix it, but not sure I can alone
14:18<andythenorth>eh so I did test it
14:19<@planetmaker>do you have merge rights with NML?
14:20<andythenorth>I did, not sure right now
14:20<@peter1138>Is it just NML isn't updated?
14:20<@peter1138>Shouldn't it give an error? :D
14:20<@peter1138>kk, group livery inheritance sort of working.
14:21<@peter1138>So it's there.
14:21<andythenorth>I get 47 cargos in the game with 47 cargo FIRS
14:21<@peter1138>The guy might just be using an old version?
14:22<andythenorth>think it's just user error
14:22<andythenorth>Garry has a brain injury and it's 41 degrees in Oz east coast
14:22<andythenorth>so he might benefit from some help, he's a nice guy
14:22<andythenorth>he has so much fun making this stuff
14:22<@planetmaker>well, yes, he has.
14:22<@planetmaker>but ... what's the issue?
14:23<andythenorth>could move his post to graphics forum, and make a thread about 64 cargo stuff?
14:24<@planetmaker>hm, yes, I shall do that
14:25<Wolf01>Ok, so it's not FTTH but FTTC, there is one FTTH 100/100 which costs an eye
14:25<Wolf01>Still not bad, but certified for 80M
14:26<Wolf01>I was hoping for a true FTTH
14:26<@peter1138>Gosh, this actually works.
14:27<@peter1138>Wolf01, "fibre broadband" is a lie, yes.
14:27<Samu>start_date parameter is evil, evil!!! still getting crashes
14:28<andythenorth>peter1138: works? o_O
14:28<Wolf01>200/20 still better than 4/0.2
14:29<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh approved pull request #7117: Fix group hierarchy not being visible in RTL languages.
14:29<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh merged pull request #7117: Fix group hierarchy not being visible in RTL languages.
14:33<@peter1138>Wolf01, somewhat.
14:34-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
14:38*andythenorth wonders if George has cdist in that game
14:38<andythenorth>probably unrelated, but there was a run of cdist issues with autorefit and capacity
14:39<andythenorth>" Force the train to refit to some other cargo, that is not available on both stations, and back to the required cargo on loading. "
14:41<Samu>when im trying to reset the settings of an AI that was switched to Random AI, I am getting a crash
14:41<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh requested changes for pull request #7049: Fix #6599: Can still click on buy button in vehicle selection window even if no vehicle is selected
14:41<Samu>because AI Info does not exist
14:42<Samu>what to do, what to do
14:43<andythenorth>kinda wondering about
14:44<andythenorth>and the comment above that conditional
14:46<Samu>AI Info really does not exist for Random AIs... i need another approach for the reset button
14:46<Samu>i was basing on the existance of an AI Info in every case...
14:46<Samu>must think
14:48<DorpsGek_II>[OpenTTD/OpenTTD] LordAro commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
14:49<DorpsGek_II>[OpenTTD/OpenTTD] LordAro commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
14:53<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
14:55<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog
14:57<LordAro>nielsm: currently trying a s/NULL/nullptr/, just for funsies
14:57<LordAro>yes :p
14:57<@peter1138>#define NULL nullptr
14:58<@peter1138>Expect it not to work.
14:58<milek7>i think it is already defined this way
14:58<nielsm>that's honestly not a bad approach
14:58<DorpsGek_II>[OpenTTD/OpenTTD] andythenorth commented on issue #6907: Cargo capacity should be recalculated on TRIGGER_VEHICLE_NEW_LOAD
14:58<LordAro>milek7: depends on platform & compiler, i suspect
14:59<LordAro>seemed to compile fine :)
14:59<LordAro>how dull
14:59<frosch123>just don't add STR_nullptr :p
15:08<LordAro>did s/\bNULL\b/nullptr/, should be fine
15:12-!-synchris [~synchris@] has quit [Quit: yeeha!]
15:29<nielsm>hmm I want to save this one:
15:29<TrueBrain>mark it as such :)
15:29<nielsm>should I clone his branch into mine and make a new PR, or abuse github power to push to his branch and modify the PR?
15:30<TrueBrain>(pinned label)
15:30<TrueBrain>can you write in his branch?
15:30<TrueBrain>sounds evil
15:30-!-CZTR [~Vasatko@] has quit [Ping timeout: 480 seconds]
15:31<nielsm>yes, that's a flag you can set when creating a PR, allowing users with enough permissions in the receiving repository to push to your branch
15:31<nielsm>and it defaults enabled
15:31<nielsm>but I'll make a new PR :)
15:33<DorpsGek_II>[OpenTTD/OpenTTD] PeterN updated pull request #7108: Feature: Group liveries, and livery window usability enhancements.
15:34<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7108: Feature: Group liveries, and livery window usability enhancements.
15:39<@peter1138>Ok, I don't think I need mercurial in my Jenkins install :p
15:40<@peter1138>Ah, you can't remove it.
15:44<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh opened pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
15:44-!-andythenorth [] has quit [Ping timeout: 480 seconds]
15:44<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #6973: Add: Unique ID to savegames to prevent accidental overwriting
15:44<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh closed pull request #6973: Add: Unique ID to savegames to prevent accidental overwriting
15:44<nielsm>hmm should we maybe have a tag for PRs that affect savegame version?
15:44<LordAro>doesn't seem like a bad idea
15:47<@peter1138>We should start using enums too, to avoid having to fix numbers everywhere.
15:48<LordAro>what do you mean?
15:48<@peter1138>When you rebase, the only part that conflicts is the current savegame version, so you have to check to make sure you got all the SL_COND stuff updated.
15:49<@peter1138>I encountered difficulties due to some savegame versions covering a range of commits :p
15:49<LordAro>i don't like the `SLV_FOO - 1`, perhaps the latter parameter could be exclusive?
15:49<@peter1138>We don't need to back date it as such, but we could start to do it going forwards.
15:50<+glx>#ifndef NULL #ifdef __cplusplus #define NULL 0 #else #define NULL ((void *)0) #endif #endif
15:50<@peter1138>LordAro, possibly.
15:50<+glx>that's NULL for msvc
15:50<@peter1138>LordAro, that means we need to change every SL_COND line in one go. Not an issue.
15:51<@peter1138>The enum naming is crap too, of course.
15:51<@peter1138>I was just making it work :D
15:52<@peter1138>Need to see how everyone else feels?
15:52-!-andythenorth [] has joined #openttd
15:52-!-andythenorth is "andythenorth" on #openttd
15:52<Samu>nielsm dont forget about scenario saves
15:52<Samu>UNNAMED is lame
15:52<Samu>doesn't even ask if i want to overwrite
15:52<LordAro>peter1138: mm
15:53<Samu>you're working on savegames, aren't you
15:53*andythenorth tests
15:53<LordAro>glx: interestingly, i can't find any definition of NULL in mingw, other than redefinitions in SDL & ICU
15:53<nielsm>oh, does it carry the savegame unique id over from scenario to game when you start a new game from scenario?
15:53<LordAro>ICU defines as nullptr :)
15:53<andythenorth>peter1138: so which branch? o_O
15:54<nielsm>Samu: I just imported someone else's patch and updated it to compile on current master
15:54<@peter1138>andythenorth, nrt?
15:54<Samu>oh, i didn't look at it in detail, just hoping he didn't forget about scenario editor
15:55<Samu>saving a scenario always defaults to UNNAMED
15:55<@peter1138>andythenorth, ah. yes. That one.
15:56<+glx>#ifndef NULL #ifdef __cplusplus #ifndef _WIN64 #define NULL 0 #else #define NULL 0LL #endif /* W64 */ #else #define NULL ((void *)0) #endif #endif
15:57<+glx>there's this one in crtdgb.h
15:59<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
15:59<@peter1138>LordAro, so this doesn't attempt to solve the savegame version issue with lots of patch packs and all that bollocks
16:00<@peter1138>LordAro, just make things a little easier to maintain.
16:00-!-sla_ro|master [] has quit []
16:01<@peter1138>I'm willing to go through and convert (most) previous versions if this is acceptable.
16:01<LordAro>i wouldn't be unopposed
16:02<LordAro>should probably be `enum SaveLoadVersion : uint16`
16:02<LordAro>i wouldn't be opposed*
16:04<@peter1138>Can be tricky working out what each entry name should be :)
16:04<+glx>and the same preprocessor block in locale.h, minwindef.h, ntdef.h (also defining NULL64)
16:04<+glx>oh of course stddef.h
16:04<@peter1138>I guess, step 1, make COND exclusive, not inclusive.
16:07-!-Wormnest [~Wormnest@] has joined #openttd
16:07-!-Wormnest is "Wormnest" on #openttd
16:07<@peter1138> * @param version_to Highest version number that falls within the range.
16:08<@peter1138>Hmm, how do you reword a comment like that :p
16:14<Samu>i have a question, I made this:
16:14<Samu>now, I wanna call it
16:15-!-Wormnest [~Wormnest@] has quit [Ping timeout: 480 seconds]
16:16<Samu>is swap what I'm looking for?
16:16<Samu>it makes a swap, but what happens to the discarted list?
16:16<Samu>i dont need it for anything
16:17-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
16:17-!-keoz is "Grmph" on #openttd
16:17<Samu>is it occupying memory
16:18<nielsm>is it a pointer?
16:19<Samu>VisibleSettingsList visible_settings;
16:19<Samu>it's a vector?
16:19<Samu>no idea
16:19<nielsm>the object itself is destroyed when it goes out of scope, but if the object is a pointer then the pointed-to object is not touched
16:21<Samu>oh boy, I don't know
16:22<Samu>out of scope means, outside the brackets?
16:23<@peter1138>LordAro, hmm, maybe converting to exclusive before-hand is a bit error prone :/
16:24<@peter1138>Ah, old_station_desc
16:24<@peter1138>I thought we were still "reserving" space for a second.
16:24<Samu>hold on nielsm
16:24<Samu>copying code...
16:25-!-Progman [] has quit [Remote host closed the connection]
16:26<Samu>i have the function outside the big one, which is where it's called
16:26<Samu>line 35 initiates visible_settings;
16:26<milek7>Samu: vector will be destroyed after swap call
16:26<DorpsGek_II>[OpenTTD/OpenTTD] RoqueDeicide commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
16:26<milek7>but is it valid code? (it doesn't complain about passing non-const temporary reference?)
16:27<Samu>and line 78
16:27<Samu>is where i made the swap, i don't know i want to use swap command or some other command
16:28<Samu>because i only need to update visible_settings
16:28<milek7>you could just use copy assignment, visible_settings = BuildVisibleSettingsList(slot);
16:28<Samu>doesn't like it
16:29<Samu>unless it likes it now, let me test
16:29<Samu>visible_settings = BuildVisibleSettingsList(slot);
16:29<Samu>funny... it wasn't working the first time
16:30<Samu>now it works
16:30<Samu>well, sorry
16:31<Samu>yep, it built
16:31<Samu>no error
16:31<@peter1138>LordAro, "git diff --word-diff-regex=." is magic!
16:32<LordAro>ooh, very nice
16:32<@peter1138>Actually in this case, "git diff --word-diff-regex=[0-9]+" works better.
16:34<@peter1138>Ok, that blew it up :D
16:38<DorpsGek_II>[OpenTTD/OpenTTD] LordAro commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
16:42<@peter1138>Oh god there's all the settings too :(
16:42<LordAro>oh yes
16:42<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
16:43<@peter1138>to = ...
16:43<@peter1138>Hmm, not that many
16:43<@peter1138>grep ^to ...
16:46-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:46<@peter1138>Hmm, still doesn't load.
16:47<@peter1138>Ah, another test. Sigh.
16:47<@peter1138>Code duplication, eh?
16:48<LordAro>who would do such a thing
16:49-!-Gja [] has quit []
16:50<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
16:51<@peter1138>I'm not joking about that comment. I have no idea how to reword it.
16:52<LordAro>"Exclusive savegame version upper bound. SL_MAX_VERSION if no upper bound" ?
16:54<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
16:55<Samu>peter1138, that window you're quoting is the list of available AIs, not the list of AI settings, unless you really mean what you say
16:57<@peter1138>Ok, then s/settings/list/
16:57<@peter1138>I don't know the change does.
16:58<@peter1138>But it looks like it'll close the window if the slot is a valid AI.
16:58<@peter1138>But I dunno.
16:58<Samu>yes, that window is called when a company starts
16:58<Samu>that invalidate command*
16:59<Samu>if it's human, no need to close
16:59<Samu>if it's ai, then yes, must be closed
16:59<Samu>can't risk changing the ai config list into another
16:59<andythenorth>nice group hierarchy \o/
17:00<andythenorth>I made a group called 'The Rainbow'
17:03<andythenorth>peter1138: if I have a child group with 'default', AND the parent has different value to company AND I then move child out of parent, 'default' doesn't update to the one set in company
17:04<andythenorth>also same if I move the child into parent
17:04<@peter1138>Maybe I broke it when simplifying :(
17:05<andythenorth>or is it just the 2nd CC
17:05*andythenorth testing more
17:05<@peter1138>Oh. 2CC might be a bit odd :/
17:05<@peter1138>Did test that.
17:05<andythenorth>I can't repro now
17:05<andythenorth>but I repro-ed it twice before
17:06<andythenorth>maybe I am wrong
17:06<andythenorth>nope got a repro again
17:06<nielsm>hmm well working better, but not quite right
17:06<nielsm>it's not printing the warning text in the save window info pane
17:07<andythenorth>peter1138: dunno, it's a savegame from previous version of patch, making a clean one
17:07<andythenorth>might be stale data
17:09<andythenorth>can't repro on fresh game
17:12<DorpsGek_II>[OpenTTD/OpenTTD] andythenorth commented on pull request #7108: Feature: Group liveries, and livery window usability enhancements.
17:13-!-HerzogDeXtEr [] has quit [Read error: Connection reset by peer]
17:14<@peter1138>LordAro, that effort ;(
17:14<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick commented on pull request #7084: Change: AI/GS Config GUI overhaul
17:15<@peter1138>I just ate a jam doughnut. It was not satisfying. It was 2 days old :/
17:21<Samu> is this working?
17:22<Samu>settings.cpp has a much more complex methodology of syncronizing parameters
17:23-!-CZTR [~Vasatko@] has joined #openttd
17:23-!-CZTR is "realname" on #openttd
17:23<nielsm>that's better
17:24-!-Supercheese [~Superchee@] has joined #openttd
17:24-!-Supercheese is "Supercheese" on #openttd
17:24<@peter1138>nielsm, nice. That's separate to the unique-id stuff, right?
17:25<nielsm>it uses it
17:26<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
17:29<Samu>what shall I do?
17:30<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
17:30<Samu>besides, in the Config window it's called Configure, in the AI Debug window it's called Settings, and they're openning the exact same window
17:33<LordAro>peter1138: very nice
17:33<DorpsGek_II>[OpenTTD/OpenTTD] RoqueDeicide commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
17:33<Samu>it's an english issue
17:34<Samu>consistency + english
17:34<@peter1138>LordAro, making big progress currently converting numbers to SLV_numbers
17:34<@peter1138>once that's done a few little one liners can convert the numbers to something meaningful.
17:34<Samu>into PR numbers
17:34<Samu>commit numbers
17:34<Samu>or something
17:35-!-CZTR [~Vasatko@] has quit [Ping timeout: 480 seconds]
17:35<Samu>tell me what to do peter1138
17:36<Samu>you're the englishman
17:36-!-Chrill [] has joined #openttd
17:36-!-Chrill is "Christopher" on #openttd
17:36<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting
17:37<andythenorth>Samu: is it a pre-existing inconsistency?
17:40<Samu>but it's non functional, doesn't change anything, it's just what to display
17:43-!-Wormnest [~Wormnest@] has joined #openttd
17:43-!-Wormnest is "Wormnest" on #openttd
17:50<Samu>alright, i'm going to revert those
17:50<Samu>less work needed from translators
17:50<Samu>if it ever gets accepted
17:50<andythenorth>string consistency is a nice issue to handle separately
17:50<Samu>ok, im undecided
17:51<andythenorth>someone very experienced might just change the string and it's all fine
17:51<andythenorth>but you need to keep the changeset for your patches as small as you can, to aid reviewing
17:52<andythenorth>good luck!
17:52-!-andythenorth [] has left #openttd []
17:52<DorpsGek_II>[OpenTTD/OpenTTD] glx22 opened pull request #7129: Add: allow opening of one TextfileWindow per type
17:53<Samu>something like revert but keep the changes
17:53<Samu>ok, i think i can do that
17:59-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
17:59<+glx>and while testing that I noticed GameOptionsWindow doesn't close textfile window when it's closed
18:00<LordAro>heh, figures
18:00-!-gelignite [] has quit [Quit: Good fight, good night!]
18:00<+glx>so many windows having issues with window closing
18:00<+glx>at least it doesn't crash ;)
18:02<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
18:02<nielsm>controversial opinion: the in-game wrench button should be changed to open the Settings window rather than Game Options
18:02<nielsm>Game Options is so rarely needed, all the useful stuff is in Settings
18:03<Samu>does it need to close?
18:03<Samu>what if i want to delight in the readme.txt :)
18:03<+glx>it's still in the dropdown so why not
18:04<+glx>when you close the option menu I think you don't care about the licenses or changelog of basesets
18:04<Samu>GameOptionsWindow, which one is this
18:04<Samu>brb googling
18:04<+glx>the one where you set language and other stuff
18:05<Samu>ah, that one
18:05<nielsm>huh, Options and Settings can't be opened at the same time, never noticed that before
18:05<+glx>same class :)
18:06<+glx>but you can work around it using window_number
18:06<nielsm>(also, some of the options in Options should be moved to Settings, like the town names)
18:06<nielsm>hmm I should move myself to bed :P
18:07<+glx>indeed options related to game play should move to settings
18:07<Samu>is it just me or the number of changed files keep decreasing everytime I update?
18:08<Samu> Files changed 70 nvm, it increased
18:08<LordAro>are you expecting it to stay constant?
18:08-!-Chrill [] has quit []
18:08<Samu>i edited one more file, it was 69
18:08<@peter1138>Ok... what the fuck is SLE_WRITEBYTE?
18:09<+glx>you change a lot of files for just a window ;)
18:09<Samu>it's more than 1
18:09<@peter1138>glx, languages.
18:09<+glx>oh of course
18:10<+glx>forgot that one
18:10<+glx>anyway removing outdated strings is useless if the string is still in english.txt
18:10<+glx>we saw that recently :)
18:12<@peter1138>Yes :(
18:13<@peter1138>Used to work with WT, IIRC?
18:14<+glx>yes it worked with the old system
18:14-!-nielsm [] has quit [Ping timeout: 480 seconds]
18:18<Samu>I didn't touch that
18:18<@peter1138>As glx wrote about 8 minutes ago...
18:18<LordAro>Samu: yeah, not your issue, peter1138 broke it :p
18:18<@peter1138>I did not.
18:19<@peter1138>Not my fault that EINTS is dumb.
18:19<LordAro>peter1138: glx: frosch pointed at a line of code in eints yesterday, but i don't understand enough about it to do anything with it (easily)
18:20-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
18:24<@peter1138>OMG it linked.
18:25<@peter1138>And it loaded a saveload
18:26<@peter1138>vehicle types aren't messed up.
18:27<+glx>and it's bad ?
18:27<@peter1138>I had to fiddle with SLWRITEBYTE.
18:27<@peter1138>Because that is... wtf.
18:28<@peter1138>It's used for writing a fixed value to the savegame, but the value is stored in the version from and version to fields.
18:29<@peter1138>Which causes issues when I make them an enum.
18:29<@peter1138>It's horrible.
18:30<@peter1138>Also it takes about translating a value, but I can't see any translation.
18:37<@peter1138>Hmm, I ought to check saving a game.
18:39-!-Wormnest [~Wormnest@] has quit [Ping timeout: 480 seconds]
18:39<@peter1138>It could just write the value of the variable it references, but...
18:40<+glx>ah yes it's weird
18:41<@peter1138>I suspect it's kinda legacy and doesn't really do what the comment says any more.
18:42-!-Flygon [] has joined #openttd
18:42-!-Flygon is "Flygon" on #openttd
18:42<@peter1138>Rubidium tried to remove it in 2007 :-)
18:43<DorpsGek_II>[OpenTTD/OpenTTD] LordAro approved pull request #7129: Add: allow opening of one TextfileWindow per type
18:43<DorpsGek_II>[OpenTTD/OpenTTD] LordAro merged pull request #7129: Add: allow opening of one TextfileWindow per type
18:43<Samu>#include "../strings_func.h" - removed this line and it still builds!
18:45<+glx>hmm it writes something in the savegame, and discard it on load if I read correctly
18:46<@peter1138>It's read directly with SlReadByte() in the loading code, in say vehicle_sl.cpp
18:46<@peter1138>Ok. It currently does not do translation
18:47<@peter1138>eab8ac49cee is where rubidium removed it
18:47<+glx>I'm reading in SlObjectMember
18:47<@peter1138>622a4d10b92 is where it is put back
18:47<@peter1138>it's differente
18:47<@peter1138>Before, it had 2 values, after it doesn't.
18:48<+glx> case SLA_SAVE: SlWriteByte(sld->version_to); break;
18:48<+glx> case SLA_LOAD_CHECK:
18:48<+glx> case SLA_LOAD: *(byte *)ptr = sld->version_from; break;
18:48-!-Thedarkb-T60 [] has quit [Remote host closed the connection]
18:48<@peter1138>glx, yup
18:48<+glx>write, and discard on load
18:48-!-Thedarkb-T60 [] has joined #openttd
18:48-!-Thedarkb-T60 is "realname" on #openttd #oolite
18:48<@peter1138>in Load_VEHS() there's VehicleType vtype = (VehicleType)SlReadByte();
18:49<@peter1138>Which is reading that value directly.
18:49<+glx>I think it was to automatically convert vehicle types to the right value
18:50<+glx>but was changed since
18:50<@peter1138>Yes, we changed the enum.
18:50<@peter1138>IIRC it was +0x10 originally.
18:52-!-Thedarkb1-T60 [] has joined #openttd
18:52-!-Thedarkb1-T60 is "realname" on #openttd #oolite
18:52<@peter1138>So discard on load...
18:52<@peter1138>It assigns that value to the pointer, but is that ecessary?
18:53<+glx>well discard the saved data and replace by what's in the source
18:54<@peter1138>It's always read directly with SlReadByte(), rather than through the description system.
18:55-!-supermop_Home [] has joined #openttd
18:55-!-supermop_Home is "Guest" on #openttd
18:57-!-Thedarkb-T60 [] has quit [Ping timeout: 480 seconds]
18:59<+glx>SLE_WRITEBYTE is used only for types it seems (vehicles and station)
19:00<@peter1138>Looking at both cases, it could actually just write the value of the variable, instead of storing it from/to.
19:03-!-Thedarkb2-T60 [] has joined #openttd
19:03-!-Thedarkb2-T60 is "realname" on #openttd #oolite
19:06-!-Thedarkb1-T60 [] has quit [Ping timeout: 480 seconds]
19:09<+glx>oh was about to say I wasn't understanding how loading could work, but it's ok it read the byte before SlObject, and SlObject just does "nothing" for SLE_WRITEBYTE
19:09<@peter1138>That's what I was trying to say but wasn't clear :)
19:10<+glx>indeed it could just write for SLA_SAVE and break for other cases
19:10<@peter1138>It's slightly different for stations as the fixed value may not be the value stored in facilities, but in any case we're only looking for a specific bit, so it doesn't hurt to write the proper value.
19:11<Samu>bug in scenario editor
19:12<+glx>SLE_WRITEBYTE is just a hack to write a constant
19:12<+glx>abusing SLE_GENERAL fields
19:12<Samu>if i set up a GS in the scenario editor, save the scenario and load it back, the GS is loaded as active
19:12<@peter1138>Yes, and that hasn't been necessary since we changed the enum.
19:13<+glx>special load handling is still required, we still want to ignore the field on load
19:13<+glx>as we read it before
19:14<@peter1138>SlReadByte still needs to stay, but that's fine. That isn't abuse.
19:14<Samu>oh, you're also dealing with saving stuff
19:15<+glx>yes but SLE_WRITEBYTE still needs to be a special case, we can't use SLE_VAR there
19:15<@peter1138>It's a "write only" part of the description :)
19:15<+glx>because we read the var before the _desc
19:15<@peter1138>But it's possible to write the var's value, not a fixed value.
19:16<+glx>and discard the SLE_GENERAL abuse
19:16<@peter1138>bjarni you STAR!
19:16<+glx>allowing SLE_CONDWRITEBYTE if needed one day
19:16<@peter1138>That's the commit that renumbered the types.
19:17<+glx>not clickable ;)
19:17<@peter1138>git show 037d6367349afa5a27ddf2cf015f6490167cf786
19:17<@peter1138>There you go.
19:18<@peter1138>2007. Quite late.
19:19<+glx>"Surprisingly this can be done without changing the savegame format" <-- of course SLE_WRITEBYTE did its job ;)
19:20<+glx>and at that time we weren't reading the byte before SlObject
19:21<+glx>I wonder what happens if we try to load a savegame from before that commit with master
19:22<@peter1138>Like the titlegame that still loads?
19:22<+glx>it's been updated I think
19:22<@peter1138>Not in master.
19:23<Samu>any GS expert around that uses scenario editor? I have... questions, doubts
19:23<@peter1138>Before then the data structure was static.
19:23<@peter1138>waypoints were actually stations.
19:23<+glx>if SlReadByte gets a pre enum change it will SlErrorCorrupt("Invalid vehicle type");
19:24<@peter1138>glx, the enum changed, the savegame value was correct already.
19:24<@peter1138>the enum was changed and it happens to make the savegame value that was being written before.
19:26<DorpsGek_II>[OpenTTD/OpenTTD] PeterN opened pull request #7130: Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.
19:28<Samu>I have a delicate situation on my hands: on 1.8.0 and master, GS can be edited in scenario editor with no visual indication of its instance being active or not
19:29<Samu>my gui stuff exposes that loading a scenario, will always activate the GS
19:29<Samu>even if i saved it as a configuration
19:30<Samu>i don't think it's intended for it to load as active, if it wasn't saved as active
19:30<Samu>but I'm not sure
19:30<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7130: Codechange: Remove value mangling and field misuse in SLE_WRITEBYTE.
19:30<Samu>need your thoughts on it
19:31<@peter1138>Nothing should really be active within the scenario editor.
19:32<Samu>so, it's a bug? a very hidden one?
19:34<Samu>how am I gonna report the steps for this... it's unnoticeable on 1.8.0
19:35<@peter1138>Nobody cares about 1.8.0 :p
19:35<Samu>okay, it's the same as current master
19:35<Samu>unnoticeable, but it's there
19:35<@peter1138>Anyway, I thought you said that it's *your* stuff that activates the GS.
19:36<Samu>no, it's not activated by me
19:36<@peter1138>00:29 < Samu> my gui stuff exposes that loading a scenario, will always activate the GS
19:36<Samu>i simply made the gui to be able to detect what's active, and it's how I spotted the bug
19:36<@peter1138>So by "active" what does it do?
19:36<@peter1138>Actually run?
19:37<Samu>the instance is running
19:37<@peter1138>Maybe it is meant to run? I don't kno!
19:37<Samu>doesn't seem to be doing anything
19:37<Samu>but it's active
19:37<Samu>the issue is that on master, the slot is always configurable, i can change to other gs
19:38<Samu>that's gonna mix configs of GS's from each other
19:39<Samu>saved data may be of one GS, but then loaded into the other, that's gonna conflict for sure and cause issues
19:40<+glx>oh after checking source from that time SLE_WRITEBYTE macro was indeed different :)
19:40<Samu>i'm gonna try fill a report
19:41<+glx>but it's a pain to navigate in old files, everything is moved :)
19:41<@peter1138>git blame xxx -- filename
19:41<@peter1138>And xxx~1 is useful.
19:41<+glx>had to remember where the saveload stuff was stored
19:43-!-supermop_Home [] has quit [Ping timeout: 480 seconds]
19:44<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z commented on pull request #7120: Feature: Town Voronoi diagram
19:45<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick opened issue #7131: Possible GS issues in Scenario Editor
19:47<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z commented on pull request #7120: Feature: Town Voronoi diagram
19:51-!-sushibear [] has joined #openttd
19:51-!-sushibear is "SushiBear" on #C #openttd
19:52-!-sushibear [] has quit []
19:52<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
19:54-!-snail_UES_ [] has joined #openttd
19:54-!-snail_UES_ is "Jacopo Coletto" on #openttd
19:54<+glx>and indeed for stations the value can be anything as long as the flag is correct
20:08-!-glx [] has quit []
20:14-!-Wormnest [~Wormnest@] has joined #openttd
20:14-!-Wormnest is "Wormnest" on #openttd
20:31-!-Supercheese [~Superchee@] has quit [Quit: Valete omnes]
20:52-!-Thedarkb-X40 [] has joined #openttd
20:52-!-Thedarkb-X40 is "realname" on #openttd #/r/openttd #oolite
20:59-!-Thedarkb2-T60 [] has quit [Ping timeout: 480 seconds]
21:07<DorpsGek_II>[OpenTTD/OpenTTD] nikolas commented on issue #6584: Preview GUI text drops text in German translation
21:17-!-supermop_Home [] has joined #openttd
21:17-!-supermop_Home is "Guest" on #openttd
21:30-!-Wormnest [~Wormnest@] has quit [Quit: Leaving]
21:59<DorpsGek_II>[OpenTTD/OpenTTD] nikolas opened pull request #7132: Fix #6584: text layout problem in engine preview dialog
21:59<DorpsGek_II>[OpenTTD/OpenTTD] nikolas updated pull request #7132: Fix #6584: text layout problem in engine preview dialog
22:07<nnyby>hehe am i the only one in here not in europe? :P this channel gets pretty dead silent at like 9pm my time
22:16-!-Thedarkb-X40 [] has quit [Ping timeout: 480 seconds]
22:20-!-Samu [] has quit []
22:42-!-D-HUND [~debdog@] has joined #openttd
22:42-!-D-HUND is "Wowbagger" on #openttd #bitlbee
22:49-!-debdog [~debdog@] has quit [Ping timeout: 480 seconds]
22:55-!-duck_ [] has quit [Ping timeout: 480 seconds]
22:58-!-luaduck [] has joined #openttd
22:58-!-luaduck is "duck." on #openttd #/r/openttd
23:04-!-Gustavo6046 [~Gustavo60@] has quit [Ping timeout: 480 seconds]
23:42-!-HerzogDeXtEr [] has joined #openttd
23:42-!-HerzogDeXtEr is "purple" on #openttd
---Logclosed Tue Jan 29 00:00:41 2019