mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 08:45:33 +00:00
Floor system
This commit is contained in:
parent
8c17738371
commit
c1afa466d3
14 changed files with 199 additions and 86 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FDecompilerCache_003Fdecompiler_003F4cff0a608e114644b749bd11413a95c6583e00_003F73_003F8aac4f93_003FArray_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FDecompilerCache_003Fdecompiler_003F4fd22cd129a84c16b5d8004b467c426f518800_003F67_003F90d26b57_003FArray_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FDecompilerCache_003Fdecompiler_003F69e3acf0074a4ef8afaea275d4055b96522800_003Fa3_003Fb99d585e_003FArray_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FMaddo_003FAppData_003FLocal_003FJetBrains_003FShared_003FvAny_003FDecompilerCache_003Fdecompiler_003Fb9315b94b9124600ad99083b1bc65e44584a00_003Ff6_003F4c30a43e_003FArray_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ _name = "Intro"
|
|||
[sub_resource type="Resource" id="Resource_cfhv5"]
|
||||
script = ExtResource("1_ov731")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0k62o"]
|
||||
script = ExtResource("2_tnajf")
|
||||
|
|
@ -34,8 +34,8 @@ StartData = SubResource("Resource_cfhv5")
|
|||
[sub_resource type="Resource" id="Resource_tpb7s"]
|
||||
script = ExtResource("1_ov731")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
|
||||
[sub_resource type="Resource" id="Resource_edoov"]
|
||||
script = ExtResource("2_tnajf")
|
||||
|
|
@ -47,8 +47,8 @@ StartData = SubResource("Resource_tpb7s")
|
|||
[sub_resource type="Resource" id="Resource_1sw5g"]
|
||||
script = ExtResource("1_ov731")
|
||||
EggIndex = 255
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
|
||||
[sub_resource type="Resource" id="Resource_47bot"]
|
||||
script = ExtResource("2_tnajf")
|
||||
|
|
@ -61,7 +61,7 @@ StartData = SubResource("Resource_1sw5g")
|
|||
script = ExtResource("1_ov731")
|
||||
EggIndex = 2
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([ExtResource("3_fydgr"), ExtResource("4_38yta"), ExtResource("5_em757"), ExtResource("6_sdmg8")])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = []
|
||||
|
||||
[sub_resource type="Resource" id="Resource_mgdm6"]
|
||||
script = ExtResource("2_tnajf")
|
||||
|
|
@ -79,8 +79,8 @@ _name = "Rebel Base"
|
|||
[sub_resource type="Resource" id="Resource_maxpt"]
|
||||
script = ExtResource("1_ov731")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pein5"]
|
||||
script = ExtResource("2_tnajf")
|
||||
|
|
@ -91,25 +91,25 @@ StartData = SubResource("Resource_maxpt")
|
|||
|
||||
[sub_resource type="Resource" id="Resource_6wrc7"]
|
||||
script = ExtResource("2_tnajf")
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
Path = "res://Scenes/naviogation_test.tscn"
|
||||
_name = "Navigation Test"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x3w7w"]
|
||||
script = ExtResource("2_tnajf")
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
Path = "res://Scenes/Actors/ActorEnemyTest.tscn"
|
||||
_name = "Enemy Actor Test"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ajht5"]
|
||||
script = ExtResource("2_tnajf")
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
Path = "res://Scenes/Maps/BossTestArena.tscn"
|
||||
_name = "Boss Test Arena"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7vmdn"]
|
||||
script = ExtResource("2_tnajf")
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
Path = "res://Scenes/Maps/SimpleScene.tscn"
|
||||
_name = "Default Scene"
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ _name = "Default Scene"
|
|||
script = ExtResource("1_ov731")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([ExtResource("7_b3oo5")])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = []
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6ijnv"]
|
||||
script = ExtResource("2_tnajf")
|
||||
|
|
@ -136,8 +136,8 @@ metadata/_custom_type_script = "uid://dnthdjrx78u6m"
|
|||
[sub_resource type="Resource" id="Resource_7sue8"]
|
||||
script = ExtResource("1_ov731")
|
||||
EggIndex = 255
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
metadata/_custom_type_script = "uid://mja0rk7n2kln"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ognca"]
|
||||
|
|
@ -151,8 +151,8 @@ metadata/_custom_type_script = "uid://dnthdjrx78u6m"
|
|||
[sub_resource type="Resource" id="Resource_olpjo"]
|
||||
script = ExtResource("1_ov731")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
RemoveEquipment = Array[ExtResource("2_bkci5")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
metadata/_custom_type_script = "uid://mja0rk7n2kln"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nbnej"]
|
||||
|
|
@ -186,14 +186,14 @@ metadata/_custom_type_script = "uid://dnthdjrx78u6m"
|
|||
|
||||
[sub_resource type="Resource" id="Resource_xhgge"]
|
||||
script = ExtResource("2_tnajf")
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
Path = "uid://bitld8jkjkflo"
|
||||
_name = "Spell Card Test"
|
||||
metadata/_custom_type_script = "uid://dnthdjrx78u6m"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gkp3t"]
|
||||
script = ExtResource("2_tnajf")
|
||||
Enabled = true
|
||||
Enabled = false
|
||||
Map = ExtResource("9_ognca")
|
||||
Path = ""
|
||||
_name = "Roguelite"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
[gd_resource type="Resource" script_class="MapResource" load_steps=5 format=3 uid="uid://dsvcyd0f5br85"]
|
||||
[gd_resource type="Resource" script_class="MapResource" load_steps=4 format=3 uid="uid://dsvcyd0f5br85"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="1_7e3mb"]
|
||||
[ext_resource type="Script" uid="uid://quy4d4tgvqfy" path="res://Scripts/Resources/MapResource.cs" id="1_x864d"]
|
||||
[ext_resource type="Script" uid="uid://mja0rk7n2kln" path="res://Scripts/Resources/MapStartDataResource.cs" id="2_bbif0"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7e7pr"]
|
||||
script = ExtResource("2_bbif0")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("1_7e3mb")]([])
|
||||
RemoveEquipment = Array[ExtResource("1_7e3mb")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
metadata/_custom_type_script = "uid://mja0rk7n2kln"
|
||||
|
||||
[resource]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[resource]
|
||||
script = ExtResource("1_nap7o")
|
||||
LevelId = -2
|
||||
LevelId = 0
|
||||
MapName = &"Roguelite"
|
||||
MapDescription = null
|
||||
ScenePath = &"uid://bf1kqr3o6r6d4"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
[gd_resource type="Resource" script_class="MapResource" load_steps=5 format=3 uid="uid://b4u3cs6ietmow"]
|
||||
[gd_resource type="Resource" script_class="MapResource" load_steps=4 format=3 uid="uid://b4u3cs6ietmow"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://mja0rk7n2kln" path="res://Scripts/Resources/MapStartDataResource.cs" id="1_3bwtp"]
|
||||
[ext_resource type="Script" uid="uid://quy4d4tgvqfy" path="res://Scripts/Resources/MapResource.cs" id="1_5stb7"]
|
||||
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="1_dpitu"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_dpitu"]
|
||||
script = ExtResource("1_3bwtp")
|
||||
EggIndex = 0
|
||||
StartingEquipment = Array[ExtResource("1_dpitu")]([])
|
||||
RemoveEquipment = Array[ExtResource("1_dpitu")]([])
|
||||
StartingEquipment = []
|
||||
RemoveEquipment = []
|
||||
metadata/_custom_type_script = "uid://mja0rk7n2kln"
|
||||
|
||||
[resource]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" script_class="RogueliteMapTheme" load_steps=60 format=3 uid="uid://cw6868vuvuynh"]
|
||||
[gd_resource type="Resource" script_class="RogueliteMapTheme" load_steps=65 format=3 uid="uid://cw6868vuvuynh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bwtif3if3ea0u" path="res://Scripts/Resources/RogueliteMapTheme.cs" id="1_2rtdw"]
|
||||
[ext_resource type="Resource" uid="uid://cltxhkrqp055v" path="res://Resources/Items/Money_Pickup.tres" id="1_ae3bb"]
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
[ext_resource type="Resource" uid="uid://clr1gln7nxa1o" path="res://Resources/Items/Power_Pickup.tres" id="9_to7mi"]
|
||||
[ext_resource type="Resource" uid="uid://ct1fa2huvy34n" path="res://Resources/Items/Ammo1.tres" id="10_w335g"]
|
||||
[ext_resource type="Script" uid="uid://rgx0g5iqksnn" path="res://Scripts/Resources/Loot/LootTable.cs" id="11_eegnh"]
|
||||
[ext_resource type="Script" uid="uid://b1mvbcwsip0mv" path="res://Scripts/Resources/RogueliteFloorResource.cs" id="14_mvnxq"]
|
||||
[ext_resource type="Resource" uid="uid://do11fodskgasi" path="res://Resources/RogueliteMaps/RGTestRoom1.tres" id="14_rjphh"]
|
||||
[ext_resource type="Resource" uid="uid://cur433g6oevmd" path="res://Resources/RogueliteMaps/RGLongAcidWalk.tres" id="15_2gg5d"]
|
||||
[ext_resource type="PackedScene" uid="uid://bi6m7am6gry17" path="res://Scenes/Misc/Horizontal_North_Solid_Wall.tscn" id="15_qo6vk"]
|
||||
|
|
@ -66,6 +67,70 @@ script = ExtResource("11_eegnh")
|
|||
Items = Array[Object]([ExtResource("1_ae3bb"), ExtResource("6_cxv74"), ExtResource("7_f7mru"), ExtResource("8_3kwn2"), ExtResource("9_to7mi"), ExtResource("10_w335g")])
|
||||
metadata/_custom_type_script = "uid://rgx0g5iqksnn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rdbqj"]
|
||||
script = ExtResource("14_mvnxq")
|
||||
DungeonLength = 3
|
||||
MaxBranchLength = 2
|
||||
MaxRooms = 12
|
||||
MinKeys = 0
|
||||
MaxKeys = 2
|
||||
MinSecrets = 1
|
||||
MaxSecrets = 1
|
||||
MinTreasures = 1
|
||||
MaxTreasures = 1
|
||||
MinShops = 1
|
||||
MaxShops = 1
|
||||
EnemyHealthMultiplier = 1.1
|
||||
metadata/_custom_type_script = "uid://b1mvbcwsip0mv"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_p1heq"]
|
||||
script = ExtResource("14_mvnxq")
|
||||
DungeonLength = 4
|
||||
MaxBranchLength = 2
|
||||
MaxRooms = 12
|
||||
MinKeys = 1
|
||||
MaxKeys = 2
|
||||
MinSecrets = 1
|
||||
MaxSecrets = 1
|
||||
MinTreasures = 1
|
||||
MaxTreasures = 1
|
||||
MinShops = 1
|
||||
MaxShops = 1
|
||||
EnemyHealthMultiplier = 1.4
|
||||
metadata/_custom_type_script = "uid://b1mvbcwsip0mv"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4mbci"]
|
||||
script = ExtResource("14_mvnxq")
|
||||
DungeonLength = 4
|
||||
MaxBranchLength = 3
|
||||
MaxRooms = 16
|
||||
MinKeys = 1
|
||||
MaxKeys = 3
|
||||
MinSecrets = 1
|
||||
MaxSecrets = 2
|
||||
MinTreasures = 1
|
||||
MaxTreasures = 2
|
||||
MinShops = 1
|
||||
MaxShops = 1
|
||||
EnemyHealthMultiplier = 1.6
|
||||
metadata/_custom_type_script = "uid://b1mvbcwsip0mv"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4dp3b"]
|
||||
script = ExtResource("14_mvnxq")
|
||||
DungeonLength = 4
|
||||
MaxBranchLength = 4
|
||||
MaxRooms = 16
|
||||
MinKeys = 2
|
||||
MaxKeys = 4
|
||||
MinSecrets = 1
|
||||
MaxSecrets = 3
|
||||
MinTreasures = 1
|
||||
MaxTreasures = 3
|
||||
MinShops = 1
|
||||
MaxShops = 1
|
||||
EnemyHealthMultiplier = 1.8
|
||||
metadata/_custom_type_script = "uid://b1mvbcwsip0mv"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_11cll"]
|
||||
script = ExtResource("11_eegnh")
|
||||
Items = Array[Object]([ExtResource("9_to7mi"), ExtResource("3_tsgja"), ExtResource("10_w335g"), ExtResource("6_cxv74"), ExtResource("9_to7mi"), ExtResource("5_ga54h"), ExtResource("41_tsgja"), ExtResource("42_qo6vk"), ExtResource("7_f7mru"), ExtResource("4_qo6vk"), ExtResource("2_p3lfl"), ExtResource("8_3kwn2")])
|
||||
|
|
@ -102,4 +167,5 @@ ShopLootTable = SubResource("Resource_11cll")
|
|||
EnemiesLootTable = SubResource("Resource_tsgja")
|
||||
WeaponsLootTable = SubResource("Resource_eegnh")
|
||||
Rooms = Array[Object]([ExtResource("5_sludw"), ExtResource("6_b3pjl"), ExtResource("7_nil27"), ExtResource("8_pmfuo"), ExtResource("9_0lwa1"), ExtResource("14_rjphh"), ExtResource("15_2gg5d"), ExtResource("16_402ix"), ExtResource("17_52l5g"), ExtResource("18_gh41q"), ExtResource("19_bn1n6"), ExtResource("20_0on7r"), ExtResource("23_p3lfl"), ExtResource("24_tsgja"), ExtResource("36_ga54h"), ExtResource("37_cxv74"), ExtResource("38_f7mru"), ExtResource("39_3kwn2"), ExtResource("40_w335g"), ExtResource("42_nnvxo"), ExtResource("43_11cll")])
|
||||
Floors = Array[ExtResource("14_mvnxq")]([SubResource("Resource_rdbqj"), SubResource("Resource_p1heq"), SubResource("Resource_4mbci"), SubResource("Resource_4dp3b")])
|
||||
metadata/_custom_type_script = "uid://bwtif3if3ea0u"
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
[ext_resource type="Resource" uid="uid://byo74ews118nl" path="res://Resources/Music/No_Reason.tres" id="13_fh7cp"]
|
||||
[ext_resource type="FontFile" uid="uid://cyk27h5aox1n7" path="res://fonts/sector_034.ttf" id="14_yxkem"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ljnfb"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_py6u0"]
|
||||
atlas = ExtResource("9_riqfo")
|
||||
region = Rect2(128, 0, 32, 16)
|
||||
region = Rect2(416, 0, 32, 16)
|
||||
|
||||
[sub_resource type="Theme" id="Theme_c7h4d"]
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ offset_top = 40.995
|
|||
offset_right = 186.42
|
||||
offset_bottom = 56.995
|
||||
rotation = 3.14159
|
||||
texture = SubResource("AtlasTexture_ljnfb")
|
||||
texture = SubResource("AtlasTexture_py6u0")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchors_preset = 15
|
||||
|
|
@ -112,6 +112,16 @@ theme = ExtResource("4_nk7wn")
|
|||
theme_override_styles/normal = ExtResource("7_rrcx7")
|
||||
text = "Continue"
|
||||
|
||||
[node name="RogueliteTestButton" type="Button" parent="MarginContainer/GridContainer/GameButtons"]
|
||||
layout_mode = 2
|
||||
focus_neighbor_left = NodePath("../../Options/CreditsButton")
|
||||
focus_neighbor_top = NodePath("../ContinueButton")
|
||||
focus_neighbor_right = NodePath("../../Options/CreditsButton")
|
||||
focus_neighbor_bottom = NodePath("../ExitButton")
|
||||
theme = ExtResource("4_nk7wn")
|
||||
text = "Roguelite
|
||||
Test"
|
||||
|
||||
[node name="DebugButton" type="Button" parent="MarginContainer/GridContainer/GameButtons"]
|
||||
layout_mode = 2
|
||||
focus_neighbor_left = NodePath("../../Options/CreditsButton")
|
||||
|
|
@ -223,6 +233,7 @@ theme_override_styles/panel = ExtResource("7_rrcx7")
|
|||
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/GameButtons/StartButton" to="." method="_on_start_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/GameButtons/ContinueButton" to="." method="OnContinuePressed"]
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/GameButtons/RogueliteTestButton" to="." method="OnRogueliteButtonPressed"]
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/GameButtons/DebugButton" to="." method="_on_debug_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/GameButtons/ExitButton" to="." method="_on_exit_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/Options/OptionsButton" to="." method="OnOptionsButtonPressed"]
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@ SpawnMarkers = Dictionary[int, NodePath]({
|
|||
process_mode = 1
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("4_jtlua")
|
||||
MapTheme = ExtResource("25_7gtqx")
|
||||
DungeonLength = 3
|
||||
MaxBranchLength = 2
|
||||
MaxKeys = 2
|
||||
MaxSecrets = 1
|
||||
MaxTreasures = 1
|
||||
MapThemes = Array[Object]([ExtResource("25_7gtqx")])
|
||||
|
||||
[node name="CameraController" type="Camera2D" parent="."]
|
||||
process_mode = 1
|
||||
|
|
|
|||
|
|
@ -16,8 +16,16 @@ public partial class RogueliteRoomManager : Node2D
|
|||
{
|
||||
//[Export] public Array<RogueliteRoomResource> Rooms { get; set; }
|
||||
|
||||
[Export] public RogueliteMapTheme MapTheme { get; set; }
|
||||
[Export] public Array<RogueliteMapTheme> MapThemes { get; set; }
|
||||
|
||||
private int CurrentLevel => GlobalState.Instance.SessionSettings.LevelNumber;
|
||||
|
||||
// TODO : Get based on level number
|
||||
RogueliteMapTheme MapTheme => MapThemes[0];
|
||||
|
||||
// TODO: overflow on next theme
|
||||
private RogueliteFloorResource CurrentFloorData => MapTheme.Floors[CurrentLevel % MapTheme.Floors.Count];
|
||||
|
||||
//private Godot.Collections.Dictionary<Vector2I, RogueliteRoomResource> _grid = new();
|
||||
private Godot.Collections.Dictionary<Vector2I, RogueliteRoom> _roomGrid = new();
|
||||
|
||||
|
|
@ -26,22 +34,22 @@ public partial class RogueliteRoomManager : Node2D
|
|||
public List<RogueliteRoom> SpawnedRooms { get; private set; } = [];
|
||||
|
||||
[Export] public Vector2I SpawnOrigin { get; private set; } = Vector2I.Zero;
|
||||
|
||||
[Export] public int DungeonLength { get; set; } = 10;
|
||||
[Export] public int MaxBranches { get; set; } = 3;
|
||||
[Export] public int MaxBranchLength { get; set; } = 3;
|
||||
|
||||
[Export] public int DungeonWidth = 10;
|
||||
[Export] public int DungeonHeight = 10;
|
||||
[Export] public int MaxRooms = 12;
|
||||
[Export] public int MinKeys = 0;
|
||||
[Export] public int MaxKeys = 3;
|
||||
[Export] public int MinSecrets = 1;
|
||||
[Export] public int MaxSecrets = 2;
|
||||
[Export] public int MinTreasures = 1;
|
||||
[Export] public int MaxTreasures = 2;
|
||||
[Export] public int MinShops = 1;
|
||||
[Export] public int MaxShops = 1;
|
||||
|
||||
//[Export] public int DungeonLength { get; set; } = 10;
|
||||
// [Export] public int MaxBranches { get; set; } = 3;
|
||||
// [Export] public int MaxBranchLength { get; set; } = 3;
|
||||
//
|
||||
// [Export] public int DungeonWidth = 10;
|
||||
// [Export] public int DungeonHeight = 10;
|
||||
// [Export] public int MaxRooms = 12;
|
||||
// [Export] public int MinKeys = 0;
|
||||
// [Export] public int MaxKeys = 3;
|
||||
// [Export] public int MinSecrets = 1;
|
||||
// [Export] public int MaxSecrets = 2;
|
||||
// [Export] public int MinTreasures = 1;
|
||||
// [Export] public int MaxTreasures = 2;
|
||||
// [Export] public int MinShops = 1;
|
||||
// [Export] public int MaxShops = 1;
|
||||
[Export] public string ManualSeed { get; private set; }
|
||||
|
||||
private ulong _seed;
|
||||
|
|
@ -60,29 +68,14 @@ public partial class RogueliteRoomManager : Node2D
|
|||
public void InitSpawning()
|
||||
{
|
||||
GlobalState.Instance.SessionSettings.GameMode = GameMode.Roguelite;
|
||||
GlobalState.Instance.SessionSettings.AllowSaving = false;
|
||||
// if (GlobalState.Instance.SessionSettings.LevelNumber < 0)
|
||||
// {
|
||||
// GlobalState.Instance.SessionSettings.LevelNumber = 0;
|
||||
// }
|
||||
GenerateStraightLineDungeon();
|
||||
}
|
||||
|
||||
private void SpawnRoomsGrid()
|
||||
{
|
||||
//var firstRoom = Rooms.FirstOrDefault();
|
||||
|
||||
var origin = Vector2.Zero;
|
||||
var tileSize = new Vector2(16, 16);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
var roomIndex = GD.RandRange(0, MapTheme.Rooms.Count - 1);
|
||||
var room = MapTheme.Rooms[roomIndex];
|
||||
//SpawnRoom(room, origin + (room.Size * new Vector2(i, j) * tileSize));
|
||||
}
|
||||
}
|
||||
|
||||
//CallDeferred(MethodName.RebakeNavigationDeferred);
|
||||
}
|
||||
|
||||
|
||||
private IEnumerable<RogueliteRoomResource> StarterRooms => MapTheme.Rooms.Where(x => x.Type is RoomType.Starter);
|
||||
|
||||
private IEnumerable<RogueliteRoomResource> RegularRooms => MapTheme.Rooms.Where(x =>
|
||||
|
|
@ -118,6 +111,8 @@ public partial class RogueliteRoomManager : Node2D
|
|||
{
|
||||
SetSeed();
|
||||
|
||||
GD.Print($"Floor: {CurrentLevel}");
|
||||
|
||||
MapTheme.MakeChestLootQueue();
|
||||
MapTheme.TeleportersList = [];
|
||||
|
||||
|
|
@ -139,10 +134,10 @@ public partial class RogueliteRoomManager : Node2D
|
|||
|
||||
var offshoots = new List<RoomType>();
|
||||
|
||||
AddRandomOffshootType(offshoots, MinKeys, MaxKeys, RoomType.Key);
|
||||
AddRandomOffshootType(offshoots, MinShops, MaxShops, RoomType.Shop);
|
||||
AddRandomOffshootType(offshoots, MinSecrets, MaxSecrets, RoomType.Secret);
|
||||
AddRandomOffshootType(offshoots, MinTreasures, MaxTreasures, RoomType.Treasure);
|
||||
AddRandomOffshootType(offshoots, CurrentFloorData.MinKeys, CurrentFloorData.MaxKeys, RoomType.Key);
|
||||
AddRandomOffshootType(offshoots, CurrentFloorData.MinShops, CurrentFloorData.MaxShops, RoomType.Shop);
|
||||
AddRandomOffshootType(offshoots, CurrentFloorData.MinSecrets, CurrentFloorData.MaxSecrets, RoomType.Secret);
|
||||
AddRandomOffshootType(offshoots, CurrentFloorData.MinTreasures, CurrentFloorData.MaxTreasures, RoomType.Treasure);
|
||||
|
||||
var shuffledOffshoots = offshoots.Shuffle().ToList();
|
||||
|
||||
|
|
@ -155,7 +150,7 @@ public partial class RogueliteRoomManager : Node2D
|
|||
|
||||
bool lockNext = false;
|
||||
|
||||
for (int i = 0; i < DungeonLength; i++)
|
||||
for (int i = 0; i < CurrentFloorData.DungeonLength; i++)
|
||||
{
|
||||
GD.Print($"Dungeon room {i}");
|
||||
|
||||
|
|
@ -217,7 +212,7 @@ public partial class RogueliteRoomManager : Node2D
|
|||
|
||||
int roomsInOffshot = offshootTypeToSpawn is RoomType.Secret or RoomType.Shop
|
||||
? 0
|
||||
: GD.RandRange(0, MaxBranchLength);
|
||||
: GD.RandRange(0, CurrentFloorData.MaxBranchLength);
|
||||
|
||||
// var roomsForOffshoot = randomOffshootRoomsList
|
||||
// .Take(new Range(randOffshootStartIndex, randomOffshootRoomsList.Count - 1)).ToList();
|
||||
|
|
@ -259,9 +254,9 @@ public partial class RogueliteRoomManager : Node2D
|
|||
}
|
||||
|
||||
// Add more dungeon if not enough rooms are generated
|
||||
if (i == DungeonLength - 1 && DungeonLength < MaxRooms && currentOffshoot < DungeonLength)
|
||||
if (i == CurrentFloorData.DungeonLength - 1 && CurrentFloorData.DungeonLength < CurrentFloorData.MaxRooms && currentOffshoot < CurrentFloorData.DungeonLength)
|
||||
{
|
||||
DungeonLength++;
|
||||
CurrentFloorData.DungeonLength++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Components.FSM;
|
||||
using Cirno.Scripts.Enums;
|
||||
using Cirno.Scripts.Misc;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot.Collections;
|
||||
|
|
@ -74,7 +75,19 @@ public partial class GameManager : Node2D
|
|||
{
|
||||
Instance = this;
|
||||
RenderingServer.SetDefaultClearColor(Colors.Black);
|
||||
GlobalState.Session.LevelNumber = MapResource.LevelId;
|
||||
if (GlobalState.Instance.SessionSettings.GameMode is GameMode.Roguelite)
|
||||
{
|
||||
if (GlobalState.Instance.SessionSettings.LevelNumber < 0)
|
||||
{
|
||||
// TODO: Change based on which level we're going to
|
||||
GlobalState.Instance.SessionSettings.LevelNumber = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalState.Session.LevelNumber = MapResource.LevelId;
|
||||
}
|
||||
|
||||
|
||||
GlobalState.Instance.ResizeCursor();
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,16 @@ public partial class MainMenu : CanvasLayer
|
|||
SpawnMenu<OptionsMenu>(OptionsMenuTemplate, SubMenuHolder);
|
||||
}
|
||||
|
||||
private void OnRogueliteButtonPressed()
|
||||
{
|
||||
GlobalState.Session.NewSession();
|
||||
GlobalState.Session.AllowSaving = false;
|
||||
GlobalState.Session.Difficulty = DifficultyLevel.Normal;
|
||||
GlobalState.Session.GameMode = GameMode.Roguelite;
|
||||
GlobalState.Session.LevelNumber = 0;
|
||||
GlobalState.Instance.GotoScene("uid://bf1kqr3o6r6d4");
|
||||
}
|
||||
|
||||
private void _on_mainmenu_button_pressed()
|
||||
{
|
||||
if (MainMenuScene != null)
|
||||
|
|
|
|||
20
Scripts/Resources/RogueliteFloorResource.cs
Normal file
20
Scripts/Resources/RogueliteFloorResource.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class RogueliteFloorResource : Resource
|
||||
{
|
||||
[Export] public int DungeonLength { get; set; } = 3;
|
||||
[Export] public int MaxBranchLength { get; set; } = 2;
|
||||
[Export] public int MaxRooms = 12;
|
||||
[Export] public int MinKeys = 0;
|
||||
[Export] public int MaxKeys = 2;
|
||||
[Export] public int MinSecrets = 1;
|
||||
[Export] public int MaxSecrets = 1;
|
||||
[Export] public int MinTreasures = 1;
|
||||
[Export] public int MaxTreasures = 1;
|
||||
[Export] public int MinShops = 1;
|
||||
[Export] public int MaxShops = 1;
|
||||
[Export] public float EnemyHealthMultiplier = 1.1f;
|
||||
}
|
||||
1
Scripts/Resources/RogueliteFloorResource.cs.uid
Normal file
1
Scripts/Resources/RogueliteFloorResource.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b1mvbcwsip0mv
|
||||
|
|
@ -48,6 +48,9 @@ public partial class RogueliteMapTheme : Resource
|
|||
[ExportCategory("Rooms")]
|
||||
[Export] public Array<RogueliteRoomResource> Rooms { get; set; }
|
||||
|
||||
[ExportCategory("Floors")]
|
||||
[Export] public Array<RogueliteFloorResource> Floors { get; set; } = [];
|
||||
|
||||
[ExportCategory("Loot Counts")] public int MaxChestLoot { get; set; } = 100;
|
||||
|
||||
public Queue<LootItem> ChestLootQueue { get; private set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue