Log for #openttd on 11th December 2021:
Times are UTC Toggle Colours
10:28:35  <TrueBrain> tiny bit smaller :P
10:35:46  *** andythenorth has joined #openttd
10:37:47  *** Etua has quit IRC
10:38:42  <TrueBrain> action0::write(output, Feature::Cargoes, cargo_id, action0::Cargo::Bitmask(0xff).into());
10:38:45  <TrueBrain> Rust is pretty cool :)
10:41:23  <TrueBrain> and even smaller:
10:41:24  <TrueBrain> action0::write(output, cargo_id, action0::Cargo::Bitmask(0xff).into());
10:41:24  <TrueBrain> :D
10:41:41  <TrueBrain> (that it is the feature cargoes can be deduced by the fact you say action0::Cargo)
10:43:51  *** andythenorth has quit IRC
11:06:02  <Rubidium> can't you make a action0::Cargo::Disable, so you do not actually specify a bitmask? It's a few characters shorter here, and more meaningful
11:09:24  <TrueBrain> that line happens to be a very specific case, which are the exception more than the rule :) But possible, for sure
11:09:26  <TrueBrain> write(output, action0::Cargo::Bitmask { id:, bitmask: }.into());
11:09:33  <TrueBrain> I wonder if that is an improvement to the earlier statement or not ..
11:18:28  <TrueBrain> write(output, action0::Cargo::Disable { id: cargo_id }.into());
11:18:33  <TrueBrain> to apply the earlier suggestion
11:18:36  <TrueBrain> hmm, I guess ..
11:23:54  <LordAro> you writing nml-rs ?
11:24:11  <TrueBrain> no, I am writing TrueGRF
11:24:19  <LordAro> oh yes
11:24:21  <TrueBrain> :)
11:24:41  <TrueBrain> still sad I can't use NML, but what can you do .. it is nice to do stuff in Rust, so there is that
11:27:01  <LordAro> what's stopping you using nml?
11:27:13  <TrueBrain> running Python in a browser is not realistic
11:27:37  <LordAro> ah yes
11:32:56  *** HerzogDeXtEr has joined #openttd
11:33:57  *** WormnestAndroid has joined #openttd
11:34:03  <TrueBrain> this now became a game of: how far can I abstract everything away :P
11:53:38  *** jottyfan has joined #openttd
11:58:06  <peter1138> Abstract the abstractions
12:05:31  <TrueBrain> Action0::Cargo::Bitmask { id:, bitmask: }.write(output);
12:05:34  <TrueBrain> I think I can get that to work :D
12:08:38  *** andythenorth has joined #openttd
12:16:42  *** andythenorth has quit IRC
12:38:04  <TrueBrain> action0::Cargo::Enable { id: }.write(output);
12:38:06  <TrueBrain> works \o/ :D
12:51:40  *** frosch123 has joined #openttd
12:53:53  *** roadt__ has quit IRC
12:57:31  <frosch123> TrueBrain: the biggest problem with nfo abstractions is that every number you put into an action may become a parameter later
12:57:32  <Eddi|zuHause> whatever you're doing, sounds extremely talkative
12:57:58  <TrueBrain> frosch123: what do you mean, sorry?
12:58:15  *** roadt__ has joined #openttd
12:58:28  <Eddi|zuHause> TrueBrain: i think he means that an action 6 can change it
12:58:28  <frosch123> say, you set an industry to produce 90 units/month via the property
12:58:49  <frosch123> it is possible to replace the 90 with a computation/condition at grf-load-time
12:59:15  <frosch123> once you want to support that, a lot of "constants" can suddenly become "variables"
12:59:51  <TrueBrain> ah, like that. Exactly why I was doing this :)
13:00:21  <TrueBrain> I was looking into adding climate support for cargo types :P
13:01:17  <TrueBrain> I should now be able to nest this stuff how-ever I feel like .. I think ..
13:01:31  <TrueBrain> then again, what ever you do, you have to rewrite this 5 times at least anyway :D
13:04:32  *** andythenorth has joined #openttd
13:19:20  <TrueBrain> :P
13:19:23  <fr

Powered by YARRSTE version: svn-trunk