summaryrefslogtreecommitdiff
path: root/client/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'client/main.lua')
-rw-r--r--client/main.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/client/main.lua b/client/main.lua
index 4941814..244925e 100644
--- a/client/main.lua
+++ b/client/main.lua
@@ -95,13 +95,12 @@ function love.update(dt)
end
local mh = camera:screen_to_world(Pos:make(love.mouse.getPosition())):to_hex():round()
- if false== map:at(mh) and love.mouse.isDown(1) then
- map:set_at(mh,true)
- send_settile(mh,true)
- elseif map:at(mh) and love.mouse.isDown(2) then
- map:set_at(mh,false)
- -- print(mh,false)
- send_settile(mh,false)
+ if map:at(mh) == 0 and love.mouse.isDown(1) then
+ map:set_at(mh,9)
+ send_settile(mh,9)
+ elseif map:at(mh) ~= 0 and love.mouse.isDown(2) then
+ map:set_at(mh,0)
+ send_settile(mh,0)
end
if local_player then