projects
/
smartshop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efc7223
)
solved bug with alerting
author
Gabriel Pérez-Cerezo
<gabriel@gpcf.eu>
Sat, 18 Nov 2017 11:57:46 +0000
(12:57 +0100)
committer
Gabriel Pérez-Cerezo
<gabriel@gpcf.eu>
Sat, 18 Nov 2017 11:57:46 +0000
(12:57 +0100)
init.lua
patch
|
blob
|
history
diff --git
a/init.lua
b/init.lua
index
9f518e8
..
2852e6c
100644
(file)
--- a/
init.lua
+++ b/
init.lua
@@
-123,7
+123,7
@@
smartshop.receive_fields=function(player,pressed)
if type==1 then
\r
inv:remove_item("main", stack)
\r
inv:add_item("main", pay)
\r
- if not inv:contains_item("main", stack)
and not meta:get_int("alerted") or meta:get_int("alerted") == 0
then
\r
+ if not inv:contains_item("main", stack)
and (not meta:get_int("alerted") or meta:get_int("alerted") == 0)
then
\r
meta:set_int("alerted",1) -- Do not alert twice
\r
smartshop.send_mail(meta:get_string("owner"), pos, stack)
\r
end
\r