IRC logs for #openttd on OFTC at 2023-02-03
            
00:02:43 <reldred> Game scripts in nfo
00:02:45 <reldred> Disgusting
00:02:48 <reldred> Let’s do it
00:17:05 <petern> graphics in gs
00:55:30 <reldred> gamescript can provide custom objects
00:55:35 <reldred> embed grf in gs
02:58:01 <Eddi|zuHause> embed GS in GRF
02:58:28 <Eddi|zuHause> i mean, we can embed sound in GRF and stuff
03:22:28 *** Wormnest has quit IRC (Quit: Leaving)
03:45:29 *** D-HUND has joined #openttd
03:48:56 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:57:16 *** bryjen has quit IRC (Quit: Leaving)
04:24:36 *** keikoz has joined #openttd
04:36:43 *** Flygon has joined #openttd
06:06:13 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:41:02 *** HerzogDeXtEr has joined #openttd
07:00:23 <andythenorth[d]> https://arstechnica.com/gaming/2023/02/after-16-years-of-freeware-dwarf-fortress-creators-get-their-7m-payday/
07:13:31 *** sla_ro|master has joined #openttd
07:35:54 *** gelignite has joined #openttd
07:46:28 *** MarkoMarko has joined #openttd
07:46:28 <MarkoMarko> Hello. Is it possible to get cp->p1 in ReceiveCommand, as it was in version 12. This is how I used to get the initial tile, but now in version 13 this has been replaced with cp->data. Is it possible to get a tile from this?
07:48:15 <petern> andythenorth[d]: Top-down baseset?
07:52:01 <petern> MarkoMarko: No, there is no p1 anymore.
07:53:20 <MarkoMarko> petern: It is possible to somehow get and change the initial tile on the server side?
07:55:04 <LordAro> much the same way you would've before, just all the parameters are "properly named" now, rather than being bitpacked together
07:55:58 <LordAro> without knowing what you're doing it's difficult to say. but a look at the existing commands should tell you what's available
07:57:45 <petern> This sort of thing could be a job for andy's GS regions/areas when he writes it... πŸ˜‰
07:59:22 <MarkoMarko> I received x and y from cp->1. Now there is no cp->1, and I have not found a way to get the tile from cp->data.
08:02:00 <petern> There is cp->tile though, outside of cp->data.
08:02:08 <petern> (Not sure why)
08:02:45 <LordAro> because tile was special before, so it's special after
08:03:35 <LordAro> i think you're operating in the wrong place though. without knowing what command it is, there's no guarantee that it even contains a tileindex
08:04:04 <MarkoMarko> This is the end tile, and I need the starting tile, which I used to replace if the player didn't have the right to build.
08:04:24 <LordAro> you shouldn't be trying to alter the raw command objects
08:05:01 <petern> Ah okay. Yeah "intercept" at the command level, where it's already decoded.
08:05:21 <MarkoMarko> Thanks, I will look for other options.
08:05:49 <dP> petern: at that level command is already distributed to the clients so can't be modified
08:06:49 <dP> LordAro: so, what's your solution to preventing players to build in certain areas?
08:06:59 <dP> implement regions that noone bothered to do for a decade?
08:07:25 <petern> Regions is only andy's thing πŸ™‚
08:07:54 <andythenorth[d]> petern: do I need to patch OpenTTD?
08:07:58 <LordAro> well the proper way to do it would not be faking it on the server :p
08:07:58 <andythenorth[d]> this will be lolz?
08:08:40 <dP> proper way doesn't exist, not even as a concept
08:08:40 <LordAro> i suppose you should be able to insert some sort of "intercept" decoding on the serverside
08:08:52 <petern> PlanetX keep sending me emails with offers of half-price bikes, which tells me they are normally at least 2x overpriced...
08:11:55 <andythenorth[d]> such bikes
08:12:00 <andythenorth[d]> I rode a bike yesterday
08:12:58 <andythenorth[d]> how do I measure elevation in google maps?
08:13:04 <andythenorth[d]> I can probably google that eh
08:14:15 <petern> bing maps are useful sometimes.
08:14:44 <petern> They have an Ordnance Survey map mode, which has elevation, though you probably have to count it yourself.
08:15:14 <petern> Cycle route planners will give elevation too but probably too much faff.
08:15:16 <andythenorth[d]> hmm is 1:4 steep?
08:15:21 <petern> Fairly
08:17:09 <petern> 1:10 is steep around here.
08:18:56 <LordAro> 1:4 is basically as steep as it gets
08:20:57 <petern> Rosedale Chimney?
08:21:02 <LordAro> 1:3
08:21:18 <LordAro> i said basically :p
08:21:27 <petern> Have you done it?
08:21:38 <LordAro> round here 25% is common, 33% is rare
08:21:41 <LordAro> i have
08:21:46 <LordAro> 3 times
08:21:50 <LordAro> it hurts
08:21:51 <petern> Oof
08:24:11 <petern> I think I've been there when I was much younger, and wasn't on bike.
08:26:26 <petern> Oh no, Bamford Clough, average 21%, max 36.5%
08:26:37 <petern> But yes,. "fairly steep"
08:28:48 <LordAro> i've heard of this one
09:07:36 <andythenorth[d]> but if my electric bike puts in a maximum torque assist of 400%
09:07:40 <andythenorth[d]> is a 1:4 just 1:1?
09:08:18 <andythenorth[d]> no that would be 45 degrees πŸ˜›
09:08:20 <andythenorth[d]> 1:16?
09:12:19 <dwfreed> probably would feel like it, yeah, until your ebike battery dies :D
09:13:14 <andythenorth[d]> solar ebike anyway?
09:13:17 <andythenorth[d]> windmill on it?
09:13:50 <andythenorth[d]> steam powered?
09:14:34 <petern> Of course, the effort of getting an ebike up a hill might be 200% more than a normal bike πŸ˜‰
09:14:48 <andythenorth[d]> wait it's only about 70 KG or something πŸ˜›
09:14:50 <dwfreed> right, increased weight
09:14:57 * andythenorth[d] wonders how much it weighs
09:15:42 <dwfreed> typical mountain bike is probably about 13.5 kg
09:16:03 <andythenorth[d]> my urban hybrid aluminium frame bike is 12 kg with pannier rack etc
09:16:08 <andythenorth[d]> it's horrific to ride but eh
09:16:15 <dwfreed> heh
09:16:17 <andythenorth[d]> the ebike is about 25 kg
09:16:26 <dwfreed> so petern was about right :D
09:16:50 <petern> When you add the weight of the rider, it's not that much.
09:16:57 <andythenorth[d]> the ebike is like riding a sofa, the urban hybrid is like riding a kitchen knife
09:17:29 <LordAro> sounds like you should get a new saddle
09:18:00 <andythenorth[d]> it's skinny tyres and really really deep rims
09:18:05 <andythenorth[d]> and high pressures
09:18:18 <LordAro> ...on an urban hybrid?
09:18:20 <andythenorth[d]> yes
09:18:29 <andythenorth[d]> not racer thin, but thin
09:19:53 <andythenorth[d]> https://ep1.pinkbike.org/p4pb10317139/p4pb10317139.jpg
09:20:02 <andythenorth[d]> supposed to run at about 60 PSI
09:20:15 <andythenorth[d]> forks are straight, zero flex, frame is so rigid
09:20:36 <andythenorth[d]> fastest trad bike I ever rode, faster than my friends touring racer
09:20:57 <andythenorth[d]> but you can feel it if you ride over a crisp packet
09:20:59 <LordAro> ah, your definition of "really really deep rims" differs from mine :p
09:21:16 <andythenorth[d]> yeah, context πŸ˜›
09:21:32 <Merni> andythenorth[d]: Meanwhile I just take the bus :p
09:21:39 <andythenorth[d]> the ebike has front suspension, and big fat tyres and can just be ridden through potholes
09:31:11 <petern> That saddle is set to impale-the-groin position though.
09:31:37 <LordAro> mm, is a bit pointed
09:32:30 <petern> My MTB is 27.5+ (of course it's the obsolete standard...) so it's pretty comfy.
09:54:24 <andythenorth[d]> it's not actually my bike, but identical
09:54:37 <petern> Ah
09:54:38 <andythenorth[d]> and yeah the saddle fitted tends to a backwards position
09:54:50 <andythenorth[d]> I adjusted mine, but it has limited rotation
09:55:07 <andythenorth[d]> I mostly ride standing up though, it's traffic in town
10:04:34 <andythenorth[d]> ok so areas
10:04:45 <andythenorth[d]> is it just a maths thing and a memory thing?
10:05:10 <andythenorth[d]> we need to be able to add / remove tiles from areas using primitive shapes, fast
10:05:48 <andythenorth[d]> and we probably need to not copy the whole map into memory n times, where a GS might make hundreds of different area definitions
10:05:53 <andythenorth[d]> ??
10:15:02 *** Samu has joined #openttd
10:30:46 <DorpsGek> [OpenTTD/OpenTTD] Quast65 commented on discussion #10002: Meetup 2022 / 2023 / 10k event https://github.com/OpenTTD/OpenTTD/discussions/10002
10:32:00 <LordAro> from __future__ import its_your_kids_marty
10:34:00 <Samu> hmm I don't recall seeing SQInteger used in the API
10:34:28 <Samu> why not int64 if you're going that way?
10:34:56 <LordAro> Samu: same reason you use SubsidyID instead of uint32 or whatever it is
10:35:25 <LordAro> as far as the resulting code is the same, it's identical, but they mean different things semantically
10:37:47 <Samu> that was not SubsidyID, it was SourceID, it was already being the return type for valid subsidies
10:38:29 <LordAro> whatever
10:38:37 <LordAro> typedefs in general
10:42:28 <Samu> feels like an oddity
10:45:22 <Samu> ScriptLog::Warning is a bit too intrusive, better just tell a clamping may happen in the description, rather than outputing some text.
10:46:23 <LordAro> Samu: In. The. Pull. Request.
10:46:41 <Samu> okk
10:46:57 <LordAro> (also i agree)
10:49:08 <petern> Maybe smaller more local events πŸ™‚
10:49:42 <petern> But that would basically be a me & LordAro cycling event :p
10:49:54 <LordAro> someone needs to take executive action and decide on a time & place
10:50:03 <LordAro> petern: i wouldn't be opposed
10:50:09 <dwfreed> LordAro: sounds like you're volunteering
10:50:12 * dwfreed ducks
10:50:18 * LordAro gooses
10:52:00 <Samu> wow i'm doing a review, I feel special lolol
10:56:25 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #10443: Fix: [Script] ScriptBase::Rand() return value was between -MIN(int32) and MAX(int32) https://github.com/OpenTTD/OpenTTD/pull/10443#pullrequestreview-1282764204
10:59:51 <Samu> I considered changing the Rand functions to return int64 before, I just didn't go with it on my PR, because...
11:00:42 <Samu> ... i thought having a int64 when the max value was MAX_UINT32, was gonna look strage
11:00:54 <Samu> in the function description
11:01:21 <Samu> but i'm speaking against myself too, when then changed the return type of other functions
11:01:29 <Samu> in the same PR
12:02:00 <dP> new `font` command is even more confusing than a config
12:02:10 <dP> I've gave up on understanding wth is it doing
12:03:02 <dP> why does changing one font reset all the others?
12:04:58 <dP> https://cdn.discordapp.com/attachments/1008473233844097104/1071038586713022485/Screenshot_from_2023-02-03_16-04-30.png
12:04:58 <dP> why does it have 2 different configurations for each font?
12:06:32 <LordAro> it's not great
12:06:41 <LordAro> one font resetting the others seems like a bug
12:07:32 <petern> Changing one font does not reset all the others.
12:07:53 <petern> Inside the square brackets is the configured settings, and before that is the active settings.
12:09:00 <dP> https://cdn.discordapp.com/attachments/1008473233844097104/1071039600027517039/Screenshot_from_2023-02-03_16-08-01.png
12:09:00 <dP> https://cdn.discordapp.com/attachments/1008473233844097104/1071039600388214804/Screenshot_from_2023-02-03_16-08-28.png
12:09:12 <dP> I changed small font to the same size but it changed the normal one
12:09:35 <petern> You changed "medium"
12:09:42 <petern> Oh
12:10:00 <petern> Didn't read the console text πŸ™‚
12:10:32 <dP> it seems to be changing all fonts every time and losing "Condensed Bold" for everything but current
12:10:51 <petern> Linux or Windows?
12:10:54 <dP> linux
12:16:36 <petern> I don't think this is an issue with the "font" command itself, it's more likely an issue with how freetype/fontconfig are used, and the ability to change fonts while the game is running makes it more visible.
12:19:00 <dP> well, it's some issue somewhere xD
12:19:20 <dP> if I just change size it makes the font I changed bold but all others not bold
12:19:54 <dP> also ui size scaling fonts is anoying :p
12:20:44 <dP> btw, is 3x size not scaling sprites by design?
12:20:52 <dP> only 2x and 4x seem to scale
12:23:16 <petern> Because our sprite scaler only does powers of 2.
12:26:34 <dP> lol, changing interface size changes map zoom
12:27:03 <petern> You're the first person to complain about that.
12:27:44 * andythenorth[d] reading https://happycoding.io/tutorials/processing/collision-detection#circle-circle-collision
12:27:45 <petern> Though I think it's probably a bug -- it's intentional if the interface scale changes automatically due to (e.g.) Windows DPI changing.
12:28:28 <osswix> Fonts is my big problem with ottd Linux
12:28:30 <petern> That also changes the small viewports not just the main viewport.
12:28:54 <osswix> Std font does not Japanese and Japanese fonts don't contain one polish letter so they can't be used.
12:29:05 <osswix> Because polish letter used in English name for currency.
12:29:25 <petern> That's not really a Linux problem.
12:29:31 <petern> That's our fallback system being stupid.
12:32:08 <osswix> Yeah, absurdly annoying
12:32:30 <osswix> Why is it that we decide one foreign non standard letter for one currency once?
12:35:18 <dP> somehow making openttd look good is even harder now :p
12:35:30 <dP> though I guess I never tried on 2560 width beffore
12:37:44 <dP> I kinda want the opposite of what fractional scaling does now. More sprite size but smaller margins.
12:40:14 <dP> oh, God, checking hardware acceleration changes the scaling...
12:43:08 <dP> though I guess I should switch to proprietary driver before testing these things
13:07:37 *** gelignite has quit IRC (Quit: Stay safe!)
13:18:40 <dP> is the game doing some auto-scaling even if it's disabled in options?
13:18:59 <dP> it starts on one scale but then switches to another if I go fullscreen
13:19:09 <dP> but keeps it if I go back to windowed
13:20:32 *** keikoz has joined #openttd
13:22:35 <petern> dP: That should definitely not happen.
13:23:52 <petern> I do have a patch for fractional sprite scaling, it's not as bad as I thought, but still sucks for fonts.
13:23:56 <petern> (Sprite fonts)
13:24:18 <Pruple> remove sprite fonts, clearly
13:25:11 <dP> petern: looks like ubuntu fractional scaling is doing some weird shit
13:25:40 <andythenorth[d]> Pruple: unsubscribe
13:25:42 <petern> I've seen that on Windows, but only if I load a particular **font** which is very weird.
13:34:04 <dP> seemingly fractional scaling increases the virtual screen size and then somehow scales it back to the actual screen
13:34:38 <dP> but some combinations of hardware accel and full screen forces it to use the actual size, so visible scale changes
13:35:45 <dP> scaling with `gnome-tweaks` doesn't seem to have this issue
13:40:09 <dP> 0.89x wentbourne though... I expected more from Intel :p
13:52:18 *** Etua has joined #openttd
13:52:54 *** Etua has quit IRC ()
14:08:44 <petern> The game's scaling is not exposed to the OS at all, so that fractional scaling you see will be there even when OpenTTD is at 100%.
14:56:33 *** nielsm has joined #openttd
15:03:33 <glx[d]> Main issue is the missing glyphs check and fallback mechanism
15:04:11 <glx[d]> Fallback always sets all sizes
15:05:34 *** gelignite has joined #openttd
15:23:38 <petern> Ah, that'll do it.
15:55:47 <supermop_toil> got tickets to go regress to my youth next week
16:03:06 <Samu> issue 10156, im so tempted to reverse the recent changes ;/
16:14:54 <petern> So the music jukebox is accessible from the settings page, but... you can change playlist or track πŸ™‚
16:14:55 <petern> ...
16:14:58 <petern> You CAN'T...
16:17:03 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
16:21:43 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
16:46:28 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10443: Fix: [Script] ScriptBase::Rand() return value was between -MIN(int32) and MAX(int32) https://github.com/OpenTTD/OpenTTD/pull/10443#pullrequestreview-1283310615
16:48:47 <petern> Music sounds okay with a JV-1080, although it glitches a bit on the first notes of a song.
16:57:47 <petern> Oh I'm using the wrong driver I think.
17:01:45 <petern> OpenMSX are a bit meh
17:10:18 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
17:10:52 <Samu> https://github.com/OpenTTD/OpenTTD/issues/10059 im looking into this
17:11:08 <Samu> it's not normally possible to set a negative value
17:11:49 <Samu> or is it?
17:11:58 <nielsm> peter1138: I'd assume it would, as long as it can run in some GM/GS compatible mode. but yeah there are some things with the start of songs where the traditional serial MIDI transmission speed actually becomes a problem
17:12:39 <Samu> ah, it is
17:12:55 <nielsm> if there's a lot of setting up channel controllers etc
17:14:21 <petern> it was using dmusic, the win32 driver works a lot better (not perfect though)
17:17:52 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
17:19:48 <andythenorth[d]> is cat?
17:20:05 <andythenorth[d]> hmm can draw cat in regions?
17:20:21 <petern> You cannot contain cat.
17:21:22 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1071118212609093743/how-to-draw-a-cat-easy-step-by-step-instruction-puzzle-games.png
17:21:29 <andythenorth[d]> mostly circles...
17:21:59 <andythenorth[d]> oh FML we I remember in 2001, we used to make fancy curves in CGI by negative-boolean of circles
17:22:08 <andythenorth[d]> if you know how to do tangents...it works
17:22:17 <andythenorth[d]> can't remember how to do it though
17:22:48 <andythenorth[d]> the curves of the ears can be fitted to two specific circles
17:23:29 <andythenorth[d]> also Bryce 3D was never the strongest modeller, being design to make canyons πŸ˜› https://en.wikipedia.org/wiki/Bryce_(software)
17:23:34 <DorpsGek> [OpenTTD/OpenTTD] James103 commented on pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322#issuecomment-1416174473
17:25:03 *** Wormnest has joined #openttd
17:37:06 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322#issuecomment-1416189724
17:47:44 <glx[d]> ok generating the doc even via wsl is a pain because CRLF
17:53:26 *** Wolf01 has joined #openttd
18:00:22 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #10443: Fix: [Script] ScriptBase::Rand() return value was between -MIN(int32) and MAX(int32) https://github.com/OpenTTD/OpenTTD/pull/10443
18:03:56 <Samu> speaking of clamping
18:04:38 <Samu> issue #10059 may need some
18:19:16 <glx[d]> oups I should have tested before push
18:26:01 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
18:26:10 <Samu> btw, the clamp
18:26:24 <Samu> the function itself takes an int
18:26:25 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
18:27:15 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #10443: Fix: [Script] ScriptBase::Rand() return value was between -MIN(int32) and MAX(int32) https://github.com/OpenTTD/OpenTTD/pull/10443
18:27:17 <Samu> you give it a int64, but it is transformed to int
18:28:24 <glx[d]> the issue was UINT32_MAX converted to int (== -1)
18:28:40 <glx[d]> so Clamp(v, 0 -1)
18:28:48 <glx[d]> assertion failure
18:29:23 <Samu> Clamp(max, 0, UINT32_MAX);, it will transform max from SQInteger to int
18:29:45 <Samu> a big value might become negative, then it clamps to 0
18:30:14 <glx[d]> yeah it was wrong, but detected by the assert and regression
18:30:37 <glx[d]> now using Clamp<SQInteger>() instead
18:31:39 <Samu> ah, :) thx for fixing
18:32:05 <petern> Ah, Hocus Pocus with a GM synth...
18:33:46 <glx[d]> TallTyler: thanks for overloading the Actions πŸ˜‰
18:36:45 <Samu> my idea to fix #10059 is changis this https://github.com/OpenTTD/OpenTTD/blob/master/src/script/script_info.cpp#L146-L150
18:37:07 <Samu> change res to ClampToI32(res)
18:37:39 <Samu> sq_getinteger actually gets the number correctly
18:39:03 <Samu> it's just the config.min_value, config.max_value etc... that turn it into int
18:39:20 <TallTyler> Oof, I know
18:40:14 <Samu> another possibility is to actually change the type for min_value, max_value,... to int64? but im not sure how these values are then saved in the save code
18:41:16 <glx[d]> it stored as string
18:45:01 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/b364b417686f6631c4031404a10d53d086affe41
18:45:02 <DorpsGek> - Update: Translations from eints (by translators)
18:47:13 <glx[d]> using SQInteger might work, but many things will need to be updated, not only ScriptConfigItem
18:49:43 <DorpsGek> [OpenTTD/team] Boltyansky opened issue #390: [he_IL] Translator access request https://github.com/OpenTTD/team/issues/390
18:56:07 <Samu> random deviation should never be a negative value
18:56:17 <Samu> let me try what happens
18:57:21 <glx[d]> anyway as script settings are to be used by scripts it makes sense to make them SQInteger
19:10:49 <andythenorth[d]> goes it approve? πŸ˜› https://github.com/OpenTTD/OpenTTD/pull/10381
19:12:08 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #10381: Change: allow GS to mutate vehicle orders (previously AI-only) https://github.com/OpenTTD/OpenTTD/pull/10381#pullrequestreview-1283574096
19:13:11 <TallTyler> Does the changelog not need to be updated?
19:13:57 <LordAro> probably
19:14:22 <DorpsGek> [OpenTTD/OpenTTD] LordAro requested changes for pull request #10381: Change: allow GS to mutate vehicle orders (previously AI-only) https://github.com/OpenTTD/OpenTTD/pull/10381#pullrequestreview-1283576572
19:14:25 <LordAro> :p
19:14:28 <dP> does it require gs to use company mode to change orders?
19:17:47 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10381: Change: allow GS to mutate vehicle orders (previously AI-only) https://github.com/OpenTTD/OpenTTD/pull/10381#issuecomment-1416296713
19:18:45 <andythenorth[d]> nice digging πŸ™‚
19:19:02 <TallTyler> Maybe, I linked the two needed commits in my GH comment
19:20:42 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
19:21:58 <andythenorth[d]> samu is more thorough than me πŸ™‚
19:22:07 <andythenorth[d]> should I close my PR?
19:23:22 <LordAro> nah
19:23:54 <TallTyler> Question: If I change a string, for example from days to seconds, is it best to rename the string entirely so that until the translation is updated, it will use the english string? Or can I leave it for eints to handle?
19:24:16 <TallTyler> (The translation would be wrong, but with the same number of DParams so it would not be invalid)
19:24:29 <andythenorth[d]> I want to write some GS, but it's soo naptime πŸ˜›
19:24:45 <andythenorth[d]> worked past 10pm 2 nights in a row
19:24:53 <TallTyler> This question goes for `+100 -93` in english.txt 😬
19:31:27 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10386: Fix: Some Script::IsValidVehicle checks need to be complemented with IsPrimaryVehicle https://github.com/OpenTTD/OpenTTD/pull/10386#pullrequestreview-1283596693
19:32:21 <petern> Rename string IMHO
19:32:48 <TallTyler> RIP my afternoon πŸ˜›
19:32:55 <TallTyler> But good call
19:33:05 <TallTyler> I was hoping for permission to be lazy
19:33:45 <TallTyler> Changing strings, then rebasing to put the change in the right commit...
19:40:23 *** lobstarooo__ has joined #openttd
19:43:33 *** lobstarooo has joined #openttd
19:50:18 *** lobstarooo__ has quit IRC (Ping timeout: 480 seconds)
19:50:24 *** lobstarooo is now known as lobstarooo__
19:52:24 <Eddi|zuHause> there used to be a script to remove strings from lang files
19:54:16 <andythenorth[d]> I have a python one for grfs
19:54:21 <andythenorth[d]> it's horrible line splitter
19:57:03 <TallTyler> Often most of the string stays the same, just with the unit changed, so removing the translated string entirely seems mean-spirited
19:57:24 <TallTyler> Although I guess the result is the same if the string gets renamed
20:10:14 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10386: Fix: Some Script::IsValidVehicle checks need to be complemented with IsPrimaryVehicle https://github.com/OpenTTD/OpenTTD/pull/10386
20:11:50 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #10386: Fix: Some Script::IsValidVehicle checks need to be complemented with IsPrimaryVehicle https://github.com/OpenTTD/OpenTTD/pull/10386#pullrequestreview-1283649774
20:14:25 <Samu> how do i allow query string to insert a minus, to input a negative number?
20:15:33 <Samu> ah, CS_NUMERAL_SIGNED
20:21:37 <Samu> i thought you were against code repetition, almost half of game_gui.cpp is a copy of ai_gui.cpp
20:21:57 <glx[d]> <https://github.com/OpenTTD/OpenTTD/pull/10443/checks?check_run_id=11097954278> <-- silly it's not even in my code
20:22:11 <glx[d]> but different window
20:22:35 <TallTyler> Who is "you?"
20:22:47 <glx[d]> code repetition is unavoidable in some occasions
20:23:02 <TallTyler> GUI code in particular is very repetitive in OpenTTD
20:23:44 <Samu> even the start_date special case was copied over!
20:23:53 <Samu> there is no start_date for gs'es
20:44:33 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
20:46:15 <TallTyler> Eddi|zuHause: If anyone knows where that script to remove strings from lang files is, I think that's a better approach than renaming dozens of strings to unnecessarily long names
20:57:30 <andythenorth[d]> hmm not in bin
21:01:37 <Samu> funny, found a bug somewhere
21:02:03 <Samu> when trying to write down the config item values into openttd.cfg
21:02:12 <Samu> it cuts off the last part
21:03:02 <dP> hm...
21:03:02 <dP> ```ag FIXME src | wc -l
21:03:03 <dP> 10
21:03:07 <Samu> i think it's there, need to make sure where it happens
21:04:47 <Samu> [game_scripts]
21:04:47 <Samu> "Minimal CTD Test" = ok=-21474836,test_ctd=214748364 these values are not what they were
21:04:55 <dP> dP: 36 in cmclient 😩
21:05:38 <Samu> -2Β 147Β 483Β 648 it's missing 2 digits on the negative value, and 1 on the positive value
21:08:12 <Samu> i saved game and loaded, and i get the shortened values again
21:10:12 <glx[d]> -2 147 483 648 is wrong anyway
21:11:59 <glx[d]> char no[10];
21:11:59 <glx[d]> seprintf(no, lastof(no), "%d", item.second);
21:12:06 <glx[d]> no wonder it's wrong πŸ˜‰
21:14:59 <TrueBrain> please don't run `git blame` on that, tnx
21:17:01 <glx[d]> I really think all the settings should be modified to support SQInteger
21:17:12 <TrueBrain> what is holding you back? πŸ™‚
21:17:36 <TrueBrain> SQInteger is the interface to the scripting, so it totally makes sense
21:17:36 <glx[d]> I'll probably do it πŸ™‚
21:19:32 <glx[d]> and maybe put some option in doxygen to autoreplace SQInteger with integer (in squirrel sense) and char * with string (if possible)
21:20:35 <glx[d]> like https://docs.openttd.org/ai-api/classAIInfo.html#a390926c8e631a628510f0bcb0fa5ad29 seems to be almost full of squirrel only types
21:22:05 <TrueBrain> things are also easier now, with SQInteger being 64bit
21:23:04 <glx[d]> yes at beginning SQInteger was 32 or 64 depending on system
21:24:34 <glx[d]> https://github.com/OpenTTD/OpenTTD/security/code-scanning/3425 <-- annoyingly make all PR to fail the annotation check
21:25:02 <TrueBrain> so fix it πŸ˜„
21:26:23 <TrueBrain> as it appears to be actually right, so you can have BMPs which are .. interesting πŸ˜›
21:26:30 <glx[d]> I think it was discarded and reappeared
21:27:56 <glx[d]> ah no it seems new
21:28:17 <TrueBrain> CodeQL is constantly improving, so in general you can expect new hits to pop up from time to time
21:28:21 <TrueBrain> why they suggest to run it every night
21:29:39 <TrueBrain> ah, no, it is clamped to max of 256, because of line 361
21:30:16 <glx[d]> yes false positive
21:30:18 <TrueBrain> so if it is truly a false positive, close it as such, and it will be gone πŸ™‚
21:30:45 <TrueBrain> I am happy the PRs fail; someone should address things like that πŸ˜›
21:33:02 <Samu> settings are saved and loaded correctly now
21:34:39 <Samu> gonna pr
21:37:39 <glx[d]> samu: don't focus on that, it needs a bigger rework πŸ™‚
21:37:57 <Samu> :(
21:38:33 <Samu> random deviation might be an issue
21:38:43 <Samu> if you're now letting everything to int64
21:38:49 <Samu> or SQInteger
21:41:19 <glx[d]> that's why everything must be check when changing types
21:41:52 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #10443: Fix: [Script] ScriptBase::Rand() return value was between -MIN(int32) and MAX(int32) https://github.com/OpenTTD/OpenTTD/pull/10443
21:42:32 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #10444: Fix #10059: Clamp config item values to int, disallow negative random deviation, and allow values up to 12 digits including '-' https://github.com/OpenTTD/OpenTTD/pull/10444
22:03:51 <Samu> game_gui.cpp needs some cleanup... i don't think it requires all those includes
22:04:13 <Samu> how do i know which includes are strictly necessary?
22:04:23 <Samu> without having to remove 1 by 1
22:04:25 <Samu> and test
22:06:56 <Samu> ai_gui might as well, since part was moved to a new file
22:11:36 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:12:38 <dP> why is rail depot picker layout so different from the road one?
22:12:54 <dP> <https://github.com/OpenTTD/OpenTTD/blob/master/src/rail_gui.cpp#L1962>
22:12:54 <dP> vs
22:12:54 <dP> <https://github.com/OpenTTD/OpenTTD/blob/master/src/road_gui.cpp#L1014>
22:12:57 <dP> they look the same
22:24:58 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:27:58 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:31:28 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
22:32:10 *** WormnestAndroid has joined #openttd
22:40:11 <petern> I'm going to go with "to annoy dP"
22:40:56 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10322: Feature: Change speed of calendar progress https://github.com/OpenTTD/OpenTTD/pull/10322
22:43:26 *** sla_ro|master has quit IRC ()
22:48:29 <glx[d]> hmm using SQInteger for script settings is problematic for GUI because dropdowns only handle int
22:48:41 <glx[d]> and int is 32bit
22:51:48 *** gelignite has quit IRC (Quit: Stay safe!)
22:57:23 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10444: Fix #10059: Clamp config item values to int, disallow negative random deviation, and allow values up to 12 digits including '-' https://github.com/OpenTTD/OpenTTD/pull/10444#pullrequestreview-1283882061
23:00:17 *** Samu has quit IRC (Quit: Leaving)
23:08:12 *** Wormnest has joined #openttd
23:17:05 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:25:49 *** Etua has joined #openttd