Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def intFloor(*args):
return [int(math.floor(x)) for x in flatten(args)]
def intFloor(*args):
return [int(math.floor(x)) for x in flatten(args)]
def setSign(self, *args):
"""Set a sign (x,y,z,id,data,[line1,line2,line3,line4])
Wall signs (id=68) require data for facing direction 2=north, 3=south, 4=west, 5=east
Standing signs (id=63) require data for facing rotation (0-15) 0=south, 4=west, 8=north, 12=east
@author: Tim Cummings https://www.triptera.com.au/wordpress/"""
lines = []
flatargs = []
for arg in flatten(args):
flatargs.append(arg)
for flatarg in flatargs[5:]:
lines.append(flatarg.replace(",",";").replace(")","]").replace("(","["))
self.conn.send(b"world.setSign",intFloor(flatargs[0:5]) + lines)