IRC logs for #openttd on OFTC at 2025-05-05
β΄ go to previous day
02:11:34 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
02:12:44 *** WormnestAndroid has joined #openttd
02:16:52 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:17:34 *** WormnestAndroid has joined #openttd
02:25:45 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:07:03 *** Wormnest has joined #openttd
03:10:48 <pickpacket> LordAro: make a train for the game called "Deadline" and it doesn't take any wagons or cargo, but is fast as lightning
04:47:24 <DorpsGek> - Update: Translations from eints (by translators)
04:59:33 *** Flygon_ has joined #openttd
05:06:03 *** Flygon has quit IRC (Ping timeout: 480 seconds)
06:01:05 *** Flygon_ has quit IRC (Read error: Connection reset by peer)
06:48:40 *** akimoto has joined #openttd
07:12:32 <peter1138[d]> Is there a "this type is pool item" concept?
07:18:36 <DorpsGek> - Add: summary for week 18 of 2025 (by OpenTTD Survey)
07:27:19 *** aperezdc has quit IRC (Remote host closed the connection)
07:45:17 *** aperezdc has joined #openttd
07:48:25 *** gelignite has joined #openttd
08:40:04 *** gelignite has quit IRC (Quit: Stay safe!)
08:46:14 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
09:07:43 *** aperezdc has quit IRC (Remote host closed the connection)
09:08:49 *** aperezdc has joined #openttd
09:10:30 *** aperezdc has quit IRC (Remote host closed the connection)
09:11:35 *** aperezdc has joined #openttd
09:16:23 <peter1138[d]> Oops, stations are broken.
09:42:24 <xarick> oh no, you no longer like vectors
09:45:39 <peter1138> It's an adapter that uses vector underneath.
09:46:04 <peter1138> It avoids having to remember the incantion for ::lower_bound() all over place.
10:07:36 <peter1138> Okay, d030d17bd6e84e0f311a24e0a354150f972b90e8 is what broke stations.
10:12:27 <xarick> how do i print the values of every class member
10:23:48 <peter1138> LordAro, so, lower-case it all?
10:25:30 <xarick> is this supposed to fail?
10:26:31 <xarick> i wanna print all member values
10:31:54 <_glx_> `foreach` is the usual way to do it
10:33:14 <_glx_> But maybe `AirRoute` overloads the metamethod
10:33:51 <_glx_> Or a recent change broke things
10:47:34 <peter1138> Next on my commits is `StationList`, which stores `Station *` but is sorted by `Station::index`.
10:47:44 <peter1138> Hence the PoolItem question earlier :)
10:54:34 <peter1138> I already allowed a comparator.
11:21:41 <xarick> how do i achieve similar results
11:22:14 <xarick> wanna try debug this thing
11:23:17 <xarick> `foreach (member, val in this) {` also failed
11:24:22 <peter1138> Does it work in 14.0?
11:24:33 <peter1138> Or whatever the stable version is :D
11:41:25 <_glx_> Code seems to imply `foreach` for an instance uses the `_nexti` metamethod
11:46:03 <_glx_> A `_nexti` method seems to exist too, else the error would be `cannot iterate`
11:48:36 <_glx_> Ah no, it fails without an explicit message if `_nexti` doesn't exist
11:49:17 <peter1138> Hmm, all our "FlatMap" style containers access things a bit differently.
12:00:35 <exceptik> _glx_: not even in errno?
12:25:00 <peter1138[d]> We're not in Cansas any more
12:25:46 <xarick> route is an instance, AirRoute is a class
12:25:54 <xarick> why aren't both classes...
12:26:40 <xarick> maybe there is a different way to achieve the same ... just need to figure out
12:42:56 <xarick> it's printing stuff from AirRouteManager
12:43:15 <xarick> but the values are not initialized
12:47:28 <_glx_> class is the skeleton, instance is the object built following the skeleton, it's OOP 101
12:48:39 <peter1138> auto result = this->DoResolve();
12:48:39 <peter1138> const auto *value = std::get_if<CallbackResult>(&result);
12:48:40 <peter1138> return value != nullptr ? *value : CALLBACK_FAILED;
12:49:18 <peter1138> Compiling things and optimising stuff.
12:49:40 <peter1138> Anyway, result is a SGT_CALLBACK with a value of 630.
12:49:54 <peter1138> But the CALLBACK_FAILED is returned.
12:50:14 *** keikoz has quit IRC (Ping timeout: 480 seconds)
12:52:07 <xarick> ::print(member + " = " + route.member);
12:52:37 <xarick> how do I convert "member" into its actual name
12:53:21 <xarick> route.member -> route.m_airport_from -> prints the actual value of route.m_airport_from
12:54:13 <_glx_> you have to implement `_nexti` in the class I think
12:54:32 <peter1138> Hmm, ResolveReal() needs to call Resolve() as well, perhaps?
12:55:26 <peter1138> Hmm, dunno how this works now D
13:00:54 <peter1138> I just got "invalid email for merge" or something similar to that.
13:14:28 <peter1138> pickpacket, in case you hadn't guessed, the person in your RTS thread holds a massive grudge for some reason.
13:20:52 *** Timberwolf has quit IRC (Remote host closed the connection)
13:30:25 <xarick> i need to implement a _get
13:37:10 <_glx_> foreach(k,v in this.getclass()) {
13:37:16 <_glx_> this seems to work for me
13:40:27 <_glx_> I guess it's possible to add extra filtering to remove useless members
13:42:13 <_glx_> foreach(k,v in this.getclass()) {
13:42:13 <_glx_> if(type(v) == "function") continue;
13:43:11 <xarick> I'm getting stuff from AirRouteManager and not AirRoute
13:44:53 <xarick> ah route.getclass() works
13:46:29 <_glx_> well `class AirRoute extends RouteManager` so `AirRoute` contains all members of `RouteManager`
13:48:06 <xarick> wish there was a away to filter out AirRouteManager
13:49:17 <xarick> what if I don't extend AirRouteManager
13:49:34 <xarick> what could possibly go wrong
13:49:39 <_glx_> I was reading code from v20
13:49:55 <_glx_> so it's not extending AirRouteManager, but RouteManager
13:50:25 <xarick> poor old version i guess
13:51:04 <_glx_> yeah at least 1 year old π
13:51:49 <xarick> i can remove the extend stuff
13:55:54 <_glx_> foreach(k,v in this.getclass()) {
13:55:54 <_glx_> if (this.getclass().parent && k in this.getclass().parent) continue;
13:55:54 <_glx_> // if(type(v) == "function") continue;
13:56:08 <_glx_> different filtering, only shows own members
13:59:38 <_glx_> oh pitchforks incomming
13:59:44 <xarick> hmm nope that only got the base
14:02:08 <xarick> that intro looks quite.... dull
14:02:38 <pickpacket> peter1138: which one of them?
14:04:06 <xarick> maybe a single column, then place that on the left side
14:04:12 <xarick> of the screen, not centered
14:04:26 <pickpacket> peter1138: the ... one ... with all the ... ellipsis?
14:07:04 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
14:23:37 <pickpacket> peter1138: then..?
14:23:59 <pickpacket> and holds a grudge against whom?
14:28:08 <xarick> looks like I don't need "extends" for anything...
14:28:16 <xarick> I fail at understanding their purpose
14:31:08 *** Timberwolf has joined #openttd
14:43:18 *** WormnestAndroid has joined #openttd
14:44:45 <peter1138[d]> I guess "new game" and "play heightmap" are more alike that "play scenario", as they use the newgame settings, instead of settings from elsewhere.
14:51:27 <talltyler> "Play Scenario" is most like "Load Game"
14:52:19 *** mindlesstux has joined #openttd
14:52:24 <peter1138[d]> In functionality, yes, but in expecations, no.
14:52:35 <peter1138[d]> You are starting a new game, it's just set up in a specific way already.
14:54:14 <frosch123> Yes play height map leads to a modified mapgen window
14:55:04 <peter1138[d]> I should be possible for the mapgen window to combine both, and maybe use tabs to switch between "random terrain" and "heightmap terrain"
14:55:41 <peter1138[d]> (But also fitting in "play scenario" would be nice, but that doesn't need... well, basically anything of the others.)
14:56:21 <_zephyris> I wouldn't try to unify scenarios with heightmap or magen, just too different.
14:56:51 <_zephyris> Tabs for mapgen vs heightmap import works well
14:57:05 <talltyler> Tabs everywhere! \o/
14:57:14 <peter1138[d]> Requires a modified "file" window that might not look like a file window π
14:57:58 <peter1138[d]> A dark window, that's controversial alone π
14:59:00 <peter1138[d]> Now I wonder if that style of tab is better than what Game Options does.
14:59:04 <frosch123> I also considered groupboxes for single player vs multi player, but half of the buttons are single player
14:59:36 <peter1138[d]> Multiplayer is a different "work flow" really.
14:59:44 <peter1138[d]> (Although it does have the "start new game" option in it)
15:00:28 <frosch123> Anyhow, if we can get some big icons for the top 6 buttons, everyone is happy?
15:00:57 <peter1138[d]> I don't know if icons would help, or make sense?
15:01:04 <frosch123> peter1138[d]: Yes, but it needs a player name in addition
15:01:32 <peter1138[d]> frosch123: Is this your design or something random on the Wiki?
15:02:34 <frosch123> I think it's from #5147
15:02:53 <frosch123> The picture may be from planetmaker
15:04:36 <frosch123> Ah, it's from #3826
15:11:53 <peter1138[d]> Hmm, the extra inset panel does mean more space is used by padding.
15:16:58 *** mindlesstux has joined #openttd
15:17:25 <xarick> how do I detect an instance is an AIList?
15:47:47 *** gelignite has joined #openttd
16:08:42 <xarick> there's some fixes not present in openttd's squirrel
16:09:34 <xarick> openttd has the wrong WEAKERF
16:10:21 <_glx_> yes, and it's dead code
16:11:09 <_glx_> it's inside `#ifdef _DEBUG_DUMP` and we don't define it
16:36:26 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
16:37:22 *** WormnestAndroid has joined #openttd
16:45:03 <truebrain> I so wish I had more time for this game π too many ideas collecting dust π¦ Sad!
16:47:19 <truebrain> but maybe my old drafts inspires _zephyris π
16:49:59 <xarick> Visual Studio -> Edit -> Advanced -> Format Document
16:50:21 <xarick> should I do this for all squirrel files
16:55:02 <xarick> I see stuff like this and it drives me crazy
16:55:40 <LordAro> stop looking at it then
17:02:19 <xarick> the Format Document on cases: puts brackets on a new line
17:02:43 <xarick> is that according to coding style
17:04:40 <andythenorth> frosch123: is that one of my horrible old designs?
17:04:57 <andythenorth> I had quite a lot, as someone who designs UI for a career, I have some shame about them
17:08:20 <frosch123> It was posted by planetmaker to flyspray.
17:12:29 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:21:44 *** kuka_lie has joined #openttd
17:29:26 <xarick> which one is about case
17:34:32 *** WormnestAndroid has joined #openttd
17:45:59 <xarick> oops, i removed an `extends`
17:47:20 <xarick> `class Segment extends DoubleRail` so this one is required
17:53:46 *** Flygon has quit IRC (Read error: Connection reset by peer)
18:00:39 *** WormnestAndroid has quit IRC (Read error: No route to host)
18:06:49 *** WormnestAndroid has joined #openttd
18:10:59 <peter1138[d]> Heh, borrowing from that earlier design, although no darkening.
18:18:41 <frosch123> Did you try removing the outside padding? I.e. tabs 0px below titlebar
18:54:41 *** akimoto has quit IRC (Ping timeout: 480 seconds)
18:54:41 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
18:55:16 *** WormnestAndroid has joined #openttd
19:15:34 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
19:17:53 <peter1138[d]> No, not tried anything really.
19:18:39 *** WormnestAndroid has joined #openttd
19:19:31 <peter1138[d]> Smooshed up the top is a bit weird.
19:19:45 <peter1138[d]> But removing the extra separate panel might work.
19:37:08 <xarick> I'm watching weird videos. last time my country was invaded was in 1961, by India, lol
19:38:56 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
19:39:10 *** WormnestAndroid has joined #openttd
19:43:12 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
19:48:07 *** nielsm has quit IRC (Remote host closed the connection)
19:49:53 *** WormnestAndroid has joined #openttd
19:52:24 *** kuka_lie has quit IRC (Quit: Lost terminal)
20:03:49 <xarick> portugal has been saved by the british countless times...
20:05:35 <xarick> turns out the british were also forced out of india, it would be weird if they'd help
20:06:03 <andythenorth> too tired to have a post-colonial discussion π
20:06:07 <andythenorth> "it's complicated"
20:06:24 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:15:30 *** tabytac has joined #openttd
20:15:30 <tabytac> zephyrisviaGitHub: just adding icons for all the buttons (my personal preference vs only some) makes this look muuuuch better than the current layout.
20:15:30 <tabytac> Dont think im qualified enough to talk about having the word mod but i dont mind it.
20:15:30 <tabytac> I saw in TrueBrain's mock up from a few years ago that they had a "Continue Game" button. Obviously this is outside the scope of this PR, but eventually adding something like this would be amazing and so reserving some space for it might be ideal
20:16:19 <frosch123> Question: are scenarios and height maps "mods"?
20:19:40 <frosch123> Maybe "download content" is the right term?
20:22:19 <xarick> does anyone really care for the high score table? it's so meaningless
20:29:20 <_zephyris> "content", "add-ons", "extensions", "plugins"...
20:33:09 <_zephyris> I hope I was clear - Online Content isn't too bad, but it's in my list of things that I would consider tweaking.
20:35:28 <frosch123> I'll post an updated pr tomorrow
20:41:29 <peter1138[d]> Did you know there is no existing window with buttons containing both image and text.
20:41:40 <_zephyris> I suspected that might be the case...
20:41:53 <peter1138[d]> The closest to that is dropdown lists, which basically ignore the widget system (the entire list is one widget.)
20:41:54 <talltyler> Side quest unlocked π
20:42:59 <peter1138[d]> Well, IIRC, a WWT_PANEL can be clicked, so composing a "button" should be possible without anything too special.
20:43:21 <peter1138[d]> panel -> horizontal container -> image | text
20:44:10 <_zephyris> On a totally different note, a dummies guide to what's needed for base set builds to get to the cdn would be useful...
20:44:15 <_zephyris> Or rather, a guide for a dummy
20:45:39 *** gelignite has quit IRC (Quit: Stay safe!)
20:49:39 *** yiffgirl has joined #openttd
20:49:39 <yiffgirl> andythenorth: oh wow, this looks great
20:51:48 *** digitalfox has joined #openttd
20:51:48 <digitalfox> xarick: this is a game dev channel
20:51:48 <digitalfox> Lets keep it that way ok?
20:52:44 <peter1138[d]> Conversation police?
20:53:13 <digitalfox> No but as a fellow portuguese, makes no sense talking about that stuff here
20:53:34 <peter1138[d]> And it makes no sense for me to talk about lunch or cycling.
20:54:19 <digitalfox> Those things are not related to war
20:54:21 <peter1138[d]> (The off-topic-ness had already finished.)
20:54:48 <digitalfox> Thatβs why i deleted
20:54:48 <digitalfox> My bad discord didnβt update
20:56:06 *** Wormnest has joined #openttd
21:19:03 <frosch123> Do you know the intention for muting the titlegame?
21:19:03 <frosch123> I generally mute all games, but why would you want to mute the titlegame but not in-game?
21:20:26 <peter1138[d]> Basically it's "just noise" at that point, I think.
21:20:53 <peter1138[d]> I dunno, it's just something I've seen a bit of.
21:21:01 <_glx_> honk honk ding ding ding ding
21:21:34 <_glx_> then the yate hogan takes off π
21:26:17 <_zephyris> Mmm, surely buried options rather than main menu buttons
21:26:38 <_zephyris> Though could float to a corner of the screen?
21:27:24 <peter1138[d]> Difficult to find them on the World Generation screen?
21:29:18 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:30:45 <_zephyris> Possibly solving the wrong problem, should SFX be less intrusive?
21:30:54 <_zephyris> But volume control is easy to find now...
21:31:10 <peter1138[d]> It's several clicks.
21:31:30 <_zephyris> Lol, just looked at the Factorio main menu
21:31:37 <_zephyris> Always a useful geek-oriented reference
21:32:15 <tabytac> wube always kill it with UX and UI
21:32:43 <xarick> how to force a bit to turn 0 even if it's not 1
21:34:21 <_glx_> should work the same I hpe
21:35:39 <_glx_> ah no it doesn't have &= it seems so val = val & ~somthing
21:36:44 <xarick> this.sleep_longer = this.sleep_longer & ~(1 << AITile.TRANSPORT_ROAD);
21:37:42 <xarick> this.sleep_longer = ((built_road_route & 1) == 0).tointeger() << AITile.TRANSPORT_ROAD;
21:40:01 <xarick> that doesn't seem right
21:40:45 <_zephyris> Looks like this is the most industry standard option:
21:42:14 <_zephyris> It's a new game option, not relevant for the main menu
21:42:35 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:42:54 <peter1138[d]> Sounds like I need to continue that other side-quest of embeddable filtered settings tree...
21:43:09 <xarick> `this.sleep_longer = ((built_road_route & (1 << 0)) == 0).tointeger() << AITile.TRANSPORT_ROAD;` something tells me this is wrong
21:43:17 <_zephyris> There is another problem - scenario editor should fire up a new game window, with newgrf settings etc.
21:43:50 <peter1138[d]> Scenario editor dumping you straight into a blank world, without asking for size, or anything, is a bit jarring.
21:44:42 <_zephyris> Not having a "New Scenario" option is an odd one too
21:45:13 <xarick> if `((built_road_route & (1 << 0)) == 0).tointeger()` is actually 0, I don't want to remove the other bits on this.sleep_longer
21:45:38 <_zephyris> Well, focuses attention that there should probably be a shared new game w/worldgen, new game w/heightmap and new scenario window.
21:46:22 *** ChanServ sets mode: +v tokai
21:46:41 <_zephyris> The more I think about entering the scenario editor the weirder it is
21:50:21 <_glx_> xarick: maybe you are trying to pack too much logic in a single line
21:53:20 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:08:39 *** WormnestAndroid has quit IRC (Remote host closed the connection)
22:08:40 *** WormnestAndroid has joined #openttd
22:13:28 <xarick> what is FindLastBit returning?
22:13:45 <xarick> if I have 1111, does that return 0 or 3?
22:21:44 <xarick> very ambiguous "Last" meaning
22:24:36 <xarick> what does it return if the value is 0
22:25:34 <_jgr_> Take a look at the documentation of the function, it's described there explictly what the result for 0 is
22:33:21 <xarick> there's no equivalent in squirrel π¦
22:36:40 <_jgr_> Why do you want to do this in Squirrel?
22:38:10 <xarick> I need to manipulate bits
22:40:32 <_glx_> looks similar to the old version
22:46:03 <xarick> wow, that's actually ugly
22:47:06 <_glx_> your version should work too
22:56:49 *** debdog has quit IRC (Ping timeout: 480 seconds)
continue to next day β΅