Back to Home / #openttd / 2018 / 09 / Prev Day | Next Day
#openttd IRC Logs for 2018-09-01

---Logopened Sat Sep 01 00:00:30 2018
00:20-!-nielsm [~nielsm@176-23-103-56-cable.dk.customer.tdc.net] has joined #openttd
00:20-!-nielsm is "Niels Martin Hansen" on #openttd #tycoon
00:52-!-sim-al2 [~sim-al2@c-75-65-196-171.hsd1.tn.comcast.net] has joined #openttd
00:52-!-sim-al2 is "sim-al2" on @#/r/openttd #openttd
00:58-!-Alberth [~alberth@00015f9e.user.oftc.net] has joined #openttd
00:58-!-mode/#openttd [+o Alberth] by ChanServ
00:58-!-Alberth is "purple" on @#openttd
01:51-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has quit [Read error: Connection reset by peer]
01:51-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
01:51-!-Supercheese is "Supercheese" on #openttd
02:49-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has quit [Quit: Valete omnes]
03:15-!-Progman [~progman@p4FD6671D.dip0.t-ipconnect.de] has joined #openttd
03:15-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttdcoop #openttd
03:49-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Read error: Connection reset by peer]
03:55-!-sla_ro|master [~sla.ro@84.117.88.126] has joined #openttd
03:55-!-sla_ro|master is "slamaster" on #sla #openttd
04:09-!-Xaroth [~Xaroth@00017153.user.oftc.net] has joined #openttd
04:09-!-Xaroth is "Xaroth Brook" on #openttd @#opendune +#openttd.dev
04:35-!-andythenorth [~andytheno@211.red-83-49-254.dynamicip.rima-tde.net] has joined #openttd
04:35-!-andythenorth is "Mutter User" on #openttd
04:38-!-HerzogDeXtEr [~farci@dslb-188-103-224-017.188.103.pools.vodafone-ip.de] has joined #openttd
04:38-!-HerzogDeXtEr is "purple" on #openttd
04:41-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has joined #openttd
04:41-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
04:46<andythenorth>o/
04:57-!-andythenorth [~andytheno@211.red-83-49-254.dynamicip.rima-tde.net] has quit [Quit: quit]
05:00-!-andythenorth [~andytheno@211.red-83-49-254.dynamicip.rima-tde.net] has joined #openttd
05:00-!-andythenorth is "Mutter User" on #openttd
05:20-!-andythenorth [~andytheno@211.red-83-49-254.dynamicip.rima-tde.net] has quit [Quit: quit]
05:34-!-Wormnest [~Wormnest@s5596abd2.adsl.online.nl] has joined #openttd
05:34-!-Wormnest is "Wormnest" on #openttd
06:00-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
06:00-!-Wolf01 is "Wolf01" on #openttd
06:01<Wolf01>o/
06:11<@Alberth>o/
06:11-!-frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
06:11-!-frosch123 is "frosch" on #openttdcoop.devzone +#openttd.dev #openttd
06:36-!-Samu [~oftc-webi@pa4-84-91-142-34.netvisao.pt] has joined #openttd
06:36-!-Samu is "OFTC WebIRC Client" on #openttd
06:36<Samu>hi
06:40<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
06:42<Samu>imagine I want to implement that for every road piece that is built
07:00-!-Stimrol [~Stimrol@89-160-153-213.du.xdsl.is] has joined #openttd
07:00-!-Stimrol is "Stimrol" on #openttd
07:03<Wolf01>Yes
07:03<Samu>yes?
07:04<Wolf01>What?
07:10<TrueBrain>cookie?
07:11<Wolf01>Pathfinder is ignoring my straight road and preferring the highway :S
07:12<TrueBrain>your way of the highway
07:12<TrueBrain>sounds good to me
07:12<@Alberth>cookie!
07:12<Wolf01>I'll swap the entry and exit lanes, so they can't take the highway for 200m :>
07:14<@Alberth>Samu: what raising and lowering? I can only see two mostly identical blocks of code
07:14<Samu>raising only the needed money for constructing the next thing, and then repaying it after
07:23<@Alberth>oh, only the airport type changes?
07:24<Samu>no, I meant for every kind of things
07:24<Samu>building road pieces
07:24<Samu>building road stations
07:24<Samu>buidling bridges
07:24<Samu>even demolishing stuff too
07:25<Samu>building airports
07:25<Samu>building vehicles
07:25<Samu>refiting vehicles, everything that involves money
07:25<Samu>*spending money
07:25<@Alberth>AIAirport.BuildAirport(airport1_location, airport1_type, airport1_stationId) <-- so this line changes every time
07:25<Samu>yes
07:26<@Alberth>right, does squirrel have a function type as data?
07:26<Samu>I have no idea
07:27-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
07:27<Samu>i guess it does, there's the Valuate functions
07:28<@Alberth>it exists according to the manual
07:29<@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."
07:30<@Alberth>hmm, function parameters are known, or can they change each time?
07:31<Samu>not sure I understand the question, but they can change, imagine a path of roads being built, the tiles always change
07:32<@Alberth>if they can change, make a base class that implements your test, except it calls a separate method to do the action
07:32-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Ping timeout: 480 seconds]
07:32<@Alberth>in a derived class, implement that separate method for the thing you want to test
07:33-!-Fuco [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has joined #openttd
07:33-!-Fuco is "O_o" on +#openttdcoop #openttd
07:33<@Alberth>in the derived class, you can also set parameters etc
07:33<Samu>wow, too much lingo I don't fully get
07:33<Samu>sounds like it's a difficult task for me
07:34<@Alberth>it's not that difficult, it just explodes a bit in size, as there are lots of things you can build
07:35<@Alberth>let's see how to do this, one moment
07:36<Samu>woah, appreciate the time you take on helping me
07:44<@Alberth>https://paste.openttdcoop.org/pxlnisyp2 something like this
07:45<@Alberth>Test class is the generic code, never changes. It calls "theaction()" to do the real test
07:45<@Alberth>TestBuildAirport class implements the "theaction" for building an airport, it tries, and simply returns the result
07:46<@Alberth>since it extends from Test, you can instantiate the TestBuildAirport class, and then call dotest() on it
07:46<@Alberth>code is fully untested :p
07:47<Samu>let me study it
07:47<@Alberth>Test is the baseclass, and TestAirport is derived from it
07:47<@Alberth>"theaction" is the separate method I mentioned
07:48<@Alberth>I just copied some arbitrary lines from your paste, no idea if it is correct
07:53-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
07:53-!-Wolf01 is "Wolf01" on #openttd
07:53<Wolf01>Mmmh, overcharged the UPS
07:53<Wolf01>*overloaded
07:54<Wolf01>Let's try again if it's the video card
07:56<@Alberth>I hope the display is also behind the UPS, or you can't see a thing!
07:56<@Alberth>not to mention the router, or you'll have no network :)
07:56<Wolf01>Everything is behind the UPS, that's why everything shut off when the UPS started screaming
07:57<Samu>TestBuildAirport.dotest();
07:58<Samu>never actually dealt with classes, so i'm getting some errors
07:59<@Alberth>first make an instance, you can't call the class directly
08:00<Wolf01>I need to reinstall the powerchute
08:00<@Alberth>(or you can perhaps, but it doesn't do what you think it does)
08:01<@Alberth>local tap = TestAirport(loc, tp, id); tap.dotest();
08:01<Samu>ah
08:01<@Alberth>hope it works :)
08:02<Samu>TAP is actually a portuguese air transport company
08:02<Samu>coincidence
08:03<@Alberth>you can rename the variable, simpler than renaming the company :)
08:03<Samu>or was... no longer portuguese, we sold it :8
08:04<Samu>actually it's local tap = TestAirport(airport1_location, airport1_type, airport1_stationId);
08:04<@Alberth>everybody is at their desired location, no need for transport -> let's sell it :p
08:04<Samu>loc, tp, id woudln't work
08:04<@Alberth>yeah, I don't know what values you have
08:05<Samu>hmm the index TestAirport doesn't exist :(
08:05<Samu>TestBuildAirport maybe?
08:05<@Alberth>index ?
08:05-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has quit [Ping timeout: 480 seconds]
08:05<@Alberth>ah, yes indeed
08:06<Samu>now I'm getting a weird error, never seen it before
08:06<Samu>sec
08:06<@Alberth>classes is fun :)
08:06<Samu>https://imgur.com/a/EcfFkiJ
08:07<Samu>line 126 is
08:07<Samu>loc <- location;
08:07<@Alberth>"new slot operator not supported", which is the <- thing
08:08<@Alberth>so, just = ?
08:08<Samu>ok, trying
08:08<Samu>the index loc does not exist :(
08:08<Samu>hmm
08:09<Samu>i need something before the constructor, isn't it?
08:09<nielsm>maybe the field needs to be pre-declared
08:09<Samu>loc = null; or so
08:11<Samu>the index HasMoney does not exist
08:11<Samu>why
08:11<Samu>must be WrightAI.HasMoney?
08:11<Samu>WrightAI.GetMoney
08:12<Samu>testing
08:12<Samu>oh WrightAI.RepayLoan();
08:12<Samu>damn it complains a lot
08:13<Samu>the index last_cost does not exist, but that's already past the test, the airport was built :)
08:13<Samu>thx Alberth it works
08:14<@Alberth>nice
08:15<@Alberth>as for explosion in code size, you need a new derived class for each thing you test
08:16<@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()
08:24-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has joined #openttd
08:24-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
08:27-!-Fuco [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
08:30-!-Fuco [~foobar@ip-86-49-3-131.net.upcbroadband.cz] has joined #openttd
08:30-!-Fuco is "O_o" on +#openttdcoop #openttd
08:38-!-Fuco_ [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has joined #openttd
08:38-!-Fuco_ is "O_o" on #openttdcoop #openttd
08:40-!-Fuco [~foobar@ip-86-49-3-131.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
08:45-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Ping timeout: 480 seconds]
08:51-!-Fuco [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has joined #openttd
08:51-!-Fuco is "O_o" on +#openttdcoop #openttd
08:52-!-Fuco_ [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
08:57-!-bona is "bona" on #oftc #ceph #osm-es
08:57-!-bona [~bona@7YZAABT09.tor-irc.dnsbl.oftc.net] has joined #openttd
09:00-!-bona [~bona@7YZAABT09.tor-irc.dnsbl.oftc.net] has left #openttd []
09:26<Samu>can you explain me how do I do a method to change parameters stuff
09:26-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
09:26-!-Wolf01 is "Wolf01" on #openttd
09:27<Samu>dotest remains the same
09:28<Samu>theaction is... modified?
09:29<Samu>hmm
09:30-!-Fuco_ [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has joined #openttd
09:30-!-Fuco_ is "O_o" on #openttdcoop #openttd
09:30<Wolf01>3rd take on that game, I should save after doing things :P
09:31-!-sim-al2 [~sim-al2@c-75-65-196-171.hsd1.tn.comcast.net] has quit [Ping timeout: 480 seconds]
09:32-!-Fuco [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
09:33-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
09:33-!-KouDy is "KouDy" on #openttd
09:34<Samu>sec
09:40-!-Fuco [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has joined #openttd
09:40-!-Fuco is "O_o" on +#openttdcoop #openttd
09:41-!-Fuco_ [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
09:46<Samu>comparison between instance and 0
09:46<Samu>error
09:46<Samu>uhm.. how do i get the result of the test for comparison?
09:48<Samu> local tap = TestBuildAirport(airport1_location, airport1_type, airport1_stationId); tap.DoBuildAirport(); if (tap < 0) {
09:48<Samu>can't compare tap and 0 halp!
10:00<Samu>it's always returning a false?
10:02<@Alberth>tap is an object, likely tap.DoBuildAirport() returns the result of the test?
10:03<@Alberth>ie "calling" the class makes an object, an instance of the class
10:04<@Alberth>on that object you can get its values and call its methods (=functions of the object)
10:05<@Alberth>alternatively, you store the answer in the object, and then retrieve it using the tap variable
10:06<Samu>i was hoping for a 0 or a -1
10:06<Samu>these were the values I was expecting
10:06<@Alberth>what does DoAirport() look like?
10:06<@Alberth>or perhaps just the entire class :)
10:07<Samu>ec
10:07<Samu>copy pasting
10:07<@Alberth>pasting copy
10:07<Samu>https://paste.openttdcoop.org/pgunmzidm
10:07<Samu>like that, atm
10:08<Samu>i changed -1 to false and true to 0, i was testing some stuff
10:08<Samu>eventually they should be -1 and 0 respectively
10:09<@Alberth>you shouldn't call DoBuildAirport , unless you want to just build an airport without your test
10:09<@Alberth>tap.DoMoneyTest() should give you true or false
10:10<@Alberth>or add one more layer, to set the parameters as well, let me show that
10:16<@Alberth>https://paste.openttdcoop.org/pxvhutvfz
10:18-!-frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Ping timeout: 480 seconds]
10:19<Samu>thx, let's test
10:31<Samu>nice nice https://imgur.com/a/xmWEif4
10:31<Samu>no more errors
10:33<Samu> tap = TestBuildAirport(); if (!tap.TryBuild(airport2_location, airport2_type, airport2_stationId)) {
10:33<Samu>works
10:33<Samu>waiting for a case where it can't build
10:34-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
10:39-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Ping timeout: 480 seconds]
10:40-!-Fuco_ [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has joined #openttd
10:40-!-Fuco_ is "O_o" on #openttdcoop #openttd
10:42-!-Fuco [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
10:42-!-chomwitt is "chomwitt" on #debian #debian-games
10:42-!-chomwitt [~chomwitt@ppp-94-66-223-108.home.otenet.gr] has joined #openttd
10:46-!-Fuco [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has joined #openttd
10:46-!-Fuco is "O_o" on +#openttdcoop #openttd
10:48<Samu>gonna try do for a build engine
10:48<Samu>buildvehicle
10:49-!-Fuco_ [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
10:56-!-Fuco [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
10:59-!-Fuco [~foobar@ip-86-49-3-131.net.upcbroadband.cz] has joined #openttd
10:59-!-Fuco is "O_o" on +#openttdcoop #openttd
11:07<Samu>hmm harder to do for vehicle
11:07<Samu>it got to return the vehicle in this case
11:07-!-Fuco [~foobar@ip-86-49-3-131.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
11:08<Samu>I think I did it
11:08<Samu>it didn't simplify that much for the vehicle case, I must have failed
11:11-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
11:11-!-Wolf01 is "Wolf01" on #openttd
11:11<Samu>Alberth: https://paste.openttdcoop.org/pizkc23g9
11: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
11:14<@Alberth>then in TryBuild, call the baseclass method, and if it returns success, return the vehicle else null
11:15-!-Fuco [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has joined #openttd
11:15-!-Fuco is "O_o" on +#openttdcoop #openttd
11:16<@Alberth>you didn't need a price before? with the airport?
11:16<Samu>yes, but it was all dealt with inside that test
11:16<Samu>it raised the money
11:16<Samu>built, then payed it
11:17<Samu>didn't need it outside that part
11:17<@Alberth>make a new method in the derived class like GetPrice() or so, which you call from the baseclass money test
11:17<@Alberth>so you can change GetPrice() each time without modifying the money test
11:20-!-Progman [~progman@p4FD6671D.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
11:23-!-Fuco [~foobar@ip-86-49-3-63.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
11:24-!-chomwitt [~chomwitt@ppp-94-66-223-108.home.otenet.gr] has quit [Ping timeout: 480 seconds]
11:26-!-Fuco [~foobar@ip-86-49-3-131.net.upcbroadband.cz] has joined #openttd
11:26-!-Fuco is "O_o" on +#openttdcoop #openttd
11:39-!-Fuco [~foobar@ip-86-49-3-131.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
11:47<Samu>im still confused
11:48<Samu>Alberth: got this https://paste.openttdcoop.org/pqpkz9ykh
11:49<Samu>seems to work, but i don't think that's what you wanted
11:52<@Alberth>seems much like I want
11:54<Samu>the MoneyTest class is the one that must fit all my cases?
11:54<@Alberth>I don't understand your reason for the money test though :)
11:54<@Alberth>as much as possible, as it reduces the amount of code that you have to write
11:54<@Alberth>that's what we started with right? :)
11:55<Samu>yes, I see
11:55<Samu>in the buildvehicle case I actually needed to get the vehicle, to do stuff with it
11:55<Samu>it was a bit more complicated
11:56<Samu>in the build bridge, build road, i expect not needing anything
11:57<Samu>strange, that means the airport implementation is wrong
11:57<Samu>well, i see
11:57<@Alberth>build truck would also give a vehicle, doesn't it?
11:58<@Alberth>the difference is that you don't want to do anything with a bridge
11:58<@Alberth>while you want to give orders etc to a vehicle
11:59<@Alberth>you could of course walk through all vehicles to find the one without orders
11:59<@Alberth>probably like you walk through all your stations to find new oppportunities
12:00<Samu>gonna rework the airport again, brb
12:06-!-Arveen2 [~Arveen@pD9FD31E3.dip0.t-ipconnect.de] has joined #openttd
12:06-!-Arveen2 is "realname" on #openttdcoop #openttd
12:08<Samu>instead of DoBuildAirport, DoBuildVehicle, I actually give it a common name
12:08<Samu>DoBuild
12:09<Samu>assert(AIError.GetLastError() != AIError.ERR_STATION_TOO_SPREAD_OUT);
12:09<Samu>hmm, i actually need this
12:09<Samu>lol
12:11-!-Arveen [~Arveen@pD9FD3403.dip0.t-ipconnect.de] has quit [Ping timeout: 480 seconds]
12:13-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has quit [Ping timeout: 480 seconds]
12:19<Samu>i don't need a p = null; after all
12:19-!-Gustavo6046 [~Gustavo60@189.6.232.99] has joined #openttd
12:19-!-Gustavo6046 is "Non dico nomen." on #openttd
12:22<Samu>class TestBuildVehicle extends MoneyTest {
12:22<Samu>class TestBuildAirport extends MoneyTest {
12:22<Samu>now they both extends the same class
12:22<Samu>let's see
12:24<Samu>hmm nop, it's failing to build airports
12:26-!-Flygon [~Flygon@124-148-188-30.dyn.iinet.net.au] has quit [Read error: Connection reset by peer]
12:27<Samu>AITestMode() && AIAirport.BuildAirport(loc, tp, id);
12:27<Samu>is this a valid line?
12:28<Samu>not inside any if or local
12:28<Samu>just that
12:28<Samu>sec, i'll show u
12:30<Samu>https://paste.openttdcoop.org/pkii1nhhh
12:30<Samu>i have the master class MoneyTest that suits 2 different build methods
12:30<Samu>build vehicle and build airport
12:30<Samu>I'm wondering if line 27 is valid
12:31<Samu>in the game I see it building airports and aircraft, so it seems fine, but code-wise... seems weird
12:35<@Alberth>inside a GetPrice function?
12:35<Samu>yes
12:35<@Alberth>it computes the truth value of the expression, and then discards the result
12:36<@Alberth>weird place to build an airport :p
12:36<Samu>it runs in testmode
12:36<Samu>to get the cost
12:36<Samu>it doesn't really build
12:37<@Alberth>fair enough
12:38-!-DorpsGek_II [~DorpsGek_@spam.openttd.org] has joined #openttd
12:38<DorpsGek_II>[OpenTTD/DorpsGek-github] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
12:38<DorpsGek_II> - Update aiohttp from 3.3.2 to 3.4.1 (by pyup-bot)
12:38<DorpsGek_II>https://github.com/OpenTTD/DorpsGek-github/commit/838af1d41859
12:38-!-DorpsGek_II is "Irc bot based on irc3 http://irc3.readthedocs.io" on #openttd
12:38<DorpsGek_II>[OpenTTD/DorpsGek-github] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
12:38<DorpsGek_II> - Update attrs from 18.1.0 to 18.2.0 (by pyup-bot)
12:38<DorpsGek_II>https://github.com/OpenTTD/DorpsGek-github/commit/4b97f488cd44
12:38<DorpsGek_II>[OpenTTD/DorpsGek-github] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
12:38<DorpsGek_II> - Update cryptography from 2.3 to 2.3.1 (by pyup-bot)
12:38<DorpsGek_II>https://github.com/OpenTTD/DorpsGek-github/commit/49e48d3e2649
12:38<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
12:39<@Alberth>if (AITestMode()) AIAirport.BuildAirport(loc, tp, id); is likely easier to read
12:39<DorpsGek_II>[OpenTTD/DorpsGek-runner] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
12:39<DorpsGek_II> - Update aiohttp from 3.3.2 to 3.4.1 (by pyup-bot)
12:39<DorpsGek_II>https://github.com/OpenTTD/DorpsGek-runner/commit/c01c085379be
12:39<DorpsGek_II>[OpenTTD/DorpsGek-runner] TrueBrain pushed 1 commits to pyup-scheduled-update-2018-09-01:
12:39<DorpsGek_II> - Update attrs from 18.1.0 to 18.2.0 (by pyup-bot)
12:39<DorpsGek_II>https://github.com/OpenTTD/DorpsGek-runner/commit/87b544e373af
12:39<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
12:40<LordAro>oh dear
12:43<Samu>local vehicle = TestBuildAircraft.TryBuild(best_hangar, engine);
12:43<Samu>this is much easier
12:43<Samu>than 2 lines :(
12:44<Samu>my buildairport function is a complete mess
12:45<Samu>i'm surprised everything works
12:45-!-Gustavo6056 [~Gustavo60@189.6.232.99] has joined #openttd
12:45-!-Gustavo6056 is "Non dico nomen." on #openttd
12:46<Samu>can you take a look?
12:47<Samu>erm...
12:47<Samu>i'm so scared of showing this to someone lol
12:48<Samu>https://paste.openttdcoop.org/ptzbjupwa
12:48<Samu>damn 171 lines
12:48<Samu>for a single function :(
12:50-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Read error: Connection reset by peer]
12:50-!-Gustavo6056 is now known as Gustavo6046
12:59-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
12:59-!-KouDy is "KouDy" on #openttd
13:09<@Alberth>lot of commented code, which you can all remove
13:10<@Alberth>wouldn't it be simpler to add only airports that you can actually use?
13:11<@Alberth>18-20 adds 3 heli stations, which you may remove after line 67
13:11<@Alberth>why not move line 67 before line 18?
13:13<@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
13:14<@Alberth>11-20 then simply call that function
13:16-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
13:18-!-Fuco [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has joined #openttd
13:18-!-Fuco is "O_o" on +#openttdcoop #openttd
13:24<Samu>I needed all airport types the game can offer in 1 single place
13:25-!-Fuco_ [~foobar@ip-86-49-3-139.net.upcbroadband.cz] has joined #openttd
13:25-!-Fuco_ is "O_o" on #openttdcoop #openttd
13:26-!-Fuco [~foobar@ip-86-49-3-31.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
13:29<Samu>ah, instead of filtering out from a list, I would add up to the list
13:29<Samu>build it
13:29<Samu>the opposite of what I did
13:31<Samu>but i still need a list of all airport types available anyway
13:31<Samu>:|
13:31<Samu>how would I do that
13:31-!-haudrauf [~haudrauf2@00021656.user.oftc.net] has quit [Ping timeout: 480 seconds]
13:31<Samu>i couldn't use that for cycle
13:33<Samu>ah, maybe it's doable, without a for cycling through
13:33<Samu>would do case by case
13:33-!-haudrauf [~haudrauf2@p200300C35F37A700FA4F578C0FEC8A90.dip0.t-ipconnect.de] has joined #openttd
13:33-!-haudrauf is "Haudrauf" on #openttd #frickelplatz @#ffod @#ffnord @#ffki @#ffhl @#ffhh @#fffl #cryptoparty @#ccchh @#ccc.do
13:35-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has joined #openttd
13:35-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
13:43<@Alberth>you have a sequence to add all types now too
13:43<@Alberth>so have a sequence of testing + adding instead
13:45<Samu>I can't think through
13:45<Samu>how would I test
13:46<Samu>test for engines available
13:46<Samu>if true, add corresponding airport type and only if it's available
13:46<Samu>and what about heliport removal for 2nd airport
13:47<Samu>hmm I think I prefer the way I have it for the moment
13:48<Samu>I can't think I could build up a list
13:49<Samu>if I add it in duplicate, i would get it listed twice?
13:49<Samu>if I remove it in duplicate, I don't have that issue
13:51<Samu>and the prices always change, I always have to keep the costs
13:51<Samu>especially with inflation
13:51-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has quit [Ping timeout: 480 seconds]
13:51<Samu>i can't think of doing the list in build-up way
13:52-!-Stimrol [~Stimrol@89-160-153-213.du.xdsl.is] has quit [Ping timeout: 480 seconds]
13:54-!-Fuco [~foobar@ip-86-49-3-127.net.upcbroadband.cz] has joined #openttd
13:54-!-Fuco is "O_o" on +#openttdcoop #openttd
13:55-!-Fuco_ [~foobar@ip-86-49-3-139.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
13:59-!-Gustavo6056 [~Gustavo60@189.6.232.99] has joined #openttd
13:59-!-Gustavo6056 is "Non dico nomen." on #openttd
14:01-!-roidal [~roland@194-152-172-205.adsl.highway.telekom.at] has joined #openttd
14:01-!-roidal is "roland" on #openttd
14:01-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
14:01-!-Supercheese is "Supercheese" on #openttd
14:05-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Ping timeout: 480 seconds]
14:05-!-Gustavo6056 is now known as Gustavo6046
14:06-!-tokai|noir [~tokai@00012860.user.oftc.net] has joined #openttd
14:06-!-mode/#openttd [+v tokai|noir] by ChanServ
14:06-!-tokai|noir is "Christian Rosentreter" on +#openttd
14:07-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
14:07-!-KouDy is "KouDy" on #openttd
14:10-!-Stimrol [~Stimrol@89-160-153-213.du.xdsl.is] has joined #openttd
14:10-!-Stimrol is "Stimrol" on #openttd
14:13-!-tokai [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
14:20-!-agentw4b [~agentw4b@178.77.244.91] has joined #openttd
14:20-!-agentw4b is "KlubusL" on #openttd.dev #openttdcoop #openttd
14:24-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has joined #openttd
14:24-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
14:40-!-Alberth [~alberth@00015f9e.user.oftc.net] has left #openttd []
14:47-!-roidal [~roland@194-152-172-205.adsl.highway.telekom.at] has quit [Quit: WeeChat 2.2]
14:53-!-Fuco_ [~foobar@ip-86-49-3-139.net.upcbroadband.cz] has joined #openttd
14:53-!-Fuco_ is "O_o" on #openttdcoop #openttd
14:55-!-Fuco [~foobar@ip-86-49-3-127.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
15:00-!-gelignite [~gelignite@55d4b7d8.access.ecotel.net] has joined #openttd
15:00-!-gelignite is "gelignite" on #openttd
15:10-!-Stimrol_ [~Stimrol@89-160-153-213.du.xdsl.is] has joined #openttd
15:10-!-Stimrol [~Stimrol@89-160-153-213.du.xdsl.is] has quit [Read error: Connection reset by peer]
15:10-!-Stimrol_ is "Stimrol" on #openttd
15:16-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
15:21-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has quit [Read error: Connection reset by peer]
15:21-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
15:21-!-Supercheese is "Supercheese" on #openttd
15:30-!-Stimrol [~Stimrol@89-160-153-213.du.xdsl.is] has joined #openttd
15:30-!-Stimrol is "Stimrol" on #openttd
15:30-!-Stimrol_ [~Stimrol@89-160-153-213.du.xdsl.is] has quit [Read error: Connection reset by peer]
15:51-!-Progman [~progman@p4FD6671D.dip0.t-ipconnect.de] has joined #openttd
15:51-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttdcoop #openttd
15:52-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
15:52-!-KouDy is "KouDy" on #openttd
15:55-!-Fuco_ [~foobar@ip-86-49-3-139.net.upcbroadband.cz] has quit [Ping timeout: 480 seconds]
15:59-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
16:16-!-nielsm [~nielsm@176-23-103-56-cable.dk.customer.tdc.net] has quit [Ping timeout: 480 seconds]
16:19-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
16:19-!-KouDy is "KouDy" on #openttd
16:20-!-gelignite [~gelignite@55d4b7d8.access.ecotel.net] has quit [Quit: Match found!]
16:22-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
16:26-!-sim-al2 [~sim-al2@c-75-65-196-171.hsd1.tn.comcast.net] has joined #openttd
16:26-!-sim-al2 is "sim-al2" on @#/r/openttd #openttd
17:08-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
17:08-!-KouDy is "KouDy" on #openttd
17:11<Samu>I dont understand
17:12<Samu>I have class MoneyTest inside Utils.nut file
17:12<Samu>WrightAI.nut can call it without a require("Utils.nut");
17:12<Samu>BuildManager.nut cannot
17:13<Samu>why does it require a require("Utils.nut");
17:13<Samu>?
17:13<Wolf01>Dependency chain?
17:14<Samu>well, i'm clueless about such a chain, this code wasn't originally mine
17:15<Wolf01>Do you have other includes in wrightai which may include utils.nut?
17:15-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
17:16<Samu>I have this
17:16<Samu>class WrightAI extends AIController {
17:16<Samu>function WrightAI::UpdateAircraftLists() {
17:16<Samu>all functions have WrightAI::
17:16<Samu>then i also have some classes
17:16<Samu>class TestRefitAircraft extends MoneyTest {
17:17<Samu>honestly I dunno
17:17<Wolf01>Did you at least try to parse what I asked you?
17:17<Samu>other includes? none
17:17-!-Gustavo6056 [~Gustavo60@189.6.232.99] has joined #openttd
17:17-!-Gustavo6056 is "Non dico nomen." on #openttd
17:18<Samu>you mean require stuff?
17:18<Wolf01>Yes
17:18<Samu>there's none
17:19<Samu>there are a lot of requires in main.nut
17:19<Samu>including require("Utils.nut");
17:19<Samu>require("WrightAI.nut");
17:19<Samu>require("BuildManager.nut");
17:20<Samu>but apparently, I'm getting MoneyTest does not exist, or invalid, sec let me get correct error
17:21<Samu>when i do it inside buildmanager
17:21<Samu>here https://imgur.com/a/fzw0f2m
17:22<Samu>line 40 is this: class TestRemoveRoadStation extends MoneyTest {
17:22-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Ping timeout: 480 seconds]
17:22-!-Gustavo6056 is now known as Gustavo6046
17:23<Samu>MoneyTest is a Class inside Utils.nut file
17:23-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
17:23-!-KouDy is "KouDy" on #openttd
17:32-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
17:58-!-sla_ro|master [~sla.ro@84.117.88.126] has quit []
18:08-!-Wacko1976 [~IceChat9@027-161-128-083.dynamic.caiway.nl] has quit [Quit: IceChat - It's what Cool People use]
18:10-!-Progman [~progman@p4FD6671D.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
18:14-!-Tharbakim [~Tharbakim@S0106788a20071e8d.vf.shawcable.net] has quit []
18:15-!-Wormnest [~Wormnest@s5596abd2.adsl.online.nl] has quit [Quit: Leaving]
18:18-!-glx [kvirc@000128ec.user.oftc.net] has joined #openttd
18:18-!-mode/#openttd [+v glx] by ChanServ
18:18-!-glx is "Loïc GUILLOUX" on @#opendune @#openttd.noai #openttd.notice +#openttd
18:31-!-hph^ [~hph@ip72-195-187-57.mc.at.cox.net] has quit [Ping timeout: 480 seconds]
18:31-!-hph^ [~hph@ip72-195-187-57.mc.at.cox.net] has joined #openttd
18:31-!-hph^ is "..." on #openttd #bcache #moocows #publiclab #osm-ru #subgraph ##libtech #friendica #freedombox #ovirt #ceph-devel #biz #Qubes_OS #debian-next #privacytools.io #oftc #ceph #osm-es #qemu #virt
18:45-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
18:45-!-KouDy is "KouDy" on #openttd
18:56-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
19:32-!-Tharbakim [~Tharbakim@S0106788a20071e8d.vf.shawcable.net] has joined #openttd
19:32-!-Tharbakim is "Tharbakim" on #openttd.dev #openttd #lxde #irssi #bitlbee #/r/openttd
19:50-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
19:51-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has quit [Read error: Connection reset by peer]
19:52-!-Supercheese [~Superchee@cpe-98-146-230-183.natnow.res.rr.com] has joined #openttd
19:52-!-Supercheese is "Supercheese" on #openttd
20:11<Samu>what's the difference between cargoID cargo_type and cargoClass cargo_class ?
20:20<Samu>nevermind, i got it
20:20<Samu>LuDiAI had it wrong
20:20<Samu>I'm surprised it still worked
20:31<LordAro>welcome to software :p
20:33-!-sim-al2 [~sim-al2@c-75-65-196-171.hsd1.tn.comcast.net] has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Po-ta-to, boil em, mash em, stick em in a stew.]
20:49-!-HerzogDeXtEr [~farci@dslb-188-103-224-017.188.103.pools.vodafone-ip.de] has quit [Read error: Connection reset by peer]
20:49<Samu>i'm off to bed, take care
20:49-!-Samu [~oftc-webi@pa4-84-91-142-34.netvisao.pt] has quit [Quit: Page closed]
21:18-!-Gustavo6056 [~Gustavo60@189.6.232.99] has joined #openttd
21:18-!-Gustavo6056 is "Non dico nomen." on #openttd
21:25-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Ping timeout: 480 seconds]
21:25-!-Gustavo6056 is now known as Gustavo6046
21:36-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
21:36-!-KouDy is "KouDy" on #openttd
21:43-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
21:59-!-glx [kvirc@000128ec.user.oftc.net] has quit [Quit: Bye]
22:18-!-Gustavo6056 [~Gustavo60@189.6.232.99] has joined #openttd
22:18-!-Gustavo6056 is "Non dico nomen." on #openttd
22:24-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
22:24-!-KouDy is "KouDy" on #openttd
22:25-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Ping timeout: 480 seconds]
22:25-!-Gustavo6056 is now known as Gustavo6046
22:39-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
22:54-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
22:54-!-KouDy is "KouDy" on #openttd
22:57-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Remote host closed the connection]
23:18-!-Gustavo6056 [~Gustavo60@189.6.232.99] has joined #openttd
23:18-!-Gustavo6056 is "Non dico nomen." on #openttd
23:25-!-Gustavo6046 [~Gustavo60@189.6.232.99] has quit [Ping timeout: 480 seconds]
23:25-!-Gustavo6056 is now known as Gustavo6046
23:32-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has joined #openttd
23:32-!-KouDy is "KouDy" on #openttd
23:34-!-haudrauf [~haudrauf2@00021656.user.oftc.net] has quit [Ping timeout: 480 seconds]
23:38-!-haudrauf [~haudrauf2@p200300C35F3FBF00A043AB33D63BD3AC.dip0.t-ipconnect.de] has joined #openttd
23:38-!-haudrauf is "Haudrauf" on #openttd #frickelplatz @#ffod @#ffnord @#ffki @#ffhl @#ffhh @#fffl #cryptoparty @#ccchh @#ccc.do
23:40-!-KouDy [~koudy@ip4-83-240-28-102.cust.nbox.cz] has quit [Read error: Connection reset by peer]
---Logclosed Sun Sep 02 00:00:32 2018