diff --git a/EditorTheme.tres b/EditorTheme.tres new file mode 100644 index 0000000..41dead6 --- /dev/null +++ b/EditorTheme.tres @@ -0,0 +1,156 @@ +[gd_resource type="Theme" format=3 uid="uid://qmw85rumbdxu"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7ig61"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.1458421, 0.15639755, 0.12755793, 1) +border_width_top = 24 +border_color = Color(0.07683582, 0.07683582, 0.0768358, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_483ll"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.31794113, 0.37740794, 0.4146297, 1) +border_width_top = 24 +border_color = Color(0.3448313, 0.7226784, 0.816066, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rutdr"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.16078432, 0.16078432, 0.16078432, 1) +border_width_top = 24 +border_color = Color(0.45452452, 0.45452416, 0.4545244, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xik2j"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.27205774, 0.25932738, 0.2625498, 1) +border_width_top = 24 +border_color = Color(0.44247445, 0.47545934, 0.510849, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 +shadow_color = Color(0.051970966, 0.05197096, 0.05197095, 0.6) +shadow_size = 6 +shadow_offset = Vector2(0, -2.025) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6s1pl"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.19215687, 0.19215687, 0.19215687, 1) +border_width_top = 24 +border_color = Color(0.12225237, 0.1222522, 0.12225225, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_npyvv"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.23921569, 0.23137255, 0.2784314, 1) +border_width_top = 24 +border_color = Color(0.6392157, 0.69411767, 0.7607843, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 +shadow_color = Color(0.051970966, 0.05197096, 0.05197095, 0.6) +shadow_size = 6 +shadow_offset = Vector2(0, -2.025) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3p2gp"] +content_margin_left = 0.0 +content_margin_top = 0.0 +content_margin_right = 0.0 +content_margin_bottom = 0.0 +bg_color = Color(0.15294118, 0.15294118, 0.13725491, 0) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 +corner_detail = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_arad6"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.16078432, 0.16078432, 0.16078432, 1) +border_width_top = 12 +border_color = Color(0.45452452, 0.45452416, 0.4545244, 1) +border_blend = true +corner_detail = 1 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_11olf"] +content_margin_left = 20.0 +content_margin_top = 4.0 +content_margin_right = 20.0 +content_margin_bottom = 4.0 +bg_color = Color(0.23921569, 0.23137255, 0.2784314, 1) +border_width_top = 18 +border_color = Color(0.6392157, 0.69411767, 0.7607843, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +shadow_color = Color(0.051970966, 0.05197096, 0.05197095, 0.6) +shadow_size = 6 +shadow_offset = Vector2(0, -2.025) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qcuo3"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.19215687, 0.19215687, 0.19215687, 1) +border_width_top = 25 +border_color = Color(0.080783345, 0.080783345, 0.0807833, 1) +border_blend = true +corner_detail = 1 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gll5g"] +bg_color = Color(0.017732397, 0.01773239, 0.01773239, 0.36862746) + +[resource] +Button/styles/disabled = SubResource("StyleBoxFlat_7ig61") +Button/styles/focus = SubResource("StyleBoxFlat_483ll") +Button/styles/hover = SubResource("StyleBoxFlat_rutdr") +Button/styles/hover_pressed = SubResource("StyleBoxFlat_xik2j") +Button/styles/normal = SubResource("StyleBoxFlat_6s1pl") +Button/styles/pressed = SubResource("StyleBoxFlat_npyvv") +TabContainer/styles/panel = SubResource("StyleBoxFlat_3p2gp") +TabContainer/styles/tab_hovered = SubResource("StyleBoxFlat_arad6") +TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_11olf") +TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_qcuo3") +TabContainer/styles/tabbar_background = SubResource("StyleBoxFlat_gll5g") diff --git a/Scripts/Csharp/GitIntegration.cs b/Scripts/Csharp/GitIntegration.cs index d867078..9b22604 100644 --- a/Scripts/Csharp/GitIntegration.cs +++ b/Scripts/Csharp/GitIntegration.cs @@ -30,14 +30,20 @@ public partial class GitIntegration:Node{ Godot.DirAccess current_access = Godot.DirAccess.Open(path); current_access.IncludeHidden = true; foreach (String Dir in current_access.GetDirectories()){ - //GD.Print("found " + path.PathJoin(Dir)); + GD.Print("found " + path.PathJoin(Dir)); delete_recursive(path.PathJoin(Dir)); } foreach (String file in current_access.GetFiles()){ - //GD.Print("found file " + file); - current_access.Remove(file); + GD.Print("found file " + file); + GD.Print("deleting status: ",current_access.Remove(file)); + GD.Print(ProjectSettings.GlobalizePath(path+"/"+file)); + if (current_access.FileExists(file)){ + GD.Print("Deleting failed, moving to trash"); + OS.MoveToTrash(ProjectSettings.GlobalizePath(path+"/"+file)); + } } DirAccess.RemoveAbsolute(path); + GD.Print("deleted ",path); } public void Clone(){ diff --git a/Scripts/Gdscript/AltShowcase.gd b/Scripts/Gdscript/Ban/AltShowcase.gd similarity index 100% rename from Scripts/Gdscript/AltShowcase.gd rename to Scripts/Gdscript/Ban/AltShowcase.gd diff --git a/Scripts/Gdscript/AltShowcase.gd.uid b/Scripts/Gdscript/Ban/AltShowcase.gd.uid similarity index 100% rename from Scripts/Gdscript/AltShowcase.gd.uid rename to Scripts/Gdscript/Ban/AltShowcase.gd.uid diff --git a/Scripts/Gdscript/Punishment.gd b/Scripts/Gdscript/Ban/Punishment.gd similarity index 100% rename from Scripts/Gdscript/Punishment.gd rename to Scripts/Gdscript/Ban/Punishment.gd diff --git a/Scripts/Gdscript/Punishment.gd.uid b/Scripts/Gdscript/Ban/Punishment.gd.uid similarity index 100% rename from Scripts/Gdscript/Punishment.gd.uid rename to Scripts/Gdscript/Ban/Punishment.gd.uid diff --git a/Scripts/Gdscript/ban_list_exporter.gd b/Scripts/Gdscript/Ban/ban_list_exporter.gd similarity index 100% rename from Scripts/Gdscript/ban_list_exporter.gd rename to Scripts/Gdscript/Ban/ban_list_exporter.gd diff --git a/Scripts/Gdscript/ban_list_exporter.gd.uid b/Scripts/Gdscript/Ban/ban_list_exporter.gd.uid similarity index 100% rename from Scripts/Gdscript/ban_list_exporter.gd.uid rename to Scripts/Gdscript/Ban/ban_list_exporter.gd.uid diff --git a/Scripts/Gdscript/main.gd b/Scripts/Gdscript/Ban/main.gd similarity index 96% rename from Scripts/Gdscript/main.gd rename to Scripts/Gdscript/Ban/main.gd index 7cf09d2..f913cfc 100644 --- a/Scripts/Gdscript/main.gd +++ b/Scripts/Gdscript/Ban/main.gd @@ -108,14 +108,8 @@ func update_ban_counter(): var count:int = 0 var keys:Array[String] for punishment in punishments: - if punishment.uid != "": - if !keys.has(punishment.uid): - keys.append(punishment.uid) - count += 1 - else: - if !keys.has(punishment.username): - keys.append(punishment.username) - count += 1 + if punishment.punish_reason != "BAN_EVADING": + count += 1 ban_counter.text = str(punishments.size()) + " Entires :::::: " + str(count) + \ " Unique :::::: " + str(punishments.size()-count) + " Alts" var alts = punishments.size() - count @@ -194,4 +188,6 @@ func close_request(): func save_and_exit(): save() git.Commit_changes() + git.delete_recursive("user://repo/") + await get_tree().process_frame get_tree().quit() diff --git a/Scripts/Gdscript/main.gd.uid b/Scripts/Gdscript/Ban/main.gd.uid similarity index 100% rename from Scripts/Gdscript/main.gd.uid rename to Scripts/Gdscript/Ban/main.gd.uid diff --git a/Scripts/Gdscript/punish_list_parser.gd b/Scripts/Gdscript/Ban/punish_list_parser.gd similarity index 100% rename from Scripts/Gdscript/punish_list_parser.gd rename to Scripts/Gdscript/Ban/punish_list_parser.gd diff --git a/Scripts/Gdscript/punish_list_parser.gd.uid b/Scripts/Gdscript/Ban/punish_list_parser.gd.uid similarity index 100% rename from Scripts/Gdscript/punish_list_parser.gd.uid rename to Scripts/Gdscript/Ban/punish_list_parser.gd.uid diff --git a/Scripts/Gdscript/save_file_parser.gd b/Scripts/Gdscript/Ban/save_file_parser.gd similarity index 100% rename from Scripts/Gdscript/save_file_parser.gd rename to Scripts/Gdscript/Ban/save_file_parser.gd diff --git a/Scripts/Gdscript/save_file_parser.gd.uid b/Scripts/Gdscript/Ban/save_file_parser.gd.uid similarity index 100% rename from Scripts/Gdscript/save_file_parser.gd.uid rename to Scripts/Gdscript/Ban/save_file_parser.gd.uid diff --git a/Scripts/Gdscript/search.gd b/Scripts/Gdscript/Ban/search.gd similarity index 100% rename from Scripts/Gdscript/search.gd rename to Scripts/Gdscript/Ban/search.gd diff --git a/Scripts/Gdscript/search.gd.uid b/Scripts/Gdscript/Ban/search.gd.uid similarity index 100% rename from Scripts/Gdscript/search.gd.uid rename to Scripts/Gdscript/Ban/search.gd.uid diff --git a/Scripts/Gdscript/LoadoutOverrides/override_parser.gd b/Scripts/Gdscript/LoadoutOverrides/override_parser.gd new file mode 100644 index 0000000..2f6be5b --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/override_parser.gd @@ -0,0 +1,61 @@ +class_name OverrideParser extends Node + +func parse_overrides(source:String,users:Array[UserInfo],user_groups:Array[GroupInfo]) -> Array[OverrideItemGroup]: + var splits:PackedStringArray = source.split("\n") + print("parsing with ",splits) + var current_info:LoadoutOverrideInfo + var infos:Array[LoadoutOverrideInfo] + for line in splits: + if line.begins_with("CLASS: "): + var new_item:LoadoutOverrideInfo = LoadoutOverrideInfo.new() + new_item.class_path = line.replace("CLASS: ","") + current_info = new_item + continue + if line.begins_with("SLOT: "): + var slot:String = line.replace("SLOT: ","") + current_info.slot = slot + continue + if line.begins_with("ITEM: "): + var item:String = line.replace("ITEM: ","") + current_info.item_path = item + continue + if line.begins_with("PLAYERS: "): + var players_raw:String = line.replace("PLAYERS: ","") + var players:PackedStringArray = players_raw.split(",") + for player in players: + if player.begins_with("@"): + var user_group_name:String = player.replace("@","") + var found:bool = false + for group in user_groups: + if group.name == user_group_name: + current_info.groups.append(group) + found = true + break + if !found: + push_error("didnt find group ",user_group_name) + else: + var user_name:String = player + var found:bool = false + for user in users: + if user.name == user_name: + current_info.users.append(user) + found = true + break + if !found: + push_warning("didnt find user ",user_name) + if line.begins_with("TAG: "): + current_info.tag = line.replace("TAG: ","") + infos.append(current_info) + current_info = null + var groups:Array[OverrideItemGroup] = [] + for info in infos: + var exists:bool = false + for group in groups: + if group.name == info.tag: + exists = true + group.children.append(info) + if !exists: + var new_group:OverrideItemGroup = OverrideItemGroup.new() + new_group.name = info.tag + groups.append(new_group) + return groups diff --git a/Scripts/Gdscript/LoadoutOverrides/override_parser.gd.uid b/Scripts/Gdscript/LoadoutOverrides/override_parser.gd.uid new file mode 100644 index 0000000..348d071 --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/override_parser.gd.uid @@ -0,0 +1 @@ +uid://cg2feh2v1snlb diff --git a/Scripts/Gdscript/LoadoutOverrides/types/LoadoutItemType.gd b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutItemType.gd new file mode 100644 index 0000000..50a7de7 --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutItemType.gd @@ -0,0 +1 @@ +class_name OverrideItem extends Resource diff --git a/Scripts/Gdscript/LoadoutOverrides/types/LoadoutItemType.gd.uid b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutItemType.gd.uid new file mode 100644 index 0000000..f0a3e57 --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutItemType.gd.uid @@ -0,0 +1 @@ +uid://bv2hrpr05vaee diff --git a/Scripts/Gdscript/LoadoutOverrides/types/LoadoutOverrideInfo.gd b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutOverrideInfo.gd new file mode 100644 index 0000000..4926f09 --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutOverrideInfo.gd @@ -0,0 +1,7 @@ +class_name LoadoutOverrideInfo extends OverrideItem +@export var class_path:String +@export var slot:String +@export var item_path:String +@export var users:Array[UserInfo] +@export var groups:Array[GroupInfo] +@export var tag:String diff --git a/Scripts/Gdscript/LoadoutOverrides/types/LoadoutOverrideInfo.gd.uid b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutOverrideInfo.gd.uid new file mode 100644 index 0000000..d4e388b --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/types/LoadoutOverrideInfo.gd.uid @@ -0,0 +1 @@ +uid://be2ral0lbxxir diff --git a/Scripts/Gdscript/LoadoutOverrides/types/OverrideItemGroup.gd b/Scripts/Gdscript/LoadoutOverrides/types/OverrideItemGroup.gd new file mode 100644 index 0000000..46e4f7a --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/types/OverrideItemGroup.gd @@ -0,0 +1,14 @@ +class_name OverrideItemGroup extends OverrideItem +@export var name:String +@export var children:Array[LoadoutOverrideInfo] + +func as_string() -> String: + var string:String = "" + string += name + "\n" + for child:LoadoutOverrideInfo in children: + string += "class: " + child.class_path + "\n" + string += "slot: " + child.slot + "\n" + string += "item: " + child.item_path + "\n" + string += "users: " + str(child.users) + "\n" + string += "groups: " + str(child.groups) + "\n" + return string diff --git a/Scripts/Gdscript/LoadoutOverrides/types/OverrideItemGroup.gd.uid b/Scripts/Gdscript/LoadoutOverrides/types/OverrideItemGroup.gd.uid new file mode 100644 index 0000000..eeecfee --- /dev/null +++ b/Scripts/Gdscript/LoadoutOverrides/types/OverrideItemGroup.gd.uid @@ -0,0 +1 @@ +uid://rd4edsuoi8dg diff --git a/Scripts/Gdscript/UsersAndGroups/GroupType.gd b/Scripts/Gdscript/UsersAndGroups/GroupType.gd new file mode 100644 index 0000000..1eb49f2 --- /dev/null +++ b/Scripts/Gdscript/UsersAndGroups/GroupType.gd @@ -0,0 +1,3 @@ +class_name GroupInfo extends Resource +@export var name:String +@export var users:Array[UserInfo] diff --git a/Scripts/Gdscript/UsersAndGroups/GroupType.gd.uid b/Scripts/Gdscript/UsersAndGroups/GroupType.gd.uid new file mode 100644 index 0000000..6ae7e49 --- /dev/null +++ b/Scripts/Gdscript/UsersAndGroups/GroupType.gd.uid @@ -0,0 +1 @@ +uid://nt82db21lo01 diff --git a/Scripts/Gdscript/UsersAndGroups/PeopleParser.gd b/Scripts/Gdscript/UsersAndGroups/PeopleParser.gd new file mode 100644 index 0000000..911903b --- /dev/null +++ b/Scripts/Gdscript/UsersAndGroups/PeopleParser.gd @@ -0,0 +1,45 @@ +class_name UserParser extends Node + +func parse_people(source:String) -> Array[UserInfo]: + var splits_users:PackedStringArray = source.split("#region USERS")[1].split("#endregion")[0].split("\n") + #print("parsing: ",splits_users," on a source of, ", source) + var current_user:UserInfo = null + var users:Array[UserInfo] + for line in splits_users: + if line.begins_with("NAME: "): + var user:UserInfo = UserInfo.new() + user.name = line.replace("NAME: ","") + current_user = user + continue + if line.begins_with("UID: "): + if current_user: + current_user.uid = line.replace("UID: ","") + users.append(current_user) + else: + push_error("Error parsing people, no user object") + current_user = null + continue + return users +func parse_groups(source:String,users:Array[UserInfo]) -> Array[GroupInfo]: + var splits_groups:PackedStringArray = source.split("#region GROUPS")[1].split("#endregion")[0].split("\n") + var groups:Array[GroupInfo] + var current_group:GroupInfo + for line in splits_groups: + if line.begins_with("GROUP: "): + var group:GroupInfo = GroupInfo.new() + group.name = line.replace("GROUP: ","") + current_group = group + if line.begins_with("MEMBERS: "): + var people:PackedStringArray = line.replace("MEMBERS: ","").split(",") + for person in people: + current_group.users.append(find_user(person,users)) + groups.append(current_group) + current_group = null + return groups + +func find_user(user_name:String,users:Array[UserInfo]) -> UserInfo: + for user in users: + if user.name == user_name: + return user + push_error("User is not found") + return null diff --git a/Scripts/Gdscript/UsersAndGroups/PeopleParser.gd.uid b/Scripts/Gdscript/UsersAndGroups/PeopleParser.gd.uid new file mode 100644 index 0000000..7b3273a --- /dev/null +++ b/Scripts/Gdscript/UsersAndGroups/PeopleParser.gd.uid @@ -0,0 +1 @@ +uid://chmb3e61opk14 diff --git a/Scripts/Gdscript/UsersAndGroups/UserInfo.gd b/Scripts/Gdscript/UsersAndGroups/UserInfo.gd new file mode 100644 index 0000000..b9b96c5 --- /dev/null +++ b/Scripts/Gdscript/UsersAndGroups/UserInfo.gd @@ -0,0 +1,3 @@ +class_name UserInfo extends Resource +@export var name:String +@export var uid:String diff --git a/Scripts/Gdscript/UsersAndGroups/UserInfo.gd.uid b/Scripts/Gdscript/UsersAndGroups/UserInfo.gd.uid new file mode 100644 index 0000000..cb7ffc9 --- /dev/null +++ b/Scripts/Gdscript/UsersAndGroups/UserInfo.gd.uid @@ -0,0 +1 @@ +uid://co3i0beqyihi8 diff --git a/export_presets.cfg b/export_presets.cfg index e000402..09682e6 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -1,8 +1,11 @@ +[runnable_presets] + +"Windows Desktop"="Windows Desktop" + [preset.0] name="Windows Desktop" platform="Windows Desktop" -runnable=true dedicated_server=false custom_features="" export_filter="all_resources" diff --git a/scenes/Main.tscn b/scenes/Main.tscn index 6e4eb82..fca1826 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -1,19 +1,75 @@ [gd_scene format=3 uid="uid://cxf3yenlgvupj"] -[ext_resource type="Script" uid="uid://c57yqopmolu8o" path="res://Scripts/Gdscript/main.gd" id="1_bjd11"] +[ext_resource type="Theme" uid="uid://qmw85rumbdxu" path="res://EditorTheme.tres" id="1_3p2gp"] +[ext_resource type="Script" uid="uid://c57yqopmolu8o" path="res://Scripts/Gdscript/Ban/main.gd" id="1_bjd11"] [ext_resource type="PackedScene" uid="uid://bxpr2nb1hydpi" path="res://scenes/punish_showcase.tscn" id="2_qmy6f"] [ext_resource type="Texture2D" uid="uid://o2sjogt3b0ht" path="res://Textures/tf2logo.png" id="3_mwfav"] [ext_resource type="Texture2D" uid="uid://dppihj7ptidog" path="res://Textures/Plus.png" id="4_3p2gp"] [ext_resource type="Texture2D" uid="uid://c7r26dxgqkklc" path="res://Textures/Minus.png" id="5_cvmbd"] -[ext_resource type="Script" uid="uid://c5ihhdkosauvw" path="res://Scripts/Gdscript/punish_list_parser.gd" id="6_ft6cd"] +[ext_resource type="Script" uid="uid://c5ihhdkosauvw" path="res://Scripts/Gdscript/Ban/punish_list_parser.gd" id="6_ft6cd"] [ext_resource type="Texture2D" uid="uid://decrh4ixlnkgd" path="res://Textures/Close.svg" id="6_mwfav"] -[ext_resource type="Script" uid="uid://caaljvxo8tja5" path="res://Scripts/Gdscript/ban_list_exporter.gd" id="7_bb450"] +[ext_resource type="Script" uid="uid://caaljvxo8tja5" path="res://Scripts/Gdscript/Ban/ban_list_exporter.gd" id="7_bb450"] [ext_resource type="PackedScene" uid="uid://dy18m2uq557to" path="res://scenes/windwos/edit_window.tscn" id="8_nfivy"] [ext_resource type="PackedScene" uid="uid://burukk5374yyu" path="res://scenes/windwos/MoreOptionsWindow.tscn" id="9_1nqs0"] [ext_resource type="PackedScene" uid="uid://gah2g6nabyf4" path="res://scenes/windwos/statistics.tscn" id="10_1iba3"] -[ext_resource type="Script" uid="uid://bt5wd8qjaevk0" path="res://Scripts/Gdscript/search.gd" id="11_yxlcp"] -[ext_resource type="Script" uid="uid://3gmapu83dglo" path="res://Scripts/Gdscript/save_file_parser.gd" id="12_ebg2g"] +[ext_resource type="Script" uid="uid://bt5wd8qjaevk0" path="res://Scripts/Gdscript/Ban/search.gd" id="11_yxlcp"] +[ext_resource type="Script" uid="uid://3gmapu83dglo" path="res://Scripts/Gdscript/Ban/save_file_parser.gd" id="12_ebg2g"] [ext_resource type="Script" uid="uid://dv74d87a31oyx" path="res://Scripts/Csharp/GitIntegration.cs" id="13_qmy6f"] +[ext_resource type="Script" uid="uid://byl0odlgqrjri" path="res://scenes/loadout_overrides.gd" id="14_bb450"] +[ext_resource type="Script" uid="uid://cg2feh2v1snlb" path="res://Scripts/Gdscript/LoadoutOverrides/override_parser.gd" id="14_cvmbd"] +[ext_resource type="Script" uid="uid://chmb3e61opk14" path="res://Scripts/Gdscript/UsersAndGroups/PeopleParser.gd" id="17_ft6cd"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3p2gp"] +content_margin_left = 0.0 +content_margin_top = 0.0 +content_margin_right = 0.0 +content_margin_bottom = 0.0 +bg_color = Color(0.15294118, 0.15294118, 0.13725491, 0.32156864) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 +corner_detail = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cvmbd"] +bg_color = Color(0.1764706, 0.13725491, 0.06666667, 0.627451) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bb450"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.19076231, 0.19076234, 0.19076231, 0.6) +border_width_top = 25 +border_color = Color(0.12225237, 0.1222522, 0.12225225, 1) +border_blend = true +corner_detail = 1 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nfivy"] +content_margin_left = 10.0 +content_margin_top = 4.0 +content_margin_right = 10.0 +content_margin_bottom = 4.0 +bg_color = Color(0.16078432, 0.16078432, 0.16078432, 1) +border_width_top = 12 +border_color = Color(0.45452452, 0.45452416, 0.4545244, 1) +border_blend = true +corner_detail = 1 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ft6cd"] +content_margin_left = 20.0 +content_margin_top = 4.0 +content_margin_right = 20.0 +content_margin_bottom = 4.0 +bg_color = Color(0.23921569, 0.23137255, 0.2784314, 1) +border_width_top = 18 +border_color = Color(0.6392157, 0.69411767, 0.7607843, 1) +border_blend = true +corner_radius_top_left = 6 +corner_radius_top_right = 6 +shadow_color = Color(0.051970966, 0.05197096, 0.05197095, 0.6) +shadow_size = 6 +shadow_offset = Vector2(0, -2.025) [sub_resource type="LabelSettings" id="LabelSettings_lgr22"] font_size = 26 @@ -49,39 +105,83 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +theme = ExtResource("1_3p2gp") script = ExtResource("1_bjd11") -edit_window = NodePath("EditWindow") -punish_list_parser = NodePath("BanListParser") -PunishContainer = NodePath("MarginContainer/VBoxContainer/ScrollContainer/Tree") +edit_window = NodePath("Tabs/Banlist/EditWindow") +punish_list_parser = NodePath("Tabs/Banlist/BanListParser") +PunishContainer = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/ScrollContainer/Tree") punish_scene = ExtResource("2_qmy6f") -new_punish_btn = NodePath("MarginContainer/VBoxContainer/HBoxContainer/Punish") -new_btn = NodePath("MarginContainer/VBoxContainer/HBoxContainer/Punish") -exporter = NodePath("BanListExporter") +new_punish_btn = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/Punish") +new_btn = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/Punish") +exporter = NodePath("Tabs/Banlist/BanListExporter") save_file_parser = NodePath("SaveFileParser") quit_confirmation = NodePath("ConfirmationDialog") -ban_counter = NodePath("MarginContainer/VBoxContainer/HBoxContainer/BanCounter") -plus = NodePath("MarginContainer/VBoxContainer/HBoxContainer/BanCounter/Plus") -minus = NodePath("MarginContainer/VBoxContainer/HBoxContainer/BanCounter/Minus") -more_btn = NodePath("MarginContainer/VBoxContainer/HBoxContainer/More") -options_window = NodePath("OptionsWindow") +ban_counter = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/BanCounter") +plus = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/BanCounter/Plus") +minus = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/BanCounter/Minus") +more_btn = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/More") +options_window = NodePath("Tabs/Banlist/OptionsWindow") git = NodePath("Git") -commit = NodePath("MarginContainer/VBoxContainer/HBoxContainer2/Commit") -save_label = NodePath("MarginContainer/VBoxContainer/HBoxContainer2/Label") +commit = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2/Commit") +save_label = NodePath("Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2/Label") -[node name="TextureRect" type="TextureRect" parent="." unique_id=1516457942] +[node name="Tabs" type="TabContainer" parent="." unique_id=1219388433] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_3p2gp") +theme_override_styles/tabbar_background = SubResource("StyleBoxFlat_cvmbd") +theme_override_styles/tab_unselected = SubResource("StyleBoxFlat_bb450") +theme_override_styles/tab_hovered = SubResource("StyleBoxFlat_nfivy") +theme_override_styles/tab_selected = SubResource("StyleBoxFlat_ft6cd") +current_tab = 0 + +[node name="Banlist" type="Control" parent="Tabs" unique_id=990971830] +layout_mode = 2 +metadata/_tab_index = 0 + +[node name="BanListParser" type="Node" parent="Tabs/Banlist" unique_id=951623750] +script = ExtResource("6_ft6cd") + +[node name="BanListExporter" type="Node" parent="Tabs/Banlist" unique_id=1531169139] +script = ExtResource("7_bb450") + +[node name="EditWindow" parent="Tabs/Banlist" unique_id=211137631 instance=ExtResource("8_nfivy")] + +[node name="OptionsWindow" parent="Tabs/Banlist" unique_id=1485451151 instance=ExtResource("9_1nqs0")] +initial_position = 4 + +[node name="Statistics" parent="Tabs/Banlist" unique_id=1932979201 node_paths=PackedStringArray("root", "PunishContainer", "search_bar") instance=ExtResource("10_1iba3")] +root = NodePath("../../..") +PunishContainer = NodePath("../MarginContainer/VBoxContainer/ScrollContainer/Tree") +search_bar = NodePath("../MarginContainer/VBoxContainer/SearchBar") + +[node name="Search" type="Node" parent="Tabs/Banlist" unique_id=170590161 node_paths=PackedStringArray("search_bar", "punish_container", "name_check", "uid_check", "description_check")] +script = ExtResource("11_yxlcp") +search_bar = NodePath("../MarginContainer/VBoxContainer/SearchBar") +punish_container = NodePath("../MarginContainer/VBoxContainer/ScrollContainer/Tree") +name_check = NodePath("../MarginContainer/VBoxContainer/HBoxContainer3/NameCheck") +uid_check = NodePath("../MarginContainer/VBoxContainer/HBoxContainer3/UIDCheck") +description_check = NodePath("../MarginContainer/VBoxContainer/HBoxContainer3/DescriptionCheck") + +[node name="TextureRect" type="TextureRect" parent="Tabs/Banlist" unique_id=1516457942] modulate = Color(0.74558026, 0.7455802, 0.7455802, 1) z_index = -1 layout_mode = 1 anchors_preset = -1 offset_left = -119.0 -offset_top = -214.0 +offset_top = -245.0 offset_right = 405.0 -offset_bottom = 526.0 +offset_bottom = 495.0 +mouse_filter = 2 texture = ExtResource("3_mwfav") expand_mode = 5 stretch_mode = 5 -[node name="ColorRect" type="ColorRect" parent="." unique_id=1789999219] +[node name="ColorRect" type="ColorRect" parent="Tabs/Banlist" unique_id=1789999219] z_index = -2 layout_mode = 1 anchors_preset = 15 @@ -89,9 +189,10 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -color = Color(0.32993424, 0.25434008, 0.17645565, 1) +mouse_filter = 2 +color = Color(0.2834887, 0.26999918, 0.23374343, 1) -[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1863119132] +[node name="MarginContainer" type="MarginContainer" parent="Tabs/Banlist" unique_id=1863119132] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -103,25 +204,25 @@ theme_override_constants/margin_top = 5 theme_override_constants/margin_right = 5 theme_override_constants/margin_bottom = 5 -[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=1186401858] +[node name="VBoxContainer" type="VBoxContainer" parent="Tabs/Banlist/MarginContainer" unique_id=1186401858] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="HBoxContainer" type="FlowContainer" parent="MarginContainer/VBoxContainer" unique_id=550324332] +[node name="HBoxContainer" type="FlowContainer" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=550324332] layout_mode = 2 -[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=388690639] +[node name="Label" type="Label" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer" unique_id=388690639] layout_mode = 2 size_flags_horizontal = 3 text = "TFVR punishlist maker 2000™" label_settings = SubResource("LabelSettings_lgr22") -[node name="BanCounter" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=589605427] +[node name="BanCounter" type="Label" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer" unique_id=589605427] layout_mode = 2 text = "Unique Bans: " -[node name="Plus" type="CPUParticles2D" parent="MarginContainer/VBoxContainer/HBoxContainer/BanCounter" unique_id=93983186] +[node name="Plus" type="CPUParticles2D" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/BanCounter" unique_id=93983186] position = Vector2(76, 8) emitting = false texture = ExtResource("4_3p2gp") @@ -134,7 +235,7 @@ spread = 180.0 initial_velocity_min = 0.8 initial_velocity_max = 74.87 -[node name="Minus" type="CPUParticles2D" parent="MarginContainer/VBoxContainer/HBoxContainer/BanCounter" unique_id=2092945034] +[node name="Minus" type="CPUParticles2D" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/BanCounter" unique_id=2092945034] position = Vector2(76, 8) emitting = false amount = 3 @@ -148,98 +249,100 @@ 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="ignore that up there" type="Node" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/BanCounter" unique_id=661846832] -[node name="Punish" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=100050923] +[node name="Punish" type="Button" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer" unique_id=100050923] layout_mode = 2 size_flags_horizontal = 8 text = "new punishment" -[node name="Stats" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=1256562107] +[node name="Stats" type="Button" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer" unique_id=1256562107] +visible = false layout_mode = 2 size_flags_horizontal = 8 text = "Stats" -[node name="More" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=804757173] +[node name="More" type="Button" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer" unique_id=804757173] layout_mode = 2 size_flags_horizontal = 8 text = "More" -[node name="SearchBar" type="LineEdit" parent="MarginContainer/VBoxContainer" unique_id=2022677611] +[node name="SearchBar" type="LineEdit" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=2022677611] layout_mode = 2 placeholder_text = "Search..." -[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=355358061] +[node name="HBoxContainer3" type="HBoxContainer" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=355358061] +custom_minimum_size = Vector2(0, 36) layout_mode = 2 -[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3" unique_id=400647282] +[node name="Label" type="Label" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer3" unique_id=400647282] layout_mode = 2 text = "Filter by:" -[node name="NameCheck" type="CheckButton" parent="MarginContainer/VBoxContainer/HBoxContainer3" unique_id=422637912] +[node name="NameCheck" type="CheckButton" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer3" unique_id=422637912] layout_mode = 2 button_pressed = true text = "Name" -[node name="UIDCheck" type="CheckButton" parent="MarginContainer/VBoxContainer/HBoxContainer3" unique_id=1437120434] +[node name="UIDCheck" type="CheckButton" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer3" unique_id=1437120434] layout_mode = 2 button_pressed = true text = "UID" -[node name="DescriptionCheck" type="CheckButton" parent="MarginContainer/VBoxContainer/HBoxContainer3" unique_id=1216809809] +[node name="DescriptionCheck" type="CheckButton" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer3" unique_id=1216809809] layout_mode = 2 button_pressed = true text = "Description" -[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer" unique_id=1970903622] +[node name="HSeparator" type="HSeparator" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=1970903622] layout_mode = 2 -[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer" unique_id=1423908622] +[node name="ScrollContainer" type="ScrollContainer" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=1423908622] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="Tree" type="VBoxContainer" parent="MarginContainer/VBoxContainer/ScrollContainer" unique_id=200799914] +[node name="Tree" type="VBoxContainer" parent="Tabs/Banlist/MarginContainer/VBoxContainer/ScrollContainer" unique_id=200799914] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="HSeparator2" type="HSeparator" parent="MarginContainer/VBoxContainer" unique_id=1677426181] +[node name="HSeparator2" type="HSeparator" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=1677426181] layout_mode = 2 -[node name="HBoxContainer2" type="FlowContainer" parent="MarginContainer/VBoxContainer" unique_id=1760266968] +[node name="HBoxContainer2" type="FlowContainer" parent="Tabs/Banlist/MarginContainer/VBoxContainer" unique_id=1760266968] layout_mode = 2 alignment = 2 last_wrap_alignment = 2 -[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=1462249568] +[node name="Label" type="Label" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2" unique_id=1462249568] visible = false layout_mode = 2 text = "*" -[node name="Commit" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=533267664] +[node name="Commit" type="Button" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2" unique_id=533267664] layout_mode = 2 tooltip_text = "Send your changes to github, make sure you have saved your changes before doing this!" text = "Commit changes" -[node name="Pull" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=127094888] +[node name="Pull" type="Button" parent="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2" unique_id=127094888] layout_mode = 2 tooltip_text = "Use this when updating your local copy to the one on github. If you have local changes this wont override them" text = "Pull changes" -[node name="Base" type="Control" parent="MarginContainer" unique_id=1265704529] +[node name="Base" type="Control" parent="Tabs/Banlist/MarginContainer" unique_id=1265704529] visible = false layout_mode = 2 size_flags_horizontal = 8 size_flags_vertical = 8 -[node name="Control" type="Control" parent="MarginContainer/Base" unique_id=419756343] +[node name="Control" type="Control" parent="Tabs/Banlist/MarginContainer/Base" unique_id=419756343] anchors_preset = 0 offset_left = -250.0 offset_top = -163.0 offset_bottom = -35.0 -[node name="ColorRect" type="Panel" parent="MarginContainer/Base/Control" unique_id=1808786583] +[node name="ColorRect" type="Panel" parent="Tabs/Banlist/MarginContainer/Base/Control" unique_id=1808786583] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -248,7 +351,7 @@ grow_horizontal = 2 grow_vertical = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_mwfav") -[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/Base/Control" unique_id=1967441013] +[node name="VBoxContainer" type="VBoxContainer" parent="Tabs/Banlist/MarginContainer/Base/Control" unique_id=1967441013] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -256,52 +359,50 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/Base/Control/VBoxContainer" unique_id=984310582] +[node name="HBoxContainer" type="HBoxContainer" parent="Tabs/Banlist/MarginContainer/Base/Control/VBoxContainer" unique_id=984310582] layout_mode = 2 -[node name="Warning" type="Label" parent="MarginContainer/Base/Control/VBoxContainer/HBoxContainer" unique_id=514469174] +[node name="Warning" type="Label" parent="Tabs/Banlist/MarginContainer/Base/Control/VBoxContainer/HBoxContainer" unique_id=514469174] layout_mode = 2 size_flags_horizontal = 3 text = "Error:" -[node name="Button" type="Button" parent="MarginContainer/Base/Control/VBoxContainer/HBoxContainer" unique_id=1955287259] +[node name="Button" type="Button" parent="Tabs/Banlist/MarginContainer/Base/Control/VBoxContainer/HBoxContainer" unique_id=1955287259] layout_mode = 2 icon = ExtResource("6_mwfav") flat = true -[node name="Label" type="Label" parent="MarginContainer/Base/Control/VBoxContainer" unique_id=289973316] +[node name="Label" type="Label" parent="Tabs/Banlist/MarginContainer/Base/Control/VBoxContainer" unique_id=289973316] custom_minimum_size = Vector2(100, 100) layout_mode = 2 size_flags_vertical = 3 autowrap_mode = 2 -[node name="BanListParser" type="Node" parent="." unique_id=951623750] -script = ExtResource("6_ft6cd") +[node name="Loadout overrides" type="Control" parent="Tabs" unique_id=1214307614 node_paths=PackedStringArray("user_parser", "override_parser")] +visible = false +layout_mode = 2 +script = ExtResource("14_bb450") +user_parser = NodePath("../../UserParser") +override_parser = NodePath("OverrideParser") +metadata/_tab_index = 1 -[node name="BanListExporter" type="Node" parent="." unique_id=1531169139] -script = ExtResource("7_bb450") +[node name="ColorRect" type="ColorRect" parent="Tabs/Loadout overrides" unique_id=1845085689] +z_index = -2 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +color = Color(0.2958, 0.32674, 0.34, 1) -[node name="EditWindow" parent="." unique_id=211137631 instance=ExtResource("8_nfivy")] - -[node name="OptionsWindow" parent="." unique_id=1485451151 instance=ExtResource("9_1nqs0")] -initial_position = 4 - -[node name="Statistics" parent="." unique_id=1932979201 node_paths=PackedStringArray("root", "PunishContainer", "search_bar") instance=ExtResource("10_1iba3")] -root = NodePath("..") -PunishContainer = NodePath("../MarginContainer/VBoxContainer/ScrollContainer/Tree") -search_bar = NodePath("../MarginContainer/VBoxContainer/SearchBar") - -[node name="Search" type="Node" parent="." unique_id=170590161 node_paths=PackedStringArray("search_bar", "punish_container", "name_check", "uid_check", "description_check")] -script = ExtResource("11_yxlcp") -search_bar = NodePath("../MarginContainer/VBoxContainer/SearchBar") -punish_container = NodePath("../MarginContainer/VBoxContainer/ScrollContainer/Tree") -name_check = NodePath("../MarginContainer/VBoxContainer/HBoxContainer3/NameCheck") -uid_check = NodePath("../MarginContainer/VBoxContainer/HBoxContainer3/UIDCheck") -description_check = NodePath("../MarginContainer/VBoxContainer/HBoxContainer3/DescriptionCheck") +[node name="OverrideParser" type="Node" parent="Tabs/Loadout overrides" unique_id=48398298] +script = ExtResource("14_cvmbd") [node name="SaveFileParser" type="Node" parent="." unique_id=930223611 node_paths=PackedStringArray("options_window")] script = ExtResource("12_ebg2g") -options_window = NodePath("../OptionsWindow") +options_window = NodePath("../Tabs/Banlist/OptionsWindow") [node name="ConfirmationDialog" type="ConfirmationDialog" parent="." unique_id=416398003] oversampling_override = 1.0 @@ -315,14 +416,17 @@ cancel_button_text = "Quit without saving" [node name="Git" type="Node" parent="." unique_id=737987824 node_paths=PackedStringArray("commit_button", "options_window", "Main", "Push_error", "Push_Base", "pull_button")] script = ExtResource("13_qmy6f") -commit_button = NodePath("../MarginContainer/VBoxContainer/HBoxContainer2/Commit") -options_window = NodePath("../OptionsWindow") +commit_button = NodePath("../Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2/Commit") +options_window = NodePath("../Tabs/Banlist/OptionsWindow") Main = NodePath("..") -Push_error = NodePath("../MarginContainer/Base/Control/VBoxContainer/Label") -Push_Base = NodePath("../MarginContainer/Base") -pull_button = NodePath("../MarginContainer/VBoxContainer/HBoxContainer2/Pull") +Push_error = NodePath("../Tabs/Banlist/MarginContainer/Base/Control/VBoxContainer/Label") +Push_Base = NodePath("../Tabs/Banlist/MarginContainer/Base") +pull_button = NodePath("../Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer2/Pull") -[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/Stats" to="Statistics" method="grab_focus"] -[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/Stats" to="Statistics" method="show"] -[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/More" to="OptionsWindow" method="grab_focus"] -[connection signal="pressed" from="MarginContainer/Base/Control/VBoxContainer/HBoxContainer/Button" to="MarginContainer/Base" method="hide"] +[node name="UserParser" type="Node" parent="." unique_id=1676525800] +script = ExtResource("17_ft6cd") + +[connection signal="pressed" from="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/Stats" to="Tabs/Banlist/Statistics" method="grab_focus"] +[connection signal="pressed" from="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/Stats" to="Tabs/Banlist/Statistics" method="show"] +[connection signal="pressed" from="Tabs/Banlist/MarginContainer/VBoxContainer/HBoxContainer/More" to="Tabs/Banlist/OptionsWindow" method="grab_focus"] +[connection signal="pressed" from="Tabs/Banlist/MarginContainer/Base/Control/VBoxContainer/HBoxContainer/Button" to="Tabs/Banlist/MarginContainer/Base" method="hide"] diff --git a/scenes/Overrides/LoadoutOverrideDisplay.tscn b/scenes/Overrides/LoadoutOverrideDisplay.tscn new file mode 100644 index 0000000..87e49ba --- /dev/null +++ b/scenes/Overrides/LoadoutOverrideDisplay.tscn @@ -0,0 +1,142 @@ +[gd_scene format=3 uid="uid://buxwqxbim0yul"] + +[ext_resource type="Script" uid="uid://7g560g423lea" path="res://scenes/Overrides/loadout_override_display.gd" id="1_fg8iq"] + +[node name="LoadoutOverrideDisplay" type="Control" unique_id=814608042 node_paths=PackedStringArray("class_option", "custom_class_edit", "class_custom", "slot_option", "slot_custom", "custom_slot_edit", "item_edit")] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_fg8iq") +class_option = NodePath("VBoxContainer/Slot/SlotOption") +custom_class_edit = NodePath("VBoxContainer/ClassCustom/CustomClassEdit") +class_custom = NodePath("VBoxContainer/ClassCustom") +slot_option = NodePath("VBoxContainer/Slot/SlotOption") +slot_custom = NodePath("VBoxContainer/SlotCustom") +custom_slot_edit = NodePath("VBoxContainer/SlotCustom/CustomSlotEdit") +item_edit = NodePath("VBoxContainer/Item/ItemEdit") + +[node name="ColorRect" type="ColorRect" parent="." unique_id=730386018] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +color = Color(0, 0, 0, 0.1254902) + +[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=56912085] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Class" type="HBoxContainer" parent="VBoxContainer" unique_id=1528114493] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/Class" unique_id=1084827761] +layout_mode = 2 +text = "Class " + +[node name="ClassOption" type="OptionButton" parent="VBoxContainer/Class" unique_id=1722208042] +layout_mode = 2 +selected = 0 +item_count = 10 +popup/item_0/text = "Scout" +popup/item_0/id = 0 +popup/item_1/text = "Soldier" +popup/item_1/id = 1 +popup/item_2/text = "Medic" +popup/item_2/id = 2 +popup/item_3/text = "Engineer" +popup/item_3/id = 3 +popup/item_4/text = "Heavy" +popup/item_4/id = 4 +popup/item_5/text = "Sniper" +popup/item_5/id = 5 +popup/item_6/text = "Spy" +popup/item_6/id = 6 +popup/item_7/text = "Demoman" +popup/item_7/id = 7 +popup/item_8/text = "Pyro" +popup/item_8/id = 8 +popup/item_9/text = "custom" +popup/item_9/id = 9 + +[node name="ClassCustom" type="HBoxContainer" parent="VBoxContainer" unique_id=334297462] +visible = false +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/ClassCustom" unique_id=1982401228] +layout_mode = 2 +text = "Custom Class " + +[node name="CustomClassEdit" type="LineEdit" parent="VBoxContainer/ClassCustom" unique_id=1107468060] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Slot" type="HBoxContainer" parent="VBoxContainer" unique_id=367787261] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/Slot" unique_id=585404556] +layout_mode = 2 +text = "Slot " + +[node name="SlotOption" type="OptionButton" parent="VBoxContainer/Slot" unique_id=1195768349] +layout_mode = 2 +selected = 0 +item_count = 6 +popup/item_0/text = "Hat" +popup/item_0/id = 0 +popup/item_1/text = "Misc" +popup/item_1/id = 1 +popup/item_2/text = "Melee" +popup/item_2/id = 2 +popup/item_3/text = "Primary" +popup/item_3/id = 3 +popup/item_4/text = "Sidearm" +popup/item_4/id = 4 +popup/item_5/text = "custom" +popup/item_5/id = 5 + +[node name="SlotCustom" type="HBoxContainer" parent="VBoxContainer" unique_id=1439779772] +visible = false +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/SlotCustom" unique_id=1723957459] +layout_mode = 2 +text = "Custom Slot " + +[node name="CustomSlotEdit" type="LineEdit" parent="VBoxContainer/SlotCustom" unique_id=1153962219] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Item" type="HBoxContainer" parent="VBoxContainer" unique_id=759805961] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/Item" unique_id=1095554842] +layout_mode = 2 +text = "Custom Slot Item" + +[node name="ItemEdit" type="LineEdit" parent="VBoxContainer/Item" unique_id=895284990] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Players" type="HBoxContainer" parent="VBoxContainer" unique_id=1792459219] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/Players" unique_id=120660372] +layout_mode = 2 +text = "Players" + +[node name="ItemEdit" type="LineEdit" parent="VBoxContainer/Players" unique_id=607287913] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="HSeparator" type="HSeparator" parent="VBoxContainer" unique_id=433608728] +layout_mode = 2 diff --git a/scenes/Overrides/loadout_override_display.gd b/scenes/Overrides/loadout_override_display.gd new file mode 100644 index 0000000..f69c845 --- /dev/null +++ b/scenes/Overrides/loadout_override_display.gd @@ -0,0 +1,91 @@ +extends Control +@export var class_option: OptionButton +@export var custom_class_edit: LineEdit +@export var class_custom: HBoxContainer +@export var slot_option: OptionButton +@export var slot_custom: HBoxContainer +@export var custom_slot_edit: LineEdit +@export var item_edit: LineEdit +var loadout_override:LoadoutOverrideInfo + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + load_from_loadout() + +func load_from_loadout(_n=null): + var class_path:int = get_class_idx(loadout_override.class_path) + class_option.selected = class_path + if class_path == 9: + custom_class_edit.text = loadout_override.class_path + + var slot:int = slot_to_idx(loadout_override.slot) + slot_option.select(slot) + if slot == 5: + custom_slot_edit.text = loadout_override.slot + + item_edit.text = loadout_override.item_path + +func update_loadout(): + loadout_override.class_path = get_class_path() + +func get_class_idx(string:String) -> int: + match string: + "/Game/tf2_commons_v142/Loadout/Loadouts/Scout/TF2_Scout_HolderInfo.TF2_Scout_HolderInfo": + return 0 + "/Game/tf2_commons_v142/Loadout/Loadouts/Soldier/TF2_Soldier_HolderInfo.TF2_Soldier_HolderInfo": + return 1 + "/Game/tf2_commons_v142/Loadout/Loadouts/Medic/TF2_Medic_HolderInfo.TF2_Medic_HolderInfo": + return 2 + "/Game/tf2_commons_v142/Loadout/Loadouts/Engineer/TF2_Engineer_HolderInfo.TF2_Engineer_HolderInfo": + return 3 + "/Game/tf2_commons_v142/Loadout/Loadouts/Heavy/TF2_Heavy_HolderInfo.TF2_Heavy_HolderInfo": + return 4 + "/Game/tf2_commons_v142/Loadout/Loadouts/Sniper/TF2_Sniper_HolderInfo.TF2_Sniper_HolderInfo": + return 5 + "/Game/tf2_commons_v142/Loadout/Loadouts/Spy/TF2_Spy_HolderInfo.TF2_Spy_HolderInfo": + return 6 + "/Game/tf2_commons_v142/Loadout/Loadouts/Demoman/TF2_Demoman_HolderInfo.TF2_Demoman_HolderInfo": + return 7 + "/Game/tf2_commons_v142/Loadout/Loadouts/Pyro/TF2_Pyro_HolderInfo.TF2_Pyro_HolderInfo": + return 8 + _: + return 9 + +func slot_to_idx(slot:String) -> int: + match slot: + "Hat": + return 0 + "Misc": + return 1 + "Melee": + return 2 + "Primary": + return 3 + "Sidearm": + return 4 + _: + return 5 + +func get_class_path(): + match class_option.selected: + 0: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Scout/TF2_Scout_HolderInfo.TF2_Scout_HolderInfo" + 1: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Soldier/TF2_Soldier_HolderInfo.TF2_Soldier_HolderInfo" + 2: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Medic/TF2_Medic_HolderInfo.TF2_Medic_HolderInfo" + 3: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Engineer/TF2_Engineer_HolderInfo.TF2_Engineer_HolderInfo" + 4: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Heavy/TF2_Heavy_HolderInfo.TF2_Heavy_HolderInfo" + 5: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Sniper/TF2_Sniper_HolderInfo.TF2_Sniper_HolderInfo" + 6: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Spy/TF2_Spy_HolderInfo.TF2_Spy_HolderInfo" + 7: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Demoman/TF2_Demoman_HolderInfo.TF2_Demoman_HolderInfo" + 8: + return "/Game/tf2_commons_v142/Loadout/Loadouts/Pyro/TF2_Pyro_HolderInfo.TF2_Pyro_HolderInfo" + 9: + return custom_class_edit.text diff --git a/scenes/Overrides/loadout_override_display.gd.uid b/scenes/Overrides/loadout_override_display.gd.uid new file mode 100644 index 0000000..0a17280 --- /dev/null +++ b/scenes/Overrides/loadout_override_display.gd.uid @@ -0,0 +1 @@ +uid://7g560g423lea diff --git a/scenes/loadout_overrides.gd b/scenes/loadout_overrides.gd new file mode 100644 index 0000000..abdd64a --- /dev/null +++ b/scenes/loadout_overrides.gd @@ -0,0 +1,22 @@ +extends Control + +@export var user_parser: UserParser +@export var override_parser: OverrideParser + +var users:Array[UserInfo] +var user_groups:Array[GroupInfo] +var override_categories:Array[OverrideItemGroup] +# Called when the node enters the scene tree for the first time. +func _ready() -> void: # "user://repo/loadout-overrides/default-loadout-overrides.txt" + if FileAccess.file_exists("user://repo/users.txt") && FileAccess.file_exists("user://repo/loadout-overrides/default-loadout-overrides.txt"): + var user_text:String = FileAccess.get_file_as_string("user://repo/users.txt") + var override_text:String = FileAccess.get_file_as_string("user://repo/loadout-overrides/default-loadout-overrides.txt") + users = user_parser.parse_people(user_text) + #print("got ",users) + user_groups = user_parser.parse_groups(user_text,users) + override_categories = override_parser.parse_overrides(override_text,users,user_groups) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/scenes/loadout_overrides.gd.uid b/scenes/loadout_overrides.gd.uid new file mode 100644 index 0000000..8e2ab50 --- /dev/null +++ b/scenes/loadout_overrides.gd.uid @@ -0,0 +1 @@ +uid://byl0odlgqrjri diff --git a/scenes/punish_showcase.tscn b/scenes/punish_showcase.tscn index 7e03b9d..04ad2b1 100644 --- a/scenes/punish_showcase.tscn +++ b/scenes/punish_showcase.tscn @@ -1,7 +1,7 @@ [gd_scene format=3 uid="uid://bxpr2nb1hydpi"] [ext_resource type="Script" uid="uid://dxlkscqs0wpo6" path="res://scenes/punish_showcase.gd" id="1_3wpqj"] -[ext_resource type="Script" uid="uid://cafyno407e2uq" path="res://Scripts/Gdscript/Punishment.gd" id="2_j4kex"] +[ext_resource type="Script" uid="uid://cafyno407e2uq" path="res://Scripts/Gdscript/Ban/Punishment.gd" id="2_j4kex"] [ext_resource type="Texture2D" uid="uid://cinbmowbp2btd" path="res://Textures/door.png" id="3_lw8i6"] [sub_resource type="Resource" id="Resource_j4kex"] diff --git a/scenes/windwos/altshowcse.tscn b/scenes/windwos/altshowcse.tscn index 8f68d15..997894f 100644 --- a/scenes/windwos/altshowcse.tscn +++ b/scenes/windwos/altshowcse.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://bv4mvou68l2sk"] -[ext_resource type="Script" uid="uid://2f384phq5272" path="res://Scripts/Gdscript/AltShowcase.gd" id="1_7tuyd"] +[ext_resource type="Script" uid="uid://2f384phq5272" path="res://Scripts/Gdscript/Ban/AltShowcase.gd" id="1_7tuyd"] [sub_resource type="LabelSettings" id="LabelSettings_7tuyd"] font_size = 20 diff --git a/scenes/windwos/edit_window.gd b/scenes/windwos/edit_window.gd index 5d5ca94..a0f9c83 100644 --- a/scenes/windwos/edit_window.gd +++ b/scenes/windwos/edit_window.gd @@ -1,13 +1,15 @@ class_name EditWindow extends Window @onready var days_edit: SpinBox = $margin/VBoxContainer/ScrollContainer/Container/Ends/DaysEdit @onready var years_edit: SpinBox = $margin/VBoxContainer/ScrollContainer/Container/Ends/YearsEdit -@onready var reason_edit: LineEdit = $"margin/VBoxContainer/ScrollContainer/Container/Reason/Reason Edit" +@export var reason_edit: LineEdit +@export var reason_option: OptionButton @onready var uid_edit: LineEdit = $"margin/VBoxContainer/ScrollContainer/Container/UID/UID Edit" @onready var name_edit: LineEdit = $"margin/VBoxContainer/ScrollContainer/Container/Name/Name Edit" @onready var donebutton: Button = $margin/VBoxContainer/Done @onready var delete_check: CheckBox = $margin/VBoxContainer/ScrollContainer/Container/DeleteCheck @onready var delete_button: Button = $margin/VBoxContainer/ScrollContainer/Container/DeleteButton @onready var type_button: OptionButton = $margin/VBoxContainer/ScrollContainer/Container/Type/TypeButton +@export var reason_custom: HBoxContainer @export var opened_from:PunishShowcase @export var punishment:Punishment @@ -21,9 +23,13 @@ func _ready() -> void: close_requested.connect(close) donebutton.pressed.connect(done) delete_button.pressed.connect(delete_this) + reason_option.item_selected.connect(should_show_custom) for type in Punishment.punishment_types: type_button.add_item(type) +func should_show_custom(_a): + reason_custom.visible = reason_option.selected == 3 + func delete_this(): if opened_from: opened_from.queue_free() @@ -41,7 +47,19 @@ func update(set_time:bool = false): return name_edit.text = punishment.username uid_edit.text = punishment.uid - reason_edit.text = punishment.punish_reason + reason_edit.text = "" + reason_custom.hide() + match punishment.punish_reason: + "TOXICITY": + reason_option.select(0) + "BAN_EVADING": + reason_option.select(1) + "HARASSMENT": + reason_option.select(2) + _: + reason_custom.show() + reason_option.select(3) + reason_edit.text = punishment.punish_reason var from_time:int = punishment.punish_end var from_unix:Dictionary = Time.get_date_dict_from_unix_time(from_time) @warning_ignore("integer_division") @@ -74,7 +92,7 @@ func get_punish() -> Punishment: var new_punishment:Punishment = Punishment.new() new_punishment.username = name_edit.text new_punishment.uid = uid_edit.text - new_punishment.punish_reason = reason_edit.text + new_punishment.punish_reason = get_reason() var time:int = 0 time += years_edit.value * 31536000 time += days_edit.value *86400 @@ -84,3 +102,15 @@ func get_punish() -> Punishment: new_punishment.what_punishment = type_button.selected changed.emit() return new_punishment + +func get_reason() -> String: + match reason_option.selected: + 0: + return "TOXICITY" + 1: + return "BAN_EVADING" + 2: + return "HARASSMENT" + 3: + return reason_edit.text + return "" diff --git a/scenes/windwos/edit_window.tscn b/scenes/windwos/edit_window.tscn index 48c6d56..20f6393 100644 --- a/scenes/windwos/edit_window.tscn +++ b/scenes/windwos/edit_window.tscn @@ -6,13 +6,16 @@ font_size = 14 font_color = Color(0.7581918, 0.7581918, 0.7581917, 1) -[node name="EditWindow" type="Window" unique_id=1215629639] +[node name="EditWindow" type="Window" unique_id=1215629639 node_paths=PackedStringArray("reason_edit", "reason_option", "reason_custom")] oversampling_override = 1.0 initial_position = 4 size = Vector2i(680, 395) visible = false force_native = true script = ExtResource("1_827p1") +reason_edit = NodePath("margin/VBoxContainer/ScrollContainer/Container/ReasonCustom/Reason Edit") +reason_option = NodePath("margin/VBoxContainer/ScrollContainer/Container/Reason/ReasonOption") +reason_custom = NodePath("margin/VBoxContainer/ScrollContainer/Container/ReasonCustom") [node name="ColorRect" type="ColorRect" parent="." unique_id=207830370] anchors_preset = 15 @@ -20,7 +23,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -color = Color(0.32941177, 0.25490198, 0.1764706, 1) +color = Color(0.28235295, 0.27058825, 0.23529412, 1) [node name="margin" type="MarginContainer" parent="." unique_id=81777967] anchors_preset = 15 @@ -97,7 +100,26 @@ layout_mode = 2 layout_mode = 2 text = "Reason:" -[node name="Reason Edit" type="LineEdit" parent="margin/VBoxContainer/ScrollContainer/Container/Reason" unique_id=194738986] +[node name="ReasonOption" type="OptionButton" parent="margin/VBoxContainer/ScrollContainer/Container/Reason" unique_id=1290708566] +layout_mode = 2 +item_count = 4 +popup/item_0/text = "TOXICITY" +popup/item_0/id = 0 +popup/item_1/text = "BAN_EVADING" +popup/item_1/id = 1 +popup/item_2/text = "HARASSMENT" +popup/item_2/id = 2 +popup/item_3/text = "custom" +popup/item_3/id = 3 + +[node name="ReasonCustom" type="HBoxContainer" parent="margin/VBoxContainer/ScrollContainer/Container" unique_id=2083898750] +layout_mode = 2 + +[node name="Reason Label" type="Label" parent="margin/VBoxContainer/ScrollContainer/Container/ReasonCustom" unique_id=2075988770] +layout_mode = 2 +text = "Custom Reason:" + +[node name="Reason Edit" type="LineEdit" parent="margin/VBoxContainer/ScrollContainer/Container/ReasonCustom" unique_id=149222233] layout_mode = 2 size_flags_horizontal = 3