added . to maths operator to support floats
This commit is contained in:
2
calc.py
2
calc.py
@@ -1,7 +1,7 @@
|
|||||||
from helpers import *
|
from helpers import *
|
||||||
|
|
||||||
calc_users = open_json_file("calc", [])
|
calc_users = open_json_file("calc", [])
|
||||||
math_operators = ["+", "-", "*", "/", "&", "|"]
|
math_operators = ["+", "-", "*", "/", "&", "|",".",]
|
||||||
ignore_operators = ["**", "&&", "||"] # ** may be too intensive, the others cause syntax errors
|
ignore_operators = ["**", "&&", "||"] # ** may be too intensive, the others cause syntax errors
|
||||||
calc_perm = "utils.calc"
|
calc_perm = "utils.calc"
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ def on_dammnspam_command(sender, args):
|
|||||||
|
|
||||||
@hook.event("block.BlockBreakEvent", "normal")
|
@hook.event("block.BlockBreakEvent", "normal")
|
||||||
def on_block_break(event):
|
def on_block_break(event):
|
||||||
global removing_input
|
/ global removing_input
|
||||||
|
|
||||||
if removing_input:
|
if removing_input:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user