--- Log opened Tue Nov 22 00:00:12 2016 20161122 00:05:53< lamefun> celticminstrel, http://paste.ofcode.org/Nv7bZW4NHm8VTwTZSwVtQV - the Lua side of the "incredible effort". 20161122 00:06:42< lamefun> this works brilliantly! 20161122 00:07:25< lamefun> less than 200 lines of code total, compatible with Lua require syntax, no need to create a non-embedded version because it tells me which module the code is from in "load"... 20161122 00:10:09< lamefun> i mean, when an error occurs 20161122 00:14:07< lamefun> now, because I'm an idiot and didn't do this in the first place, I'll have to port my existing Lua code to the proper module system... 20161122 00:41:27-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20161122 01:20:47-!- tokage [~tokage@fsfe/tokage] has quit [Quit: tokage] 20161122 01:21:03-!- tokage [~tokage@fsfe/tokage] has joined #wesnoth 20161122 03:22:45-!- Appleman1234 [~Appleman1@KD106161205095.au-net.ne.jp] has quit [Ping timeout: 248 seconds] 20161122 03:28:17-!- ArneBab_ [~quassel@55d468f7.access.ecotel.net] has joined #wesnoth 20161122 03:32:45-!- ArneBab [~quassel@freenet/developer/arnebab] has quit [Ping timeout: 268 seconds] 20161122 04:06:45-!- Blukunfando [~bkf@2a02:2e02:81e4:8700:2e81:58ff:fee8:bc8e] has joined #wesnoth 20161122 05:14:34-!- lamefun [~lamefun@5.165.188.79] has quit [Remote host closed the connection] 20161122 05:25:34-!- edaq [~edaq3@h184-60-58-252.cytnin.broadband.dynamic.tds.net] has quit [Remote host closed the connection] 20161122 05:37:25-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth 20161122 06:08:37-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20161122 06:10:00-!- Appleman1234 [~Appleman1@KD106161210210.au-net.ne.jp] has joined #wesnoth 20161122 06:11:14-!- Appleman1234 [~Appleman1@KD106161210210.au-net.ne.jp] has quit [Remote host closed the connection] 20161122 06:22:35-!- Appleman1234 [~Appleman1@KD106161210210.au-net.ne.jp] has joined #wesnoth 20161122 06:24:03-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] 20161122 06:30:54-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth 20161122 08:11:27-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20161122 08:50:44-!- RatArmy [~RatArmy@om126204196053.6.openmobile.ne.jp] has joined #wesnoth 20161122 08:59:36-!- RatArmy [~RatArmy@om126204196053.6.openmobile.ne.jp] has quit [Ping timeout: 252 seconds] 20161122 09:03:42-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20161122 10:06:10-!- RatArmy [~RatArmy@om126204196053.6.openmobile.ne.jp] has joined #wesnoth 20161122 10:35:39-!- RatArmy [~RatArmy@om126204196053.6.openmobile.ne.jp] has quit [Ping timeout: 252 seconds] 20161122 10:45:11-!- salluc69 [~salluc69@host32-193-dynamic.244-95-r.retail.telecomitalia.it] has joined #wesnoth 20161122 11:11:27-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20161122 12:09:29-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161122 12:17:57-!- RatArmy [~RatArmy@om126204196053.6.openmobile.ne.jp] has joined #wesnoth 20161122 12:22:33-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 245 seconds] 20161122 12:38:51-!- RatArmy [~RatArmy@om126204196053.6.openmobile.ne.jp] has quit [Quit: Konversation terminated!] 20161122 12:48:16-!- Kwandulin [~Miranda@93.221.43.143] has joined #wesnoth 20161122 12:56:10-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth 20161122 13:58:03-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 268 seconds] 20161122 15:04:45-!- Kwandulin [~Miranda@93.221.43.143] has quit [Read error: Connection reset by peer] 20161122 15:50:49-!- salluc69 [~salluc69@host32-193-dynamic.244-95-r.retail.telecomitalia.it] has quit [Quit: Sto andando via] 20161122 15:52:07-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth 20161122 16:42:45-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161122 16:43:22-!- celticminstrel [~celmin@unaffiliated/celticminstrel] has joined #wesnoth 20161122 17:09:40-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth 20161122 17:11:48-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth 20161122 17:45:16-!- Kranix [~magnus@185.118.249.51] has joined #wesnoth 20161122 18:23:41-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth 20161122 18:30:19-!- wario [~wario_@unaffiliated/wario] has joined #wesnoth 20161122 18:47:25-!- jemadux [~jemadux@unaffiliated/jemadux] has joined #wesnoth 20161122 18:50:14-!- claymore [~claymore@unaffiliated/claymore] has joined #wesnoth 20161122 19:30:26-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161122 19:49:06-!- lamefun [~lamefun@5.165.188.79] has joined #wesnoth 20161122 20:14:05< DeFender1031> is there a way to make a location filter's adjacent act recursively? for example, if I wanted to select all contiguous patches of dry dirt that are adjacent to a lava space (meaning, all Rd hexes that are adjacent to a Ql* or adjacent to an Rd which is adjacent to a Ql* or adjacent to an Rd adjacent to an Rd adjacent to a Ql*, etc.) 20161122 20:17:35< zookeeper> no, you need to use radius and [filter_radius] to get something like that 20161122 20:17:41< zookeeper> (or a loop, of course) 20161122 20:24:27< DeFender1031> a loop would obviously work. I was just wondering whether there was anything built-in to handle this case. 20161122 20:26:35< zookeeper> well, radius is the simplest 20161122 20:26:55< zookeeper> radius=99 [filter_radius] terrain=Rd 20161122 20:28:41< DeFender1031> except that'll match any Rd within the radius, including other sections of Rd not attached to lava. 20161122 20:29:22< DeFender1031> in fact, as long as the map is smaller than 99x99, that'd be no different than just using a straight filter, no? 20161122 20:41:12< zookeeper> no, it makes the radius only expand to those adjacent hexes which have terrain=Rd 20161122 20:42:00< celticminstrel> Wouldn't it still match non-contiguoud Rd too? 20161122 20:42:14< zookeeper> no, because it can't ever get to them 20161122 20:42:25< zookeeper> assuming you start from one location, obviously 20161122 20:42:51< celticminstrel> Ah, I see. 20161122 20:43:51< celticminstrel> ...seems like it might not match all contiguous cases in some non-convex cases. 20161122 20:44:07< celticminstrel> ^contiguous hexes 20161122 20:46:18< zookeeper> well if you have x,y,radius=10,20,999 [filter_radius] terrain=Rd [/filter_radius] then that will include the contiguous area of Rd hexes that's touching 10,20 (and 10,20 itself too of course) 20161122 20:47:18< zookeeper> unless you have a really really twisting zig-zag line of Rd that's >999 in length. in which case just use 9999 :p 20161122 20:47:25< celticminstrel> Even if there's a hole? 20161122 20:47:45< zookeeper> wth is a hole? 20161122 20:48:12< DeFender1031> zookeeper, you don't know what a hole is? 20161122 20:48:37< DeFender1031> and yeah, you're right. seems like radius with an unreasonably high number ought to do it 20161122 20:48:39< zookeeper> not in this context and in a way which could possibly make any sense, no :p 20161122 20:48:41< celticminstrel> Suppose you have a donut shape, and 10,20 happens to fall on the top part of it. 20161122 20:48:50< celticminstrel> (donut shape of Rd tiles) 20161122 20:48:58< celticminstrel> Would that filter match the whole donut? 20161122 20:49:04< DeFender1031> celticminstrel, why not? 20161122 20:49:05< zookeeper> how could it not? 20161122 20:49:15< celticminstrel> I don't know. It depends how it works. 20161122 20:49:34< celticminstrel> If it's casting lines from 10,20, it wouldn't, but if it's flood-filling limited by the radius, it would. 20161122 20:49:44< zookeeper> well, it keeps expanding to adjacent hexes... 20161122 20:49:53< DeFender1031> in other news, on my fourth attempt to do so, i'm finally being not complete shit at drawing a cave map. 20161122 20:49:54< zookeeper> i suppose you'd call that a flood fill 20161122 20:50:21< celticminstrel> It doesn't just expand in the direction that would increase the radius? 20161122 20:50:48< DeFender1031> https://forums.wesnoth.org/viewtopic.php?f=8&t=44444 apparently I've been trying on-and-off since august... :P 20161122 20:51:37< zookeeper> celticminstrel, no, it expands to any adjacent location it can 20161122 20:51:47< celticminstrel> Okay. 20161122 20:53:20< DeFender1031> I assume it also skips already-matched hexes if it re-encounters them? 20161122 20:53:59< DeFender1031> also, if that's the case, there should maybe be a special value of "infinite" for the radius 20161122 20:54:44< celticminstrel> Presumably, as if it didn't it would run forever. 20161122 20:55:18< celticminstrel> 999 is the "official" magic value for "infinite" IIRC (there's a macro). 20161122 20:55:51< celticminstrel> If you ask me it should probably be more like 99999. 20161122 21:00:50< zookeeper> DeFender1031, well it won't include them twice if that's what you're asking 20161122 21:01:41< DeFender1031> celticminstrel, that's idiotic though. "Infinite" should be whatever the max integer value is internally to the code for whatever field. 20161122 21:01:41< celticminstrel> If it didn't skip already-matched hexes, the algorithm would literally run forever (or cause a stack overflow, if you're lucky). 20161122 21:01:49< DeFender1031> ah, good point. 20161122 21:02:04< DeFender1031> well... no, it actually wouldn't 20161122 21:02:11< celticminstrel> DeFender1031: The max integer value isn't something I think should be exposed to WML. 20161122 21:02:20< DeFender1031> it'd run however many times you told it 20161122 21:02:42< celticminstrel> ? 20161122 21:02:49< DeFender1031> celticminstrel, I agree, which is why there should be an "infinite" magic value which gets interpreted as such internally 20161122 21:02:55 * celticminstrel is thinking of generic floodfill though, might be a bit different. 20161122 21:03:42< DeFender1031> celticminstrel, my question is, with a donut-shaped contiguous area, will it re-check the hexes it already matched until it's taken 999 steps, or will it ignore those and go only to ones that aren't yet included? 20161122 21:05:16 * celticminstrel wouldn't think of 999 as a limit to the total number of steps... 20161122 21:06:46< zookeeper> hmm 20161122 21:07:45< zookeeper> i misspoke 20161122 21:08:39< DeFender1031> zookeeper, oh? 20161122 21:08:52< DeFender1031> celticminstrel, then what exactly do you think 999 is? 20161122 21:08:58< zookeeper> x,y,radius=10,20,999 [filter_radius] terrain=Rd [/filter_radius] will include any Rd connected to 10,20 _in a 999 radius_. it doesn't count steps. 20161122 21:09:00< zookeeper> i think! 20161122 21:12:04< zookeeper> so yeah, celticminstrel was half-correct; it doesn't expand to adjacent hexes for 999 steps, it expands out from the original location(s) 999 times and every time only adds the locations matching the [filter_location]. and certainly aborts early if it encounters an expansion step during which no new locations are added. 20161122 21:25:04< celticminstrel> So maybe it can be thought of as "number of steps", but each step is a ring of tiles, or something. 20161122 21:28:02-!- lamefun [~lamefun@5.165.188.79] has quit [Remote host closed the connection] 20161122 21:38:13-!- jemadux [~jemadux@unaffiliated/jemadux] has quit [Ping timeout: 265 seconds] 20161122 21:39:57-!- claymore [~claymore@unaffiliated/claymore] has quit [Quit: Leaving] 20161122 21:47:13-!- edaq [~edaq3@h184-60-58-252.cytnin.broadband.dynamic.tds.net] has joined #wesnoth 20161122 21:51:02-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20161122 21:51:03-!- jemadux [~jemadux@unaffiliated/jemadux] has joined #wesnoth 20161122 21:59:20-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth 20161122 22:45:24-!- jemadux [~jemadux@unaffiliated/jemadux] has quit [Remote host closed the connection] 20161122 22:52:42< DeFender1031> same difference. it still only gets to a maximum of 999 away at the farthest reach. obviousl a step is in any direction that allows that next step. 20161122 22:55:05< zookeeper> but at least you don't need to worry about whether 999 is enough in every theoretical case 20161122 23:10:16< DeFender1031> well, we know it's not. 20161122 23:10:38< zookeeper> eh? 20161122 23:11:03< zookeeper> for it to not be enough, the map would need to be >999 wide or tall 20161122 23:23:21-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20161122 23:35:39-!- Kranix [~magnus@185.118.249.51] has quit [Remote host closed the connection] 20161122 23:36:14< DeFender1031> so then what happens if the contiguous areas curves back upon itself? 20161122 23:57:58-!- wario [~wario_@unaffiliated/wario] has quit [Quit: Leaving] --- Log closed Wed Nov 23 00:00:16 2016