fixed list markers not being added

i forgor
This commit is contained in:
bucket
2026-03-08 15:17:20 +01:00
parent 398eb585fd
commit 222d9b940d
4 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# TFVR Ban List Editor
Requirements:
- [Godot 4.7 Indev2](https://godotengine.org/download/archive/4.7-dev2/)
- [Godot 4.7 dev2](https://godotengine.org/download/archive/4.7-dev2/)
+4
View File
@@ -6,6 +6,7 @@ func Export(Punishments:Array[Punishment],file:String) -> void:
push_error("!fileaccess is true")
return
var content:String = ""
content += "L!ListBegin\n"
for punishment in Punishments:
if !punishment.username:
continue
@@ -15,6 +16,7 @@ func Export(Punishments:Array[Punishment],file:String) -> void:
punishment.punishment_types.MUTE else "BAN") + "\n"
content += "REASON: " + punishment.punish_reason + "\n"
content += "END_DATE: " + str(punishment.punish_end) + "\n"
content += "L!ListEnd\n"
fileaccess.store_string(content)
@@ -24,9 +26,11 @@ func Exportv1(Punishments:Array[Punishment],file:String) -> void:
push_error("!fileaccess is true")
return
var content:String = ""
content += "L!ListBegin\n"
for punishment in Punishments:
if !punishment.username:
continue
content += "NAME: " + punishment.username + "\n"
content += "UID: " + punishment.uid + "\n"
content += "L!ListEnd\n"
fileaccess.store_string(content)
+5 -2
View File
@@ -152,8 +152,9 @@ func add_punishments(file:String):
func clear_children():
save_label.hide()
for child in PunishContainer.get_children():
print("kill ",child)
child.queue_free()
update_ban_counter()
update_ban_counter.call_deferred()
func edit_called(on:PunishShowcase,set_time:bool = false):
save_label.show()
@@ -166,10 +167,12 @@ func edit_called(on:PunishShowcase,set_time:bool = false):
update_ban_counter()
func set_file(path:String):
clear_children()
print("buh")
current_path = path
file_label.text = path
clear_children()
add_punishments(path)
update_ban_counter.call_deferred()
func close_request():
if !unsaved:
+2
View File
@@ -136,6 +136,8 @@ spread = 180.0
initial_velocity_min = 0.8
initial_velocity_max = 74.87
[node name="ignore that up there" type="Node" parent="MarginContainer/VBoxContainer/HBoxContainer/BanCounter" unique_id=661846832]
[node name="Punish" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=100050923]
layout_mode = 2
size_flags_horizontal = 8