+ if world_db["HUMIDITY"] > 2 and 0 == rand.next() % 2:
+ world_db["NEW_SPAWN"] += 1
+ world_db["HUMIDITY"] -= 1
+ if world_db["NEW_SPAWN"] >= 16:
+ world_db["NEW_SPAWN"] -= 16
+ from server.new_thing import new_Thing
+ while 1:
+ y = rand.next() % world_db["MAP_LENGTH"]
+ x = rand.next() % world_db["MAP_LENGTH"]
+ if chr(world_db["MAP"][y * world_db["MAP_LENGTH"] + x]) !=\
+ "5":
+ from server.utils import id_setter
+ tid = id_setter(-1, "Things")
+ world_db["Things"][tid] = new_Thing(
+ world_db["PLAYER_TYPE"], (y, x))
+ pos = y * world_db["MAP_LENGTH"] + x
+ break
+ positions_to_wet = []