mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-26 17:30:54 +00:00
couple more improvements, im pretty happy with how this is shaping up
This commit is contained in:
@@ -14,6 +14,9 @@ signal modifier_applied
|
||||
|
||||
func _ready() -> void:
|
||||
name = "EditorPropertyExposer"
|
||||
get_entity_map()
|
||||
|
||||
func get_entity_map() -> void:
|
||||
if entity_map.is_empty():
|
||||
entity_map = JSON.parse_string(FileAccess.open(EntityIDMapper.MAP_PATH, FileAccess.READ).get_as_text())
|
||||
|
||||
@@ -45,6 +48,7 @@ func get_string() -> String:
|
||||
return string
|
||||
|
||||
func apply_string(entity_string := "") -> void:
|
||||
get_entity_map()
|
||||
var idx := 2
|
||||
var slice = entity_string.split(",")
|
||||
for i in properties:
|
||||
@@ -62,6 +66,10 @@ func apply_string(entity_string := "") -> void:
|
||||
var scene = entity_map.get(value)
|
||||
if scene != null:
|
||||
owner.set(i, load(entity_map.get(value)[0]))
|
||||
elif value != "!!":
|
||||
print([value, entity_map.get(value)])
|
||||
print(entity_map)
|
||||
Global.log_error("error getting item! : " + i + str(value))
|
||||
elif owner.get(i) is int:
|
||||
var num = value
|
||||
if value.length() > 1:
|
||||
|
||||
@@ -7,7 +7,8 @@ func _ready() -> void:
|
||||
|
||||
func do_cycle() -> void:
|
||||
if BooRaceHandler.countdown_active == false:
|
||||
AudioManager.play_sfx("burner", global_position)
|
||||
if $OnScreen.is_on_screen():
|
||||
AudioManager.play_sfx("burner", global_position)
|
||||
do_animation()
|
||||
await get_tree().create_timer(0.25, false).timeout
|
||||
%Shape.set_deferred("disabled", false)
|
||||
|
||||
@@ -112,7 +112,12 @@ func player_enter(player: Player) -> void:
|
||||
LevelEditor.play_door_transition = true
|
||||
AudioManager.play_sfx("door_open", global_position)
|
||||
await get_tree().create_timer(0.5, false).timeout
|
||||
if Global.current_level.sublevel_id == sublevel_id:
|
||||
var level_id = -1
|
||||
if Global.current_level is CustomLevel:
|
||||
level_id = Global.current_level.sublevel_id
|
||||
elif Global.level_editor != null:
|
||||
level_id = Global.level_editor.sub_level_id
|
||||
if level_id == sublevel_id:
|
||||
Global.do_fake_transition()
|
||||
if Global.fade_transition:
|
||||
await get_tree().create_timer(0.25, false).timeout
|
||||
|
||||
@@ -334,6 +334,7 @@ func reset_values() -> void:
|
||||
Checkpoint.sublevel_id = 0
|
||||
Global.total_deaths = 0
|
||||
Door.unlocked_doors = []
|
||||
Door.exiting_door_id = -1
|
||||
Checkpoint.unlocked_doors = []
|
||||
KeyItem.total_collected = 0
|
||||
Checkpoint.keys_collected = 0
|
||||
|
||||
Reference in New Issue
Block a user