Config
Log for #openttd.dev on 15th June 2014:
Times are UTC Toggle Colours
07:09:49  *** Alberth has joined #openttd.dev
07:09:49  *** ChanServ sets mode: +v Alberth
07:16:24  *** Supercheese has quit IRC
07:18:28  *** GodBalls has joined #openttd.dev
07:54:15  *** Webster has joined #openttd.dev
07:54:15  *** ChanServ sets mode: +v Webster
09:16:22  <fonsinchen> planetmaker: That's to clarify what we're _not_ doing in order to prevent it from being shifted out of the 32bit range
09:17:05  <fonsinchen> I like to be really verbose with such bitwise operations as it's easy to lose track of what is happening.
09:18:04  <fonsinchen> Do you see that "Do something of which I have no idea what it is" comment in the same file? That's what I want to avoid.
10:16:08  <michi_cc> fonsinchen: Comments itself aren't the problem, only if I have to search the closing ) after the comment. Ar first glance it feels more like forgotten debug code ore something and not intentional.
10:18:34  <fonsinchen> You're talking about line 171, right? OK, I can remove both of those if you think it looks better
10:19:58  <fonsinchen> 717 that is ...
10:21:02  <michi_cc> Exactly. A comment at the line end would probably be fine.
10:22:12  <fonsinchen> There is already a comment to that effect on the previous line
10:24:19  <fonsinchen> https://github.com/ulfhermann/openttd/commit/6e6b593230d1b6fb5a70c26b957e54f7def60757 then
10:32:42  <michi_cc> Patch-wise fine, and *I* can't see a problem with it.
10:53:39  *** frosch123 has joined #openttd.dev
10:53:39  *** ChanServ sets mode: +v frosch123
11:02:29  *** DorpsGek has quit IRC
11:02:41  <fonsinchen> Is https://github.com/ulfhermann/openttd/blob/a1129e811f7e9934c9b2571f104d67017fe5719a/src/script/api/script_stationlist.hpp a useful script API for querying a list of next hops or cargo origins from a station?
11:03:13  <fonsinchen> (It doesn't work, yet; I have to fill in all the boilerplate first)
11:03:34  *** DorpsGek has joined #openttd.dev
11:03:34  *** ChanServ sets mode: +v DorpsGek
11:04:47  *** TrueBrain has joined #openttd.dev
11:05:36  *** ChanServ sets mode: +o TrueBrain
11:05:41  *** ChanServ sets mode: +o DorpsGek
11:05:46  *** TrueBrain has left #openttd.dev
11:06:52  <frosch123> using the enum to choose different lists looks unusual to me
11:07:57  <fonsinchen> I could also make that 8 different classes, but wouldn't be so nice either.
11:08:18  <fonsinchen> But, yes, I'm undecided on that, too
11:09:19  <frosch123> the "other_station" does not have a meaning in all cases, does it?
11:09:26  <fonsinchen> No
11:09:46  <fonsinchen> But squirrel doesn't really do default parameters, does it?
11:09:53  <frosch123> nope :/
11:12:52  <frosch123> how about: ScriptStationList_CargoOrigin(StationId station, CargoId cargo, WaitingOrPlanned, StationId next_hop=INVALID_STATION), ScriptStationList_CargoNextHop(StationId station, CargoId cargo, WaitingOrPlanned, StationId from=INVALID_STATION)
11:13:08  <frosch123> two lists, and an enum with two values (planned/waiting)
11:13:26  <frosch123> and the "other_station" only as optional filter criterion
11:13:37  <fonsinchen> INVALID_STATION is a valid station to select by
11:13:48  <fonsinchen> You get the "from unknown" or "via any" cargo then
11:13:55  <frosch123> yes, it would need two special values "unknown station" and "all stations"
11:14:17  <fonsinchen> And default parameters still don't work
11:14:21  <frosch123> there is already SpecialStationIDs for special ids
11:14:32  <frosch123> yes, i meant the default parameters only as examples
11:15:25  <fonsinchen> If we let the user type the enum value and the useless extra parameter we can as well let her choose from 8 enum values ...
11:16:22  <fonsinchen> It doesn't really make a difference, does it?
11:17:10  <fonsinchen> I'd rather make it 8 classes and do away with the enum and the extra parameter, at the cost of some noise in that header.
11:17:14  <frosch123> it could make the documentation easier
11:17:24  <frosch123> since you do not need as generic names as "other_station"
11:19:23  <frosch123> making 8 classes with similar names as the existing ScriptStation methods (GetCargoWaitingVia, GetCargoWaitingFromVia, ...) sounds best
16:41:24  *** Gthotel_org has joined #openttd.dev
17:11:05  *** Gthotel_org has quit IRC
17:45:42  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r26648 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
18:49:12  *** Supercheese has joined #openttd.dev
18:49:12  *** ChanServ sets mode: +v Supercheese
20:13:26  *** Alberth has left #openttd.dev
20:37:29  *** frosch123 has quit IRC

Powered by YARRSTE version: svn-trunk