Compare commits
No commits in common. "55748d3f69e95b3f6b8070761d45e8de70522e81" and "0f1498a31c3ec61abf500c7557d78090b3995de0" have entirely different histories.
55748d3f69
...
0f1498a31c
20 changed files with 598 additions and 611 deletions
|
|
@ -1,171 +0,0 @@
|
||||||
{
|
|
||||||
"netrunner": {
|
|
||||||
"rolls": {
|
|
||||||
"1": {
|
|
||||||
"INT": 5.0,
|
|
||||||
"REF": 8.0,
|
|
||||||
"ZW": 7.0,
|
|
||||||
"TECH": 7.0,
|
|
||||||
"CHA": 7.0,
|
|
||||||
"SW": 4.0,
|
|
||||||
"SZ": 8.0,
|
|
||||||
"RUCH": 7.0,
|
|
||||||
"BC": 7.0,
|
|
||||||
"EMP": 4.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
"INT": 5.0,
|
|
||||||
"REF": 6.0,
|
|
||||||
"ZW": 7.0,
|
|
||||||
"TECH": 5.0,
|
|
||||||
"CHA": 8.0,
|
|
||||||
"SW": 3.0,
|
|
||||||
"SZ": 8.0,
|
|
||||||
"RUCH": 7.0,
|
|
||||||
"BC": 5.0,
|
|
||||||
"EMP": 5.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"3": {
|
|
||||||
"INT": 5.0,
|
|
||||||
"REF": 6.0,
|
|
||||||
"ZW": 8.0,
|
|
||||||
"TECH": 6.0,
|
|
||||||
"CHA": 6.0,
|
|
||||||
"SW": 4.0,
|
|
||||||
"SZ": 7.0,
|
|
||||||
"RUCH": 6.0,
|
|
||||||
"BC": 7.0,
|
|
||||||
"EMP": 4.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"4": {
|
|
||||||
"INT": 5.0,
|
|
||||||
"REF": 7.0,
|
|
||||||
"ZW": 7.0,
|
|
||||||
"TECH": 7.0,
|
|
||||||
"CHA": 7.0,
|
|
||||||
"SW": 5.0,
|
|
||||||
"SZ": 8.0,
|
|
||||||
"RUCH": 6.0,
|
|
||||||
"BC": 5.0,
|
|
||||||
"EMP": 5.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"5": {
|
|
||||||
"INT": 5.0,
|
|
||||||
"REF": 8.0,
|
|
||||||
"ZW": 8.0,
|
|
||||||
"TECH": 5.0,
|
|
||||||
"CHA": 7.0,
|
|
||||||
"SW": 3.0,
|
|
||||||
"SZ": 7.0,
|
|
||||||
"RUCH": 5.0,
|
|
||||||
"BC": 5.0,
|
|
||||||
"EMP": 6.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"6": {
|
|
||||||
"INT": 6.0,
|
|
||||||
"REF": 6.0,
|
|
||||||
"ZW": 6.0,
|
|
||||||
"TECH": 7.0,
|
|
||||||
"CHA": 8.0,
|
|
||||||
"SW": 4.0,
|
|
||||||
"SZ": 7.0,
|
|
||||||
"RUCH": 7.0,
|
|
||||||
"BC": 6.0,
|
|
||||||
"EMP": 6.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"7": {
|
|
||||||
"INT": 6.0,
|
|
||||||
"REF": 6.0,
|
|
||||||
"ZW": 6.0,
|
|
||||||
"TECH": 7.0,
|
|
||||||
"CHA": 6.0,
|
|
||||||
"SW": 5.0,
|
|
||||||
"SZ": 7.0,
|
|
||||||
"RUCH": 7.0,
|
|
||||||
"BC": 7.0,
|
|
||||||
"EMP": 6.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"8": {
|
|
||||||
"INT": 5.0,
|
|
||||||
"REF": 6.0,
|
|
||||||
"ZW": 8.0,
|
|
||||||
"TECH": 6.0,
|
|
||||||
"CHA": 8.0,
|
|
||||||
"SW": 4.0,
|
|
||||||
"SZ": 8.0,
|
|
||||||
"RUCH": 5.0,
|
|
||||||
"BC": 7.0,
|
|
||||||
"EMP": 4.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"9": {
|
|
||||||
"INT": 7.0,
|
|
||||||
"REF": 6.0,
|
|
||||||
"ZW": 7.0,
|
|
||||||
"TECH": 7.0,
|
|
||||||
"CHA": 6.0,
|
|
||||||
"SW": 3.0,
|
|
||||||
"SZ": 6.0,
|
|
||||||
"RUCH": 5.0,
|
|
||||||
"BC": 6.0,
|
|
||||||
"EMP": 5.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
},
|
|
||||||
"10": {
|
|
||||||
"INT": 7.0,
|
|
||||||
"REF": 8.0,
|
|
||||||
"ZW": 6.0,
|
|
||||||
"TECH": 6.0,
|
|
||||||
"CHA": 6.0,
|
|
||||||
"SW": 4.0,
|
|
||||||
"SZ": 7.0,
|
|
||||||
"RUCH": 7.0,
|
|
||||||
"BC": 5.0,
|
|
||||||
"EMP": 6.0,
|
|
||||||
"PW": 0.0,
|
|
||||||
"CZL": 0.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"umiejetnosci": {
|
|
||||||
"Atletyka": 2.0,
|
|
||||||
"Bijatyka": 2.0,
|
|
||||||
"Język (slang uliczny)": 2.0,
|
|
||||||
"Koncentracja": 2.0,
|
|
||||||
"Konwersacja": 2.0,
|
|
||||||
"Odczytywanie emocji": 2.0,
|
|
||||||
"Percepcja": 2.0,
|
|
||||||
"Perswazja": 2.0,
|
|
||||||
"Pierwsza pomoc": 2.0,
|
|
||||||
"Skradanie się": 6.0,
|
|
||||||
"Unik": 6.0,
|
|
||||||
"Wiedza lokalna": 2.0,
|
|
||||||
"Wykształcenie": 6.0,
|
|
||||||
"Broń krótka": 6.0,
|
|
||||||
"Cyberinżynieria": 6.0,
|
|
||||||
"Elektronika i zabezpieczenia (x2)": 6.0,
|
|
||||||
"Kryptografia": 6.0,
|
|
||||||
"Podstawowe naprawy": 6.0,
|
|
||||||
"Przeszukiwanie naprawy": 6.0,
|
|
||||||
"Przeszukiwanie baz danych": 6.0,
|
|
||||||
"Ukrycie/Znalezienie przedmotu": 6.0
|
|
||||||
},
|
|
||||||
"bron": [],
|
|
||||||
"pancerz": [],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
default_font = ExtResource("6_4fp8c")
|
default_font = ExtResource("6_4fp8c")
|
||||||
default_font_size = 24
|
default_font_size = 32
|
||||||
Button/styles/focus = SubResource("StyleBoxEmpty_axncs")
|
Button/styles/focus = SubResource("StyleBoxEmpty_axncs")
|
||||||
Button/styles/hover = ExtResource("1_axncs")
|
Button/styles/hover = ExtResource("1_axncs")
|
||||||
Button/styles/normal = ExtResource("1_vhku8")
|
Button/styles/normal = ExtResource("1_vhku8")
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ config/features=PackedStringArray("4.5", "Forward Plus")
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
Global="*res://scenes/create_player/global.gd"
|
Global="*res://scenes/global.gd"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
|
|
||||||
24
scenes/create_player/main.gd
Normal file
24
scenes/create_player/main.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
## Scene variables
|
||||||
|
@onready var new_character = get_node("Character/NewCharacter")
|
||||||
|
|
||||||
|
## Vars
|
||||||
|
@onready var button_new = get_node("Menu/ButtonNew")
|
||||||
|
@onready var menu = get_node("Menu")
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _on_button_quit_pressed() -> void:
|
||||||
|
get_tree().quit()
|
||||||
|
|
||||||
|
func _on_new_pressed() -> void:
|
||||||
|
toggle_mode()
|
||||||
|
|
||||||
|
func toggle_mode() -> void:
|
||||||
|
new_character.visible = !new_character.visible
|
||||||
|
if menu.is_visible_in_tree():
|
||||||
|
menu.hide()
|
||||||
|
else:
|
||||||
|
menu.show()
|
||||||
1
scenes/create_player/main.gd.uid
Normal file
1
scenes/create_player/main.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://djdhpn3mtkuh3
|
||||||
108
scenes/create_player/main.tscn
Normal file
108
scenes/create_player/main.tscn
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
[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"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://odjphawrdiw8" path="res://scenes/create_player/new_character/new_character.tscn" id="3_ysn76"]
|
||||||
|
|
||||||
|
[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"]
|
||||||
|
custom_minimum_size = Vector2(640, 480)
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2_s4h7g")
|
||||||
|
script = ExtResource("2_ysn76")
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0.050980393, 0.15294118, 0.19607843, 1)
|
||||||
|
|
||||||
|
[node name="Top" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_bottom = 38.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="TopMenu" type="HBoxContainer" parent="Top"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonQuit" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Quit
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="VSeparator" type="VSeparator" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonSave" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SAVE"
|
||||||
|
|
||||||
|
[node name="ButtonRoll" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "ROLL"
|
||||||
|
|
||||||
|
[node name="ButtonTest" type="Button" parent="Top/TopMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "!! TEST !!"
|
||||||
|
|
||||||
|
[node name="Character" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 8.0
|
||||||
|
offset_top = 56.0
|
||||||
|
offset_right = 792.0
|
||||||
|
offset_bottom = 584.0
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="NewCharacter" parent="Character" instance=ExtResource("3_ysn76")]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
rola_cb = SubResource("ButtonGroup_ysn76")
|
||||||
|
metody_cb = SubResource("ButtonGroup_g4ktg")
|
||||||
|
|
||||||
|
[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 = 76.0
|
||||||
|
offset_bottom = 134.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
|
||||||
|
[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="Menu"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_yty2c")
|
||||||
|
disabled = true
|
||||||
|
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="Menu/ButtonNew" to="." method="_on_new_pressed"]
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
extends Control
|
|
||||||
|
|
||||||
## Grupa przycisków typu checkbox która umożliwia
|
|
||||||
## wybór tylko jednej opcji
|
|
||||||
@export var rola_cb: ButtonGroup
|
|
||||||
@export var metody_cb: ButtonGroup
|
|
||||||
|
|
||||||
@onready var stats = $Stats
|
|
||||||
@onready var roll_button = $Top/TopMenu/Roll
|
|
||||||
@onready var quit_button = $Top/TopMenu/Quit
|
|
||||||
@onready var um_container = $Umiejetnosci/GridContainer
|
|
||||||
@onready var roll_label = $Stats/Roll2
|
|
||||||
|
|
||||||
enum Chum {
|
|
||||||
SOLO,
|
|
||||||
NETRUNNER,
|
|
||||||
KORPO,
|
|
||||||
}
|
|
||||||
|
|
||||||
## Słownik zawierający szablon dla klasy netrunner
|
|
||||||
var netrunner: Dictionary = {}
|
|
||||||
# Plik z szablonem
|
|
||||||
var NETRUNNER_TEMPLATE = "res://assets/templates/netrunner.json"
|
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
var stats_group = get_tree().get_nodes_in_group("stats")
|
|
||||||
|
|
||||||
for stat in stats_group:
|
|
||||||
stat.text = "0"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
quit_button.pressed.connect(_on_button_quit_pressed)
|
|
||||||
roll_button.pressed.connect(_on_button_roll_pressed)
|
|
||||||
|
|
||||||
|
|
||||||
## Metoda która wczytuje plik json zawierający szablony
|
|
||||||
## dla odpowiednich klas
|
|
||||||
func load_template():
|
|
||||||
var file = FileAccess.open(NETRUNNER_TEMPLATE, FileAccess.READ)
|
|
||||||
|
|
||||||
var json = file.get_as_text()
|
|
||||||
var json_object = JSON.new()
|
|
||||||
|
|
||||||
json_object.parse(json)
|
|
||||||
netrunner = json_object.data
|
|
||||||
|
|
||||||
return netrunner
|
|
||||||
|
|
||||||
|
|
||||||
## Metoda która zapisuje postać
|
|
||||||
func save_character():
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
## Główna metoda do tworzenia postaci
|
|
||||||
func create_character(roll, chum: int) -> void:
|
|
||||||
var stats_group = get_tree().get_nodes_in_group("stats")
|
|
||||||
var template = load_template()
|
|
||||||
var um
|
|
||||||
var player
|
|
||||||
|
|
||||||
match chum:
|
|
||||||
1:
|
|
||||||
player = template["netrunner"]["rolls"][roll]
|
|
||||||
um = template["netrunner"]["umiejetnosci"]
|
|
||||||
_:
|
|
||||||
print(":(")
|
|
||||||
|
|
||||||
player["PW"] = wylicz_pw(player)
|
|
||||||
player["CZL"] = wylicz_czl(player)
|
|
||||||
|
|
||||||
if chum <= 1:
|
|
||||||
for i in range(stats_group.size()):
|
|
||||||
stats_group[i].text = str(int(player.values()[i]))
|
|
||||||
|
|
||||||
var labels: Array[Label]
|
|
||||||
var um_place = "{name}: {value}"
|
|
||||||
|
|
||||||
for i in range(um.size()):
|
|
||||||
var label: Label = Label.new()
|
|
||||||
label.name = um.keys()[i]
|
|
||||||
label.text = um_place.format(
|
|
||||||
{"name": um.keys()[i], "value": int(um.values()[i])})
|
|
||||||
labels.append(label)
|
|
||||||
|
|
||||||
if um_container.get_child_count() == 0:
|
|
||||||
for label in labels:
|
|
||||||
um_container.add_child(label)
|
|
||||||
|
|
||||||
|
|
||||||
func wylicz_pw(player) -> int:
|
|
||||||
var bc = player["INT"]
|
|
||||||
var sw = player["SW"]
|
|
||||||
|
|
||||||
var pw = 10 + (5 * ceil(lerp(bc, sw, 0.5)))
|
|
||||||
|
|
||||||
return pw
|
|
||||||
|
|
||||||
|
|
||||||
func wylicz_czl(player) -> int:
|
|
||||||
var emp = player["EMP"]
|
|
||||||
var czl = emp * 10
|
|
||||||
|
|
||||||
return czl
|
|
||||||
|
|
||||||
func _on_button_roll_pressed() -> void:
|
|
||||||
var roll = str(Global.rolld(10))
|
|
||||||
var button_pressed = rola_cb.get_pressed_button()
|
|
||||||
var chum
|
|
||||||
|
|
||||||
roll_label.text = roll
|
|
||||||
|
|
||||||
match button_pressed.name:
|
|
||||||
"SoloCB":
|
|
||||||
chum = Chum.SOLO
|
|
||||||
"NetrunnerCB":
|
|
||||||
chum = Chum.NETRUNNER
|
|
||||||
"KorpoCB":
|
|
||||||
chum = Chum.KORPO
|
|
||||||
|
|
||||||
create_character(roll, chum)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_button_quit_pressed() -> void:
|
|
||||||
get_tree().quit()
|
|
||||||
|
|
@ -1,279 +0,0 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://dt41bt5fi3t47"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://be8pfcpjesmal" path="res://scenes/create_player/new_character.gd" id="2_g4ktg"]
|
|
||||||
[ext_resource type="Theme" uid="uid://dy41x4ott07ql" path="res://assets/themes/main_theme.tres" id="2_s4h7g"]
|
|
||||||
[ext_resource type="ButtonGroup" uid="uid://b18rjpsr6uaw4" path="res://scenes/create_player/resource/rola_cb.tres" id="3_g4ktg"]
|
|
||||||
[ext_resource type="ButtonGroup" uid="uid://blusey675offa" path="res://scenes/create_player/resource/metody_cb.tres" id="4_hip5e"]
|
|
||||||
|
|
||||||
[node name="NewCharacter" type="Control"]
|
|
||||||
custom_minimum_size = Vector2(640, 480)
|
|
||||||
layout_mode = 3
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme = ExtResource("2_s4h7g")
|
|
||||||
script = ExtResource("2_g4ktg")
|
|
||||||
rola_cb = ExtResource("3_g4ktg")
|
|
||||||
metody_cb = ExtResource("4_hip5e")
|
|
||||||
|
|
||||||
[node name="Background" type="ColorRect" parent="."]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
color = Color(0.050980393, 0.15294118, 0.19607843, 1)
|
|
||||||
|
|
||||||
[node name="Top" type="MarginContainer" parent="."]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 10
|
|
||||||
anchor_right = 1.0
|
|
||||||
offset_bottom = 38.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_constants/margin_left = 5
|
|
||||||
theme_override_constants/margin_top = 5
|
|
||||||
theme_override_constants/margin_right = 5
|
|
||||||
theme_override_constants/margin_bottom = 5
|
|
||||||
|
|
||||||
[node name="TopMenu" type="HBoxContainer" parent="Top"]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="Quit" type="Button" parent="Top/TopMenu"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Quit
|
|
||||||
"
|
|
||||||
|
|
||||||
[node name="Separator" type="VSeparator" parent="Top/TopMenu"]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="Save" type="Button" parent="Top/TopMenu"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "SAVE"
|
|
||||||
|
|
||||||
[node name="Roll" type="Button" parent="Top/TopMenu"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "ROLL"
|
|
||||||
|
|
||||||
[node name="Test" type="Button" parent="Top/TopMenu"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "!! TEST !!"
|
|
||||||
|
|
||||||
[node name="Ksywa" type="Label" parent="."]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 8.0
|
|
||||||
offset_top = 48.0
|
|
||||||
offset_right = 58.0
|
|
||||||
offset_bottom = 69.0
|
|
||||||
text = "Ksywa"
|
|
||||||
|
|
||||||
[node name="KsywaInput" type="LineEdit" parent="."]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 64.0
|
|
||||||
offset_top = 48.0
|
|
||||||
offset_right = 320.0
|
|
||||||
offset_bottom = 77.0
|
|
||||||
|
|
||||||
[node name="Rola" type="GridContainer" parent="."]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 328.0
|
|
||||||
offset_top = 48.0
|
|
||||||
offset_right = 448.0
|
|
||||||
offset_bottom = 134.0
|
|
||||||
columns = 2
|
|
||||||
|
|
||||||
[node name="NetrunnerCB" type="CheckBox" parent="Rola"]
|
|
||||||
layout_mode = 2
|
|
||||||
button_pressed = true
|
|
||||||
button_group = ExtResource("3_g4ktg")
|
|
||||||
|
|
||||||
[node name="Netrunner" type="Label" parent="Rola"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Netrunner"
|
|
||||||
|
|
||||||
[node name="SoloCB" type="CheckBox" parent="Rola"]
|
|
||||||
layout_mode = 2
|
|
||||||
disabled = true
|
|
||||||
button_group = ExtResource("3_g4ktg")
|
|
||||||
|
|
||||||
[node name="Solo" type="Label" parent="Rola"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Solo"
|
|
||||||
|
|
||||||
[node name="KorpoCB" type="CheckBox" parent="Rola"]
|
|
||||||
layout_mode = 2
|
|
||||||
disabled = true
|
|
||||||
button_group = ExtResource("3_g4ktg")
|
|
||||||
|
|
||||||
[node name="Korpo" type="Label" parent="Rola"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Korpo"
|
|
||||||
|
|
||||||
[node name="Metody" type="GridContainer" parent="."]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 464.0
|
|
||||||
offset_top = 48.0
|
|
||||||
offset_right = 654.0
|
|
||||||
offset_bottom = 134.0
|
|
||||||
columns = 2
|
|
||||||
|
|
||||||
[node name="UlicznicyCB" type="CheckBox" parent="Metody"]
|
|
||||||
layout_mode = 2
|
|
||||||
button_pressed = true
|
|
||||||
button_group = ExtResource("4_hip5e")
|
|
||||||
|
|
||||||
[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("4_hip5e")
|
|
||||||
|
|
||||||
[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("4_hip5e")
|
|
||||||
|
|
||||||
[node name="KompletnyPakiet" type="Label" parent="Metody"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Kompletny Pakiet"
|
|
||||||
|
|
||||||
[node name="Stats" type="GridContainer" parent="."]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 696.0
|
|
||||||
offset_top = 48.0
|
|
||||||
offset_right = 788.0
|
|
||||||
offset_bottom = 592.0
|
|
||||||
columns = 2
|
|
||||||
|
|
||||||
[node name="Inteligencja" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "INT"
|
|
||||||
|
|
||||||
[node name="Int" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Refleks" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "REF"
|
|
||||||
|
|
||||||
[node name="Ref" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Zwinnosc" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "ZW"
|
|
||||||
|
|
||||||
[node name="Zw" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Technika" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "TECH"
|
|
||||||
|
|
||||||
[node name="Tech" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Charakter" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "CHA"
|
|
||||||
|
|
||||||
[node name="Cha" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="SilaWoli" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "SW"
|
|
||||||
|
|
||||||
[node name="Sw" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Szcescie" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "SZ"
|
|
||||||
|
|
||||||
[node name="Sz" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Ruch" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "RUCH"
|
|
||||||
|
|
||||||
[node name="Ruch2" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="BudowaCiala" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "BC"
|
|
||||||
|
|
||||||
[node name="Bc" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Empatia" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "EMP"
|
|
||||||
|
|
||||||
[node name="Emp" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="PunktyWytrzymalosci" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "PW"
|
|
||||||
|
|
||||||
[node name="Pw" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Czlowieczenstwo" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "CZŁ"
|
|
||||||
|
|
||||||
[node name="Czl" type="LineEdit" parent="Stats" groups=["stats"]]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Roll" type="Label" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "ROLL"
|
|
||||||
|
|
||||||
[node name="Roll2" type="LineEdit" parent="Stats"]
|
|
||||||
layout_mode = 2
|
|
||||||
editable = false
|
|
||||||
|
|
||||||
[node name="Umiejetnosci2" type="Label" parent="."]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 8.0
|
|
||||||
offset_top = 104.0
|
|
||||||
offset_right = 128.0
|
|
||||||
offset_bottom = 125.0
|
|
||||||
text = "Umiejętności"
|
|
||||||
|
|
||||||
[node name="Umiejetnosci" type="ScrollContainer" parent="."]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 8.0
|
|
||||||
offset_top = 136.0
|
|
||||||
offset_right = 688.0
|
|
||||||
offset_bottom = 592.0
|
|
||||||
|
|
||||||
[node name="GridContainer" type="VBoxContainer" parent="Umiejetnosci"]
|
|
||||||
layout_mode = 2
|
|
||||||
231
scenes/create_player/new_character/new_character.gd
Normal file
231
scenes/create_player/new_character/new_character.gd
Normal file
|
|
@ -0,0 +1,231 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
## Grupa przycisków typu checkbox która umożliwia
|
||||||
|
## wybór tylko jednej opcji
|
||||||
|
@export var rola_cb: ButtonGroup
|
||||||
|
@export var metody_cb: ButtonGroup
|
||||||
|
|
||||||
|
@onready var netrunner_cb = get_node("Rola/NetrunnerCB")
|
||||||
|
@onready var button_roll = $"../../Top/TopMenu/ButtonRoll"
|
||||||
|
|
||||||
|
enum Chum { SOLO, NETRUNNER, KORPO }
|
||||||
|
|
||||||
|
## Słownik zawierający szablony dla klasy netrunner
|
||||||
|
var netrunner: Dictionary = {
|
||||||
|
1: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 8,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 7,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 4,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
2: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 5,
|
||||||
|
"CHA": 8,
|
||||||
|
"SW": 3,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 5,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
3: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 8,
|
||||||
|
"TECH": 6,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 6,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 4,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
4: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 7,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 7,
|
||||||
|
"SW": 5,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 6,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 5,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
5: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 8,
|
||||||
|
"ZW": 8,
|
||||||
|
"TECH": 5,
|
||||||
|
"CHA": 7,
|
||||||
|
"SW": 3,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 5,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 6,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
6: {
|
||||||
|
"INT": 6,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 6,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 8,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 6,
|
||||||
|
"EMP": 6,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
7: {
|
||||||
|
"INT": 6,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 6,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 5,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 6,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
8: {
|
||||||
|
"INT": 5,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 8,
|
||||||
|
"TECH": 6,
|
||||||
|
"CHA": 8,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 8,
|
||||||
|
"RUCH": 5,
|
||||||
|
"BC": 7,
|
||||||
|
"EMP": 4,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
9: {
|
||||||
|
"INT": 7,
|
||||||
|
"REF": 6,
|
||||||
|
"ZW": 7,
|
||||||
|
"TECH": 7,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 3,
|
||||||
|
"SZ": 6,
|
||||||
|
"RUCH": 5,
|
||||||
|
"BC": 6,
|
||||||
|
"EMP": 5,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
10: {
|
||||||
|
"INT": 7,
|
||||||
|
"REF": 8,
|
||||||
|
"ZW": 6,
|
||||||
|
"TECH": 6,
|
||||||
|
"CHA": 6,
|
||||||
|
"SW": 4,
|
||||||
|
"SZ": 7,
|
||||||
|
"RUCH": 7,
|
||||||
|
"BC": 5,
|
||||||
|
"EMP": 6,
|
||||||
|
"PW": 0,
|
||||||
|
"CZL": 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## !! FUNKCJA TESTOWA !!
|
||||||
|
func test() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var stats = get_tree().get_nodes_in_group("stats")
|
||||||
|
|
||||||
|
button_roll.disabled = true
|
||||||
|
|
||||||
|
for stat in stats:
|
||||||
|
stat.text = "0"
|
||||||
|
|
||||||
|
|
||||||
|
func _draw() -> void:
|
||||||
|
var stats_scene = get_node("Stats")
|
||||||
|
|
||||||
|
if stats_scene.is_visible_in_tree():
|
||||||
|
button_roll.disabled = !button_roll.disabled
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_roll_pressed() -> void:
|
||||||
|
var roll = Global.rolld(10)
|
||||||
|
var button_pressed = rola_cb.get_pressed_button()
|
||||||
|
var chum
|
||||||
|
|
||||||
|
match button_pressed.name:
|
||||||
|
"SoloCB":
|
||||||
|
chum = Chum.SOLO
|
||||||
|
"NetrunnerCB":
|
||||||
|
chum = Chum.NETRUNNER
|
||||||
|
"KorpoCB":
|
||||||
|
chum = Chum.KORPO
|
||||||
|
|
||||||
|
|
||||||
|
print("Rzut wynosi: %d a klasa to %s" % [roll, chum])
|
||||||
|
character_template(roll, chum)
|
||||||
|
|
||||||
|
|
||||||
|
func character_template(roll: int, chum: int) -> void:
|
||||||
|
var stats_group = get_tree().get_nodes_in_group("stats")
|
||||||
|
var _netrunner = netrunner.duplicate()
|
||||||
|
var template
|
||||||
|
|
||||||
|
match chum:
|
||||||
|
1:
|
||||||
|
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.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
|
||||||
115
scenes/create_player/new_character/new_character.tscn
Normal file
115
scenes/create_player/new_character/new_character.tscn
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
[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://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
|
||||||
|
anchors_preset = 15
|
||||||
|
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")
|
||||||
|
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 = 12.0
|
||||||
|
offset_right = 75.0
|
||||||
|
offset_bottom = 44.0
|
||||||
|
text = "Ksywa"
|
||||||
|
|
||||||
|
[node name="KsywaInput" type="LineEdit" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 78.0
|
||||||
|
offset_top = 12.0
|
||||||
|
offset_right = 448.0
|
||||||
|
offset_bottom = 48.0
|
||||||
|
|
||||||
|
[node name="Rola" type="GridContainer" parent="."]
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 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"]
|
||||||
|
layout_mode = 2
|
||||||
|
button_pressed = true
|
||||||
|
button_group = ExtResource("3_xx3y5")
|
||||||
|
|
||||||
|
[node name="Netrunner" type="Label" parent="Rola"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Netrunner"
|
||||||
|
|
||||||
|
[node name="SoloCB" type="CheckBox" parent="Rola"]
|
||||||
|
layout_mode = 2
|
||||||
|
disabled = true
|
||||||
|
button_group = ExtResource("3_xx3y5")
|
||||||
|
|
||||||
|
[node name="Solo" type="Label" parent="Rola"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Solo"
|
||||||
|
|
||||||
|
[node name="KorpoCB" type="CheckBox" parent="Rola"]
|
||||||
|
layout_mode = 2
|
||||||
|
disabled = true
|
||||||
|
button_group = ExtResource("3_xx3y5")
|
||||||
|
|
||||||
|
[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 = 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"
|
||||||
11
scenes/create_player/new_character/notification.tscn
Normal file
11
scenes/create_player/new_character/notification.tscn
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
[gd_scene format=3 uid="uid://bhvrnh1s3pktt"]
|
||||||
|
|
||||||
|
[node name="Notification" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
104
scenes/create_player/new_character/stats.tscn
Normal file
104
scenes/create_player/new_character/stats.tscn
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
[gd_scene format=3 uid="uid://p5nhkod3yaf0"]
|
||||||
|
|
||||||
|
[node name="Stats" type="GridContainer"]
|
||||||
|
offset_left = 240.0
|
||||||
|
offset_right = 464.0
|
||||||
|
offset_bottom = 396.0
|
||||||
|
theme_override_constants/h_separation = 20
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="Inteligencja" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "INT"
|
||||||
|
|
||||||
|
[node name="Int" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Refleks" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "REF"
|
||||||
|
|
||||||
|
[node name="Ref" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Zwinnosc" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "ZW"
|
||||||
|
|
||||||
|
[node name="Zw" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Technika" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "TECH"
|
||||||
|
|
||||||
|
[node name="Tech" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Charakter" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "CHA"
|
||||||
|
|
||||||
|
[node name="Cha" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="SilaWoli" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SW"
|
||||||
|
|
||||||
|
[node name="Sw" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Szcescie" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SZ"
|
||||||
|
|
||||||
|
[node name="Sz" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Ruch" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "RUCH"
|
||||||
|
|
||||||
|
[node name="Ruch2" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="BudowaCiala" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "BC"
|
||||||
|
|
||||||
|
[node name="Bc" type="LineEdit" parent="." groups=["stats"]]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Empatia" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
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
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
class_name PlayerStats
|
|
||||||
extends Resource
|
|
||||||
|
|
||||||
@export var inteligencja: int
|
|
||||||
@export var refleks: int
|
|
||||||
@export var zwinnosc: int
|
|
||||||
@export var tech: int
|
|
||||||
@export var charakter: int
|
|
||||||
@export var sila_woli: int
|
|
||||||
@export var szczescie: int
|
|
||||||
@export var ruch: int
|
|
||||||
@export var budowa_ciala: int
|
|
||||||
@export var empatia: int
|
|
||||||
|
|
||||||
func _init() -> void:
|
|
||||||
inteligencja = 0
|
|
||||||
refleks = 0
|
|
||||||
zwinnosc = 0
|
|
||||||
tech = 0
|
|
||||||
charakter = 0
|
|
||||||
sila_woli = 0
|
|
||||||
szczescie = 0
|
|
||||||
ruch = 0
|
|
||||||
budowa_ciala = 0
|
|
||||||
empatia = 0
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bb1yvhsxoh1km
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
[gd_resource type="Resource" script_class="PlayerStats" load_steps=2 format=3 uid="uid://gcw04goxke0m"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bb1yvhsxoh1km" path="res://scenes/create_player/resource/player_stats.gd" id="1_gll0b"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_gll0b")
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
var roll: int = 0
|
||||||
|
|
||||||
func rolld(d: int) -> int:
|
func rolld(d: int) -> int:
|
||||||
return randi_range(1, d)
|
return randi_range(1, d)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue