- length = world_db["MAP_LENGTH"]
- map = None
- if not world_db["Things"][command_tid.id][maptype]:
- map = bytearray(b' ' * (length ** 2))
- else:
- map = world_db["Things"][command_tid.id][maptype]
- map[val * length:(val * length) + length] = mapline.encode()
+ return val
+ return None
+
+ def nonThingMap_helper(str_int, mapline):
+ val = valid_map_line(str_int, mapline)
+ if None != val:
+ length = world_db["MAP_LENGTH"]
+ if not world_db["MAP"]:
+ map = bytearray(b' ' * (length ** 2))
+ else:
+ map = world_db["MAP"]
+ map[val * length:(val * length) + length] = mapline.encode()
+ if not world_db["MAP"]:
+ world_db["MAP"] = map
+
+ @test_Thing_id
+ def ThingMap_helper(str_int, mapline):
+ val = valid_map_line(str_int, mapline)
+ if None != val:
+ length = world_db["MAP_LENGTH"]
+ if not world_db["Things"][command_tid.id][maptype]:
+ map = bytearray(b' ' * (length ** 2))
+ else:
+ map = world_db["Things"][command_tid.id][maptype]
+ map[val * length:(val * length) + length] = mapline.encode()
+ if not world_db["Things"][command_tid.id][maptype]: