show clone id on props page

This commit is contained in:
aronwk-aaron 2023-11-09 23:48:28 -06:00
parent 01e304a041
commit 7ca62fe478
2 changed files with 20 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import string
import datetime import datetime
from flask_user import current_app from flask_user import current_app
from app import db 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 pathlib
import zlib import zlib
from wand import image from wand import image
@ -180,6 +180,17 @@ def load_property(zone, player):
) )
new_prop_content.save() 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") @click.command("gen_image_cache")
def gen_image_cache(): def gen_image_cache():

View File

@ -77,6 +77,14 @@
{{ property.performance_cost }} {{ property.performance_cost }}
</div> </div>
</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" %} {% if request.endpoint != "properties.view" %}
<br/> <br/>
<div class="row"> <div class="row">