Updating character location based on occupied tile
Deploy Promiscuity Auth API / deploy (push) Successful in 45s
Deploy Promiscuity Character API / deploy (push) Successful in 57s
Deploy Promiscuity Locations API / deploy (push) Successful in 44s
k8s smoke test / test (push) Successful in 7s

This commit is contained in:
2026-03-13 21:34:59 -05:00
parent 6ca0f306bb
commit e79f473ce4
8 changed files with 122 additions and 14 deletions
+13 -3
View File
@@ -11,9 +11,19 @@ func create_character(character_name: String) -> Dictionary:
})
return await _request(HTTPClient.METHOD_POST, CHARACTER_API_URL, payload)
func delete_character(character_id: String) -> Dictionary:
var url := "%s/%s" % [CHARACTER_API_URL, character_id]
return await _request(HTTPClient.METHOD_DELETE, url)
func delete_character(character_id: String) -> Dictionary:
var url := "%s/%s" % [CHARACTER_API_URL, character_id]
return await _request(HTTPClient.METHOD_DELETE, url)
func update_character_coord(character_id: String, coord: Vector2i) -> Dictionary:
var url := "%s/%s/coord" % [CHARACTER_API_URL, character_id]
var payload := JSON.stringify({
"coord": {
"x": coord.x,
"y": coord.y
}
})
return await _request(HTTPClient.METHOD_PUT, url, payload)
func _request(method: int, url: String, body: String = "") -> Dictionary:
var request := HTTPRequest.new()
+6
View File
@@ -14,3 +14,9 @@ func get_coord() -> Vector2:
float(coord.get("x", 0)),
float(coord.get("y", 0))
)
func set_coord(coord: Vector2i) -> void:
character["coord"] = {
"x": coord.x,
"y": coord.y
}