Skip to content

Commit

Permalink
show clone id on props page
Browse files Browse the repository at this point in the history
  • Loading branch information
aronwk-aaron committed Nov 10, 2023
1 parent 01e304a commit 7ca62fe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import datetime
from flask_user import current_app
from app import db
from app.models import Account, PlayKey, CharacterInfo, Property, PropertyContent, UGC, Mail
from app.models import Account, PlayKey, CharacterInfo, Property, PropertyContent, UGC, Mail, CharacterXML
import pathlib
import zlib
from wand import image
Expand Down Expand Up @@ -180,6 +180,17 @@ def load_property(zone, player):
)
new_prop_content.save()

@click.command("remove_buffs")
@with_appcontext
def remove_buffs():
"""Clears all buff from all characters"""
chars = CharacterXML.query.all()
for char in chars:
character_xml = ET.XML(character_data.xml_data.replace("\"stt=", "\" stt="))
dest = character_xml.find(".//buff...")
dest.remove(character_xml.find(".//buff"))
character_data.save()


@click.command("gen_image_cache")
def gen_image_cache():
Expand Down
8 changes: 8 additions & 0 deletions app/templates/partials/_property.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@
{{ property.performance_cost }}
</div>
</div>
<div class="row">
<div class="col text-right">
Clone ID:
</div>
<div class="col">
{{ property.clone_id }}
</div>
</div>
{% if request.endpoint != "properties.view" %}
<br/>
<div class="row">
Expand Down

0 comments on commit 7ca62fe

Please sign in to comment.