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