IRC logs for #openttd on OFTC at 2018-09-01
            
00:01:58 *** frosch123 has quit IRC
00:07:11 *** Wormnest has quit IRC
00:10:44 *** Progman has quit IRC
00:44:36 *** KouDy has joined #openttd
00:51:46 *** Wolf01 has quit IRC
00:53:30 *** KouDy has quit IRC
01:27:42 <Samu> it got to look 2 tiles ahead
01:27:48 <Samu> to detect a possible bridge
02:04:54 *** Supercheese has quit IRC
02:05:16 *** Supercheese has joined #openttd
02:28:23 *** Compu has joined #openttd
02:28:29 *** Compu has quit IRC
02:35:35 *** HerzogDeXtEr has quit IRC
02:43:41 *** Supercheese has quit IRC
03:06:32 *** KouDy has joined #openttd
03:09:05 *** sim-al2 has quit IRC
03:11:59 *** KouDy has quit IRC
03:27:56 *** WWacko1976-work has joined #openttd
03:30:20 *** Samu has quit IRC
03:35:50 *** Supercheese has joined #openttd
04:18:40 *** KouDy has joined #openttd
04:26:30 *** KouDy has quit IRC
04:27:26 *** Flygon has joined #openttd
04:43:47 *** glx has quit IRC
04:46:49 *** KouDy has joined #openttd
05:45:02 *** haudrauf has quit IRC
05:46:50 *** haudrauf has joined #openttd
06:20:59 *** nielsm has joined #openttd
06:52:56 *** sim-al2 has joined #openttd
06:58:37 *** Alberth has joined #openttd
06:58:37 *** ChanServ sets mode: +o Alberth
07:51:08 *** Supercheese has quit IRC
07:51:30 *** Supercheese has joined #openttd
08:49:08 *** Supercheese has quit IRC
09:15:15 *** Progman has joined #openttd
09:49:16 *** Gustavo6046 has quit IRC
09:55:19 *** sla_ro|master has joined #openttd
10:09:06 *** Xaroth has joined #openttd
10:35:31 *** andythenorth has joined #openttd
10:38:13 *** HerzogDeXtEr has joined #openttd
10:41:35 *** Wacko1976 has joined #openttd
10:46:49 <andythenorth> o/
10:57:54 *** andythenorth has quit IRC
11:00:50 *** andythenorth has joined #openttd
11:20:23 *** andythenorth has quit IRC
11:34:57 *** Wormnest has joined #openttd
12:00:35 *** Wolf01 has joined #openttd
12:01:34 <Wolf01> o/
12:11:06 <Alberth> o/
12:11:24 *** frosch123 has joined #openttd
12:36:31 *** Samu has joined #openttd
12:36:34 <Samu> hi
12:40:04 <Samu> how do I avoid code repetition here, about raising and lowering everytime I am about to do an action that costs money? https://paste.openttdcoop.org/pknb4f6ep
12:42:53 <Samu> imagine I want to implement that for every road piece that is built
13:00:33 *** Stimrol has joined #openttd
13:03:27 <Wolf01> Yes
13:03:43 <Samu> yes?
13:04:07 <Wolf01> What?
13:10:25 <TrueBrain> cookie?
13:11:03 <Wolf01> Pathfinder is ignoring my straight road and preferring the highway :S
13:12:30 <TrueBrain> your way of the highway
13:12:32 <TrueBrain> sounds good to me
13:12:44 <Alberth> cookie!
13:12:46 <Wolf01> I'll swap the entry and exit lanes, so they can't take the highway for 200m :>
13:14:01 <Alberth> Samu: what raising and lowering? I can only see two mostly identical blocks of code
13:14:33 <Samu> raising only the needed money for constructing the next thing, and then repaying it after
13:23:13 <Alberth> oh, only the airport type changes?
13:24:04 <Samu> no, I meant for every kind of things
13:24:15 <Samu> building road pieces
13:24:18 <Samu> building road stations
13:24:24 <Samu> buidling bridges
13:24:30 <Samu> even demolishing stuff too
13:25:05 <Samu> building airports
13:25:09 <Samu> building vehicles
13:25:23 <Samu> refiting vehicles, everything that involves money
13:25:31 <Samu> *spending money
13:25:37 <Alberth> AIAirport.BuildAirport(airport1_location, airport1_type, airport1_stationId) <-- so this line changes every time
13:25:43 <Samu> yes
13:26:28 <Alberth> right, does squirrel have a function type as data?
13:26:37 <Samu> I have no idea
13:27:15 *** KouDy has quit IRC
13:27:29 <Samu> i guess it does, there's the Valuate functions
13:28:50 <Alberth> it exists according to the manual
13:29:25 <Alberth> "Functions are first class values like integer or strings and can be stored in table slots, local variables, arrays and passed as function parameters."
13:30:26 <Alberth> hmm, function parameters are known, or can they change each time?
13:31:41 <Samu> not sure I understand the question, but they can change, imagine a path of roads being built, the tiles always change
13:32:26 <Alberth> if they can change, make a base class that implements your test, except it calls a separate method to do the action
13:32:35 *** Wolf01 has quit IRC
13:32:58 <Alberth> in a derived class, implement that separate method for the thing you want to test
13:33:09 *** Fuco has joined #openttd
13:33:13 <Alberth> in the derived class, you can also set parameters etc
13:33:35 <Samu> wow, too much lingo I don't fully get
13:33:53 <Samu> sounds like it's a difficult task for me
13:34:49 <Alberth> it's not that difficult, it just explodes a bit in size, as there are lots of things you can build
13:35:50 <Alberth> let's see how to do this, one moment
13:36:59 <Samu> woah, appreciate the time you take on helping me
13:44:36 <Alberth> https://paste.openttdcoop.org/pxlnisyp2 something like this
13:45:17 <Alberth> Test class is the generic code, never changes. It calls "theaction()" to do the real test
13:45:58 <Alberth> TestBuildAirport class implements the "theaction" for building an airport, it tries, and simply returns the result
13:46:37 <Alberth> since it extends from Test, you can instantiate the TestBuildAirport class, and then call dotest() on it
13:46:58 <Alberth> code is fully untested :p
13:47:10 <Samu> let me study it
13:47:27 <Alberth> Test is the baseclass, and TestAirport is derived from it
13:47:48 <Alberth> "theaction" is the separate method I mentioned
13:48:19 <Alberth> I just copied some arbitrary lines from your paste, no idea if it is correct
13:53:02 *** Wolf01 has joined #openttd
13:53:21 <Wolf01> Mmmh, overcharged the UPS
13:53:36 <Wolf01> *overloaded
13:54:11 <Wolf01> Let's try again if it's the video card
13:56:07 <Alberth> I hope the display is also behind the UPS, or you can't see a thing!
13:56:54 <Alberth> not to mention the router, or you'll have no network :)
13:56:56 <Wolf01> Everything is behind the UPS, that's why everything shut off when the UPS started screaming
13:57:21 <Samu> TestBuildAirport.dotest();
13:58:28 <Samu> never actually dealt with classes, so i'm getting some errors
13:59:48 <Alberth> first make an instance, you can't call the class directly
14:00:01 <Wolf01> I need to reinstall the powerchute
14:00:10 <Alberth> (or you can perhaps, but it doesn't do what you think it does)
14:01:35 <Alberth> local tap = TestAirport(loc, tp, id); tap.dotest();
14:01:42 <Samu> ah
14:01:59 <Alberth> hope it works :)
14:02:39 <Samu> TAP is actually a portuguese air transport company
14:02:43 <Samu> coincidence
14:03:15 <Alberth> you can rename the variable, simpler than renaming the company :)
14:03:16 <Samu> or was... no longer portuguese, we sold it :8
14:04:14 <Samu> actually it's local tap = TestAirport(airport1_location, airport1_type, airport1_stationId);
14:04:20 <Alberth> everybody is at their desired location, no need for transport -> let's sell it :p
14:04:27 <Samu> loc, tp, id woudln't work
14:04:50 <Alberth> yeah, I don't know what values you have
14:05:06 <Samu> hmm the index TestAirport doesn't exist :(
14:05:25 <Samu> TestBuildAirport maybe?
14:05:27 <Alberth> index ?
14:05:40 *** Wacko1976 has quit IRC
14:05:50 <Alberth> ah, yes indeed
14:06:11 <Samu> now I'm getting a weird error, never seen it before
14:06:19 <Samu> sec
14:06:39 <Alberth> classes is fun :)
14:06:47 <Samu> https://imgur.com/a/EcfFkiJ
14:07:22 <Samu> line 126 is
14:07:23 <Samu> loc <- location;
14:07:58 <Alberth> "new slot operator not supported", which is the <- thing
14:08:07 <Alberth> so, just = ?
14:08:13 <Samu> ok, trying
14:08:50 <Samu> the index loc does not exist :(
14:08:52 <Samu> hmm
14:09:27 <Samu> i need something before the constructor, isn't it?
14:09:35 <nielsm> maybe the field needs to be pre-declared
14:09:35 <Samu> loc = null; or so
14:11:03 <Samu> the index HasMoney does not exist
14:11:08 <Samu> why
14:11:18 <Samu> must be WrightAI.HasMoney?
14:11:57 <Samu> WrightAI.GetMoney
14:12:00 <Samu> testing
14:12:23 <Samu> oh WrightAI.RepayLoan();
14:12:26 <Samu> damn it complains a lot
14:13:20 <Samu> the index last_cost does not exist, but that's already past the test, the airport was built :)
14:13:34 <Samu> thx Alberth it works
14:14:33 <Alberth> nice
14:15:05 <Alberth> as for explosion in code size, you need a new derived class for each thing you test
14:16:28 <Alberth> and current code takes parameters values in the constructor, so you'd need a new instance for each test, which is very expensive. Better add a method to change the parameter values, and then call dotest()
14:24:27 *** Wacko1976 has joined #openttd
14:27:15 *** Fuco has quit IRC
14:30:47 *** Fuco has joined #openttd
14:38:29 *** Fuco_ has joined #openttd
14:40:30 *** Fuco has quit IRC
14:45:00 *** Wolf01 has quit IRC
14:51:14 *** Fuco has joined #openttd
14:52:55 *** Fuco_ has quit IRC
14:57:41 *** bona has joined #openttd
15:00:37 *** bona has left #openttd
15:26:18 <Samu> can you explain me how do I do a method to change parameters stuff
15:26:28 *** Wolf01 has joined #openttd
15:27:52 <Samu> dotest remains the same
15:28:02 <Samu> theaction is... modified?
15:29:32 <Samu> hmm
15:30:29 *** Fuco_ has joined #openttd
15:30:53 <Wolf01> 3rd take on that game, I should save after doing things :P
15:31:59 *** sim-al2 has quit IRC
15:32:07 *** Fuco has quit IRC
15:33:57 *** KouDy has joined #openttd
15:34:11 <Samu> sec
15:40:06 *** Fuco has joined #openttd
15:41:57 *** Fuco_ has quit IRC
15:46:31 <Samu> comparison between instance and 0
15:46:36 <Samu> error
15:46:56 <Samu> uhm.. how do i get the result of the test for comparison?
15:48:17 <Samu> local tap = TestBuildAirport(airport1_location, airport1_type, airport1_stationId); tap.DoBuildAirport(); if (tap < 0) {
15:48:28 <Samu> can't compare tap and 0 halp!
16:00:09 <Samu> it's always returning a false?
16:02:11 <Alberth> tap is an object, likely tap.DoBuildAirport() returns the result of the test?
16:03:13 <Alberth> ie "calling" the class makes an object, an instance of the class
16:04:00 <Alberth> on that object you can get its values and call its methods (=functions of the object)
16:05:25 <Alberth> alternatively, you store the answer in the object, and then retrieve it using the tap variable
16:06:12 <Samu> i was hoping for a 0 or a -1
16:06:20 <Samu> these were the values I was expecting
16:06:38 <Alberth> what does DoAirport() look like?
16:06:57 <Alberth> or perhaps just the entire class :)
16:07:07 <Samu> ec
16:07:10 <Samu> copy pasting
16:07:17 <Alberth> pasting copy
16:07:30 <Samu> https://paste.openttdcoop.org/pgunmzidm
16:07:43 <Samu> like that, atm
16:08:26 <Samu> i changed -1 to false and true to 0, i was testing some stuff
16:08:34 <Samu> eventually they should be -1 and 0 respectively
16:09:10 <Alberth> you shouldn't call DoBuildAirport , unless you want to just build an airport without your test
16:09:53 <Alberth> tap.DoMoneyTest() should give you true or false
16:10:49 <Alberth> or add one more layer, to set the parameters as well, let me show that
16:16:08 <Alberth> https://paste.openttdcoop.org/pxvhutvfz
16:18:27 *** frosch123 has quit IRC
16:19:41 <Samu> thx, let's test
16:31:02 <Samu> nice nice https://imgur.com/a/xmWEif4
16:31:06 <Samu> no more errors
16:33:24 <Samu> tap = TestBuildAirport(); if (!tap.TryBuild(airport2_location, airport2_type, airport2_stationId)) {
16:33:35 <Samu> works
16:33:56 <Samu> waiting for a case where it can't build
16:34:22 *** KouDy has quit IRC
16:39:30 *** Wolf01 has quit IRC
16:40:40 *** Fuco_ has joined #openttd
16:42:20 *** Fuco has quit IRC
16:42:26 *** chomwitt has joined #openttd
16:46:13 *** Fuco has joined #openttd
16:48:45 <Samu> gonna try do for a build engine
16:48:53 <Samu> buildvehicle
16:49:00 *** Fuco_ has quit IRC
16:56:37 *** Fuco has quit IRC
16:59:48 *** Fuco has joined #openttd
17:07:18 <Samu> hmm harder to do for vehicle
17:07:30 <Samu> it got to return the vehicle in this case
17:07:55 *** Fuco has quit IRC
17:08:00 <Samu> I think I did it
17:08:42 <Samu> it didn't simplify that much for the vehicle case, I must have failed
17:11:31 *** Wolf01 has joined #openttd
17:11:47 <Samu> Alberth: https://paste.openttdcoop.org/pizkc23g9
17:14:14 <Alberth> In DoBuildVehicle() store the vehicle in a variable of the class, and return success / failure, so your test-code knows what to do
17:14:59 <Alberth> then in TryBuild, call the baseclass method, and if it returns success, return the vehicle else null
17:15:15 *** Fuco has joined #openttd
17:16:00 <Alberth> you didn't need a price before? with the airport?
17:16:32 <Samu> yes, but it was all dealt with inside that test
17:16:41 <Samu> it raised the money
17:16:45 <Samu> built, then payed it
17:17:01 <Samu> didn't need it outside that part
17:17:28 <Alberth> make a new method in the derived class like GetPrice() or so, which you call from the baseclass money test
17:17:54 <Alberth> so you can change GetPrice() each time without modifying the money test
17:20:18 *** Progman has quit IRC
17:23:36 *** Fuco has quit IRC
17:24:21 *** chomwitt has quit IRC
17:26:58 *** Fuco has joined #openttd
17:39:25 *** Fuco has quit IRC
17:47:56 <Samu> im still confused
17:48:48 <Samu> Alberth: got this https://paste.openttdcoop.org/pqpkz9ykh
17:49:04 <Samu> seems to work, but i don't think that's what you wanted
17:52:44 <Alberth> seems much like I want
17:54:11 <Samu> the MoneyTest class is the one that must fit all my cases?
17:54:15 <Alberth> I don't understand your reason for the money test though :)
17:54:43 <Alberth> as much as possible, as it reduces the amount of code that you have to write
17:54:57 <Alberth> that's what we started with right? :)
17:55:00 <Samu> yes, I see
17:55:45 <Samu> in the buildvehicle case I actually needed to get the vehicle, to do stuff with it
17:55:53 <Samu> it was a bit more complicated
17:56:13 <Samu> in the build bridge, build road, i expect not needing anything
17:57:14 <Samu> strange, that means the airport implementation is wrong
17:57:28 <Samu> well, i see
17:57:39 <Alberth> build truck would also give a vehicle, doesn't it?
17:58:01 <Alberth> the difference is that you don't want to do anything with a bridge
17:58:18 <Alberth> while you want to give orders etc to a vehicle
17:59:09 <Alberth> you could of course walk through all vehicles to find the one without orders
17:59:30 <Alberth> probably like you walk through all your stations to find new oppportunities
18:00:17 <Samu> gonna rework the airport again, brb
18:06:01 *** Arveen2 has joined #openttd
18:08:39 <Samu> instead of DoBuildAirport, DoBuildVehicle, I actually give it a common name
18:08:44 <Samu> DoBuild
18:09:44 <Samu> assert(AIError.GetLastError() != AIError.ERR_STATION_TOO_SPREAD_OUT);
18:09:48 <Samu> hmm, i actually need this
18:09:50 <Samu> lol
18:11:16 *** Arveen has quit IRC
18:13:00 *** Wacko1976 has quit IRC
18:19:15 <Samu> i don't need a p = null; after all
18:19:29 *** Gustavo6046 has joined #openttd
18:22:27 <Samu> class TestBuildVehicle extends MoneyTest {
18:22:35 <Samu> class TestBuildAirport extends MoneyTest {
18:22:45 <Samu> now they both extends the same class
18:22:52 <Samu> let's see
18:24:01 <Samu> hmm nop, it's failing to build airports
18:26:39 *** Flygon has quit IRC
18:27:38 <Samu> AITestMode() && AIAirport.BuildAirport(loc, tp, id);
18:27:43 <Samu> is this a valid line?
18:28:06 <Samu> not inside any if or local
18:28:08 <Samu> just that
18:28:56 <Samu> sec, i'll show u
18:30:03 <Samu> https://paste.openttdcoop.org/pkii1nhhh
18:30:27 <Samu> i have the master class MoneyTest that suits 2 different build methods
18:30:34 <Samu> build vehicle and build airport
18:30:57 <Samu> I'm wondering if line 27 is valid
18:31:44 <Samu> in the game I see it building airports and aircraft, so it seems fine, but code-wise... seems weird
18:35:18 <Alberth> inside a GetPrice function?
18:35:23 <Samu> yes
18:35:55 <Alberth> it computes the truth value of the expression, and then discards the result
18:36:32 <Alberth> weird place to build an airport :p
18:36:47 <Samu> it runs in testmode
18:36:53 <Samu> to get the cost
18:36:57 <Samu> it doesn't really build
18:37:27 <Alberth> fair enough
18:38:09 *** DorpsGek_II has joined #openttd
18:38:09 <DorpsGek_II> [OpenTTD/DorpsGek-github] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
18:38:09 <DorpsGek_II> - Update aiohttp from 3.3.2 to 3.4.1 (by pyup-bot)
18:38:09 <DorpsGek_II> https://github.com/OpenTTD/DorpsGek-github/commit/838af1d41859
18:38:18 <DorpsGek_II> [OpenTTD/DorpsGek-github] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
18:38:19 <DorpsGek_II> - Update attrs from 18.1.0 to 18.2.0 (by pyup-bot)
18:38:20 <DorpsGek_II> https://github.com/OpenTTD/DorpsGek-github/commit/4b97f488cd44
18:38:27 <DorpsGek_II> [OpenTTD/DorpsGek-github] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
18:38:28 <DorpsGek_II> - Update cryptography from 2.3 to 2.3.1 (by pyup-bot)
18:38:29 <DorpsGek_II> https://github.com/OpenTTD/DorpsGek-github/commit/49e48d3e2649
18:38:36 <DorpsGek_II> [OpenTTD/DorpsGek-github] pyup-bot opened pull request #7: Scheduled monthly dependency update for September https://github.com/OpenTTD/DorpsGek-github/pull/7
18:39:03 <Alberth> if (AITestMode()) AIAirport.BuildAirport(loc, tp, id); is likely easier to read
18:39:06 <DorpsGek_II> [OpenTTD/DorpsGek-runner] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
18:39:06 <DorpsGek_II> - Update aiohttp from 3.3.2 to 3.4.1 (by pyup-bot)
18:39:06 <DorpsGek_II> https://github.com/OpenTTD/DorpsGek-runner/commit/c01c085379be
18:39:12 <DorpsGek_II> [OpenTTD/DorpsGek-runner] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
18:39:13 <DorpsGek_II> - Update attrs from 18.1.0 to 18.2.0 (by pyup-bot)
18:39:14 <DorpsGek_II> https://github.com/OpenTTD/DorpsGek-runner/commit/87b544e373af
18:39:21 <DorpsGek_II> [OpenTTD/DorpsGek-runner] pyup-bot opened pull request #6: Scheduled monthly dependency update for September https://github.com/OpenTTD/DorpsGek-runner/pull/6
18:40:52 <LordAro> oh dear
18:43:39 <Samu> local vehicle = TestBuildAircraft.TryBuild(best_hangar, engine);
18:43:44 <Samu> this is much easier
18:43:54 <Samu> than 2 lines :(
18:44:49 <Samu> my buildairport function is a complete mess
18:45:06 <Samu> i'm surprised everything works
18:45:55 *** Gustavo6056 has joined #openttd
18:46:58 <Samu> can you take a look?
18:47:08 <Samu> erm...
18:47:25 <Samu> i'm so scared of showing this to someone lol
18:48:18 <Samu> https://paste.openttdcoop.org/ptzbjupwa
18:48:20 <Samu> damn 171 lines
18:48:25 <Samu> for a single function :(
18:50:33 *** Gustavo6046 has quit IRC
18:50:33 *** Gustavo6056 is now known as Gustavo6046
18:59:26 *** KouDy has joined #openttd
19:09:25 <Alberth> lot of commented code, which you can all remove
19:10:39 <Alberth> wouldn't it be simpler to add only airports that you can actually use?
19:11:24 <Alberth> 18-20 adds 3 heli stations, which you may remove after line 67
19:11:37 <Alberth> why not move line 67 before line 18?
19:13:59 <Alberth> make a function that takes an airport type, and adds it to the list only if all the conditions at lines 24-38 hold
19:14:26 <Alberth> 11-20 then simply call that function
19:16:33 *** KouDy has quit IRC
19:18:23 *** Fuco has joined #openttd
19:24:32 <Samu> I needed all airport types the game can offer in 1 single place
19:25:00 *** Fuco_ has joined #openttd
19:26:40 *** Fuco has quit IRC
19:29:16 <Samu> ah, instead of filtering out from a list, I would add up to the list
19:29:23 <Samu> build it
19:29:34 <Samu> the opposite of what I did
19:31:15 <Samu> but i still need a list of all airport types available anyway
19:31:20 <Samu> :|
19:31:26 <Samu> how would I do that
19:31:55 *** haudrauf has quit IRC
19:31:59 <Samu> i couldn't use that for cycle
19:33:03 <Samu> ah, maybe it's doable, without a for cycling through
19:33:09 <Samu> would do case by case
19:33:45 *** haudrauf has joined #openttd
19:35:14 *** Wacko1976 has joined #openttd
19:43:39 <Alberth> you have a sequence to add all types now too
19:43:55 <Alberth> so have a sequence of testing + adding instead
19:45:38 <Samu> I can't think through
19:45:53 <Samu> how would I test
19:46:10 <Samu> test for engines available
19:46:29 <Samu> if true, add corresponding airport type and only if it's available
19:46:40 <Samu> and what about heliport removal for 2nd airport
19:47:28 <Samu> hmm I think I prefer the way I have it for the moment
19:48:19 <Samu> I can't think I could build up a list
19:49:42 <Samu> if I add it in duplicate, i would get it listed twice?
19:49:56 <Samu> if I remove it in duplicate, I don't have that issue
19:51:06 <Samu> and the prices always change, I always have to keep the costs
19:51:12 <Samu> especially with inflation
19:51:27 *** Wacko1976 has quit IRC
19:51:37 <Samu> i can't think of doing the list in build-up way
19:52:51 *** Stimrol has quit IRC
19:54:02 *** Fuco has joined #openttd
19:55:45 *** Fuco_ has quit IRC
19:59:31 *** Gustavo6056 has joined #openttd
20:01:40 *** roidal has joined #openttd
20:01:56 *** Supercheese has joined #openttd
20:05:23 *** Gustavo6046 has quit IRC
20:05:23 *** Gustavo6056 is now known as Gustavo6046
20:06:31 *** tokai|noir has joined #openttd
20:06:31 *** ChanServ sets mode: +v tokai|noir
20:07:26 *** KouDy has joined #openttd
20:10:41 *** Stimrol has joined #openttd
20:13:15 *** tokai has quit IRC
20:20:49 *** agentw4b has joined #openttd
20:24:59 *** Wacko1976 has joined #openttd
20:40:06 *** Alberth has left #openttd
20:47:45 *** roidal has quit IRC
20:53:32 *** Fuco_ has joined #openttd
20:55:15 *** Fuco has quit IRC
21:00:45 *** gelignite has joined #openttd
21:10:34 *** Stimrol_ has joined #openttd
21:10:34 *** Stimrol has quit IRC
21:16:53 *** KouDy has quit IRC
21:21:34 *** Supercheese has quit IRC
21:21:55 *** Supercheese has joined #openttd
21:30:33 *** Stimrol has joined #openttd
21:30:33 *** Stimrol_ has quit IRC
21:51:57 *** Progman has joined #openttd
21:52:31 *** KouDy has joined #openttd
21:55:47 *** Fuco_ has quit IRC
21:59:58 *** KouDy has quit IRC
22:16:02 *** nielsm has quit IRC
22:19:01 *** KouDy has joined #openttd
22:20:15 *** gelignite has quit IRC
22:22:48 *** KouDy has quit IRC
22:26:46 *** sim-al2 has joined #openttd
23:08:13 *** KouDy has joined #openttd
23:11:46 <Samu> I dont understand
23:12:17 <Samu> I have class MoneyTest inside Utils.nut file
23:12:51 <Samu> WrightAI.nut can call it without a require("Utils.nut");
23:12:59 <Samu> BuildManager.nut cannot
23:13:16 <Samu> why does it require a require("Utils.nut");
23:13:19 <Samu> ?
23:13:38 <Wolf01> Dependency chain?
23:14:32 <Samu> well, i'm clueless about such a chain, this code wasn't originally mine
23:15:16 <Wolf01> Do you have other includes in wrightai which may include utils.nut?
23:15:57 *** KouDy has quit IRC
23:16:06 <Samu> I have this
23:16:07 <Samu> class WrightAI extends AIController {
23:16:22 <Samu> function WrightAI::UpdateAircraftLists() {
23:16:32 <Samu> all functions have WrightAI::
23:16:47 <Samu> then i also have some classes
23:16:50 <Samu> class TestRefitAircraft extends MoneyTest {
23:17:17 <Samu> honestly I dunno
23:17:32 <Wolf01> Did you at least try to parse what I asked you?
23:17:55 <Samu> other includes? none
23:17:58 *** Gustavo6056 has joined #openttd
23:18:01 <Samu> you mean require stuff?
23:18:05 <Wolf01> Yes
23:18:06 <Samu> there's none
23:19:26 <Samu> there are a lot of requires in main.nut
23:19:35 <Samu> including require("Utils.nut");
23:19:43 <Samu> require("WrightAI.nut");
23:19:51 <Samu> require("BuildManager.nut");
23:20:51 <Samu> but apparently, I'm getting MoneyTest does not exist, or invalid, sec let me get correct error
23:21:00 <Samu> when i do it inside buildmanager
23:21:48 <Samu> here https://imgur.com/a/fzw0f2m
23:22:42 <Samu> line 40 is this: class TestRemoveRoadStation extends MoneyTest {
23:22:59 *** Gustavo6046 has quit IRC
23:22:59 *** Gustavo6056 is now known as Gustavo6046
23:23:10 <Samu> MoneyTest is a Class inside Utils.nut file
23:23:51 *** KouDy has joined #openttd
23:32:10 *** KouDy has quit IRC
23:58:25 *** sla_ro|master has quit IRC