Config
Log for #openttd.dev on 13th August 2014:
Times are UTC Toggle Colours
00:08:13  *** keoz has quit IRC
06:53:35  *** keoz has joined #openttd.dev
11:31:47  *** Supercheese is now known as Guest383
11:31:50  *** Supercheese has joined #openttd.dev
11:31:50  *** ChanServ sets mode: +v Supercheese
11:37:31  *** Guest383 has quit IRC
12:06:23  *** Klanticus has joined #openttd.dev
15:55:45  *** Alberth has joined #openttd.dev
15:55:45  *** ChanServ sets mode: +v Alberth
16:25:53  *** frosch123 has joined #openttd.dev
16:25:53  *** ChanServ sets mode: +v frosch123
18:50:43  <Alberth> http://paste.openttdcoop.org/show/3613/       warning for missing industries, so far it only triggered in arctic on farms or on forests with default industries
18:51:56  <planetmaker> Alberth, how does it behave with oil rigs?
18:52:11  <frosch123> there is a Industry::GetIndustryTypeCount, which may be handy
18:52:15  <planetmaker> how does it react with NewGRFs?
18:53:45  <frosch123> it uses the availability callback
18:53:52  <planetmaker> hm, yeah, I see now
18:53:54  <frosch123> so, same as for funding/prospecting
18:54:33  <Alberth> I haven't been able to trigger any error with newgrf industries, and indeed, same as the main game does things
18:55:07  <planetmaker> hm, that's good :)
18:55:35  <frosch123> if (chance == 0 && !force_at_least_one) continue; // Types that are not available can be skipped. <- should be || instead &&, shouldn't it?
18:56:20  <frosch123> force_at_least_one defaults to true, so if a newgrf really sets it to false, i don't think ottd needs to complani
18:57:56  <frosch123> actually, checking force_at_least_one is enough, no need to check chance
18:58:13  <Alberth> oh, right
18:58:23  <Alberth> (after 2 minutes pondering :) )
18:58:33  <planetmaker> :)
18:59:28  <Alberth> frosch123: it should complain for not having industries is chance == 0 ?
18:59:33  <Alberth> *if
19:00:21  <frosch123> STR_ERROR_INDUSTRY_NOT_ON_MAP :{WHITE}{STRING} industries are not available <- how about "There were no suitable places for '{STRING}' industries"
19:00:40  <frosch123> *force_at_least_one = (chance > 0) && !(ind_spc->behaviour & INDUSTRYBEH_NOBUILT_MAPCREATION) && (_game_mode != GM_EDITOR); <- force_at_least_one implies chance > 0
19:01:13  <frosch123> but, if you think it is cleared, you can check both .)
19:01:19  <frosch123> *clearer
19:05:51  <Alberth> http://paste.openttdcoop.org/show/3614/
19:07:34  <Alberth> much smaller with the industry type count :)
19:09:24  <frosch123> looks nice to me :)
19:11:19  <Alberth> the error message doesn't last as long, but I guess I have a bit too aggressively reduced the error display duration :)
19:17:04  *** Klanticus_ has joined #openttd.dev
19:20:31  *** Klanticus has quit IRC
19:30:39  <planetmaker> anyhow, this patch is much smaller than I thought it could be :) +1 to it
19:31:46  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r26729 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
19:32:44  <Alberth> just use enough already existing functionality :p
19:32:53  <Alberth> let's see if it helps in bug reports :)
20:04:34  *** Klanticus_ has quit IRC
20:16:50  *** Alberth has left #openttd.dev
20:46:01  *** frosch123 has quit IRC

Powered by YARRSTE version: svn-trunk