Skip to content

Commit

Permalink
Castagne v0.54.21 (#59)
Browse files Browse the repository at this point in the history
* Gameplay: Adding the ability to attack cancel movement options (#55)

Air Dash Into Attack Cancels
Run Into Attack Cancels
HighJump Into Attack Cancels

* Castagne v0.54.21

---------

Co-authored-by: Jamie Meyer <[email protected]>
  • Loading branch information
panthavma and HeatXD authored Oct 5, 2024
1 parent 4a60049 commit 99b827f
Show file tree
Hide file tree
Showing 59 changed files with 2,568 additions and 217 deletions.
2 changes: 1 addition & 1 deletion Castagne.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[ext_resource path="res://castagne/engine/CastagneParser.gd" type="Script" id=2]
[ext_resource path="res://castagne/engine/CastagneNet.gd" type="Script" id=3]
[ext_resource path="res://castagne/engine/CastagneLoader.gd" type="Script" id=4]
[ext_resource path="res://castagne/menus/CastagneMenus.gd" type="Script" id=5]
[ext_resource path="res://castagne/engine/CastagneMenus.gd" type="Script" id=5]

[node name="Castagne" type="Node"]
script = ExtResource( 1 )
Expand Down
19 changes: 16 additions & 3 deletions editor/CastagneEditor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ func _ready():

if(tutorialPath != null):
$TutorialSystem.StartTutorial(tutorialPath)

# Temp: Change background color (useful if you have lots of projects)
var backgroundMaterial = $Background/ColorRect.get_material()
var backgroundColorAConfig = configData.Get("Editor-TmpBackgroundColor1")
var backgroundColorBConfig = configData.Get("Editor-TmpBackgroundColor2")
backgroundMaterial.set_shader_param("colorA", Color(backgroundColorAConfig[0]/255.0,backgroundColorAConfig[1]/255.0,backgroundColorAConfig[2]/255.0,1.0))
backgroundMaterial.set_shader_param("colorB", Color(backgroundColorBConfig[0]/255.0,backgroundColorBConfig[1]/255.0,backgroundColorBConfig[2]/255.0,1.0))

func EnterMenu():
for c in get_children():
Expand Down Expand Up @@ -191,6 +198,7 @@ func StartCharacterEditor(safeMode = false, battleInitData = null):
$CharacterEdit.safeMode = safeMode
if(battleInitData == null):
battleInitData = GetCurrentlySelectedBattleInitData()
battleInitData["mode"] = Castagne.GAMEMODES.MODE_EDITOR

$CharacterEdit.EnterMenu(battleInitData)

Expand All @@ -201,9 +209,10 @@ func GetCurrentlySelectedBattleInitData():
else:
return configData.GetModuleSlot(Castagne.MODULE_SLOTS_BASE.FLOW).EditorGetCurrentBattleInitData(self, $MainMenu/FlowPanel/Custom/VBox)

func StartBattle(battleInitData = null):
func StartBattle(mode, battleInitData = null):
if(battleInitData == null):
battleInitData = GetCurrentlySelectedBattleInitData()
battleInitData["mode"] = mode
queue_free()
var ce = Castagne.InstanceCastagneEngine(battleInitData, configData)
get_tree().get_root().add_child(ce)
Expand Down Expand Up @@ -234,10 +243,12 @@ func _on_StartGame_pressed():
get_tree().get_root().add_child(menu)
queue_free()
#call_deferred("LoadLevel", configData.Get("PathMainMenu"))
func _on_StartGameMainMenu_pressed():
_on_StartGame_pressed()
func _on_StartGameMatch_pressed():
pass # Replace with function body.
StartBattle(Castagne.GAMEMODES.MODE_BATTLE)
func _on_StartGameTraining_pressed():
StartBattle()
StartBattle(Castagne.GAMEMODES.MODE_TRAINING)
func LoadLevel(path):
var ps = load(path)
var s = ps.instance()
Expand Down Expand Up @@ -270,3 +281,5 @@ func _on_FlowNewBID_pressed():





74 changes: 47 additions & 27 deletions editor/CastagneEditor.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -128,44 +128,44 @@ margin_bottom = -8.0
alignment = 1

[node name="Label" type="Label" parent="MainMenu/Menu"]
margin_top = 103.0
margin_top = 85.0
margin_right = 508.0
margin_bottom = 117.0
margin_bottom = 99.0
text = "---- Castagne ----"
align = 1

[node name="Tutorials" type="Button" parent="MainMenu/Menu"]
margin_top = 121.0
margin_top = 103.0
margin_right = 508.0
margin_bottom = 139.0
margin_bottom = 121.0
text = "Castagne Tutorials"

[node name="Documentation" type="Button" parent="MainMenu/Menu"]
margin_top = 143.0
margin_top = 125.0
margin_right = 508.0
margin_bottom = 161.0
margin_bottom = 143.0
size_flags_stretch_ratio = 0.5
text = "Documentation"

[node name="Updater" type="Button" parent="MainMenu/Menu"]
margin_top = 165.0
margin_top = 147.0
margin_right = 508.0
margin_bottom = 183.0
margin_bottom = 165.0
size_flags_horizontal = 3
text = "Updater"

[node name="Label2" type="Label" parent="MainMenu/Menu"]
margin_top = 187.0
margin_top = 169.0
margin_right = 508.0
margin_bottom = 218.0
margin_bottom = 200.0
text = "
---- Settings ----"
align = 1

[node name="Config" type="HBoxContainer" parent="MainMenu/Menu"]
margin_top = 222.0
margin_top = 204.0
margin_right = 508.0
margin_bottom = 240.0
margin_bottom = 222.0
size_flags_horizontal = 3
alignment = 1

Expand All @@ -185,25 +185,25 @@ __meta__ = {
}

[node name="Label3" type="Label" parent="MainMenu/Menu"]
margin_top = 244.0
margin_top = 226.0
margin_right = 508.0
margin_bottom = 275.0
margin_bottom = 257.0
text = "
---- Game ----"
---- Create ----"
align = 1

[node name="CharacterEdit" type="Button" parent="MainMenu/Menu"]
margin_top = 279.0
margin_top = 261.0
margin_right = 508.0
margin_bottom = 311.0
margin_bottom = 293.0
rect_min_size = Vector2( 0, 32 )
size_flags_horizontal = 3
text = "Character Editor"

[node name="CharEditOptions" type="HBoxContainer" parent="MainMenu/Menu"]
margin_top = 315.0
margin_top = 297.0
margin_right = 508.0
margin_bottom = 333.0
margin_bottom = 315.0

[node name="CharacterEditNew" type="Button" parent="MainMenu/Menu/CharEditOptions"]
margin_right = 252.0
Expand All @@ -218,10 +218,18 @@ margin_bottom = 18.0
size_flags_horizontal = 3
text = "Character Editor (Safemode)"

[node name="Label4" type="Label" parent="MainMenu/Menu"]
margin_top = 319.0
margin_right = 508.0
margin_bottom = 350.0
text = "
---- Game ----"
align = 1

[node name="StartGameModes" type="HBoxContainer" parent="MainMenu/Menu"]
margin_top = 337.0
margin_top = 354.0
margin_right = 508.0
margin_bottom = 355.0
margin_bottom = 372.0

[node name="StartGameTraining" type="Button" parent="MainMenu/Menu/StartGameModes"]
margin_right = 252.0
Expand All @@ -237,13 +245,24 @@ size_flags_horizontal = 3
disabled = true
text = "Start Normal Match"

[node name="StartGame" type="Button" parent="MainMenu/Menu"]
margin_top = 359.0
[node name="StartGameModes2" type="HBoxContainer" parent="MainMenu/Menu"]
margin_top = 376.0
margin_right = 508.0
margin_bottom = 377.0
margin_bottom = 394.0

[node name="StartGame" type="Button" parent="MainMenu/Menu/StartGameModes2"]
margin_right = 508.0
margin_bottom = 18.0
size_flags_horizontal = 3
disabled = true
text = "Start Game Normally (Locked until v0.55)"
text = "Start Game"

[node name="StartGameMainMenu" type="Button" parent="MainMenu/Menu/StartGameModes2"]
visible = false
margin_left = 256.0
margin_right = 508.0
margin_bottom = 18.0
size_flags_horizontal = 3
text = "Main Menu"

[node name="FlowPanel" type="VBoxContainer" parent="MainMenu"]
anchor_left = 0.5
Expand Down Expand Up @@ -1310,7 +1329,8 @@ __meta__ = {
[connection signal="pressed" from="MainMenu/Menu/CharEditOptions/CharacterEditSafe" to="." method="_on_CharacterEditSafe_pressed"]
[connection signal="pressed" from="MainMenu/Menu/StartGameModes/StartGameTraining" to="." method="_on_StartGameTraining_pressed"]
[connection signal="pressed" from="MainMenu/Menu/StartGameModes/StartGameMatch" to="." method="_on_StartGameMatch_pressed"]
[connection signal="pressed" from="MainMenu/Menu/StartGame" to="." method="_on_StartGame_pressed"]
[connection signal="pressed" from="MainMenu/Menu/StartGameModes2/StartGame" to="." method="_on_StartGame_pressed"]
[connection signal="pressed" from="MainMenu/Menu/StartGameModes2/StartGameMainMenu" to="." method="_on_StartGameMainMenu_pressed"]
[connection signal="pressed" from="MainMenu/FlowPanel/Generic/VBox/Setup/FlowNewBID" to="." method="_on_FlowNewBID_pressed"]
[connection signal="toggled" from="MainMenu/FlowPanel/FlowAdvanced" to="." method="_on_FlowAdvanced_toggled"]
[connection signal="pressed" from="Config/BackButton" to="Config" method="_on_BackButton_pressed"]
Expand Down
Loading

0 comments on commit 99b827f

Please sign in to comment.