[partially-solved] surface.get_tile{}, .get_tileproperties{}

Things that already exist in the current mod API
Post Reply
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[partially-solved] surface.get_tile{}, .get_tileproperties{}

Post by aubergine18 »

Would it be possible to make surface.get_tile() and surface.get_tileproperties() accept position objects ( {x=x,y=y} or {x,y} )? In most cases where I'm doing stuff with tiles, I already have such object and would be nice to simply re-use it rather than pulling out specific properties just for these two functions. Most other tile/position related methods/properties already accept position objects, such as surface.create_entity(), player.position, etc., so it would also improve consistency.

Also, shouldn't get_tileproperties() be called get_tile_properties()?
Last edited by aubergine18 on Sat Oct 08, 2016 6:57 am, edited 1 time in total.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [solved] surface.get_tile{}, .get_tileproperties{}

Post by aubergine18 »

Partially implemented in 0.14.13

viewtopic.php?f=3&t=33827

Doesn't look like get_tileproperties() was updated though: http://lua-api.factorio.com/latest/LuaS ... properties
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [partially-solved] surface.get_tile{}, .get_tileproperties{}

Post by aubergine18 »

Just tested surface.get_tileproperties() and it still requires two separate x,y params - would it be possible to update it to also accept position objects in form {x,y} and {x=x, y=y} ?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Already exists”