IRC logs for #openttd on OFTC at 2019-07-03
            
00:03:15 *** gelignite has quit IRC
00:03:37 *** Wolf01 has quit IRC
00:05:08 *** urdh has quit IRC
00:12:58 *** Progman has quit IRC
00:17:18 *** tfgbd_ has joined #openttd
00:23:21 <tfgbd_> Wheres the PPC version
00:29:27 <tfgbd_> NM, I found it: https://web.archive.org/web/20060216173549/http://www.esoftinteractive.com/spookysoft/ppcttd_dev.zip https://web.archive.org/web/20060216173549/http://www.esoftinteractive.com/spookysoft/ppcttd.zip
00:56:29 *** urdh has joined #openttd
01:21:00 *** Wormnest has quit IRC
01:35:33 *** Mahjong has joined #openttd
01:41:08 *** Mahjong1 has quit IRC
01:43:59 *** Tirili has joined #openttd
02:00:11 <spnda> When I want a certain function to run on game start and then sometimes get reexecuted when a game starts or finished in which file should this be done? In a game core file maybe?
02:11:06 <Eddi|zuHause> what kind of function?
02:11:59 <Eddi|zuHause> if it's commands, you might want to look at server scripts or admin port
02:12:52 <spnda> what's the admin port again
02:13:19 <Eddi|zuHause> an interface for external programs to issue commands
02:13:32 <Eddi|zuHause> and a few other things
02:14:56 <spnda> Well it's a function for discord rich presence
02:15:39 <glx> admin port seems to be a good candidate then
02:16:26 <spnda> That's what planetmakers suggestion was on the forums. But when doing C++ I'm unsure how that would all work
02:16:59 <Eddi|zuHause> admin port is basically like a network connection
02:17:00 <glx> admin port can be used with any language, it's just an interface
02:17:20 <Eddi|zuHause> there are existing admin port libraries in java and python, i think
02:17:36 <Eddi|zuHause> you could use those as a starting point
02:18:14 <spnda> Python, Java, PHP.
02:18:24 <glx> and a big advantage of using admin port is that you keep a vanilla server
02:18:34 <glx> easier for users
02:19:07 <Eddi|zuHause> and it'll work for both vanilla and patchpacks, without complicated merging
02:19:16 <spnda> But doesn't this mean the user would need to launch a different program?
02:19:56 <glx> admin port is on the server only
02:19:58 <Eddi|zuHause> you probably need to make a wrapper script that launches both your admin port library and the game at the same time
02:20:09 <Eddi|zuHause> and they would need to configure the game to open the admin port
02:20:21 <Eddi|zuHause> not sure if that's even supported in single player
02:24:03 <Eddi|zuHause> hm... my steam cart is alredy 30€ and i've made barely a dent in my wishlist :(
02:25:23 *** Tirili has quit IRC
02:36:59 *** Wormnest has joined #openttd
02:37:17 <spnda> I just added the Discord stuff right into the source code. Works perfectly fine.
02:37:47 <glx> Eddi|zuHause: and how is the list of never started games ?
02:38:08 <Eddi|zuHause> glx: i'm fairly good at that... :)
02:41:14 <spnda> in game_core.cpp can I access the current company, if currently in a game?
02:41:49 <spnda> Or should I do this from a completely different file. (I know I probably should be doing it through the admin port but I want integration inside of the program)
02:43:13 <glx> if you want the actual player it's the local company
02:46:01 <spnda> Can I get the name of it?
02:47:15 <glx> _local_company
02:47:57 <spnda> The name of the company itself, I mean.
02:48:41 <glx> it's a CompanyID so you can use company functions with it
02:53:16 <spnda> But how do I get a Company with a CompanyID?
02:53:48 <glx> Company::Get() should do it
02:54:15 <glx> than to get the name of the company you need to format the string
02:54:51 <glx> check usages of STR_COMPANY_NAME
02:56:41 <glx> you don't need to get the Company to get the name, CompanyID is enough
03:02:36 <tfgbd_> Use the resource editor. It's GUI now.
03:02:53 <tfgbd_> .rc .re files are not Editible Text
03:18:04 <spnda> Which function runs when a new game has just started?
03:18:14 <spnda> Or a game has been loaded
03:26:00 <glx> you can look for "game_start.scr" as this script is executed at start
03:26:33 *** tfgbd_ has left #openttd
03:33:48 <spnda> glx where are those scripts located? I can't find it
03:33:55 *** snail_UES_ has joined #openttd
03:34:10 <glx> I mean search in the code
03:46:31 *** spnda has quit IRC
04:08:57 *** Flygon has joined #openttd
04:15:46 *** Wormnest has quit IRC
04:23:46 *** D-HUND has joined #openttd
04:27:08 *** debdog has quit IRC
04:31:49 *** Mahjong1 has joined #openttd
04:36:13 *** Mahjong has quit IRC
05:06:58 *** snail_UES_ has quit IRC
05:18:38 *** Samu has quit IRC
05:29:50 *** glx has quit IRC
08:02:43 *** Eddi|zuHause has quit IRC
08:04:18 *** Mahjong has joined #openttd
08:05:38 *** gnu_jj has quit IRC
08:05:38 *** Thedarkb-T60 has quit IRC
08:05:38 *** Arveen has quit IRC
08:05:38 *** Meiki has quit IRC
08:05:38 *** freu[m] has quit IRC
08:05:38 *** king[m] has quit IRC
08:05:38 *** paulus[m] has quit IRC
08:05:38 *** grag[m] has quit IRC
08:05:38 *** cesar[m] has quit IRC
08:05:38 *** nartir[m] has quit IRC
08:05:38 *** dag[m] has quit IRC
08:05:38 *** pothyurf[m] has quit IRC
08:05:38 *** lapav[m] has quit IRC
08:05:38 *** yur3shmukcik[m] has quit IRC
08:05:38 *** ad5twoknebor[m] has quit IRC
08:05:38 *** murr4y has quit IRC
08:05:38 *** innocenat_ has quit IRC
08:05:38 *** acklen_ has quit IRC
08:05:38 *** rubenwardy has quit IRC
08:05:38 *** colde has quit IRC
08:05:38 *** Vadtec has quit IRC
08:05:38 *** greeter has quit IRC
08:05:38 *** ST2 has quit IRC
08:05:38 *** Sacro has quit IRC
08:05:38 *** mikegrb has quit IRC
08:05:38 *** ToBeFree has quit IRC
08:05:38 *** techmagus has quit IRC
08:05:38 *** Laedek has quit IRC
08:05:38 *** AKTheKnight has quit IRC
08:05:38 *** Extrems has quit IRC
08:05:38 *** jinks has quit IRC
08:05:38 *** Antheus has quit IRC
08:05:38 *** daspork_ has quit IRC
08:05:38 *** Flygon has quit IRC
08:05:38 *** APTX has quit IRC
08:05:38 *** Smedles has quit IRC
08:05:38 *** k-man has quit IRC
08:05:38 *** tokai|noir has quit IRC
08:05:38 *** y2kboy23 has quit IRC
08:05:38 *** rocky11384497 has quit IRC
08:05:38 *** Maarten has quit IRC
08:05:38 *** heffer has quit IRC
08:05:38 *** Ttech has quit IRC
08:05:38 *** reldred has quit IRC
08:05:38 *** nnyby has quit IRC
08:05:38 *** cHawk has quit IRC
08:05:38 *** dwfreed has quit IRC
08:05:38 *** WWacko1976-work has quit IRC
08:05:40 *** khavik[m] has quit IRC
08:05:40 *** dude[m] has quit IRC
08:05:40 *** ircer[m] has quit IRC
08:05:40 *** iarp[m] has quit IRC
08:05:40 *** blim[m] has quit IRC
08:05:40 *** yoltid[m] has quit IRC
08:05:40 *** buggeas40d[m] has quit IRC
08:05:40 *** tops[m] has quit IRC
08:05:40 *** hylshols7qui[m] has quit IRC
08:05:40 *** Xaroth has quit IRC
08:05:40 *** Alkel_U3 has quit IRC
08:05:40 *** Speedy` has quit IRC
08:05:40 *** KenjiE20 has quit IRC
08:05:40 *** goodger has quit IRC
08:05:40 *** juzza1 has quit IRC
08:05:40 *** tycoondemon has quit IRC
08:05:40 *** ntsbmvnk has quit IRC
08:05:40 *** ZirconiumX has quit IRC
08:05:40 *** Lejving has quit IRC
08:05:40 *** luaduck has quit IRC
08:05:40 *** milek7 has quit IRC
08:05:40 *** Exec has quit IRC
08:05:40 *** _dp_ has quit IRC
08:05:40 *** ericnoan has quit IRC
08:05:40 *** nakki has quit IRC
08:05:40 *** backtu[m] has quit IRC
08:05:40 *** Corns[m] has quit IRC
08:05:40 *** jact[m] has quit IRC
08:05:40 *** gandi[m] has quit IRC
08:05:40 *** natmac[m] has quit IRC
08:05:40 *** josef[m] has quit IRC
08:05:40 *** jeeg[m] has quit IRC
08:05:40 *** nolep[m] has quit IRC
08:05:40 *** labs[m] has quit IRC
08:05:40 *** cawal[m] has quit IRC
08:05:40 *** ciet[m] has quit IRC
08:05:40 *** godva[m] has quit IRC
08:05:40 *** twom[m] has quit IRC
08:05:40 *** ookfof[m] has quit IRC
08:05:40 *** fiddeldibu[m] has quit IRC
08:05:40 *** glothit7ok[m] has quit IRC
08:05:40 *** olmvnec[m] has quit IRC
08:05:40 *** ist5shreawf[m] has quit IRC
08:05:40 *** UncleCJ has quit IRC
08:05:40 *** guru3 has quit IRC
08:05:40 *** crem1 has quit IRC
08:05:40 *** orudge has quit IRC
08:05:40 *** grossing has quit IRC
08:05:40 *** dihedral has quit IRC
08:05:40 *** seatsea0 has quit IRC
08:05:40 *** FLHerne has quit IRC
08:05:40 *** fonsinchen has quit IRC
08:05:40 *** Jyggalag has quit IRC
08:05:53 *** berndj has quit IRC
08:09:43 *** Mahjong1 has quit IRC
08:10:35 *** Mahjong has quit IRC
08:10:50 *** Heiki has quit IRC
08:12:29 *** SpComb has quit IRC
08:21:13 *** planetmaker has quit IRC
08:31:53 *** D-HUND has quit IRC
08:32:05 *** debdog has joined #openttd
08:35:48 *** planetmaker has joined #openttd
08:35:48 *** SpComb^ has joined #openttd
08:35:48 *** Heili has joined #openttd
08:35:48 *** Mahjong has joined #openttd
08:35:48 *** berndj has joined #openttd
08:35:48 *** Eddi|zuHause2 has joined #openttd
08:35:48 *** Flygon has joined #openttd
08:35:48 *** tokai|noir has joined #openttd
08:35:48 *** gnu_jj has joined #openttd
08:35:48 *** y2kboy23 has joined #openttd
08:35:48 *** WWacko1976-work has joined #openttd
08:35:48 *** _dp_ has joined #openttd
08:35:48 *** ericnoan has joined #openttd
08:35:48 *** Thedarkb-T60 has joined #openttd
08:35:48 *** rocky11384497 has joined #openttd
08:35:48 *** nakki has joined #openttd
08:35:48 *** Arveen has joined #openttd
08:35:48 *** APTX has joined #openttd
08:35:48 *** Smedles has joined #openttd
08:35:48 *** Laedek has joined #openttd
08:35:48 *** backtu[m] has joined #openttd
08:35:48 *** nolep[m] has joined #openttd
08:35:48 *** freu[m] has joined #openttd
08:35:48 *** gandi[m] has joined #openttd
08:35:48 *** king[m] has joined #openttd
08:35:48 *** dude[m] has joined #openttd
08:35:48 *** natmac[m] has joined #openttd
08:35:48 *** josef[m] has joined #openttd
08:35:48 *** ircer[m] has joined #openttd
08:35:48 *** paulus[m] has joined #openttd
08:35:48 *** Corns[m] has joined #openttd
08:35:48 *** jeeg[m] has joined #openttd
08:35:48 *** labs[m] has joined #openttd
08:35:48 *** cesar[m] has joined #openttd
08:35:48 *** jact[m] has joined #openttd
08:35:48 *** grag[m] has joined #openttd
08:35:48 *** ciet[m] has joined #openttd
08:35:48 *** nartir[m] has joined #openttd
08:35:48 *** iarp[m] has joined #openttd
08:35:48 *** godva[m] has joined #openttd
08:35:48 *** dag[m] has joined #openttd
08:35:48 *** pothyurf[m] has joined #openttd
08:35:48 *** twom[m] has joined #openttd
08:35:48 *** cawal[m] has joined #openttd
08:35:48 *** blim[m] has joined #openttd
08:35:48 *** Meiki has joined #openttd
08:35:48 *** ookfof[m] has joined #openttd
08:35:48 *** charon.oftc.net sets mode: +ov planetmaker tokai|noir
08:35:48 *** fiddeldibu[m] has joined #openttd
08:35:48 *** tops[m] has joined #openttd
08:35:48 *** yur3shmukcik[m] has joined #openttd
08:35:48 *** yoltid[m] has joined #openttd
08:35:49 *** buggeas40d[m] has joined #openttd
08:35:49 *** olmvnec[m] has joined #openttd
08:35:49 *** lapav[m] has joined #openttd
08:35:49 *** ad5twoknebor[m] has joined #openttd
08:35:49 *** ist5shreawf[m] has joined #openttd
08:35:49 *** glothit7ok[m] has joined #openttd
08:35:49 *** hylshols7qui[m] has joined #openttd
08:35:49 *** khavik[m] has joined #openttd
08:35:49 *** UncleCJ has joined #openttd
08:35:49 *** Maarten has joined #openttd
08:35:49 *** heffer has joined #openttd
08:35:49 *** guru3 has joined #openttd
08:35:49 *** Ttech has joined #openttd
08:35:49 *** Xaroth has joined #openttd
08:35:49 *** AKTheKnight has joined #openttd
08:35:49 *** Extrems has joined #openttd
08:35:49 *** Alkel_U3 has joined #openttd
08:35:49 *** k-man has joined #openttd
08:35:49 *** reldred has joined #openttd
08:35:49 *** jinks has joined #openttd
08:35:49 *** Antheus has joined #openttd
08:35:49 *** nnyby has joined #openttd
08:35:49 *** murr4y has joined #openttd
08:35:49 *** ST2 has joined #openttd
08:35:49 *** innocenat_ has joined #openttd
08:35:49 *** Sacro has joined #openttd
08:35:49 *** mikegrb has joined #openttd
08:35:49 *** greeter has joined #openttd
08:35:49 *** acklen_ has joined #openttd
08:35:49 *** techmagus has joined #openttd
08:35:49 *** rubenwardy has joined #openttd
08:35:49 *** colde has joined #openttd
08:35:49 *** ToBeFree has joined #openttd
08:35:49 *** Vadtec has joined #openttd
08:35:49 *** daspork_ has joined #openttd
08:35:49 *** dwfreed has joined #openttd
08:35:49 *** cHawk has joined #openttd
08:35:49 *** Speedy` has joined #openttd
08:35:49 *** crem1 has joined #openttd
08:35:49 *** orudge has joined #openttd
08:35:49 *** KenjiE20 has joined #openttd
08:35:49 *** goodger has joined #openttd
08:35:49 *** juzza1 has joined #openttd
08:35:49 *** tycoondemon has joined #openttd
08:35:49 *** ntsbmvnk has joined #openttd
08:35:49 *** ZirconiumX has joined #openttd
08:35:49 *** Lejving has joined #openttd
08:35:49 *** luaduck has joined #openttd
08:35:49 *** milek7 has joined #openttd
08:35:49 *** Exec has joined #openttd
08:35:49 *** grossing has joined #openttd
08:35:49 *** dihedral has joined #openttd
08:35:49 *** seatsea0 has joined #openttd
08:35:49 *** FLHerne has joined #openttd
08:35:49 *** fonsinchen has joined #openttd
08:35:49 *** Jyggalag has joined #openttd
08:36:08 *** ChanServ sets mode: +v DorpsGek
08:36:08 *** ChanServ sets mode: +o peter1138
08:36:08 *** ChanServ sets mode: +v Terkhen
08:36:08 *** ChanServ sets mode: +o SmatZ
11:31:18 <LordAro> blarg, no bike until friday
11:41:56 *** Compu has joined #openttd
11:42:38 *** Eddi|zuHause2 is now known as Eddi|zuHause
11:45:47 <peter1138> Oh no!
11:46:04 <peter1138> Wait, surely you have more than one? :p
11:49:58 <Arveen> 🚲 have this one meanwhile
11:59:59 <Eddi|zuHause> have an empty box?
12:00:56 <nakki> it's two thousand nineteen and your irc client doesn't have emojis working?
12:01:28 <Eddi|zuHause> it's more to do with font selection than IRC client, i think
12:02:40 <nakki> sure, the whole stack matters
12:03:55 <peter1138> More importantly, does it work in OpenTTD? :D
12:04:53 <Eddi|zuHause> probably not out-of-the-box :p
12:05:31 <peter1138> Sadly OpenTTD substitutes the whole font when a glyph is missing, not just the missing glyph.
12:05:48 <peter1138> (Which is why font selection often doesn't work)
12:12:53 <reldred> You mean I can put emojis in my station names in openttd?
12:13:08 * reldred prepares to make Cursed Grfs
12:13:24 <Eddi|zuHause> you can put any unicode symbol in names
12:13:38 <Eddi|zuHause> but the font might not display it
12:13:57 <reldred> I'll start copying my github release notes made in the zalgo text generator into my grf descriptions.
12:14:07 <nakki> heh
12:14:13 <nakki> iä, iä
12:14:35 <nakki> south hooverville station fhtagn!
12:15:03 <reldred> lol
12:15:18 <reldred> Sigh. Time to paint more pixels tonight I think.
12:15:33 <reldred> I fixed a ten year old bug in an unreleased station set last night, then released it.
12:15:57 <reldred> I mean be reasonable, we didn;'t have custom rail types back when I made that .grf
12:16:15 <reldred> but wow does it look nice with narrow guage :)
12:33:57 <DorpsGek_II> [OpenTTD/OpenTTD] rsn8887 commented on issue #7333: Libtimidity could be trivially enabled to play music through mixer.cpp https://git.io/fj6fz
12:38:22 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on issue #7333: Libtimidity could be trivially enabled to play music through mixer.cpp https://git.io/fj6fw
12:40:14 <DorpsGek_II> [OpenTTD/OpenTTD] rsn8887 opened issue #7636: Bring libtimidity support back https://git.io/fj6fK
12:42:40 <DorpsGek_II> [OpenTTD/OpenTTD] Milek7 commented on issue #7636: Bring libtimidity support back https://git.io/fj6f6
12:43:26 <DorpsGek_II> [OpenTTD/OpenTTD] rsn8887 commented on issue #7636: Bring libtimidity support back https://git.io/fj6fi
12:43:27 <DorpsGek_II> [OpenTTD/OpenTTD] rsn8887 closed issue #7636: Bring libtimidity support back https://git.io/fj6fK
12:44:47 <DorpsGek_II> [OpenTTD/OpenTTD] rsn8887 commented on issue #7636: Bring libtimidity support back https://git.io/fj6fX
12:47:08 *** Samu has joined #openttd
12:56:59 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on issue #7636: Bring libtimidity support back https://git.io/fj6fb
13:12:35 *** rocky11384497 has quit IRC
13:16:11 *** WWacko1976-work has quit IRC
13:56:11 *** snail_UES_ has joined #openttd
14:05:38 *** snail_UES_ has quit IRC
14:42:38 *** sla_ro|master has joined #openttd
14:49:23 *** andythenorth has joined #openttd
15:00:13 *** techmagus has quit IRC
15:04:09 *** techmagus has joined #openttd
15:17:39 <reldred> andythenorth: hey guess what I'm finally getting ready to code: https://github.com/reldred/re_suburban/blob/master/Art/re_suburban.png
15:18:19 <reldred> I've only been sitting on the sprites cornelius gave me for twelve years
15:32:32 <andythenorth> iz stations
15:34:07 <reldred> yup, working on some greenery, station lights, signposts, etc.
15:34:17 <reldred> should have options more in line with jp stations
15:43:14 *** nielsm has joined #openttd
16:33:14 *** Tirili has joined #openttd
16:49:26 *** Flygon has quit IRC
16:51:08 *** Samu_ has joined #openttd
16:54:12 *** Wormnest has joined #openttd
16:57:59 *** Samu has quit IRC
17:01:10 *** andythenorth has quit IRC
17:11:11 *** andythenorth has joined #openttd
17:57:19 *** spnda has joined #openttd
18:09:52 *** andythenorth has quit IRC
18:23:46 *** andythenorth has joined #openttd
18:26:46 *** frosch123 has joined #openttd
18:37:45 *** andythenorth has left #openttd
18:44:03 *** HerzogDeXtEr has joined #openttd
19:03:46 *** andythenorth has joined #openttd
19:03:49 <andythenorth> yo
19:07:30 *** Wolf01 has joined #openttd
19:07:44 <Wolf01> o/
19:09:32 <spnda> I still can't find any function or trigger that runs when a new game is loaded and the player can start playing...
19:12:00 <LordAro> spnda: add one!
19:12:02 <LordAro> probably.
19:12:42 <Eddi|zuHause> you got enough pointers how to look for one...
19:19:43 *** urdh has quit IRC
19:34:51 *** tokai has joined #openttd
19:34:51 *** ChanServ sets mode: +v tokai
19:38:37 *** Eddi|zuHause has quit IRC
19:39:04 *** Eddi|zuHause has joined #openttd
19:39:28 *** Eddi|zuHause has quit IRC
19:40:15 *** Eddi|zuHause has joined #openttd
19:41:45 *** tokai|noir has quit IRC
19:45:30 *** glx has joined #openttd
19:45:30 *** ChanServ sets mode: +v glx
20:05:07 *** rocky11384497 has joined #openttd
20:05:13 *** Progman has joined #openttd
20:11:08 *** urdh has joined #openttd
20:13:10 <andythenorth> now what shall I do? :)
20:13:41 <Eddi|zuHause> if in doubt, lunch?
20:16:28 <andythenorth> lunch happened at least twice today
20:26:07 *** Heili has quit IRC
20:26:13 *** Heiki has joined #openttd
20:50:15 <andythenorth> so...a map display to show industries with cargo transport below a % threshold? o_O
20:52:35 <frosch123> link industry directory to smallmap?
20:52:46 <frosch123> only show industries currently visible in the list?
20:52:55 <frosch123> then sort/filter the industry list
20:56:08 <nielsm> I wonder if a more flexible filtering UI would be useful in more places
20:56:28 <nielsm> vehicle lists, purchasing lists, industry lists
20:56:42 <frosch123> ideally there would be a list widget, which already provides text filters, column sorting and column filtering
20:56:53 <nielsm> yeah
20:57:05 <frosch123> currently all windows have to do that themself, and all do it differently
21:01:25 <nielsm> also for sorting it could be neat to have a way to select a sort by the ratio or difference or product of two parameters
21:01:36 <nielsm> any two parameters
21:04:04 <frosch123> freeorion uses stable sorting for all its lists, so you get most sort variants by clicking different rows in a sequence
21:04:29 <frosch123> but it does not resort automatically when numbers change
21:06:27 <frosch123> s/rows/columns/
21:07:10 <frosch123> oh, also freeorion allows you to position and select visible columns
21:07:49 <frosch123> so, if your items have 20 attributes, you can pick which to display as columns
21:08:14 <frosch123> no spreadsheet formulas though :p
21:12:11 <spnda> Uh I just tried to get _cur_year from date_func.h and now in date_func.h and date_type.h some stuff is apparently undefined. That being: uint64, int32 and uint8. So uhm anyone know why this is?
21:12:42 <frosch123> always include stdafx first
21:12:56 <Eddi|zuHause> order of includes
21:13:29 <frosch123> stdafx first, safeguards last, that's the rule
21:13:48 <spnda> Ah ok, thanks.
21:14:15 <LordAro> (ideally, the headers should include the stuff they use, but...)
21:15:24 <frosch123> that should be the case for everything but those two
21:15:51 <spnda> huh ok. Also does _cur_year update automatically or would I have to check for it?
21:16:24 <frosch123> spnda: either there is a function returning the value, or there is a global variable with the value
21:16:41 <frosch123> but there is never a function to fill a global variable
21:17:11 <frosch123> otherwise that function could just return the value without needing a global
21:17:53 <spnda> _cur_year is global
21:18:00 <Eddi|zuHause> ideally we would not have any global variables, but the code is very old in some places
21:18:11 <frosch123> (hmm though i guess there are exceptions with stuff from commands for the local company, like _refit_capacity)
21:29:02 <Samu_> round 44 begins
21:29:08 <Samu_> almost there
21:29:17 <Samu_> 47 is coming
21:29:19 *** peter1138 has quit IRC
21:32:07 *** peter1138 has joined #openttd
21:32:07 *** ChanServ sets mode: +o peter1138
21:35:08 <andythenorth> did someone make a grf with electricity as a cargo?
21:35:46 <nielsm> batteries are in the base game
21:35:50 <nielsm> (in toyland)
21:36:20 *** andythenorth is now known as Guest6620
21:36:20 *** andythenorth has joined #openttd
21:38:56 <andythenorth> found https://www.tt-forums.net/viewtopic.php?f=26&t=63356
21:39:40 <Eddi|zuHause> was it lost?
21:41:31 <nielsm> a better approach would probably be to just pretend there are underground transmission cables strewn about the map
21:41:35 <DorpsGek_II> [OpenTTD/OpenTTD] mercuriete opened issue #7637: Midi notes are never released and sustained forever https://git.io/fj6YF
21:41:51 <nielsm> and then have some kind of game global counting available power and demand power
21:43:09 *** Guest6620 has quit IRC
21:43:37 <Eddi|zuHause> wires probably fall into the same category as pipes. they need a new transport type
21:43:40 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6YA
21:44:18 <LordAro> nielsm: like yoda you speak
21:44:41 <nielsm> I think backwards
21:46:12 <nielsm> I think it could be worth adding a new kind of variables in the game, accessible via newgrf and perhaps also GS, named globals
21:46:33 <nielsm> maybe named via the popular 4cc scheme
21:46:43 <Eddi|zuHause> nielsm: there is per-industry and per-town storage
21:47:01 <nielsm> yeah, here you want a truly global storage so all industries can sum up their total production
21:47:15 <nielsm> and towns can read the result
21:47:55 <DorpsGek_II> [OpenTTD/OpenTTD] mercuriete commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6Oe
21:47:55 <Eddi|zuHause> global storage might overlap with GS scope
21:49:07 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6Of
21:50:14 <nielsm> Eddi|zuHause: it will, but it might also open a way for GS and GRF to cooperate
21:51:19 <Eddi|zuHause> ... which will open a dependency hell
21:51:25 <nielsm> indeed
21:52:08 <DorpsGek_II> [OpenTTD/OpenTTD] mercuriete commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6OU
21:53:19 <spnda> This is probably the most wrong way I could have made this. I made the function to update Discord inside of the function that lets the toolbar show up.
21:53:19 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6OI
21:53:20 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh closed issue #7637: Midi notes are never released and sustained forever https://git.io/fj6YF
21:54:19 <spnda> But hey this works just as expected... Just that the company name doesn't show up...
21:55:14 <Eddi|zuHause> you probably need to convert the name into a string
21:55:43 <spnda> I always get an assertion error if I do Company::Get(_local_company).name
21:55:54 <spnda> I think even with GetIfValid()
21:56:15 <andythenorth> nielsm: we devised some schema before for regions
21:56:25 <Eddi|zuHause> shouldn't that be ->name?
21:56:27 <andythenorth> which could handle power, if arbitrarily devised
21:56:47 <spnda> What's the difference between name, name_1 and name_2
21:56:56 <Eddi|zuHause> dunno
21:57:01 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6OY
21:57:12 <Eddi|zuHause> manager name?
21:57:26 <spnda> Ah found it in the struct..
21:57:46 <spnda> Seems name_1 is the default name and name is when the user changed it. A bit complicated I feel
21:59:40 <spnda> yup it crashed because of that
22:01:26 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7637: Midi notes are never released and sustained forever https://git.io/fj6On
22:04:47 <frosch123> spnda: you should not use either of them
22:04:56 <spnda> what else?
22:04:58 <frosch123> instead you should use a string with {COMPANY}
22:05:27 <spnda> I don't want to create a string in the language files though.
22:05:29 <nielsm> there is probably a STR_JUST_COMPANY constant you can use
22:05:39 <nielsm> which is just the company name and nothing more
22:07:29 <nielsm> STR_COMPANY_NAME
22:07:41 <nielsm> or STR_COMPANY_NAME_COMPANY_NUM :{COMPANY} {COMPANY_NUM}
22:08:03 <spnda> so how would I convert that to std::string?
22:08:20 <nielsm> format buffer
22:09:03 <nielsm> strings_func.h
22:09:41 <spnda> GetStringPtr maybe?
22:09:43 <nielsm> no
22:09:53 <nielsm> that gets the raw format string, it doesn't format
22:10:26 <nielsm> char buffer[64]; std::string foo{GetString(buffer, STR_COMPANY_NAME, lastof(buffer))};
22:10:33 <nielsm> would probably work
22:10:39 <nielsm> oh wait no
22:10:57 <nielsm> before that you also need: SetDParam(0, company_number);
22:11:15 <nielsm> (to indicate which company you want the name of)
22:12:17 <spnda> I'll try that. Thanks a lot
22:12:53 *** frosch123 has quit IRC
22:13:23 <nielsm> also no that won't work
22:13:36 <nielsm> since I didn't read what GetString returns
22:13:47 <nielsm> (it returns a pointer to the end of the formatted string, not the start)
22:14:20 <spnda> Just wanted to say... I got no output
22:14:34 <nielsm> SetDParam(0, company_num); char buffer[64]; GetString(buffer, STR_COMPANY_NAME, lastof(buffer)); std::string name(buffer);
22:15:21 <nielsm> it'd be nice if someone would change the string formatting to return std::string or something like that...
22:16:27 <spnda> Thanks a lot for that code. It's now showing up correctly as "Unnamed"
22:23:18 <andythenorth> 84% Horse
22:23:19 <andythenorth> :P
22:23:33 <andythenorth> 52 trains to draw
22:24:52 *** sla_ro|master has quit IRC
22:32:33 <Eddi|zuHause> why is going by train twice as expensive as going the same route by car?
22:33:21 <spnda> DB?
22:33:26 <andythenorth> because safety cases
22:33:27 <andythenorth> unions
22:33:32 <andythenorth> infra
22:35:07 <spnda> how do I declare global variables again and use them in another file? I'm getting linker errors all the time because the variable is already defined
22:35:29 <nielsm> use the extern keyword
22:35:48 <nielsm> "extern int _foo;" declares that _foo is an int with storage defined somewhere else
22:35:54 <spnda> I have that
22:36:24 <spnda> In all other files I do extern std::chrono::milliseconds _timestamp;. In the header file I just do std::chrono::milliseconds _timestamp
22:37:22 <milek7> in header use extern
22:37:28 <nielsm> yeah
22:37:35 <spnda> everywhere else aswell or not?
22:37:38 <milek7> and in single translation unit declare storage
22:37:38 <nielsm> now you're defining storage in all cpp files that include the header
22:40:21 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7638: Change: Limit in-editor warnings in VS 2019 https://git.io/fj63e
22:41:29 <spnda> Now I'm getting unresolved external symbol in my header file I think
22:42:02 <nielsm> did you decide on which cpp file owns the global?
22:42:29 <nielsm> you decide on one (arbitrarily, but probably something that would make sense to others) that define the global as not extern in that one
22:43:20 <spnda> No I did not. So do I just have to remove the extern symbol in one cpp file?
22:44:09 <nielsm> compare date_func.h and date.cpp
22:44:28 <nielsm> see how date_func.h declares _cur_year as extern, and then date.cpp declares it as not extern
22:44:43 <nielsm> that makes date.cpp "own" the global by defining its storage
22:45:33 <Eddi|zuHause> you put the extern in the header file, and the not-extern in any cpp file, no extern in the other cpp files
22:45:46 <spnda> Ah yeah
22:45:53 <Eddi|zuHause> the other cpp files just include the header
22:46:00 <Eddi|zuHause> which will include the extern
22:46:04 <spnda> done
22:47:42 <spnda> Thanks guys. If anyone has Discord and are on the same guild as me. You can see my feed of what I am doing in OpenTTD now.
22:50:42 <nielsm> gnight
22:51:10 <Eddi|zuHause> "withe the purchase of this bundle you save 0,--€", thanks, steam.
22:58:46 *** nielsm has quit IRC
23:03:07 <andythenorth> nice discount
23:03:42 <DorpsGek_II> [OpenTTD/OpenTTD] stormcone commented on issue #7635: Game crash on exit scenario editor when you build or demolish infrastructure https://git.io/fj63E
23:27:42 *** tokai has quit IRC
23:31:33 *** Tirili has quit IRC
23:38:57 *** Wolf01 has quit IRC