Added 'Is Real' option to Bowser and his bro

This commit is contained in:
guzlad
2025-10-10 02:58:19 +02:00
parent fbb592fbe8
commit 08adf8fd6c
3 changed files with 10 additions and 18 deletions

View File

@@ -3027,11 +3027,6 @@ type = 1
icon_texture = ExtResource("40_62ull")
icon_region_override = Rect2(8, 16, 16, 16)
entity_scene = ExtResource("41_3yhuv")
metadata/_edit_group_ = true
metadata/can_be_stored = false
metadata/can_note_store = false
metadata/can_lakitu_throw = false
metadata/can_pipe_gen = false
[node name="BowserBro" parent="TileMenu/MarginContainer/VBoxContainer/PanelContainer/TILES/ScrollContainer/VBoxContainer/Enemies/MarginContainer/GridContainer/Bowsers" groups=["Selectors"] instance=ExtResource("8_wkmjk")]
layout_mode = 1
@@ -3043,11 +3038,6 @@ type = 1
icon_texture = ExtResource("59_kxvns")
icon_region_override = Rect2(8, 16, 16, 16)
entity_scene = ExtResource("60_ed30e")
metadata/_edit_group_ = true
metadata/can_be_stored = false
metadata/can_note_store = false
metadata/can_lakitu_throw = false
metadata/can_pipe_gen = false
[node name="TextureRect" type="TextureRect" parent="TileMenu/MarginContainer/VBoxContainer/PanelContainer/TILES/ScrollContainer/VBoxContainer/Enemies/MarginContainer/GridContainer/Bowsers"]
layout_mode = 1

View File

@@ -381,7 +381,7 @@ metadata/_custom_type_script = "uid://cqif1li7otvpl"
[node name="EditorPropertyExposer" type="Node" parent="."]
script = ExtResource("15_nf6hu")
properties = Array[String](["can_hammer", "can_fire"])
properties = Array[String](["can_hammer", "can_fire", "is_real"])
[node name="TrackJoint" type="Node" parent="."]
script = ExtResource("17_5b235")

View File

@@ -6,7 +6,7 @@ const HAMMER = preload("res://Scenes/Prefabs/Entities/Items/Hammer.tscn")
@export var can_hammer := false
@export var can_fire := true
@export var is_real := true
@export var music_enabled := true
var target_player: Player = null
@@ -50,13 +50,15 @@ func get_target_y(player: Player) -> float:
return player.global_position.y - 8
func show_smoke() -> void:
if has_meta("is_real"):
# guzlad: ugly but it'll have to do until we move the metadata stuff to actual variables
if (((Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL) or (Global.current_game_mode == Global.GameMode.LEVEL_EDITOR)) and !is_real):
var smoke = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn").instantiate()
smoke.scale = Vector2(2, 2)
smoke.global_position =global_position
AudioManager.play_sfx("magic", global_position)
add_sibling(smoke)
elif has_meta("is_real"):
return
var smoke = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn").instantiate()
smoke.scale = Vector2(2, 2)
smoke.global_position =global_position
AudioManager.play_sfx("magic", global_position)
add_sibling(smoke)
func breathe_fire() -> void:
if can_fire == false: