Finalized Item Icons + New Weapon Slashes

This commit is contained in:
Pal
2026-03-20 16:23:51 -07:00
parent f19cb7edda
commit 83dbbba8e6
984 changed files with 18940 additions and 1253 deletions

View File

@@ -20,9 +20,9 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
public void InitializeDungeon()
{
Rooms = [];
Rooms = FindAllDungeonRooms([.. GetChildren()], Rooms);
_playerSpawnPoint = RandomizePlayerSpawnPoint();
Rooms = [];
Rooms = FindAllDungeonRooms([.. GetChildren()], Rooms);
_playerSpawnPoint = RandomizePlayerSpawnPoint();
}
public void FadeOutAudio()
@@ -32,27 +32,27 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
public void SpawnEnemies(DungeonFloorNode floorNode)
{
var enemyOdds = new Godot.Collections.Dictionary<EnemyType, float>
{
{ EnemyType.Sproingy, floorNode.Sproingy },
{ EnemyType.Michael, floorNode.Michael },
{ EnemyType.FilthEater, floorNode.FilthEater },
{ EnemyType.Sara, floorNode.Sara },
{ EnemyType.Ballos, floorNode.Ballos },
{ EnemyType.Chariot, floorNode.Chariot },
{ EnemyType.Chinthe, floorNode.Chinthe },
{ EnemyType.AmbassadorGreen, floorNode.GreenAmbassador },
{ EnemyType.AmbassadorRed, floorNode.RedAmbassador },
{ EnemyType.AmbassadorSteel, floorNode.SteelAmbassador },
{ EnemyType.AgniDemon, floorNode.AgniDemon },
{ EnemyType.AqueousDemon, floorNode.AqueosDemon },
{ EnemyType.Palan, floorNode.Palan },
{ EnemyType.ShieldOfHeaven, floorNode.ShieldOfHeaven },
{ EnemyType.GoldSproingy, floorNode.GoldSproingy },
};
var monsterRooms = Rooms.OfType<MonsterRoom>();
foreach (var room in monsterRooms)
room.SpawnEnemies(enemyOdds);
var enemyOdds = new Godot.Collections.Dictionary<EnemyType, float>
{
{ EnemyType.Sproingy, floorNode.Sproingy },
{ EnemyType.Michael, floorNode.Michael },
{ EnemyType.FilthEater, floorNode.FilthEater },
{ EnemyType.Sara, floorNode.Sara },
{ EnemyType.Ballos, floorNode.Ballos },
{ EnemyType.Chariot, floorNode.Chariot },
{ EnemyType.Chinthe, floorNode.Chinthe },
{ EnemyType.AmbassadorGreen, floorNode.GreenAmbassador },
{ EnemyType.AmbassadorRed, floorNode.RedAmbassador },
{ EnemyType.AmbassadorSteel, floorNode.SteelAmbassador },
{ EnemyType.AgniDemon, floorNode.AgniDemon },
{ EnemyType.AqueousDemon, floorNode.AqueosDemon },
{ EnemyType.Palan, floorNode.Palan },
{ EnemyType.ShieldOfHeaven, floorNode.ShieldOfHeaven },
{ EnemyType.GoldSproingy, floorNode.GoldSproingy },
};
var monsterRooms = Rooms.OfType<MonsterRoom>();
foreach (var room in monsterRooms)
room.SpawnEnemies(enemyOdds);
}
public (Vector3 Rotation, Vector3 Position) GetPlayerSpawnPoint() { return (_playerSpawnPoint.Rotation, new Vector3(_playerSpawnPoint.GlobalPosition.X, 0, _playerSpawnPoint.GlobalPosition.Z)); }
@@ -60,25 +60,25 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
private Marker3D RandomizePlayerSpawnPoint()
{
var randomSpawnLocations = Rooms
.OfType<MonsterRoom>()
.Select(x => x.PlayerSpawn);
var godotCollection = new Godot.Collections.Array<Marker3D>(randomSpawnLocations);
var result = godotCollection.PickRandom();
return result;
var randomSpawnLocations = Rooms
.OfType<MonsterRoom>()
.Select(x => x.PlayerSpawn);
var godotCollection = new Godot.Collections.Array<Marker3D>(randomSpawnLocations);
var result = godotCollection.PickRandom();
return result;
}
private static ImmutableList<IDungeonRoom> FindAllDungeonRooms(List<Node> nodesToSearch, ImmutableList<IDungeonRoom> roomsFound)
{
if (nodesToSearch.Count == 0)
return roomsFound;
if (nodesToSearch.Count == 0)
return roomsFound;
foreach (var node in nodesToSearch)
{
if (node is IDungeonRoom dungeonRoom)
roomsFound = roomsFound.Add(dungeonRoom);
}
foreach (var node in nodesToSearch)
{
if (node is IDungeonRoom dungeonRoom)
roomsFound = roomsFound.Add(dungeonRoom);
}
return FindAllDungeonRooms([.. nodesToSearch.SelectMany(x => x.GetChildren())], roomsFound);
return FindAllDungeonRooms([.. nodesToSearch.SelectMany(x => x.GetChildren())], roomsFound);
}
}

View File

@@ -18,55 +18,55 @@ public partial class MonsterRoom : DungeonRoom
public override void _Ready()
{
SpawnItems();
SpawnItems();
}
public void SpawnEnemies(Godot.Collections.Dictionary<EnemyType, float> enemyInfo)
{
if (enemyInfo == null || !enemyInfo.Any(x => x.Value > 0))
return;
if (enemyInfo == null || !enemyInfo.Any(x => x.Value > 0))
return;
var rng = new RandomNumberGenerator();
rng.Randomize();
var enemySpawnPoints = EnemySpawnPoints.GetChildren();
var numberOfEnemiesToSpawn = rng.RandiRange(1, enemySpawnPoints.Count);
var rng = new RandomNumberGenerator();
rng.Randomize();
var enemySpawnPoints = EnemySpawnPoints.GetChildren();
var numberOfEnemiesToSpawn = rng.RandiRange(1, enemySpawnPoints.Count);
foreach (var spawnPoint in enemySpawnPoints.Cast<Marker3D>())
{
if (numberOfEnemiesToSpawn <= 0)
break;
numberOfEnemiesToSpawn--;
foreach (var spawnPoint in enemySpawnPoints.Cast<Marker3D>())
{
if (numberOfEnemiesToSpawn <= 0)
break;
numberOfEnemiesToSpawn--;
var index = rng.RandWeighted([.. enemyInfo.Values]);
var selectedEnemy = enemyInfo.ElementAt((int)index);
var instantiatedEnemy = EnemyTypeToEnemyConverter.Convert(selectedEnemy.Key);
AddChild(instantiatedEnemy);
instantiatedEnemy.GlobalPosition = new Vector3(spawnPoint.GlobalPosition.X, 0f, spawnPoint.GlobalPosition.Z);
ResetPhysicsInterpolation();
}
var index = rng.RandWeighted([.. enemyInfo.Values]);
var selectedEnemy = enemyInfo.ElementAt((int)index);
var instantiatedEnemy = EnemyTypeToEnemyConverter.Convert(selectedEnemy.Key);
AddChild(instantiatedEnemy);
instantiatedEnemy.GlobalPosition = new Vector3(spawnPoint.GlobalPosition.X, 0f, spawnPoint.GlobalPosition.Z);
ResetPhysicsInterpolation();
}
}
private void SpawnItems()
{
if (ItemSpawnPoints == null)
return;
if (ItemSpawnPoints == null)
return;
var itemSpawnPoints = ItemSpawnPoints.GetChildren();
var rng = new RandomNumberGenerator();
rng.Randomize();
var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count);
itemSpawnPoints.Shuffle();
var database = ItemDatabase.Instance;
foreach (var spawnPoint in itemSpawnPoints.Cast<Marker3D>())
{
if (numberOfItemsToSpawn <= 0)
break;
numberOfItemsToSpawn--;
var itemSpawnPoints = ItemSpawnPoints.GetChildren();
var rng = new RandomNumberGenerator();
rng.Randomize();
var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count);
itemSpawnPoints.Shuffle();
var database = ItemDatabase.Instance;
foreach (var spawnPoint in itemSpawnPoints.Cast<Marker3D>())
{
if (numberOfItemsToSpawn <= 0)
break;
numberOfItemsToSpawn--;
var selectedItem = database.PickItem<IBaseInventoryItem>() as Node3D;
var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
AddChild(duplicated);
duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z);
}
var selectedItem = database.PickItem<IBaseInventoryItem>() as Node3D;
var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
AddChild(duplicated);
duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z);
}
}
}

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cp0er3xxxjkr5"
path="res://.godot/imported/A2-Puer_AREA_2_MAIN_222STONE.png-992459ef9849c39922a9b9e0c7774a4a.ctex"
path="res://.godot/imported/a2-puer_AREA_2_MAIN_222STONE.png-139f243ac630853348798dfe584da1e0.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_222STONE.png"
dest_files=["res://.godot/imported/A2-Puer_AREA_2_MAIN_222STONE.png-992459ef9849c39922a9b9e0c7774a4a.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_AREA_2_MAIN_222STONE.png"
dest_files=["res://.godot/imported/a2-puer_AREA_2_MAIN_222STONE.png-139f243ac630853348798dfe584da1e0.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://5r16swvuqjjg"
path="res://.godot/imported/A2-Puer_AREA_2_MAIN_STONE.png-2267bd7e464cdc2e03c8954de01941bf.ctex"
path="res://.godot/imported/a2-puer_AREA_2_MAIN_STONE.png-986249227e569ea1e40b4825b7f05c47.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_AREA_2_MAIN_STONE.png"
dest_files=["res://.godot/imported/A2-Puer_AREA_2_MAIN_STONE.png-2267bd7e464cdc2e03c8954de01941bf.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_AREA_2_MAIN_STONE.png"
dest_files=["res://.godot/imported/a2-puer_AREA_2_MAIN_STONE.png-986249227e569ea1e40b4825b7f05c47.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cvnpxln2mmtkp"
path="res://.godot/imported/A2-Puer_COLUMN_WHITE.png-18037c22b966bb159d05cb7acac1bc53.ctex"
path="res://.godot/imported/a2-puer_COLUMN_WHITE.png-0b80d510851319464b2ef729d8868892.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_COLUMN_WHITE.png"
dest_files=["res://.godot/imported/A2-Puer_COLUMN_WHITE.png-18037c22b966bb159d05cb7acac1bc53.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_COLUMN_WHITE.png"
dest_files=["res://.godot/imported/a2-puer_COLUMN_WHITE.png-0b80d510851319464b2ef729d8868892.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://tjtjbktl51kd"
path="res://.godot/imported/A2-Puer_GREENBIT.png-40a9ca6a0efc569a5f329f19b3c3e572.ctex"
path="res://.godot/imported/a2-puer_GREENBIT.png-e1ed395f917a2fe57ed6288185af0729.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_GREENBIT.png"
dest_files=["res://.godot/imported/A2-Puer_GREENBIT.png-40a9ca6a0efc569a5f329f19b3c3e572.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_GREENBIT.png"
dest_files=["res://.godot/imported/a2-puer_GREENBIT.png-e1ed395f917a2fe57ed6288185af0729.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dqfdyguq83bhs"
path="res://.godot/imported/A2-Puer_M13_14.png-e781478f15895763a566a64ff37db311.ctex"
path="res://.godot/imported/a2-puer_M13_14.png-ed8b29b0af1c2b973bfaee62e57cab14.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_14.png"
dest_files=["res://.godot/imported/A2-Puer_M13_14.png-e781478f15895763a566a64ff37db311.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_M13_14.png"
dest_files=["res://.godot/imported/a2-puer_M13_14.png-ed8b29b0af1c2b973bfaee62e57cab14.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dorqwrqy03rim"
path="res://.godot/imported/A2-Puer_M13_49.png-44faadb5ae300e9ecea145cfe1949536.ctex"
path="res://.godot/imported/a2-puer_M13_49.png-86429b5a3cd80a9159f32ded99a631bc.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_M13_49.png"
dest_files=["res://.godot/imported/A2-Puer_M13_49.png-44faadb5ae300e9ecea145cfe1949536.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_M13_49.png"
dest_files=["res://.godot/imported/a2-puer_M13_49.png-86429b5a3cd80a9159f32ded99a631bc.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://nl3bwenfa8fi"
path="res://.godot/imported/A2-Puer_RUBBLE_1.png-72d7ff861d1df58d800502546da8d607.ctex"
path="res://.godot/imported/a2-puer_RUBBLE_1.png-c7185e2aad2613007d1951f1515ef882.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_RUBBLE_1.png"
dest_files=["res://.godot/imported/A2-Puer_RUBBLE_1.png-72d7ff861d1df58d800502546da8d607.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_RUBBLE_1.png"
dest_files=["res://.godot/imported/a2-puer_RUBBLE_1.png-c7185e2aad2613007d1951f1515ef882.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://0p6suo7fpxum"
path="res://.godot/imported/A2-Puer_STUCCO_DECAL_BIG.png-015d9f8dd06372231a1f422979d3604e.ctex"
path="res://.godot/imported/a2-puer_STUCCO_DECAL_BIG.png-882b477f490f6ddbf5bffb3a6f8904e1.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_STUCCO_DECAL_BIG.png"
dest_files=["res://.godot/imported/A2-Puer_STUCCO_DECAL_BIG.png-015d9f8dd06372231a1f422979d3604e.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_STUCCO_DECAL_BIG.png"
dest_files=["res://.godot/imported/a2-puer_STUCCO_DECAL_BIG.png-882b477f490f6ddbf5bffb3a6f8904e1.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ct3mkni0v0y3g"
path="res://.godot/imported/A2-Puer_Tile 4.png-0cfd085ec5fcea35eb2d1373e4717f77.ctex"
path="res://.godot/imported/a2-puer_Tile 4.png-9d089a32db3fc38a0c5dee6cdb6d3495.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_Tile 4.png"
dest_files=["res://.godot/imported/A2-Puer_Tile 4.png-0cfd085ec5fcea35eb2d1373e4717f77.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_Tile 4.png"
dest_files=["res://.godot/imported/a2-puer_Tile 4.png-9d089a32db3fc38a0c5dee6cdb6d3495.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b40fbcriycpp5"
path="res://.godot/imported/A2-Puer_imag2esnormal.jpg-be023c8af9ff59eedfb3ede232c75195.ctex"
path="res://.godot/imported/a2-puer_imag2esnormal.jpg-d6e063b2785344af34fa3bb45d47aa2f.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_imag2esnormal.jpg"
dest_files=["res://.godot/imported/A2-Puer_imag2esnormal.jpg-be023c8af9ff59eedfb3ede232c75195.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_imag2esnormal.jpg"
dest_files=["res://.godot/imported/a2-puer_imag2esnormal.jpg-d6e063b2785344af34fa3bb45d47aa2f.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b25r6gysyhu3e"
path="res://.godot/imported/A2-Puer_inner_rock2.png-7c99975de214e5dddd3507f87212b910.ctex"
path="res://.godot/imported/a2-puer_inner_rock2.png-943622742770f7b55d1e40645d07d057.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_inner_rock2.png"
dest_files=["res://.godot/imported/A2-Puer_inner_rock2.png-7c99975de214e5dddd3507f87212b910.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_inner_rock2.png"
dest_files=["res://.godot/imported/a2-puer_inner_rock2.png-943622742770f7b55d1e40645d07d057.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cw4hq3kofjowa"
path="res://.godot/imported/A2-Puer_lime_hand_relief.png-825857ea33249fe0361c829ba37bbfdb.ctex"
path="res://.godot/imported/a2-puer_lime_hand_relief.png-85b73e808337e8b8841453cbda0e78cd.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_lime_hand_relief.png"
dest_files=["res://.godot/imported/A2-Puer_lime_hand_relief.png-825857ea33249fe0361c829ba37bbfdb.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_lime_hand_relief.png"
dest_files=["res://.godot/imported/a2-puer_lime_hand_relief.png-85b73e808337e8b8841453cbda0e78cd.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bqrsde28o867s"
path="res://.godot/imported/A2-Puer_mother_GREEN.png-ba1f3d21981ed19fc5cc87868e04808c.ctex"
path="res://.godot/imported/a2-puer_mother_GREEN.png-7bb7d8dd57027953ba1e08ed0c256c8b.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_mother_GREEN.png"
dest_files=["res://.godot/imported/A2-Puer_mother_GREEN.png-ba1f3d21981ed19fc5cc87868e04808c.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_mother_GREEN.png"
dest_files=["res://.godot/imported/a2-puer_mother_GREEN.png-7bb7d8dd57027953ba1e08ed0c256c8b.ctex"]
[params]

View File

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://4aq3a26dliyg"
path="res://.godot/imported/A2-Puer_swirled_column _AREA222.png-4842b180cffdbc0274ecb9cbbbbc8221.ctex"
path="res://.godot/imported/a2-puer_swirled_column _AREA222.png-6f90c188eae5b7e81110f39984d5d43f.ctex"
metadata={
"vram_texture": false
}
@@ -13,8 +13,8 @@ generator_parameters={
[deps]
source_file="res://src/map/dungeon/models/Area 2/Puer/A2-Puer_swirled_column _AREA222.png"
dest_files=["res://.godot/imported/A2-Puer_swirled_column _AREA222.png-4842b180cffdbc0274ecb9cbbbbc8221.ctex"]
source_file="res://src/map/dungeon/models/Area 2/Puer/a2-puer_swirled_column _AREA222.png"
dest_files=["res://.godot/imported/a2-puer_swirled_column _AREA222.png-6f90c188eae5b7e81110f39984d5d43f.ctex"]
[params]