Fixed brick blocks with items in, being affected by p-switches

This commit is contained in:
JHDev2006
2025-09-21 14:38:23 +01:00
parent 2fe1fb5808
commit fd37d7fcf8
4 changed files with 84 additions and 78 deletions

View File

@@ -4,10 +4,12 @@ extends Block
var ticking_down := false
func _ready() -> void:
$PSwitcher.enabled = item == null
if item_amount == 10 and item.resource_path == "res://Scenes/Prefabs/Entities/Items/SpinningCoin.tscn" and is_instance_valid(Global.level_editor) == false:
Global.log_warning("Coin Brick Block is wrong! please report!: " + name)
func check_brick_empty() -> void:
$PSwitcher.enabled = item == null
func on_block_hit(player: Player) -> void:
if player.power_state.hitbox_size == "Big":
if item == null: