IRC logs for #openttd on OFTC at 2024-10-21
⏴ go to previous day
02:45:37 *** TinoDid|znc has joined #openttd
02:46:12 *** TinoDidriksen has quit IRC (Read error: Connection reset by peer)
02:49:41 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
02:57:55 *** godbed_ has joined #openttd
03:01:13 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:01:18 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
05:47:55 *** godbed is now known as debdog
05:50:09 *** TinoDid|znc is now known as TinoDidriksen
05:59:29 *** Flygon has quit IRC (Read error: Connection reset by peer)
07:16:39 <DorpsGek> - Add: summary for week 42 of 2024 (by OpenTTD Survey)
07:34:07 *** welterde has joined #openttd
08:13:23 <andythenorth[d]> ok new cargo classes kind of work in FIRS v4
08:13:52 <andythenorth[d]> I tested about 10 train grfs, anything that's really weird or broken was also weird or broken with old cargo classes
08:56:17 <peter1138> reldred: I have Timtams
08:57:37 <kuhnovic> peter1138: Do you want to address my comments about some local variable names in #13005, or do you want to leave those for a different PR? If not then I'll hit approve again.
08:57:46 <reldred> some sort of udon noodles tomato soupy thing with beef in it.
08:59:14 <andythenorth[d]> `dumpinfo cargotypes` eh 🙂
08:59:30 <andythenorth[d]> that's probably configured in some .h file or something
08:59:35 <andythenorth[d]> "I am not a programmer"
09:00:24 <peter1138> kuhnovic: I can address it but I'm not currently working on it (well, it's $work-oclock)
09:02:13 <kuhnovic> Then I'll wait a bit 🙂
09:02:47 <peter1138> IIRC when I looked it's a case of working out which one of the variables should be named `node` 🙂
09:06:54 <kuhnovic> They definitely shouldn't be named pNode 😛
09:07:20 <johnfranklin> Will new nml change "cargo classes" texts? like ``CC_OVERSIZED`` etc becomes other categories
09:07:53 <andythenorth[d]> I'm just using bit numbers for now
09:08:03 <johnfranklin> This will make Garry unable to produce any grf...
09:10:31 <andythenorth[d]> part of the reason cargo classes are such a mess is that they needed 'measure twice, cut once' in 2011 😛
09:10:35 <andythenorth[d]> and that didn't happen
09:11:07 <andythenorth[d]> it was more like "argue for weeks, then implement a misunderstanding"
09:11:40 <andythenorth[d]> so I'm just going to try it all on bit numbers, and worry about NML later, and not add to the mess
09:18:17 <andythenorth[d]> "we were all much younger" 😄
09:53:28 <xarick> peter1138: how did you place red squares? I am looking at 13013
09:58:00 <peter1138> (First time I've shared a .diff for a long time...)
10:01:45 <xarick> hmm only water tile type
10:03:07 <peter1138> I only changed the behaviour of the water tile type.
10:06:44 <xarick> MarkTileDirtyByTile doesn't seem to be doing a good work
10:07:10 <kuhnovic> Oh god, here we go again
10:12:27 <xarick> oh, i forgot to copy that last part
10:18:53 <peter1138> The debugging is very simple and doesn't take account of the fact that canals don't actually ever flood.
10:21:09 <xarick> okay let's fix the canal/river thing
10:26:31 <peter1138> It's throw-away debugging code.
10:28:38 <xarick> GetFloodingBehaviour tells me what floods
10:28:49 <xarick> need to refresh my memory
10:32:55 <xarick> strange that nothing is mentioned about tunnel bridge
10:37:56 <peter1138> However I think, while porting from JGRPP, I've left it more complicated than it needs to be.
10:40:28 <xarick> why do trees trigger a red square...
10:41:34 <xarick> you know trees can eat performance :p
10:41:35 <peter1138> Because it's a shore tile that got updated.
10:42:29 <xarick> but placing a lock doesn't trigger a red square
10:42:41 <xarick> locks should be reworked
10:47:58 <xarick> dang void tiles flooding constantly, need to isolate them
10:55:26 <xarick> hmm red square is constantly trying to flood the tunnel
10:55:48 <xarick> but tunnel is unfloodable
10:56:20 <xarick> where do I make the change so that it stops retrying it
10:59:43 <xarick> this comment is outdated
11:00:38 <xarick> i went to tunnelbridge_cmd and i don't see where
11:03:34 <truebrain> w00p, Factorio Space Age is out! \o/
11:10:05 <dwfreed> The Factory Must Grow
11:10:24 <ian01223> ...well, see you all in two weeks
11:10:38 <ian01223> might as well declare a server wide bank holiday
11:15:33 <dwfreed> I heard KSP 2 was a major disappointment
11:17:05 <ian01223> yeah it wasn't very good
11:17:44 <ian01223> or very much a "2" at all
11:19:18 <ian01223> actually I think the studio developing the game was closed, so pretty bad
11:20:57 <ian01223> factorio of course was confident enough to do a full playtest with hundreds of reviewers and has shown the whole DLC fairly in depth by now so it's pretty clear to everyone that it's good
11:23:03 <dwfreed> Yeah, and they have a history of actually supporting their game
11:23:19 <dwfreed> like, there was a 1.1 patch 2 months ago
11:24:01 <reldred> There was two patches. I had to keep updating my server 😠
11:32:15 <ian01223> i'll just tell myself that I won't buy it until they put a discount on it, how long could that take
11:33:45 <ian01223> also a british problem right here, looking at the prices at steam db and it costs £30 here and everywhere else in the world except switzerland it costs less (when converted)
11:40:31 <peter1138> Factorio never discounts, so...
11:41:04 <LordAro> just got to wait for the £ to improve
11:41:44 <LordAro> wait, no, wait for it to decrease in value
11:44:06 <peter1138> Factorio must be about as old now as when Transport Tycoon Deluxe was when OpenTTD started...
11:45:04 <ian01223> ...oh, no it was only announced in 2013
11:45:19 <ian01223> with a crowdfunding campaign
11:45:24 <ian01223> and only "complete" in 2020
11:46:03 <peter1138> In 2004, nobody was selling Transport Tycoon Deluxe at full price in the stores. But modern games seem to live much longer.
11:46:25 <LordAro> in some ways i miss the days when games were "done" when they were shipped
11:46:36 <ian01223> took much longer to get off the ground too
11:48:28 <LordAro> omg the car in that trailer
11:49:36 <ian01223> that trailer is a blast from the past
11:50:59 <ian01223> work in progress graphics, that player character, soothing czech voice, bipedal biters for some reason
11:51:11 <ian01223> why did they ever think that was a good idea?
12:58:23 *** ahyangyi has joined #openttd
13:01:00 *** argoneus7 has joined #openttd
13:04:11 *** argoneus7 has joined #openttd
13:06:24 <kuhnovic> I thought I saw a strange drawing glitch. Turns out it was just dirt on my monitor...
13:17:34 <ian01223> that reddit post somehow managed to remind me of a robert burns poem
13:22:20 *** Wormnest has joined #openttd
13:27:18 *** argoneus7 has joined #openttd
13:27:30 *** argoneus7 has joined #openttd
13:30:35 *** argoneus7 has joined #openttd
13:30:55 *** argoneus7 has joined #openttd
13:32:29 *** argoneus7 has joined #openttd
13:40:23 *** argoneus7 has joined #openttd
14:02:30 <talltyler> kuhnovic: I thought my power supply was failing last week, turned out my landlord turned the heat on for the first time in months and that smells exactly like the magic computer smoke.
14:30:51 <kuhnovic> talltyler: That is not a good sign 😛
14:31:17 <kuhnovic> Furnace or electric heating?
14:34:48 <kuhnovic> Reminds me of a car that I borrowed from a friend a couple of times. It had a dual fuel system so you could switch between gasoline and LPG. When you switched fuels you had to drive with the windows down for about 5 minutes to let the gasoline fumes out... Fun times 😛
14:35:24 <peter1138> Sounds... broken. Mine just had a slight difference in power between the two.
14:36:50 <kuhnovic> There must have been something wrong with it, but it was a 35 year old banger so it only got the bare maintenaince.
14:37:48 <talltyler> Furnace, I assume. It’s an old rowhouse. But it smells fine now. 🙂
14:39:11 <kuhnovic> Ah good, then that high power draw must have been temporary. Could even have been dust on the ignition element or something like that.
14:46:31 <talltyler> The smell was isolated above my computer, so I assumed I had identified the source. But my computer is just in the corner of the room, opposite the heating vent.
14:46:31 <talltyler> I realized my mistake an hour later when I was on my laptop googling where to get a new power supply locally, and smelled it again. But not before wondering if I were cursed and had just fried the laptop too. 🤦
14:52:39 *** belajalilija has quit IRC (Read error: Connection reset by peer)
14:52:39 *** mnhebi has quit IRC (Read error: Connection reset by peer)
14:52:39 *** ahyangyi has quit IRC (Write error: connection closed)
14:52:39 *** leadnaut has quit IRC (Write error: connection closed)
14:52:39 *** xarothbrook has quit IRC (Write error: connection closed)
14:52:39 *** messenils has quit IRC (Write error: connection closed)
14:52:39 *** michi_cc[d] has quit IRC (Write error: connection closed)
14:52:39 *** _glx_ has quit IRC (Write error: connection closed)
14:52:39 *** DorpsGek_vi has quit IRC (Write error: connection closed)
14:52:39 *** woobilicious has quit IRC (Read error: Connection reset by peer)
14:52:39 *** telk5093 has quit IRC (Read error: Connection reset by peer)
14:52:39 *** johnfranklin has quit IRC (Read error: Connection reset by peer)
14:52:39 *** ian01223 has quit IRC (Write error: connection closed)
14:52:39 *** xarick has quit IRC (Write error: connection closed)
14:52:39 *** locosage has quit IRC (Write error: connection closed)
14:52:39 *** andythenorth[d] has quit IRC (Write error: connection closed)
14:52:39 *** squirejames has quit IRC (Read error: Connection reset by peer)
14:52:39 *** emperorjake has quit IRC (Read error: Connection reset by peer)
14:52:39 *** tabytac has quit IRC (Read error: Connection reset by peer)
14:52:39 *** banhmarie has quit IRC (Read error: Connection reset by peer)
14:52:39 *** aviationgamerx has quit IRC (Read error: Connection reset by peer)
14:52:39 *** reldred has quit IRC (Write error: connection closed)
14:52:39 *** flote has quit IRC (Write error: connection closed)
14:52:39 *** bigyihsuan has quit IRC (Write error: connection closed)
14:52:39 *** audigex has quit IRC (Write error: connection closed)
14:52:39 *** abboh_132 has quit IRC (Write error: connection closed)
14:52:39 *** talltyler has quit IRC (Write error: connection closed)
14:52:39 *** kuhnovic has quit IRC (Write error: connection closed)
14:52:39 *** truebrain has quit IRC (Write error: connection closed)
14:52:39 *** _pruple has quit IRC (Write error: connection closed)
14:52:39 *** _jgr_ has quit IRC (Write error: connection closed)
14:52:39 *** peter1138 has quit IRC (Write error: connection closed)
14:52:39 *** wensimehrp has quit IRC (Write error: connection closed)
14:52:39 *** brickblock19280 has quit IRC (Remote host closed the connection)
14:52:39 *** jlx0 has quit IRC (Write error: connection closed)
14:52:57 *** DorpsGek_vi has joined #openttd
15:20:13 <_glx_> the smell is quite usual for convection heaters
15:25:28 <xarick> my power supply is 4 years old
15:25:48 <xarick> a graphic cards already exploded
15:25:54 <xarick> i still kept the power supply
15:54:08 <xarick> why don't we check GetFloodingBehaviour(dest) == FLOOD_ACTIVE
15:55:05 <xarick> oh... performance reasons
16:00:06 <xarick> nevermind, i fail at understanding what this is doing
16:02:51 *** kuhnovic has joined #openttd
16:02:51 <kuhnovic> This is how you blow up your graphics card Xarick
16:03:37 *** ian01223 has joined #openttd
16:03:37 <ian01223> surely there's got to be an easier way to blow up a graphics card
16:10:39 <xarick> I'm trying to reinvent the wheel
16:27:03 *** peter1138 has joined #openttd
16:27:03 <peter1138> I have some minor tweaks to make to #13013 though.
16:27:17 *** HerzogDeXtEr has joined #openttd
16:28:37 <LordAro> you can do that yourself
16:33:31 <peter1138> Do you understand what is going on there?
16:33:33 <xarick> there are canals around, they're quite hidden
16:38:58 <_glx_> and a comment in the PR even says "Canal tiles never flood anyway so never get the "not flooding" state"
16:43:43 <xarick> SetNonFloodingWaterTile needs to consider more types than just water
16:44:53 <LordAro> peter1138: because of the big scary red squares your inadequate debugging function produces
16:45:29 <Wolf01> So, it's factorio time?
16:45:46 <xarick> I'm gonna investigate this better 😐
16:45:48 <peter1138> It's about protionality.
16:45:55 <peter1138> AND proportionality.
16:46:16 <peter1138> On 2048x2048 map with 50% water, there are approximately 2,000,000 water tiles.
16:46:32 <peter1138> There are approximately 8000 void tiles.
16:47:42 <peter1138> Proportion wise, the number of tiles that can flood but are not water tiles is tiny.
16:50:43 <mnhebi> Every time I think to myself "I shoulda contributed features I want to OpenTTD" I just remind myself to look in Discord channel #openttd-development these days
16:51:26 <peter1138> What did I do that put you off?
16:52:06 <mnhebi> No no...its just this discussion reminds me how many revisions my code goes through before its actually somewhat semi-working xD
16:57:23 <peter1138> It's C, it can't be solved 😉
16:57:42 <xarick> IsFloodingTypeTile you don't seem to call this
16:58:24 <LordAro> but you should ignore him on principle until HE POSTS IT IN THE RIGHT PLACE
16:58:33 <mnhebi> peter1138: better C than C# and not having a compiler old enough to compile NET 4.0...
16:59:01 <LordAro> mnhebi: mm, global variables
16:59:14 <mnhebi> LordAro: yes, my code is JUICY.
17:02:02 <mnhebi> mostly cause I'm lazy and can't bother to make shit that actually passes values between methods.
17:03:11 <mnhebi> better to just hope Cthulhu doesn't grab a byte randomly and stick a global variable in there than bother to figure out how do I pass this or that between 5 different things that all need it xD
17:03:40 <LordAro> "took me a shit tonne of time to get working anywhere near properly, and theres still a bug in there I haven't been able to solve"
17:04:55 <mnhebi> well, you see the game I made that dll for originally
17:05:00 <mnhebi> doesn't really use MCI_SEEK
17:05:03 <_glx_> if-else coding style doesn't help readability 😉
17:05:11 <xarick> why does it require to save the state on the map array? 😮
17:05:15 <mnhebi> but then I repurposed the dll for another game...that does use it(see the SWGB branch)
17:05:33 <mnhebi> and I opened a can of bugs right there when I started backporting fixes from that branch xD
17:05:37 <xarick> just wondering if it could be on a cache
17:05:49 <_glx_> it's is caching in the map array
17:06:59 <mnhebi> _glx_: I mean, I did use a more elaborate method at one point..
17:07:23 <mnhebi> but if-else is easier to debug
17:07:57 <_glx_> this is asking for troubles 🙂
17:08:23 <mnhebi> well without that the game just freezes, actually. :)
17:08:39 <_glx_> I mean, at least add some {}
17:09:06 <mnhebi> Well I did use to but I just find it easier to read it like that.
17:11:07 <mnhebi> but yeah I did use to use switch statements instead of if else.
17:13:10 <mnhebi> I also had some while loops but sometimes bugs broke them so I just resorted to cruder code :d
17:13:36 <peter1138> At least use indentation.
17:14:12 <mnhebi> if I didn't you'd be clawing your eyes out tho.
17:14:48 <xarick> m6 bit 7 seems to be a good alternative if I want to add more tile types
17:14:57 <mnhebi> I just like whatever happens after an else to be on the same level as the else :p
17:15:28 <mnhebi> unless its {] in which case it gets indented. :P
17:17:25 <peter1138> That is a very strange coding style.
17:17:46 <LordAro> i take back my ':(' from earlier
17:19:34 <mnhebi> but yeah, a reason I can't figure out a fix for a bug is...cause I can't figure out an alternative to sscanf. You see my code catches ``status cdaudio position`` and `` "status cdaudio position track %d"`` as the same command.
17:20:09 <mnhebi> cause sscanf cant differentiate since it just has the right keywords at the start there.
17:20:16 <LordAro> try the longer one first?
17:20:23 <peter1138> Ah, thanks for blocking it.
17:20:31 <mnhebi> then it just goes with the longer one
17:20:33 <peter1138> Yeah, that function seems spurious.
17:20:34 <mnhebi> instead of the shorter one
17:20:48 <LordAro> mnhebi: how would it do that?
17:21:06 <LordAro> if it matches "... track", then it can't be the "...position" command
17:21:26 <mnhebi> don't ask me, I tried switching them around and after that every call was answered with the longer command even when the game sent for the shorter one
17:21:41 <LordAro> probably getting your if/elses wrong ;)
17:21:45 <peter1138> `if (IsFloodingTypeTile(tile) && !IsNonFloodingWaterTile(tile)) {`
17:22:13 <mnhebi> well you see shorter one just uses strstr...while longer one uses sccanf.
17:22:16 <peter1138> JGRPP has that, I don't have that code because we don't have a separate auxiliary tile loop.
17:23:00 <peter1138> Something to do with daylength.
17:23:16 <mnhebi> and yes, I did try a switch tree instead of doing a bunch of ifs :p
17:23:29 <mnhebi> results were not..good.
17:24:34 <xarick> if is FloodingTypeTile is probably to help against using IsTileType(tile, type) all the time
17:25:17 <mnhebi> you see both strstr and sscanf just care they hit the first possible result, instead of the complete one.
17:25:23 <peter1138> No, it's a detail that's only relevant to JGRPP.
17:25:29 <mnhebi> and its quite the hurdle to break that down so it actually catches the complete string.
17:32:15 <mnhebi> cause "status cdaudio position" contains the keywords it is looking for sscanf doesn't care its missing "track %d" at the end. And every workaround I read for it made the code a salad. There was even one with strncpy.
17:33:26 <xarick> i think there's a bug, not sure if I caused it, let me retry with your changes only
17:35:37 <LordAro> i really don't understand the issue - `if (sscanf(buffer, "status cdaudio position track %d", &track_no) == 1) { ... } else if (strcmp(buffer, "status cdaudio position") == 0) { ... }` should work fine
17:35:59 <mnhebi> yeah its been tried with an else if :D
17:36:47 <LordAro> then the code is not running what you're writing
17:36:52 <xarick> yep, peter1138 I magic bulldozed industries, they weren't flooded
17:37:05 <mnhebi> yeah I figure I should just make my own stuff to read the strings..
17:37:25 <mnhebi> cause none of the standard C ones actually care for the complete string, just that it contains the keywords.
17:37:38 <xarick> that's with your PR unchanged
17:37:45 <mnhebi> and it takes a whole load of chopping the string to make it parse the whole string :D
17:38:23 <LordAro> oh, there's a return, guess it doesn't need to be an else if
17:38:48 <mnhebi> theres a return cause it potentially freezes without it xD
17:39:11 <LordAro> there's a return case because you've clearly got no idea what you're doing, but that's a valid way of shortcutting regardless
17:39:12 <_glx_> yeah always check for long string first
17:39:57 <mnhebi> yeah then it just catches the long string always and you get a program that has unexpected input that goes ??? and promptly freezes :)
17:40:25 <_glx_> no if it's the short string it won't match the longer version
17:41:22 <LordAro> think about it - (in pseudocode) given the string "abc", and do `if (str == "ab") { echo "foo"; return; } if (str == "abc") { echo "bar"; return; }` - how can it ever match the second if ?
17:44:04 <LordAro> on the other hand, strstr is searching within a string, not actually matching an entire string
17:44:08 <LordAro> you want strcmp for that
17:44:40 <mnhebi> yeah...I did try strcmp at one point
17:45:53 <LordAro> trying things without adequately understanding what's going on is a recipe for ...not understanding the results
17:46:16 <mnhebi> well you see, when I use strcmp
17:46:19 <_glx_> I think it would be simpler to spilt the string into an array, then you can check by item
17:46:35 <LordAro> like i say, not adequately understanding what's going on
17:46:55 <LordAro> maybe strcmp isn't appropriate and it's not matching anything
17:47:03 <LordAro> maybe that's why the sscanf isn't working either
17:47:19 <LordAro> not matching anything because the full string contains other data*
17:48:25 <LordAro> it doesn't behave different just because it's a plugin to some other program
17:48:44 <LordAro> but i can tell you now that one thing strcmp does not do is "freeze"
17:48:53 <LordAro> under zero circumstances does that happen
17:49:23 <mnhebi> well in this case, it somehow caught the command...out of order
17:49:28 <LordAro> (ok, fine, maybe if the string is completely unbounded)
17:49:32 <mnhebi> which resulted in sending the program data it did not expect
17:49:38 <LordAro> (which is why you should be using strncmp)
17:51:29 <peter1138> xarick: This doesn't show anything useful, I don't know what your layout was before you did it.
17:51:29 <_glx_> hmm if I tweak input string I get Matched track 0 even for just "status"
17:51:40 *** andythenorth has joined #openttd
17:52:06 <LordAro> _glx_: ...have i thoroughly misunderstood sscanf's exit code?
17:52:40 <xarick> i started a new game, asked for 10000 moneys, then leveled everything around the industries to sea level, waited for all tiles to be watered, then i enabled magic bulldozer and demolished the industries there
17:52:59 <xarick> and that's what it became...
17:53:19 <LordAro> mnhebi: another thing to think about is that *only* 0 is falsy. -1 is also truthy
17:53:58 <LordAro> sscanf returns -1 "on input failure" (it calls it EOF)
17:55:42 <_glx_> yup with `> 0` it works
17:55:50 <mnhebi> also, that section of code is mostly unchanged from the original, I just added new strings to read
17:57:03 <LordAro> looking for *exact* return values
17:58:04 <LordAro> even > 0 is kinda dubious :p
18:00:20 <LordAro> there are no if statements there
18:00:39 <LordAro> and they're clearly counting the number of parameter matches
18:01:33 <LordAro> (sorry, i'm being a bit harsh here - some C stdlib functions are extremely unclear about the meaning of their return values)
18:02:45 <andythenorth> pff GPT failed me
18:03:54 <mnhebi> and I've had much more experienced coders help me with this and none of them noticed my foobar with the sscanf there :P
18:04:22 <mnhebi> man my head hurts looking at that tutorialspoint version. It just goes full cthulhu rllyeh there.
18:05:05 <LordAro> copilot completely fails to find the issue with your code, just for reference :p
18:05:50 <mnhebi> see, this is why I don't write cpp.
18:06:29 <andythenorth> pff, I need 3 tokens (dict keys) for lists of covered hopper classes. (1) food grade covered hoppers (2) non-food-grade covered hoppers (3) "don't care" covered hoppers (food-grade, but can be used for any cargo, assume they're cleaned). No idea what to call these keys
18:06:58 <andythenorth> "covered_hopper_freight" is what old Horse uses, because all the food / non-food is on labels, not classes
18:07:00 <mnhebi> but suppose tomorrow ill replace all that strstr with strcmp...that actually works
18:07:10 <mnhebi> and sscanf with proper usage xD
18:07:12 <LordAro> mnhebi: we all started somewhere :)
18:07:41 <mnhebi> Started? Nah man I just went into it full sprint from standing still and wonder why my knees hurt.
18:07:56 <LordAro> mnhebi: we all usually did that too :D
18:08:29 <LordAro> (but the suggested code would also work)
18:08:36 <andythenorth> "covered_hoppers_food_grade_but_can_be_cleaned_so_refit_any_class"
18:09:12 <mnhebi> well, my code also worked...until I started fixing a bug :P
18:09:27 <mnhebi> at which point it promptly went back to not working again ahaha.
18:10:08 <mnhebi> oh well lets hope I remember all this once I come back from work tomorrow x_X
18:11:10 <mnhebi> its always so illuminating tho when someone looks at my code and goes "why you use it that way, its wrong".
18:11:21 <mnhebi> and im like "well, it compiles and works?"
18:12:47 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
18:18:08 <LordAro> that's fine as long as you never need to modify it again
18:18:12 <LordAro> which is rarely the case :)
18:18:38 <LordAro> most code is read far more often than it is written
18:19:03 <LordAro> optimising for readability (and so maintainability) is usually more important than anything else
18:20:30 <LordAro> 10 minutes before it finishes downloading
18:24:45 <mnhebi> Did you know there is a combinator mod that allows you to write assembly code instructions for combinators?
18:25:24 <mnhebi> You can actually make self replicating factories with it ;)
18:25:48 <LordAro> this doesn't surprise me in the slightest
18:26:15 <LordAro> i don't generally get on very well with those sort of "toy assembly" type games
18:26:18 <LordAro> too much like work ;)
18:35:57 <peter1138> Okay, I see what I've done wrong.
18:50:48 *** Wormnest has joined #openttd
18:54:43 <xarick> they're supposed to be there?
19:13:23 <peter1138> Yeah, thanks for finding my bugs.
19:45:11 <andythenorth> hmm slow Horse compile is slow
19:48:11 <xarick> that part about trees on the coast... confusing me
19:50:42 <andythenorth> pff, should I drop label support from Horse, where FIRS will provide new classes?
19:50:48 <andythenorth> might be quite aggressive 😛
19:52:07 <xarick> why are trees influencing whether a tile is marked nonflooding
19:54:18 <xarick> white = nonflooding tile, red = flooding tile, if I understood this
19:57:32 <peter1138> xarick: Coastal tiles are MP_WATER, unless they have trees on them in which case they are MP_TREE.
19:59:10 <peter1138> Clearing trees on a coast will convert the tile to a clear tile instead of a water tile.
19:59:32 <peter1138> (water tile in coast with trees mode)
20:00:08 <peter1138> And yes, I also thought I was being clever by catching that situation.
20:00:25 <peter1138> But it turns out that it is deliberately left flooding.
20:00:48 <peter1138> It is still a massive improvement over *every* water tile still flooding.
20:06:26 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:08:44 <xarick> wish I could decipher if (!HasBit(_flood_from_dirs[slope_dest & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP], ReverseDir(dir))) continue;
20:12:07 <_glx_> what's hard to read there ?
20:14:56 <xarick> let me try `Slope whatever_slope_this_is = slope_dest & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP;`
20:18:21 <xarick> ah, there's a table at the start of the file
20:23:07 <andythenorth> _slightly serious idea_ what if nml could have plugins?
20:46:18 <xarick> I'm not sure what to think anymore, this is slightly overwhelming
20:46:40 <peter1138> You are misinterpreting the intention of the change.
20:46:56 <andythenorth> nml plugins provide, e.g. ready-made groupings of cargo classes
20:47:09 <andythenorth> maybe a few other things
20:47:23 <andythenorth> basically limited to constant expansion
20:48:03 <LordAro> i'd be tempted to say that that's the sort of thing nml should provide
20:48:51 <andythenorth> a few of the previous attempts are a bit weird
20:48:56 <andythenorth> like the railtype 'fallback' thing
20:49:40 <andythenorth> someone, maybe me, can't remember, did modfify nml to load extra constants from json
20:49:49 <andythenorth> probably more likely someone who could actually program, not me
20:50:13 <peter1138> Is packed struct notation legal these days?
20:50:44 <peter1138> OpenTTD isn't written in Python.
20:50:51 <andythenorth> "we could change that"
20:51:05 <LordAro> in which case "depends what you mean"
20:51:05 <andythenorth> RustyTTD perhaps though?
20:52:11 <peter1138> Ah, they're call bit-fields.
20:55:22 <peter1138> Hmm, although a reference or pointer to them does not seem likely 🙂
20:56:38 <_jgr_> I thought you were talking about attribute packed at first
20:56:51 <kuhnovic> PeterNviaGitHub: I vaguely remember iterating because going the direct route would print the traversability bits backwards
21:04:48 <peter1138> To be honest I was expecting to have to reverse it, but, uh, that showed it the wrong way.
21:05:21 <peter1138> The rotation of the region data is a bit weird. I think.
21:10:15 <peter1138> > line = fmt::format("{:{}}", label_str, max_element_width) + " " + line;
21:10:27 <peter1138> Ah no, just that confused me, by prepending instead of appending.
21:13:01 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:13:32 <peter1138> If it wasn't preprending like that the string would be the wrong way around indeed.
21:15:31 <xarick> it's starting to make sense
21:19:20 <_glx_> andythenorth: you can declare extra constants in your nml file
21:20:58 <xarick> hmm so, industries and rail with one corner raised need to be taken into account
21:21:15 <xarick> buys and docks are already fixed
21:21:28 <xarick> trees need to swap position with the bool
21:22:08 <xarick> and i guess the red is ... normal, unless there's a white adjacent to it
21:32:40 <peter1138> The industry parts of oilrigs do flood, but there generally aren't enough oilrigs around to go to the effort of disabling their flooding.
21:33:38 <_glx_> the idea is just to remove as much as possible flooding tiles, and the biggest amount is plain water
21:35:21 <_glx_> industries and "watered" rails don't cost much compared to water itself
21:35:50 <peter1138> I'm sure he can come up with a contrived savegame where 75% of the map is oilrigs 🙂
21:36:32 <xarick> and I didn't exactly force them to spawn
21:36:33 <_glx_> in "normal" condition you always have more water than oilrigs
21:39:29 <xarick> actually, screw the railway... the tiles still stay red for some reason 😦
21:40:34 <xarick> they flood from a certain direction
21:44:02 <xarick> `if (IsTileType(dest, MP_RAILWAY) && GetRailGroundType(dest) == RAIL_GROUND_WATER && !HasBit(_flood_from_dirs[slope_dest], reverse_dir)) continue;` this works, but can_flood = true; must be after
21:51:49 *** tokai|noir has joined #openttd
21:51:49 *** ChanServ sets mode: +v tokai|noir
21:53:51 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:58:48 *** tokai has quit IRC (Ping timeout: 480 seconds)
22:18:40 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
continue to next day ⏵