Remove legacy bansystem and add WARN punish type

This commit is contained in:
bucket
2026-04-14 20:34:25 +02:00
parent 33329218cf
commit 3e2d6dd24d
11 changed files with 60 additions and 26 deletions
+11 -2
View File
@@ -12,14 +12,23 @@ func Export(Punishments:Array[Punishment],file:String) -> void:
continue
content += "NAME: " + punishment.username + "\n"
content += "UID: " + punishment.uid + "\n"
content += "PUNISHMENT: " + ("MUTE" if punishment.what_punishment ==
punishment.punishment_types.MUTE else "BAN") + "\n"
content += "PUNISHMENT: " + (get_punish_type(punishment)) + "\n"
content += "REASON: " + punishment.punish_reason + "\n"
content += "END_DATE: " + str(punishment.punish_end) + "\n"
content += "L!ListEnd\n"
fileaccess.store_string(content)
func get_punish_type(punishment:Punishment):
match punishment.what_punishment:
Punishment.punishment_types.BAN:
return "BAN"
Punishment.punishment_types.MUTE:
return "MUTE"
Punishment.punishment_types.WARN:
return "WARN"
# DEPRECATED
func Exportv1(Punishments:Array[Punishment],file:String) -> void:
var fileaccess:FileAccess = FileAccess.open(file,FileAccess.WRITE)
if !fileaccess: