Add location's attributes in Location.str

This commit is contained in:
Midgard 2020-01-26 15:40:04 +01:00
parent 9494886965
commit 238c841239
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -85,11 +85,13 @@ class Location:
def __str__(self):
return (
"============================\n"
"{0.id}: {0.name}\n"
"{0.id}: {0.name}"
"{1}\n"
"============================\n"
"\n"
"{1}"
"{2}"
).format(
self,
"".join("\n\t{} {}".format(k, v) for k, v in self.attributes.items()),
"\n".join(map(str, self.dishes))
)