Skip to content

Commit

Permalink
Use constants' type as their name. (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcCote committed Feb 3, 2022
1 parent c419bb6 commit b94f39a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions textworld/generator/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def generate_text_from_grammar(game, grammar: Grammar):
# Assign name and description to objects.
for obj in game.world.objects:
if obj.type in ["I", "P"]:
obj.name = obj.type
continue

assign_name_to_object(obj, grammar, game.infos)
Expand Down

0 comments on commit b94f39a

Please sign in to comment.