Skip to content

Instantly share code, notes, and snippets.

@warmist
Created March 19, 2016 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warmist/cbf50da12467ba02bf7b to your computer and use it in GitHub Desktop.
Save warmist/cbf50da12467ba02bf7b to your computer and use it in GitHub Desktop.
function set_tile_type(pos,tile_type )
local block=dfhack.maps.getTileBlock(pos)
block.tiletype[math.fmod(pos.x,16)][math.fmod(pos.y,16)]=tile_type
end
local args={...}
set_tile_type(copyall(df.global.cursor),tonumber(args[1]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment