Skip to content

Commit

Permalink
Merge pull request #19 from Inglonias/changelog
Browse files Browse the repository at this point in the history
Add a changelog to Catapult
  • Loading branch information
qrrk authored Dec 17, 2021
2 parents c667440 + 6e7974d commit 588d28f
Show file tree
Hide file tree
Showing 7 changed files with 330 additions and 24 deletions.
61 changes: 44 additions & 17 deletions scenes/Catapult.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=33 format=2]
[gd_scene load_steps=34 format=2]

[ext_resource path="res://icons/info.svg" type="Texture" id=1]
[ext_resource path="res://icons/download.svg" type="Texture" id=2]
Expand Down Expand Up @@ -31,6 +31,7 @@
[ext_resource path="res://scenes/FontSizeHelpDialog.tscn" type="PackedScene" id=29]
[ext_resource path="res://icons/help.svg" type="Texture" id=30]
[ext_resource path="res://scripts/PathHelper.gd" type="Script" id=31]
[ext_resource path="res://scenes/ChangelogDialog.tscn" type="PackedScene" id=32]

[sub_resource type="ButtonGroup" id=1]

Expand Down Expand Up @@ -127,12 +128,11 @@ margin_bottom = 91.0
]]
margin_top = 97.0
margin_right = 784.0
margin_bottom = 594.0
margin_bottom = 418.0
tab_align = 0
script = ExtResource( 16 )

[node name="Game" type="VBoxContainer" parent="Main/Tabs"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 7.5
Expand Down Expand Up @@ -282,6 +282,8 @@ margin_top = 275.0
margin_right = 769.0
margin_bottom = 275.0

[node name="ChangelogDialog" parent="Main/Tabs/Game" instance=ExtResource( 32 )]

[node name="Mods" type="VBoxContainer" parent="Main/Tabs"]
visible = false
anchor_right = 1.0
Expand Down Expand Up @@ -587,8 +589,8 @@ window_title = "Open a File"
mode = 0
access = 2
filters = PoolStringArray( "*.zip" )
current_dir = "/mnt/data/Godot/Catapult/Project"
current_path = "/mnt/data/Godot/Catapult/Project/"
current_dir = "/mnt/data/Godot/Catapult/Changelog"
current_path = "/mnt/data/Godot/Catapult/Changelog/"

[node name="Fonts" type="VBoxContainer" parent="Main/Tabs"]
visible = false
Expand Down Expand Up @@ -871,6 +873,7 @@ margin_right = 769.0
margin_bottom = 539.0

[node name="Settings" type="VBoxContainer" parent="Main/Tabs"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 7.5
Expand Down Expand Up @@ -961,10 +964,33 @@ min_value = 1.0
value = 30.0
rounded = true

[node name="ScaleOverride" type="HBoxContainer" parent="Main/Tabs/Settings"]
[node name="NumPrs" type="HBoxContainer" parent="Main/Tabs/Settings"]
margin_top = 280.0
margin_right = 769.0
margin_bottom = 309.0
hint_tooltip = "How many recent pull requests (code additions)
will be requested from GitHub to form the changelog.
High numbers may lead to slow responses and failures."

[node name="Label" type="Label" parent="Main/Tabs/Settings/NumPrs"]
margin_right = 390.0
margin_bottom = 29.0
text = "Number of results to download for the changelog:"

[node name="sbNumPRs" type="SpinBox" parent="Main/Tabs/Settings/NumPrs"]
margin_left = 639.0
margin_right = 769.0
margin_bottom = 29.0
size_flags_horizontal = 10
min_value = 10.0
step = 10.0
value = 100.0
rounded = true

[node name="ScaleOverride" type="HBoxContainer" parent="Main/Tabs/Settings"]
margin_top = 315.0
margin_right = 769.0
margin_bottom = 344.0
hint_tooltip = "Use this if the automatically inferred UI scale
looks too large or too small on your system.
(Automatic scale relies on system-reported
Expand Down Expand Up @@ -1001,14 +1027,14 @@ editable = false
suffix = "%"

[node name="HSeparator" type="HSeparator" parent="Main/Tabs/Settings"]
margin_top = 315.0
margin_top = 350.0
margin_right = 769.0
margin_bottom = 323.0
margin_bottom = 358.0

[node name="Migration" type="VBoxContainer" parent="Main/Tabs/Settings"]
margin_top = 329.0
margin_top = 364.0
margin_right = 769.0
margin_bottom = 451.0
margin_bottom = 486.0
hint_tooltip = "Choose which types of game data to carry over
into the new game version when updating."

Expand Down Expand Up @@ -1110,21 +1136,21 @@ autowrap = true
[node name="Button" type="Button" parent="Main/Tabs/Debug"]
margin_left = 273.0
margin_top = 56.0
margin_right = 496.0
margin_right = 495.0
margin_bottom = 85.0
size_flags_horizontal = 6
text = "Test mod directory parsing"

[node name="Button2" type="Button" parent="Main/Tabs/Debug"]
margin_left = 266.0
margin_left = 267.0
margin_top = 91.0
margin_right = 502.0
margin_bottom = 120.0
size_flags_horizontal = 6
text = "Test sound directory parsing"

[node name="Button3" type="Button" parent="Main/Tabs/Debug"]
margin_left = 201.0
margin_left = 202.0
margin_top = 126.0
margin_right = 567.0
margin_bottom = 155.0
Expand All @@ -1134,13 +1160,13 @@ text = "Test passing of arguments to shell commands"
[node name="Button4" type="Button" parent="Main/Tabs/Debug"]
margin_left = 228.0
margin_top = 161.0
margin_right = 541.0
margin_right = 540.0
margin_bottom = 190.0
size_flags_horizontal = 6
text = "Test different types of status messages"

[node name="Button5" type="Button" parent="Main/Tabs/Debug"]
margin_left = 261.0
margin_left = 262.0
margin_top = 196.0
margin_right = 507.0
margin_bottom = 225.0
Expand All @@ -1158,13 +1184,13 @@ text = "Print a random Tip of the Day"
[node name="Button7" type="Button" parent="Main/Tabs/Debug"]
margin_left = 245.0
margin_top = 266.0
margin_right = 524.0
margin_right = 523.0
margin_bottom = 295.0
size_flags_horizontal = 4
text = "Test path resolution in PathHelper"

[node name="Log" type="RichTextLabel" parent="Main"]
margin_top = 600.0
margin_top = 424.0
margin_right = 784.0
margin_bottom = 984.0
focus_mode = 2
Expand Down Expand Up @@ -1288,6 +1314,7 @@ __meta__ = {
[connection signal="toggled" from="Main/Tabs/Settings/InstallArchivedMods" to="Main/Tabs/Settings" method="_on_InstallArchivedMods_toggled"]
[connection signal="toggled" from="Main/Tabs/Settings/ShowDebug" to="Main/Tabs/Settings" method="_on_ShowDebug_toggled"]
[connection signal="value_changed" from="Main/Tabs/Settings/NumReleases/sbNumReleases" to="Main/Tabs/Settings" method="_on_sbNumReleases_value_changed"]
[connection signal="value_changed" from="Main/Tabs/Settings/NumPrs/sbNumPRs" to="Main/Tabs/Settings" method="_on_sbNumPRs_value_changed"]
[connection signal="toggled" from="Main/Tabs/Settings/ScaleOverride/cbScaleOverrideEnable" to="Main/Tabs/Settings" method="_on_cbScaleOverrideEnable_toggled"]
[connection signal="value_changed" from="Main/Tabs/Settings/ScaleOverride/sbScaleOverride" to="Main/Tabs/Settings" method="_on_sbScaleOverride_value_changed"]
[connection signal="toggled" from="Main/Tabs/Settings/Migration/Grid/Savegames" to="Main/Tabs/Settings" method="_on_any_migration_checkbox_toggled"]
Expand Down
81 changes: 81 additions & 0 deletions scenes/ChangelogDialog.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
[gd_scene load_steps=6 format=2]

[ext_resource path="res://scripts/ChangelogDialod.gd" type="Script" id=1]
[ext_resource path="res://fonts/OpenSans-SemiboldItalic.tres" type="DynamicFont" id=2]
[ext_resource path="res://fonts/OpenSans-Regular.tres" type="DynamicFont" id=3]
[ext_resource path="res://fonts/OpenSans-Italic.tres" type="DynamicFont" id=4]
[ext_resource path="res://fonts/OpenSans-Semibold.tres" type="DynamicFont" id=5]

[node name="ChangelogDialog" type="WindowDialog"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -240.0
margin_top = -160.0
margin_right = 240.0
margin_bottom = 160.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Panel" type="PanelContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Margin" type="MarginContainer" parent="Panel"]
margin_left = 9.0
margin_top = 6.0
margin_right = 471.0
margin_bottom = 314.0
custom_constants/margin_top = 8
custom_constants/margin_bottom = 8
__meta__ = {
"_edit_use_anchors_": false
}

[node name="VBox" type="VBoxContainer" parent="Panel/Margin"]
margin_top = 8.0
margin_right = 462.0
margin_bottom = 300.0
custom_constants/separation = 8
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ChangelogText" type="RichTextLabel" parent="Panel/Margin/VBox"]
margin_right = 462.0
margin_bottom = 255.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_fonts/bold_italics_font = ExtResource( 2 )
custom_fonts/italics_font = ExtResource( 4 )
custom_fonts/bold_font = ExtResource( 5 )
custom_fonts/normal_font = ExtResource( 3 )
bbcode_enabled = true
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
__meta__ = {
"_edit_use_anchors_": false
}

[node name="BtnCloseChangelog" type="Button" parent="Panel/Margin/VBox"]
margin_left = 201.0
margin_top = 263.0
margin_right = 260.0
margin_bottom = 292.0
size_flags_horizontal = 4
text = "Close"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="PullRequests" type="HTTPRequest" parent="."]
timeout = 20

[connection signal="meta_clicked" from="Panel/Margin/VBox/ChangelogText" to="." method="_on_ChangelogText_meta_clicked"]
[connection signal="pressed" from="Panel/Margin/VBox/BtnCloseChangelog" to="." method="_on_BtnCloseChangelog_pressed"]
[connection signal="request_completed" from="PullRequests" to="." method="_on_PullRequests_request_completed"]
6 changes: 3 additions & 3 deletions scenes/FontSizeHelpDialog.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ custom_constants/separation = 16

[node name="Help" type="RichTextLabel" parent="Panel/Margin/VBox"]
margin_right = 772.0
margin_bottom = 919.0
margin_bottom = 903.0
size_flags_vertical = 3
custom_fonts/bold_italics_font = ExtResource( 2 )
custom_fonts/italics_font = ExtResource( 3 )
Expand Down Expand Up @@ -87,9 +87,9 @@ It is also recommended to turn on Font Blending for smoother font rendering.

[node name="BtnOK" type="Button" parent="Panel/Margin/VBox"]
margin_left = 345.0
margin_top = 935.0
margin_top = 919.0
margin_right = 427.0
margin_bottom = 972.0
margin_bottom = 956.0
size_flags_horizontal = 4
text = "Close"

Expand Down
12 changes: 8 additions & 4 deletions scripts/Catapult.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ extends Node

const _GAME_DESC = {
"dda":
"[b]Cataclysm: Dark Days Ahead[/b] is a turn-based survival game set in a post-apocalyptic world. Scavenge, explore, craft, build, farm, repair and modify vehicles, install bionics, mutate, defend against [color=#009900]zombies[/color] and countless other monstrosities — all in a limitless, procedurally generated world!",
"[b]Cataclysm: Dark Days Ahead[/b] is a turn-based survival game set in a post-apocalyptic world. Scavenge, explore, craft, build, farm, repair and modify vehicles, install bionics, mutate, defend against [color=#009900]zombies[/color] and countless other monstrosities — all in a limitless, procedurally generated world! [color=#3b93f7][url=CHANGELOG]View Changelog[/url][/color]",
"bn":
"[b]Cataclysm: Bright Nights[/b]. Reject pedantry, embrace [color=#ff3300]!!fun!![/color]. This fork takes the game back to its sci-fi roguelike roots and reverts many controversial changes by the DDA team (pockets, proficiencies, freezing, and [color=#3b93f7][url=https://github.com/cataclysmbnteam/Cataclysm-BN/wiki/Changes-so-far]more[/url][/color]). Special attention is paid to combat, game balance and pacing.",
"[b]Cataclysm: Bright Nights[/b]. Reject pedantry, embrace [color=#ff3300]!!fun!![/color]. This fork takes the game back to its sci-fi roguelike roots and reverts many controversial changes by the DDA team (pockets, proficiencies, freezing, and [color=#3b93f7][url=https://github.com/cataclysmbnteam/Cataclysm-BN/wiki/Changes-so-far]more[/url][/color]). Special attention is paid to combat, game balance and pacing. [color=#3b93f7][url=CHANGELOG]View Changelog[/url][/color]",
}

onready var _settings = $"/root/SettingsManager"
Expand All @@ -25,6 +25,7 @@ onready var _fshelper = $FSHelper
onready var _installer = $ReleaseInstaller
onready var _btn_install = $Main/Tabs/Game/BtnInstall
onready var _btn_refresh = $Main/Tabs/Game/Builds/BtnRefresh
onready var _changelog = $Main/Tabs/Game/ChangelogDialog
onready var _btn_game_dir = $Main/Tabs/Game/CurrentInstall/Build/GameDir
onready var _btn_play = $Main/Tabs/Game/CurrentInstall/BtnPlay
onready var _lst_builds = $Main/Tabs/Game/Builds/BuildsList
Expand All @@ -33,7 +34,6 @@ onready var _rbtn_stable = $Main/Tabs/Game/Channel/Group/RBtnStable
onready var _rbtn_exper = $Main/Tabs/Game/Channel/Group/RBtnExperimental
onready var _lbl_build = $Main/Tabs/Game/CurrentInstall/Build/Name


var _disable_savestate = {}
var _ui_staring_sizes = {} # For UI scaling on the fly

Expand Down Expand Up @@ -271,7 +271,10 @@ func _on_soundpack_operation_finished() -> void:

func _on_Description_meta_clicked(meta) -> void:

OS.shell_open(meta)
if meta == "CHANGELOG":
_changelog.open()
else:
OS.shell_open(meta)


func _on_BtnRefresh_pressed() -> void:
Expand Down Expand Up @@ -368,6 +371,7 @@ func apply_game_choice() -> void:
_btn_refresh.disabled = true
else:
_btn_refresh.disabled = false

"bn":
_lst_games.select(1)
_rbtn_exper.pressed = true
Expand Down
Loading

0 comments on commit 588d28f

Please sign in to comment.