aboutsummaryrefslogtreecommitdiff
path: root/plugins/inanimate.lua
blob: a01aa40d49ad0e420401b7569849805ee4cc111e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
local core = require "core"
local View = require "core.view"

function View:move_towards(t, k, dest)
  if type(t) ~= "table" then
    return self:move_towards(self, t, k, dest)
  end
  if t[k] ~= dest then
    core.redraw = true
  end
  t[k] = dest
end