Log for on 16th October 2012:
Times are UTC Toggle Colours
01:21:41  *** Knogle has quit IRC
01:22:46  *** Knogle has joined
07:50:51  *** Supercheese has quit IRC
13:19:31  *** Knogle has quit IRC
13:19:40  *** Knogle has joined
13:48:23  <Belugas> hello
14:53:15  *** FLHerne has joined
15:14:11  *** LordAro has joined
15:14:11  *** ChanServ sets mode: +v LordAro
16:18:52  *** frosch123 has joined
16:18:52  *** ChanServ sets mode: +v frosch123
17:14:22  *** Alberth has joined
17:14:23  *** ChanServ sets mode: +v Alberth
17:26:51  *** Supercheese has joined
18:45:50  *** Zuu has joined
18:45:50  *** ChanServ sets mode: +v Zuu
19:55:16  <Zuu> What is the prefered way to allow GS to tell CmdBuildIndustry to fund/prospect an industry?
19:55:18  <Zuu> a) by passing INVALID_TILE to prospect (and a valid tile to fund)
19:55:18  <Zuu> b) by reserving one of the free 16 bits of p1 to pass this parameter
19:55:41  <Zuu> In the case of b) should non-GS callers be changed to pass this bit even if its not needed?
19:56:11  <frosch123> i think commands with INVALID_TILE are rejected in general
19:56:21  <frosch123> use one bit in p1
19:57:39  <frosch123> i am not sure how the scenario editor builds industries
19:58:05  <frosch123> but for se it might be useful to being able to both fund industries in specific spots or at random spots
19:58:07  <frosch123> and both via commands
19:58:19  <frosch123> (to suit the far dream of multiplayer scenario editor :) )
19:58:37  <frosch123> in game you need to override whatever is passed via p1 anyway
19:58:39  <Zuu> Should we make this bit mandatory for non-DEITY calls? Eg. by not implicitly pick method in the cMD.
19:58:41  <frosch123> to deny cheating
19:59:05  <frosch123> i think in other places we only overwrite whatever is passed
19:59:10  <Zuu> Of course with checks that ensure that you are allowed to fund.
19:59:14  <frosch123> instead of denying the command
19:59:53  <frosch123> 	/* Disable the effect of p2 bit 0, when DC_AUTOREPLACE is not set */
19:59:55  <frosch123> 	if ((flags & DC_AUTOREPLACE) == 0) SetBit(p2, 0);
19:59:57  <frosch123> ^^ example
20:01:29  <Zuu> So bit 16 of p1 will only be valid/used if current company is DIETY.
20:01:42  <frosch123> yeah
20:01:48  <frosch123> unless you find good use in scenario editor
20:01:58  <frosch123> (separate diff anyway)
20:02:02  <Zuu> yea
20:16:53  <Zuu> Hmm && have higher priority than || in C++. The coding style doesn't mention anything about improving readability by putting extra parantheses in this case. I guess that implicitly says that the code should only rely on that the C++ standard specify that && have higher priority.
20:18:24  <frosch123> i am quite sure the codings style says always put ( ) in those cases :)
20:18:40  <frosch123> but anyway, every language puts && over ||
20:19:09  <frosch123> that is so fundamentally used in electronics and informatics
20:19:18  <frosch123> that everything else would be considered broken :)
20:19:31  <Zuu> Not languages which doesn't have lazy evanualuation and only & and |. :-)
20:19:54  <frosch123> which language is so broken?
20:20:05  <Zuu> Delphi
20:20:13  <frosch123> also pascal puts and over or
20:20:46  <Zuu> Maybe it does. I always make it explicit.
20:21:14  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24597 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
20:21:26  <frosch123> when writing lots of logic expressions it is common to drop "and" like you drop "multiply" in other math
20:21:34  <frosch123> i.e. not write it at all
20:24:01  <Alberth> my c++ compiler suggests to add parentheses in cases where && and || are combined
20:24:34  <Alberth> which I always do already :)
20:36:18  <planetmaker> would anyone mind, if bancruptcy would be declared only when money - loan > max_loan for the 3 or 4 consecutive quarters. i.e. when bancruptcy could still be averted by drawing more loan to not anymore declare it?
20:37:06  <planetmaker> if no one would mind, I'll give zxwhoever the heads-up to go code that solution. Honestly I've wondered about why it isn't that way sometimes, too
20:38:01  <frosch123> planetmaker: sounds like cheating
20:38:08  <planetmaker> frosch123, why?
20:38:10  <frosch123> you avoid the interests that way
20:38:33  <planetmaker> good point
20:38:44  <frosch123> ofc you can add higher interests for negative bank balances :)
20:38:48  <planetmaker> so... paying interest on ^^
20:38:53  <planetmaker> would solve that, right?
20:39:13  <planetmaker> twice?
20:39:27  <frosch123> might be a start
20:39:45  <frosch123> but 3 times might be easier
20:39:50  <planetmaker> ok
20:39:57  <frosch123> you could just take the interests monthly
20:40:01  <frosch123> instead of quarterly in that case
20:40:08  <planetmaker> yes, then... ^^
20:40:10  <frosch123> monthly interest for negative bank balance
20:40:17  <frosch123> quarterly interest for loan
20:40:29  <planetmaker> sounds good to me. Keeps the diff also smaller
20:43:45  <Alberth> and no building on negative balance
20:43:57  <planetmaker> of course not. That must not change
20:49:21  <frosch123> anyway, i have not read the topic
20:49:33  <frosch123> what is exactly the goal of changing the bankrupcy rules?
20:49:58  <frosch123> it sounds as if it should avoid bankrupting accidentially
20:50:20  <frosch123> but the issue remains when you happen to have taken complete loan
20:50:41  <planetmaker> that would be my motivation to sign-off such patch, yes. And I think that's at least one of the issues he wants to solve
20:51:01  <planetmaker> of course. We want to keep bancrupcy an option :-)
20:51:06  <planetmaker> at least I want
20:51:17  <frosch123> if you want to really change something, you should check whether the money-loan-thingie is negative for the whole quarter
20:51:27  <planetmaker> it's also one way to delete your company from a MP server... just let it run into debt
20:51:59  <frosch123> planetmaker: yeah, but only changing the effect of loan, while keeping the quarterly checks does not exactly solve anything
20:52:11  <Alberth> I find it a bit stupid to get bancrupt for eg -10 euro
20:52:22  <planetmaker> not? It solves accidential bancrupcy for me
20:52:36  <planetmaker> while paying only so much interest as absolutely needed
20:52:59  <frosch123> planetmaker: it remains all the same while you have maxed loan
20:53:14  <frosch123> which is the normal case at the start of the game, and when you are too lazy to ever pay it back
20:53:20  <Alberth> frosch123: yep, and we do need a bottom imho
20:53:26  <planetmaker> frosch123, of course. That's actually why I never draw max loan, but max loan - 10000
20:53:40  <frosch123> so, only adding the loan to the check improves nothing imo :p
20:53:48  <frosch123> it would need daily checks for the whole quarter
20:54:05  <frosch123> if you really want to avoid accidential bancrupcies
20:54:07  <planetmaker> isn't that a bit much? Would be fine with me, too
20:54:17  <planetmaker> So, I'll mention that option, too
20:54:30  <planetmaker> but same check actually, including the max loan and bank balance
20:54:43  <Alberth> what if I leave the machine running while making coffee eg?
20:54:44  <planetmaker> where a single day resets the counter
20:55:01  <frosch123> yeah, something like that would make more sense to me
20:55:06  <Alberth> which takes about a year :)
20:55:19  <frosch123> a rule "don't ever take the full loan" sounds kind of silly :p
20:55:43  <frosch123> then you can as well say, people should read newspaper, and make sure to have a positive balance in the next quarter
20:56:08  <planetmaker> then = when?
20:56:56  <frosch123> s/then you can/you could/
20:58:29  <planetmaker> no, my question was when option the then refers to :-)
20:59:03  <planetmaker> the "don't ever take full loan" or the "daily check for money + loan > -max_loan
20:59:19  <Alberth> planetmaker: quick different question, do you know how to stop toyland industries from glitching (just yes or no is enough for now)
20:59:57  <Alberth> otherwise I could ask Zephyris perhaps
20:59:57  <frosch123> "the player has to make sure to never take the whole loan" equals "the player has to check the news for bankrupcy annoucement and then be careful the next quarter to have a positive balance"
21:00:09  <planetmaker> I fear the question is 'no'. But I haven't looked thoroughly at it for long... I just fiddled long enough till opengfx worked. it was kinda a pain
21:00:09  <frosch123> replacing one weird rule with another
21:00:17  <frosch123> while not solving the "accidential" part
21:00:19  <planetmaker> s/question/answer/ @ Alberth
21:00:32  <frosch123> Alberth: i know :)
21:00:34  <Alberth> planetmaker: :)
21:01:03  <Alberth> frosch123: nice, I'll ask you then in a few days
21:01:07  <frosch123> i fixed it in ogfx before
21:01:20  <frosch123> i am looking whether i can find the old ticket
21:01:22  <Alberth> for now, I am going to test my bed agfain
21:01:39  <planetmaker> oh, yes, test it thoroughly :-) And enjoy it :D
21:01:57  <frosch123> #779
21:02:10  <frosch123> ah, wrong channel
21:04:32  *** Alberth has left
21:09:34  <Zuu> Should GSs be excluded from the chance that prospecting may fail? It only involves a Random() call which afaik shouldn't break NewGRFs.
21:10:04  <planetmaker> makes sense to me, Zuu
21:10:13  <Zuu> Eg add an extra contition to this check:   if (Random() <= indspec->prospecting_chance) {
21:11:04  <Zuu> although that indspec->prospecting_chance might need to be checked for 0 still.
21:12:51  <frosch123> Zuu: yup, makes sense
21:13:06  <frosch123> if it costs no money, there is no point in failing :)
21:24:07  <Zuu> Is it good to still reject the industry if indspec->prospecting_chance is 0?
21:24:40  <Zuu> Eg, some NewGRFs may set it to 0 to disable prospecting of some industries?
21:25:29  <frosch123> the gui does not check it
21:25:50  <frosch123> if the newgrf wants to forbid stuff, it should use a different method whcih also blocks the gui
21:25:57  *** Supercheese has quit IRC
21:26:00  <Zuu> Ok
21:26:02  <frosch123> so, no need to add an extra check
21:29:59  <frosch123> night
21:30:01  *** frosch123 has quit IRC
21:34:29  <Zuu> New GS industry patch:
21:34:44  <Zuu> But maybe save that for tomorrow. :-)
22:37:56  *** LordAro has quit IRC
22:53:15  *** FLHerne has left
23:27:06  *** Zuu has quit IRC

Powered by YARRSTE version: svn-trunk