wywalenie git-plugins godot

This commit is contained in:
sysek 2026-01-05 13:36:23 +01:00
parent d4688ba308
commit 330395779c
16 changed files with 163 additions and 1451 deletions

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2016-2023 The Godot Engine community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load diff

View file

@ -1,10 +0,0 @@
[configuration]
entry_symbol = "git_plugin_init"
compatibility_minimum = "4.2.0"
[libraries]
linux.editor.x86_64 = "linux/libgit_plugin.linux.editor.x86_64.so"
macos.editor = "macos/libgit_plugin.macos.editor.universal.dylib"
windows.editor.x86_64 = "windows/libgit_plugin.windows.editor.x86_64.dll"

View file

@ -1 +0,0 @@
uid://bh3sfupyqx4bn

View file

@ -24,11 +24,6 @@ window/size/viewport_width=800
window/size/viewport_height=600
window/size/resizable=false
[editor]
version_control/plugin_name="GitPlugin"
version_control/autoload_on_startup=true
[editor_plugins]
enabled=PackedStringArray("res://addons/script-ide/plugin.cfg")

View file

@ -4,8 +4,8 @@ extends Control
@onready var new_character = get_node("Character/NewCharacter")
## Vars
@onready var button_new = get_node("VBoxContainer/Menu/ButtonNew")
@onready var menu = get_node("VBoxContainer/Menu")
@onready var button_new = get_node("Menu/ButtonNew")
@onready var menu = get_node("Menu")
func _ready() -> void:
pass

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://dt41bt5fi3t47"]
[gd_scene load_steps=7 format=3 uid="uid://dt41bt5fi3t47"]
[ext_resource type="Theme" uid="uid://dy41x4ott07ql" path="res://assets/themes/main_theme.tres" id="2_s4h7g"]
[ext_resource type="Script" uid="uid://djdhpn3mtkuh3" path="res://scenes/create_player/main.gd" id="2_ysn76"]
@ -6,6 +6,8 @@
[sub_resource type="ButtonGroup" id="ButtonGroup_ysn76"]
[sub_resource type="ButtonGroup" id="ButtonGroup_g4ktg"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yty2c"]
[node name="Main" type="Control"]
@ -76,28 +78,26 @@ theme_override_constants/margin_bottom = 5
[node name="NewCharacter" parent="Character" instance=ExtResource("3_ysn76")]
visible = false
layout_mode = 2
checkbox_group = SubResource("ButtonGroup_ysn76")
rola_cb = SubResource("ButtonGroup_ysn76")
metody_cb = SubResource("ButtonGroup_g4ktg")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 0
offset_left = 8.0
[node name="Menu" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -80.0
offset_top = 56.0
offset_right = 792.0
offset_bottom = 584.0
offset_right = 76.0
offset_bottom = 134.0
grow_horizontal = 2
[node name="Logo" type="TextureRect" parent="VBoxContainer"]
custom_minimum_size = Vector2(0, 300)
layout_mode = 2
[node name="Menu" type="VBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="ButtonNew" type="Button" parent="VBoxContainer/Menu"]
[node name="ButtonNew" type="Button" parent="Menu"]
layout_mode = 2
theme_override_styles/focus = SubResource("StyleBoxEmpty_yty2c")
text = "Nowa postać"
[node name="ButtonLoad" type="Button" parent="VBoxContainer/Menu"]
[node name="ButtonLoad" type="Button" parent="Menu"]
layout_mode = 2
theme_override_styles/focus = SubResource("StyleBoxEmpty_yty2c")
disabled = true
@ -105,4 +105,4 @@ text = "Załaduj"
[connection signal="pressed" from="Top/TopMenu/ButtonQuit" to="." method="_on_button_quit_pressed"]
[connection signal="pressed" from="Top/TopMenu/ButtonRoll" to="Character/NewCharacter" method="_on_button_roll_pressed"]
[connection signal="pressed" from="VBoxContainer/Menu/ButtonNew" to="." method="_on_new_pressed"]
[connection signal="pressed" from="Menu/ButtonNew" to="." method="_on_new_pressed"]

View file

@ -1,3 +0,0 @@
[gd_resource type="ButtonGroup" format=3 uid="uid://ctiyrpjxwmat"]
[resource]

View file

@ -0,0 +1,3 @@
[gd_resource type="ButtonGroup" format=3 uid="uid://blusey675offa"]
[resource]

View file

@ -2,11 +2,10 @@ extends Control
## Grupa przycisków typu checkbox która umożliwia
## wybór tylko jednej opcji
@export var checkbox_group: ButtonGroup
@export var rola_cb: ButtonGroup
@export var metody_cb: ButtonGroup
@onready var solo_cb = get_node("Rola/GridContainer/SoloCB")
@onready var netrunner_cb = get_node("Rola/GridContainer/NetrunnerCB")
@onready var korpo_cb = get_node("Rola/GridContainer/KorpoCB")
@onready var netrunner_cb = get_node("Rola/NetrunnerCB")
@onready var button_roll = $"../../Top/TopMenu/ButtonRoll"
enum Chum { SOLO, NETRUNNER, KORPO }
@ -24,6 +23,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 7,
"EMP": 4,
"PW": 0,
"CZL": 0,
},
2: {
"INT": 5,
@ -36,6 +37,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 5,
"EMP": 5,
"PW": 0,
"CZL": 0,
},
3: {
"INT": 5,
@ -48,6 +51,8 @@ var netrunner: Dictionary = {
"RUCH": 6,
"BC": 7,
"EMP": 4,
"PW": 0,
"CZL": 0,
},
4: {
"INT": 5,
@ -60,6 +65,8 @@ var netrunner: Dictionary = {
"RUCH": 6,
"BC": 5,
"EMP": 5,
"PW": 0,
"CZL": 0,
},
5: {
"INT": 5,
@ -72,6 +79,8 @@ var netrunner: Dictionary = {
"RUCH": 5,
"BC": 5,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
6: {
"INT": 6,
@ -84,6 +93,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 6,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
7: {
"INT": 6,
@ -96,6 +107,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 7,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
8: {
"INT": 5,
@ -108,6 +121,8 @@ var netrunner: Dictionary = {
"RUCH": 5,
"BC": 7,
"EMP": 4,
"PW": 0,
"CZL": 0,
},
9: {
"INT": 7,
@ -120,6 +135,8 @@ var netrunner: Dictionary = {
"RUCH": 5,
"BC": 6,
"EMP": 5,
"PW": 0,
"CZL": 0,
},
10: {
"INT": 7,
@ -132,6 +149,8 @@ var netrunner: Dictionary = {
"RUCH": 7,
"BC": 5,
"EMP": 6,
"PW": 0,
"CZL": 0,
},
}
@ -144,9 +163,6 @@ func _ready() -> void:
var stats = get_tree().get_nodes_in_group("stats")
button_roll.disabled = true
netrunner_cb.button_pressed = true
korpo_cb.disabled = true
solo_cb.disabled = true
for stat in stats:
stat.text = "0"
@ -161,7 +177,7 @@ func _draw() -> void:
func _on_button_roll_pressed() -> void:
var roll = Global.rolld(10)
var button_pressed = checkbox_group.get_pressed_button()
var button_pressed = rola_cb.get_pressed_button()
var chum
match button_pressed.name:
@ -179,14 +195,37 @@ func _on_button_roll_pressed() -> void:
func character_template(roll: int, chum: int) -> void:
var stats_group = get_tree().get_nodes_in_group("stats")
var template_number
var _netrunner = netrunner.duplicate()
var template
match chum:
1:
template_number = netrunner.get(roll)
template = _netrunner.get(roll)
_:
print(":(")
template["PW"] = wylicz_pw(template)
template["CZL"] = wylicz_czl(template)
if chum <= 1:
for i in range(stats_group.size()):
stats_group[i].text = str(template_number.values()[i])
stats_group[i].text = str(template.values()[i])
if chum == Chum.NETRUNNER:
print("[%s] PW: %d, CZŁ: %d" % ["Netrunner", template["PW"], template["CZL"]])
func wylicz_pw(template: Dictionary) -> int:
var bc = template["INT"]
var sw = template["SW"]
var pw = 10 + (5 * ceil(lerp(bc, sw, 0.5)))
return pw
func wylicz_czl(template: Dictionary) -> int:
var emp = template["EMP"]
var czl = emp * 10
return czl

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=5 format=3 uid="uid://odjphawrdiw8"]
[gd_scene load_steps=6 format=3 uid="uid://odjphawrdiw8"]
[ext_resource type="Theme" uid="uid://dy41x4ott07ql" path="res://assets/themes/main_theme.tres" id="1_mks5g"]
[ext_resource type="Script" uid="uid://be8pfcpjesmal" path="res://scenes/create_player/new_character/new_character.gd" id="2_mks5g"]
[ext_resource type="ButtonGroup" uid="uid://ctiyrpjxwmat" path="res://scenes/create_player/new_character/checkbox_group.tres" id="3_rfvxj"]
[ext_resource type="ButtonGroup" uid="uid://b18rjpsr6uaw4" path="res://scenes/create_player/new_character/rola_cb.tres" id="3_xx3y5"]
[ext_resource type="PackedScene" uid="uid://p5nhkod3yaf0" path="res://scenes/create_player/new_character/stats.tscn" id="4_w7nxs"]
[ext_resource type="ButtonGroup" uid="uid://blusey675offa" path="res://scenes/create_player/new_character/metody_cb.tres" id="5_3ifvl"]
[node name="NewCharacter" type="Control"]
layout_mode = 3
@ -12,67 +13,103 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource("1_mks5g")
script = ExtResource("2_mks5g")
checkbox_group = ExtResource("3_rfvxj")
rola_cb = ExtResource("3_xx3y5")
metody_cb = ExtResource("5_3ifvl")
[node name="Ksywa" type="Label" parent="."]
layout_mode = 0
offset_left = 8.0
offset_top = 8.0
offset_right = 57.0
offset_bottom = 40.0
offset_top = 12.0
offset_right = 75.0
offset_bottom = 44.0
text = "Ksywa"
[node name="KsywaInput" type="LineEdit" parent="."]
layout_mode = 0
offset_left = 80.0
offset_top = 8.0
offset_right = 222.0
offset_bottom = 44.0
offset_left = 78.0
offset_top = 12.0
offset_right = 448.0
offset_bottom = 48.0
[node name="Rola" type="Label" parent="."]
layout_mode = 0
offset_left = 8.0
offset_top = 64.0
offset_right = 61.0
offset_bottom = 92.0
text = "ROLA"
[node name="GridContainer" type="GridContainer" parent="Rola"]
[node name="Rola" type="GridContainer" parent="."]
clip_contents = true
layout_mode = 0
offset_left = 72.0
offset_top = 4.0
offset_right = 222.0
offset_bottom = 96.0
offset_left = 272.0
offset_top = 60.0
offset_right = 422.0
offset_bottom = 152.0
columns = 2
[node name="NetrunnerCB" type="CheckBox" parent="Rola/GridContainer"]
[node name="NetrunnerCB" type="CheckBox" parent="Rola"]
layout_mode = 2
button_group = ExtResource("3_rfvxj")
button_pressed = true
button_group = ExtResource("3_xx3y5")
[node name="Netrunner" type="Label" parent="Rola/GridContainer"]
[node name="Netrunner" type="Label" parent="Rola"]
layout_mode = 2
text = "Netrunner"
[node name="SoloCB" type="CheckBox" parent="Rola/GridContainer"]
[node name="SoloCB" type="CheckBox" parent="Rola"]
layout_mode = 2
button_group = ExtResource("3_rfvxj")
disabled = true
button_group = ExtResource("3_xx3y5")
[node name="Solo" type="Label" parent="Rola/GridContainer"]
[node name="Solo" type="Label" parent="Rola"]
layout_mode = 2
text = "Solo"
[node name="KorpoCB" type="CheckBox" parent="Rola/GridContainer"]
[node name="KorpoCB" type="CheckBox" parent="Rola"]
layout_mode = 2
button_group = ExtResource("3_rfvxj")
disabled = true
button_group = ExtResource("3_xx3y5")
[node name="Korpo" type="Label" parent="Rola/GridContainer"]
[node name="Korpo" type="Label" parent="Rola"]
layout_mode = 2
text = "Korpo"
[node name="Stats" parent="." instance=ExtResource("4_w7nxs")]
layout_mode = 0
offset_left = 248.0
offset_right = 472.0
offset_left = 600.0
offset_top = 8.0
offset_right = 824.0
offset_bottom = 404.0
[node name="Metody" type="GridContainer" parent="."]
clip_contents = true
layout_mode = 0
offset_left = 8.0
offset_top = 56.0
offset_right = 251.0
offset_bottom = 148.0
columns = 2
[node name="UlicznicyCB" type="CheckBox" parent="Metody"]
layout_mode = 2
button_pressed = true
button_group = ExtResource("5_3ifvl")
[node name="Ulicznicy" type="Label" parent="Metody"]
layout_mode = 2
text = "Ulicznicy"
[node name="KrawedziarzCB" type="CheckBox" parent="Metody"]
layout_mode = 2
disabled = true
button_group = ExtResource("5_3ifvl")
[node name="Krawedziarz" type="Label" parent="Metody"]
layout_mode = 2
text = "Krawędziarz"
[node name="KompletnyPakietCB" type="CheckBox" parent="Metody"]
layout_mode = 2
disabled = true
button_group = ExtResource("5_3ifvl")
[node name="KompletnyPakiet" type="Label" parent="Metody"]
layout_mode = 2
text = "Kompletny Pakiet"

View file

@ -0,0 +1,3 @@
[gd_resource type="ButtonGroup" format=3 uid="uid://b18rjpsr6uaw4"]
[resource]

View file

@ -86,3 +86,19 @@ text = "EMP"
[node name="Emp" type="LineEdit" parent="." groups=["stats"]]
layout_mode = 2
editable = false
[node name="PunktyWytrzymalosci" type="Label" parent="."]
layout_mode = 2
text = "PW"
[node name="Pw" type="LineEdit" parent="." groups=["stats"]]
layout_mode = 2
editable = false
[node name="Czlowieczenstwo" type="Label" parent="."]
layout_mode = 2
text = "CZŁ"
[node name="Czl" type="LineEdit" parent="." groups=["stats"]]
layout_mode = 2
editable = false