Skip to content

Commit

Permalink
feat: Wordwrap Concierge Mii messages
Browse files Browse the repository at this point in the history
  • Loading branch information
noahpistilli committed Jul 4, 2024
1 parent deac5b1 commit c735c14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion url1/mii.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from room import app
from helpers import xml_node_name, RepeatedElement
from models import db, ConciergeMiis, MiiData, MiiMsgInfo
from textwrap import wrap


@app.route("/url1/mii/<int:mii_id>.mii")
Expand Down Expand Up @@ -62,7 +63,7 @@ def mii_met(mii_id):

# As seq/msg can repeat within a single msginfo, we add with a RepeatedKey.
separate[info.type].append(
RepeatedElement({"seq": info.seq, "msg": info.msg, "face": info.face})
RepeatedElement({"seq": info.seq, "msg": "\n".join(wrap(info.msg, 23)), "face": info.face})
)

# Then, convert all separate types to our actual msginfo type.
Expand Down

0 comments on commit c735c14

Please sign in to comment.