Implements modifier system for weapons

Adds a modifier system allowing dynamic modification of weapon
stats and behavior. This includes:

- Creating ModifierLibrary to manage available modifiers.
- Adds ModifierManager to handle equipping and unequipping modifiers
- Adds a new RangedWeaponComponent to handle firing projectiles and
  managing modifiers.
- Introduces a DebugUI for in-game modifier management.
- Introduces an "Unlimited Power" modifier that changes the projectile scene.
- Modifies stats components to work with the new modifier system.

This system allows for more flexible and customizable weapon
functionality.
This commit is contained in:
Dan Baker 2025-05-08 18:31:19 +01:00
parent 9f66ab0a73
commit 70839387ca
22 changed files with 432 additions and 40 deletions

View file

@ -31,14 +31,14 @@ var base_stats: Dictionary[String, Variant] = {
}
}
var stats: Dictionary
var stats: Dictionary = {}
func _init() -> void:
if not stats:
reset_stats()
func reset_stats() -> void:
stats = base_stats.duplicate()
stats = base_stats.duplicate(true)
Log.pr("StatsComponent reset to base stats")
func get_stat(stat_name: String) -> Variant:
@ -92,4 +92,4 @@ func set_nested_stat(path: String, value) -> bool:
# Set the value at the final key
current[final_key] = value
return true
return true