IRC logs for #openttd.dev on OFTC at 2014-08-13
⏴ go to previous day
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
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: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:23 <Alberth> (after 2 minutes pondering :) )
18:59:28 <Alberth> frosch123: it should complain for not having industries is chance == 0 ?
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: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:30:39 <planetmaker> anyhow, this patch is much smaller than I thought it could be :) +1 to it
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:16:50 *** Alberth has left #openttd.dev
continue to next day ⏵