IRC logs for #openttd on OFTC at 2022-06-18
⏴ go to previous day
01:46:55 *** wallabra_ has joined #openttd
01:51:50 *** wallabra has quit IRC (Ping timeout: 480 seconds)
02:23:05 *** Smedles has joined #openttd
02:25:45 *** Wormnest has quit IRC (Quit: Leaving)
02:26:36 *** wallabra has joined #openttd
02:40:22 *** debdog has quit IRC (Ping timeout: 480 seconds)
06:25:00 *** WormnestAndroid has quit IRC (Remote host closed the connection)
07:07:51 *** andythenorth has joined #openttd
07:44:09 <andythenorth> meh I have too much architecture
07:44:31 <andythenorth> burn it with fire
07:45:26 <andythenorth> funny what you build when you don't know how to use run time arguments properly :P
07:53:24 *** sla_ro|master has joined #openttd
07:54:40 *** HerzogDeXtEr has joined #openttd
08:54:07 *** andythenorth has quit IRC (Quit: andythenorth)
09:30:39 *** Smedles has joined #openttd
09:36:08 *** nielsm has quit IRC (Ping timeout: 480 seconds)
09:49:07 *** andythenorth has joined #openttd
10:01:09 *** andythenorth has quit IRC (Quit: andythenorth)
10:01:41 *** andythenorth has joined #openttd
10:07:17 *** WormnestAndroid has joined #openttd
10:13:33 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
10:37:24 *** D-HUND is now known as debdog
10:49:36 *** andythenorth has joined #openttd
11:01:32 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
11:41:45 *** wallabra has quit IRC (Ping timeout: 480 seconds)
11:44:36 *** andythenorth has joined #openttd
12:08:56 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
12:13:31 *** Etua has quit IRC (Quit: Etua)
12:26:13 <Samu> i found something strange
12:26:31 <Samu> GetQuarterlyExpenses returns negative values, is that intended?
12:27:12 <Samu> -1 is also returned when prerequesites aren't met
12:27:27 <glx> probably (when you sell stuff it's a negative expense)
12:31:05 <Samu> -1 can be valid and invalid, isn't that troublesome?
12:31:58 <glx> based on the description it seems it's never negative
12:32:22 <glx> unless some weird stuff happens in the economy
12:34:54 <Samu> the values are stored as negative
12:52:21 <Samu> now I wonder, can expenses ever be positive, that is, > 0 ?
12:52:49 <Samu> how am I fixing this without breaking AIs
12:54:43 <glx> operating graph uses the same data, so maybe GetQuarterlyExpenses() miss a '-'
13:03:17 <glx> and for graph it's use as "return c->old_economy[j].income + c->old_economy[j].expenses;"
13:03:28 <glx> so it's supposed to be negative
13:05:22 <glx> anyway script API doesn't say anything about the signedness of the returned value
13:06:44 <glx> and a total of expenses being exactly -1 is probably very improbable
13:09:50 <Samu> it happens, road vehicles with low running costs -1 is common
13:10:58 <glx> but a total of -1 for 3 months ?
13:11:40 <Samu> no, unless you stop the vehicle :p
13:12:34 <glx> and you still have property and loan expenses
13:13:01 <Samu> maybe fix the opposite way
13:13:07 <Samu> make the invalid value = 1
13:14:36 <glx> returning -2 or 0 for the rare expenses == -1 case would be safer
13:17:23 <glx> btw if you know you are following the precondition, then -1 is perfectly valid
13:20:38 <glx> and -1 is not an error value, it's a default result
13:27:27 *** andythenorth has joined #openttd
13:35:28 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
13:52:23 *** Tirili has quit IRC (Quit: Leaving)
13:55:54 <Samu> wow commit checker got something
13:57:07 <glx> I still think current code is not an issue
14:05:00 <Samu> ah, i have to pay for imported cargos? let me test
14:06:08 <glx> some cargoes in IOTC have a negative cargo payment rates, so it's possible revenue total to be exactly -1
14:06:57 <glx> anyway as I said -1 is a valid value if you are sure your arguments when calling the functions meet the conditions
14:14:36 <Samu> wow, I don't even know what to say... why is it allowed
14:15:15 <Samu> Revenue -£1,420 that's so weird
14:23:54 <Samu> in that case, there needs to be an INVALID_MONEY constant?
14:24:13 <Samu> how would that even work
14:24:43 <glx> not really, if the script ensure it will call with valid parameters it can assume -1 is valid
14:28:15 <Samu> im surprised some ais manage that well
14:28:24 <Samu> everybody's transporting mail!
14:28:34 <Samu> no one doing passengers (workers)
14:46:17 <Samu> heh my ai isn't immune to the problem
14:46:36 <Samu> i never expected negative incomes
15:14:41 *** Wormnest has joined #openttd
15:21:54 *** andythenorth has joined #openttd
15:29:56 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
15:47:05 *** andythenorth has joined #openttd
15:55:08 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
16:10:13 *** andythenorth has joined #openttd
16:15:12 <Samu> (quarterly_income + quarterly_expenses) / quarterly_delivered
16:15:20 <Samu> profit per unit delivered?
16:15:31 <FLHerne> TrueBrain: fwiw, ISR does have all the individual tiles in various categories if you don't want to use the magic NxM stations?
16:16:27 <Samu> im trying to come up with more ways to rank companies in a leaderboard
16:18:26 <Samu> NoNoCAB seems to excel at this metric
16:31:45 *** Smedles has joined #openttd
16:47:51 <andythenorth> grfids for Iron Moose and Iron Ibex?
16:48:27 *** virtualrandomnumber has joined #openttd
16:49:00 *** virtualrandomnumber has quit IRC ()
16:51:01 <andythenorth> hard to explain how little grfids interest me :P
17:38:37 <andythenorth> no grfid suggestions? :P
17:38:53 <andythenorth> ok I just bump them up one from Horse
18:10:59 *** andythenorth has quit IRC (Quit: andythenorth)
18:22:40 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
19:30:40 *** tokai|noir has joined #openttd
19:30:41 *** ChanServ sets mode: +v tokai|noir
19:37:33 *** tokai has quit IRC (Ping timeout: 480 seconds)
20:10:56 *** wallabra has joined #openttd
20:44:58 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:04:40 <Samu> ah, it's May, but the y leg is cut off
21:05:41 <glx> R, V, C and o also look weird
21:06:07 <dwfreed> what is this, a picture for ants
21:23:53 *** Smedles has joined #openttd
22:07:41 *** Samu has quit IRC (Ping timeout: 480 seconds)
22:22:14 *** sla_ro|master has quit IRC ()
23:46:52 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:48:05 *** Joel has quit IRC (Ping timeout: 480 seconds)
continue to next day ⏵