Skip to content

Commit

Permalink
Improve new user prompts for how to play the game.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisl8 committed Mar 22, 2024
1 parent 9b25683 commit 50546fd
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions player/prompts.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,36 @@ func _process(delta: float) -> void:
if text == "Welcome!":
text = ""
delay_time = 1
elif not Globals.player_has_done.has("mine_a_block"):
elif (
not Globals.player_has_done.has("mine_a_block")
and owner.get_node("Interaction Controller").left_hand_tool == "Mine"
):
text = "Left click to mine a block."
elif text == "Left click to mine a block.":
text = ""
elif not Globals.player_has_done.has("place_a_block"):
elif (
not Globals.player_has_done.has("place_a_block")
and owner.get_node("Interaction Controller").right_hand_tool == "Place"
):
text = "Right click to place a block."
elif text == "Right click to place a block.":
text = ""
elif not Globals.player_has_done.has("press_craft_button"):
text = "Press and hold 'c' to place an item."
elif text == "Press and hold 'c' to place an item.":
text = ""
elif not Globals.player_has_done.has("scroll_crafting_items"):
text = "Use mouse wheel to select item to craft.\nLeft click to place item.\nRelease 'c' to cancel item placing."
elif not Globals.player_has_done.has("press_build_button"):
text = "Press 'b' to enter Build mode."
elif (
not Globals.player_has_done.has("scroll_crafting_items")
and owner.get_node("Interaction Controller").left_hand_tool == "Build"
):
text = "Use mouse wheel to select item to build."
elif (
not Globals.player_has_done.has("built_an_item")
and owner.get_node("Interaction Controller").left_hand_tool == "Build"
): # and in build mode
text = "Left click to place an item."
elif (
text
== "Use mouse wheel to select item to craft.\nLeft click to place item.\nRelease 'c' to cancel item placing."
not Globals.player_has_done.has("returned_to_mining_mode")
and owner.get_node("Interaction Controller").left_hand_tool != "Mine"
):
# TODO: Something is broken, it mines, but the tool is still Build.
# TODO: Should it "auto return" to mine or just stay in build with a new item?
# TODO: Highlight on screen which tool is in use.
print(owner.get_node("Interaction Controller").left_hand_tool)
text = "Press 'v' to return to mining mode."
else:
text = ""

0 comments on commit 50546fd

Please sign in to comment.