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,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