Public repository for MUR pre alpha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
802 B

  1. extends Spatial
  2. class_name GameServer
  3. const SERVER_ADDR = "mur-server.lh8.de"
  4. const API_ADDR = "https://" + SERVER_ADDR + "/"
  5. const HEADERS = ["Content-Type: application/json"]
  6. const SSL = false
  7. var server_addr:String = SERVER_ADDR
  8. var api_addr:String = API_ADDR
  9. var headers:Array = HEADERS
  10. var ssl:bool = SSL
  11. func http():
  12. var game_server_requests = GameServerRequests.new()
  13. add_child(game_server_requests)
  14. return game_server_requests
  15. func get_server_addr():
  16. return server_addr
  17. func set_server_addr(new_server_addr:String):
  18. server_addr = new_server_addr
  19. func get_api_addr():
  20. return api_addr
  21. func set_api_addr(new_api_addr:String):
  22. if not new_api_addr.ends_with("/"):
  23. new_api_addr += "/"
  24. api_addr = new_api_addr
  25. func get_headers():
  26. return headers
  27. func get_ssl():
  28. return ssl