Browse Source

autogit test 11

Lurkars 5 years ago
parent
commit
f4ee79f4a5
  1. 8
      scripts/menus/direct_host_menu.gd
  2. 4
      scripts/menus/direct_join_menu.gd
  3. 1
      scripts/menus/ingame_menu.gd
  4. 4
      scripts/player/human_inventory.gd
  5. 6
      scripts/road/road.gd

8
scripts/menus/direct_host_menu.gd

@ -15,13 +15,13 @@ func _on_host_pressed():
var port = find_node("port").get_value()
var bots = find_node("bots").is_pressed()
var err = server.host_game(int(port), bots)
if err == OK:
var lobby_menu = LobbyMenu.instance()
get_tree().get_root().add_child(lobby_menu)
gamestate.set_player(get_tree().get_network_unique_id())
queue_free()
else:
_on_back_pressed()
@ -30,4 +30,4 @@ func _on_host_pressed():
func _on_back_pressed():
queue_free()
get_tree().get_root().get_node("multiplayer_menu").show()
get_tree().get_root().get_node("multiplayer_menu").show()

4
scripts/menus/direct_join_menu.gd

@ -6,8 +6,8 @@ func _draw():
func _on_join_pressed():
var ip = find_node("ip").text
var port = find_node("port").get_value()
var ip = find_node("ip").text
var port = find_node("port").get_value()
client.join_game(ip, int(port))
queue_free()

1
scripts/menus/ingame_menu.gd

@ -1,5 +1,6 @@
extends Control
func _draw():
find_node("resume").grab_focus()

4
scripts/player/human_inventory.gd

@ -56,7 +56,7 @@ func _on_item_changed(road_identifier, player):
if is_network_master():
if view.get_child_count() > 0:
view.remove_child(view.get_child(0))
view.add_child(item)
get_node("../hud/inventory/track_container/type").set_text(tr(road_identifier))

6
scripts/road/road.gd

@ -110,7 +110,7 @@ func get_force_penalty(index:int):
return force_penalties[index].rotated(get_rotation().normalized(), get_rotation().length())
else:
return force_penalties[index]
return Vector3(0,0,0)
@ -118,9 +118,9 @@ func get_path_penalty(index:int):
if index >= 0:
if path_penalties.size() < (index + 1):
return get_path_penalty(index - 1)
return path_penalties[index]
return 0.0

Loading…
Cancel
Save