diff --git a/stead/stead.lua b/stead/stead.lua index c61dceb..c8f0cff 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -2065,16 +2065,24 @@ function remove(obj, from) return o end -function take(obj, wh) +function taketo(obj, wh, pos) local o = remove(obj, wh); if not isObject(o) then error "Trying to take wrong object."; end - inv():add(obj); + inv():add(obj, pos); o._taken = true return o end +function take(obj, wh) + return taketo(obj, wh); +end + +function takef(obj, wh) + return taketo(obj, wh, 1); +end + function putto(obj, w, pos) local wh local o = ref(obj);