mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
[QoL] FPS Counter disabled by default, show message after screenshot, show message if noclip is enabled/disabled (#591)
* FPS counter is off by default, enable with F4 * A message or error is now shown on-screen if a screenshot is taken with F2 * Show message when noclip is enabled or disabled
This commit is contained in:
@@ -310,6 +310,7 @@ layer = 1
|
|||||||
|
|
||||||
[node name="FPSCount" type="Label" parent="GameHUD"]
|
[node name="FPSCount" type="Label" parent="GameHUD"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
anchors_preset = 3
|
anchors_preset = 3
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
|
@@ -270,6 +270,7 @@ func _physics_process(delta: float) -> void:
|
|||||||
set_power_state_frame()
|
set_power_state_frame()
|
||||||
if Input.is_action_just_pressed("debug_noclip") and Global.debug_mode:
|
if Input.is_action_just_pressed("debug_noclip") and Global.debug_mode:
|
||||||
state_machine.transition_to("NoClip")
|
state_machine.transition_to("NoClip")
|
||||||
|
Global.log_comment("NOCLIP Enabled")
|
||||||
up_direction = -gravity_vector
|
up_direction = -gravity_vector
|
||||||
handle_directions()
|
handle_directions()
|
||||||
handle_block_collision_detection()
|
handle_block_collision_detection()
|
||||||
|
@@ -263,6 +263,10 @@ func take_screenshot() -> void:
|
|||||||
var img: Image = get_viewport().get_texture().get_image()
|
var img: Image = get_viewport().get_texture().get_image()
|
||||||
var filename = Global.config_path.path_join("screenshots/screenshot_" + str(int(Time.get_unix_time_from_system())) + ".png")
|
var filename = Global.config_path.path_join("screenshots/screenshot_" + str(int(Time.get_unix_time_from_system())) + ".png")
|
||||||
var err = img.save_png(filename)
|
var err = img.save_png(filename)
|
||||||
|
if !err:
|
||||||
|
log_comment("Screenshot Saved!")
|
||||||
|
else:
|
||||||
|
log_error(error_string(err))
|
||||||
|
|
||||||
func handle_p_switch(delta: float) -> void:
|
func handle_p_switch(delta: float) -> void:
|
||||||
if p_switch_active and get_tree().paused == false:
|
if p_switch_active and get_tree().paused == false:
|
||||||
|
@@ -15,6 +15,7 @@ func physics_update(_delta: float) -> void:
|
|||||||
player.move_and_slide()
|
player.move_and_slide()
|
||||||
if Input.is_action_just_pressed("jump_0"):
|
if Input.is_action_just_pressed("jump_0"):
|
||||||
state_machine.transition_to("Normal")
|
state_machine.transition_to("Normal")
|
||||||
|
Global.log_comment("NOCLIP Disabled")
|
||||||
|
|
||||||
func exit() -> void:
|
func exit() -> void:
|
||||||
player.can_hurt = false
|
player.can_hurt = false
|
||||||
|
Reference in New Issue
Block a user