+ player_will_be_generated = False
+ playertype = world_db["PLAYER_TYPE"]
+ for ThingType in world_db["ThingTypes"]:
+ if playertype == ThingType:
+ if 0 < world_db["ThingTypes"][ThingType]["TT_START_NUMBER"]:
+ player_will_be_generated = True
+ break
+ if not player_will_be_generated:
+ print("Ignoring beyond SEED_MAP: " +
+ "No player type with start number >0 defined.")
+ return
+ wait_action = False
+ for ThingAction in world_db["ThingActions"]:
+ if "wait" == world_db["ThingActions"][ThingAction]["TA_NAME"]:
+ wait_action = True
+ if not wait_action:
+ print("Ignoring beyond SEED_MAP: " +
+ "No thing action with name 'wait' defined.")
+ return
+ setter(None, "SEED_MAP", 0, 4294967295)(seed_string)
+ world_db["Things"] = {}
+ remake_map()
+ world_db["WORLD_ACTIVE"] = 1
+ world_db["TURN"] = 1
+ for i in range(world_db["ThingTypes"][playertype]["TT_START_NUMBER"]):
+ world_db["Things"][id_setter(-1, "Things")] = {
+ "T_LIFEPOINTS": world_db["ThingTypes"][playertype]["TT_LIFEPOINTS"],
+ "T_TYPE": playertype,
+ "T_POSY": 0, # randomize safely
+ "T_POSX": 0, # randomize safely
+ "T_ARGUMENT": 0,
+ "T_PROGRESS": 0,
+ "T_SATIATION": 0,
+ "T_COMMAND": 0,
+ "T_CARRIES": [],
+ "carried": False,
+ "T_MEMTHING": [],
+ "T_MEMMAP": False,
+ "T_MEMDEPTHMAP": False
+ }
+ # generate fov map?
+ # TODO: Generate things (player first, with updated memory)
+ atomic_write(io_db["path_out"], "NEW_WORLD\n", do_append=True)