Add git, restructure

This commit is contained in:
bucket
2026-03-22 18:57:54 +01:00
parent 222d9b940d
commit 3a3c18ebc0
42 changed files with 580 additions and 81 deletions
+118 -10
View File
@@ -1,17 +1,19 @@
[gd_scene format=3 uid="uid://cxf3yenlgvupj"]
[ext_resource type="Script" uid="uid://c57yqopmolu8o" path="res://main.gd" id="1_bjd11"]
[ext_resource type="Script" uid="uid://c57yqopmolu8o" path="res://Scripts/Gdscript/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://tf2logo.png" id="3_mwfav"]
[ext_resource type="Texture2D" uid="uid://dppihj7ptidog" path="res://Plus.png" id="4_3p2gp"]
[ext_resource type="Texture2D" uid="uid://c7r26dxgqkklc" path="res://Minus.png" id="5_cvmbd"]
[ext_resource type="Script" uid="uid://c5ihhdkosauvw" path="res://punish_list_parser.gd" id="6_ft6cd"]
[ext_resource type="Script" uid="uid://caaljvxo8tja5" path="res://ban_list_exporter.gd" id="7_bb450"]
[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="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="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://search.gd" id="11_yxlcp"]
[ext_resource type="Script" uid="uid://3gmapu83dglo" path="res://save_file_parser.gd" id="12_ebg2g"]
[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://dv74d87a31oyx" path="res://Scripts/Csharp/GitIntigration.cs" id="13_qmy6f"]
[sub_resource type="LabelSettings" id="LabelSettings_lgr22"]
font_size = 26
@@ -28,6 +30,18 @@ stacked_outline_1/color = Color(0.8099345, 0.9946762, 7.70092e-07, 1)
stacked_outline_2/size = 4
stacked_outline_2/color = Color(0.32855865, 0.41260794, 1, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mwfav"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.5446172, 0.24615589, 0.017454231, 0.6)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[node name="Control" type="Control" unique_id=2276929 node_paths=PackedStringArray("edit_window", "punish_list_parser", "PunishContainer", "new_punish_btn", "file_opener", "open_btn", "new_btn", "save_btn", "exporter", "file_label", "save_file_parser", "quit_confirmation", "ban_counter", "save_label", "plus", "minus", "more_btn", "options_window")]
layout_mode = 3
anchors_preset = 15
@@ -157,6 +171,28 @@ text = "More"
layout_mode = 2
placeholder_text = "Search..."
[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=355358061]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3" unique_id=400647282]
layout_mode = 2
text = "Filter by:"
[node name="NameCheck" type="CheckButton" parent="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]
layout_mode = 2
button_pressed = true
text = "UID"
[node name="DescriptionCheck" type="CheckButton" parent="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]
layout_mode = 2
@@ -198,6 +234,64 @@ text = "*"
layout_mode = 2
text = "Save changes"
[node name="Commit" type="Button" parent="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]
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]
visible = false
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 8
[node name="Control" type="Control" parent="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]
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_mwfav")
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/Base/Control" unique_id=1967441013]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/Base/Control/VBoxContainer" unique_id=984310582]
layout_mode = 2
[node name="Warning" type="Label" parent="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]
layout_mode = 2
icon = ExtResource("6_mwfav")
flat = true
[node name="Label" type="Label" parent="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")
@@ -214,10 +308,13 @@ 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")]
[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="OpenFile" type="FileDialog" parent="." unique_id=1378168421]
oversampling_override = 1.0
@@ -228,8 +325,9 @@ access = 2
filters = PackedStringArray("*.txt", "*.dat")
use_native_dialog = true
[node name="SaveFileParser" type="Node" parent="." unique_id=930223611]
[node name="SaveFileParser" type="Node" parent="." unique_id=930223611 node_paths=PackedStringArray("options_window")]
script = ExtResource("12_ebg2g")
options_window = NodePath("../OptionsWindow")
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="." unique_id=416398003]
oversampling_override = 1.0
@@ -241,6 +339,16 @@ ok_button_text = "Save and quit"
dialog_text = "You have unsaved changes!"
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")
Main = NodePath("..")
Push_error = NodePath("../MarginContainer/Base/Control/VBoxContainer/Label")
Push_Base = NodePath("../MarginContainer/Base")
pull_button = NodePath("../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"]
+2 -2
View File
@@ -16,8 +16,8 @@ func _ready() -> void:
func update() -> void:
name_label.text = punishment.username
uid_label.text = punishment.uid
punishment_type_display.texture = load("res://door.png") if \
punishment.what_punishment == punishment.punishment_types.BAN else load("res://speaker.png")
punishment_type_display.texture = load("res://Textures/door.png") if \
punishment.what_punishment == punishment.punishment_types.BAN else load("res://Textures/speaker.png")
func edit():
Edit.emit(self)
+2 -2
View File
@@ -1,8 +1,8 @@
[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://Punishment.gd" id="2_j4kex"]
[ext_resource type="Texture2D" uid="uid://cinbmowbp2btd" path="res://door.png" id="3_lw8i6"]
[ext_resource type="Script" uid="uid://cafyno407e2uq" path="res://Scripts/Gdscript/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"]
script = ExtResource("2_j4kex")
+92 -2
View File
@@ -5,16 +5,27 @@
[sub_resource type="LabelSettings" id="LabelSettings_5xt3b"]
font_size = 30
[node name="OptionsWindow" type="Window" unique_id=1485451151 node_paths=PackedStringArray("dupe_clear_button", "save_v_1_button")]
[sub_resource type="LabelSettings" id="LabelSettings_gec7h"]
outline_color = Color(1, 0.7764706, 0.7764706, 1)
[node name="OptionsWindow" type="Window" unique_id=1485451151 node_paths=PackedStringArray("use_old", "dupe_clear_button", "save_v_1_button", "repo_edit", "email_edit", "name_edit", "key_edit", "clone_repo_button", "clone_log", "reset_repo_button")]
oversampling_override = 1.0
position = Vector2i(0, 36)
size = Vector2i(300, 200)
size = Vector2i(557, 397)
visible = false
force_native = true
min_size = Vector2i(262, 199)
script = ExtResource("1_5xt3b")
use_old = NodePath("MarginContainer/ScrollContainer/BoxContainer/UseOld")
dupe_clear_button = NodePath("MarginContainer/ScrollContainer/BoxContainer/DupeClearButton")
save_v_1_button = NodePath("MarginContainer/ScrollContainer/BoxContainer/SaveV1Button")
repo_edit = NodePath("MarginContainer/ScrollContainer/BoxContainer/Repo/RepoEdit")
email_edit = NodePath("MarginContainer/ScrollContainer/BoxContainer/Git Email/EmailEdit")
name_edit = NodePath("MarginContainer/ScrollContainer/BoxContainer/Git Username/NameEdit")
key_edit = NodePath("MarginContainer/ScrollContainer/BoxContainer/Git key/KeyEdit")
clone_repo_button = NodePath("MarginContainer/ScrollContainer/BoxContainer/CloneRepo")
clone_log = NodePath("MarginContainer/ScrollContainer/BoxContainer/CloneLog")
reset_repo_button = NodePath("MarginContainer/ScrollContainer/BoxContainer/Reset Repo")
[node name="ColorRect" type="ColorRect" parent="." unique_id=1724009282]
anchors_preset = 15
@@ -50,6 +61,16 @@ layout_mode = 2
size_flags_horizontal = 3
vertical = true
[node name="RichTextLabel3" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=418846341]
layout_mode = 2
text = "General"
label_settings = SubResource("LabelSettings_5xt3b")
[node name="UseOld" type="CheckBox" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1245550112]
layout_mode = 2
text = "Save file with OLD ban file structure(NEEDED before TFVR 4.0)"
autowrap_mode = 2
[node name="RichTextLabel" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=66906023]
layout_mode = 2
text = "Utility"
@@ -64,3 +85,72 @@ text = "Clear Dupes"
layout_mode = 2
tooltip_text = "Save a version of the banlist in the legacy format"
text = "save duplicate v1 file"
[node name="RichTextLabel2" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=824466576]
layout_mode = 2
text = "Git"
label_settings = SubResource("LabelSettings_5xt3b")
[node name="Repo" type="HBoxContainer" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1177156648]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer/Repo" unique_id=1452601630]
layout_mode = 2
text = "GIT Repo:"
[node name="RepoEdit" type="LineEdit" parent="MarginContainer/ScrollContainer/BoxContainer/Repo" unique_id=74818467]
layout_mode = 2
size_flags_horizontal = 3
[node name="Git Email" type="HBoxContainer" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1897029584]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer/Git Email" unique_id=1643679626]
layout_mode = 2
text = "GIT Email:"
[node name="EmailEdit" type="LineEdit" parent="MarginContainer/ScrollContainer/BoxContainer/Git Email" unique_id=1342026395]
layout_mode = 2
size_flags_horizontal = 3
[node name="Git Username" type="HBoxContainer" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1185383015]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer/Git Username" unique_id=790257001]
layout_mode = 2
text = "GIT Name:"
[node name="NameEdit" type="LineEdit" parent="MarginContainer/ScrollContainer/BoxContainer/Git Username" unique_id=791124761]
layout_mode = 2
size_flags_horizontal = 3
[node name="Git key" type="HBoxContainer" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=670946792]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer/Git key" unique_id=1561518298]
layout_mode = 2
text = "GIT Key:"
[node name="KeyEdit" type="LineEdit" parent="MarginContainer/ScrollContainer/BoxContainer/Git key" unique_id=1089959886]
layout_mode = 2
size_flags_horizontal = 3
secret = true
[node name="CloneRepo" type="Button" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1623040123]
layout_mode = 2
text = "Clone Repo"
[node name="CloneLog" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=876009711]
layout_mode = 2
label_settings = SubResource("LabelSettings_gec7h")
autowrap_mode = 2
[node name="Reset Repo" type="Button" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1348491757]
layout_mode = 2
text = "Reset Repo"
[node name="ResetInfo" type="Label" parent="MarginContainer/ScrollContainer/BoxContainer" unique_id=1109421918]
layout_mode = 2
text = "Reset the repo if you have a weird issue that you cannot fix by other means, this will reset all your local changes"
label_settings = SubResource("LabelSettings_gec7h")
autowrap_mode = 2
+3 -3
View File
@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://bv4mvou68l2sk"]
[ext_resource type="Script" uid="uid://2f384phq5272" path="res://AltShowcase.gd" id="1_7tuyd"]
[ext_resource type="Script" uid="uid://2f384phq5272" path="res://Scripts/Gdscript/AltShowcase.gd" id="1_7tuyd"]
[sub_resource type="LabelSettings" id="LabelSettings_7tuyd"]
font_size = 20
@@ -10,7 +10,7 @@ font_size = 15
font_color = Color(0.74558026, 0.7455802, 0.7455802, 1)
[sub_resource type="LabelSettings" id="LabelSettings_y1bem"]
font_size = 27
font_size = 18
[node name="Altshowcase" type="Control" unique_id=96967418 node_paths=PackedStringArray("name_label", "uid_label", "count_label", "search_alts_button")]
custom_minimum_size = Vector2(0, 58.235)
@@ -54,7 +54,7 @@ label_settings = SubResource("LabelSettings_45q1g")
[node name="Count" type="Label" parent="HBoxContainer" unique_id=899914138]
layout_mode = 2
text = "67 alts"
text = "69420 alts"
label_settings = SubResource("LabelSettings_y1bem")
[node name="SearchAltsButton" type="Button" parent="HBoxContainer" unique_id=957758160]
+2
View File
@@ -111,7 +111,9 @@ text = "Ends on:"
[node name="DaysEdit" type="SpinBox" parent="margin/VBoxContainer/ScrollContainer/Container/Ends" unique_id=1346908939]
layout_mode = 2
size_flags_horizontal = 3
min_value = 1.0
max_value = 364.0
value = 1.0
prefix = "day "
[node name="YearsEdit" type="SpinBox" parent="margin/VBoxContainer/ScrollContainer/Container/Ends" unique_id=467960707]
+10
View File
@@ -1,7 +1,17 @@
class_name MoreOptionsWindow extends Window
@export var use_old: CheckBox
@export var dupe_clear_button: Button
@export var save_v_1_button: Button
@export var repo_edit: LineEdit
@export var email_edit: LineEdit
@export var name_edit: LineEdit
@export var key_edit: LineEdit
@export var clone_repo_button: Button
@export var clone_log: Label
@export var reset_repo_button:Button
signal remove_dupes
signal save_v_one