mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-21 23:34:21 +00:00
Use the correct url for scores
This commit is contained in:
parent
0768c2d525
commit
9c41aca186
3 changed files with 8 additions and 14 deletions
|
@ -20,7 +20,7 @@ func _ready() -> void:
|
||||||
func _upload_score():
|
func _upload_score():
|
||||||
Singletons.should_upload = false
|
Singletons.should_upload = false
|
||||||
|
|
||||||
var url = "https://arcade.steffo.eu/score/?board=test&player=%s" % Singletons.username
|
var url = "https://arcade.steffo.eu/score/?board=ld52&player=%s" % Singletons.username
|
||||||
|
|
||||||
var httpreq = HTTPRequest.new()
|
var httpreq = HTTPRequest.new()
|
||||||
add_child(httpreq)
|
add_child(httpreq)
|
||||||
|
@ -36,14 +36,14 @@ func _upload_score():
|
||||||
httpreq.request(url, [
|
httpreq.request(url, [
|
||||||
"Content-Type: application/json",
|
"Content-Type: application/json",
|
||||||
"Accept: application/json",
|
"Accept: application/json",
|
||||||
"Authorization: Bearer hahaha-ronaldinho-soccer"
|
"Authorization: Bearer pineapples-everywhere"
|
||||||
], true, HTTPClient.METHOD_PUT, str(Singletons.time))
|
], true, HTTPClient.METHOD_PUT, str(Singletons.time))
|
||||||
|
|
||||||
_fetch_scores(true)
|
_fetch_scores(true)
|
||||||
|
|
||||||
|
|
||||||
func _fetch_scores(open_after: bool = false):
|
func _fetch_scores(open_after: bool = false):
|
||||||
const url = "https://arcade.steffo.eu/board/?board=test&offset=0&size=10"
|
const url = "https://arcade.steffo.eu/board/?board=ld52&offset=0&size=50"
|
||||||
var httpreq = HTTPRequest.new()
|
var httpreq = HTTPRequest.new()
|
||||||
add_child(httpreq)
|
add_child(httpreq)
|
||||||
httpreq.connect("request_completed", func(result, response_code, headers, body):
|
httpreq.connect("request_completed", func(result, response_code, headers, body):
|
||||||
|
|
|
@ -21,7 +21,6 @@ grow_vertical = 2
|
||||||
script = ExtResource("1_rc765")
|
script = ExtResource("1_rc765")
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
@ -30,7 +29,6 @@ grow_vertical = 2
|
||||||
color = Color(0, 0, 0, 0.635294)
|
color = Color(0, 0, 0, 0.635294)
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="."]
|
[node name="Panel" type="Panel" parent="."]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -45,7 +43,6 @@ grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_uie3v")
|
theme_override_styles/panel = SubResource("StyleBoxFlat_uie3v")
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
@ -53,30 +50,26 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="Authors" type="Label" parent="Panel/VBoxContainer"]
|
[node name="Authors" type="Label" parent="Panel/VBoxContainer"]
|
||||||
layout_mode = 2
|
|
||||||
text = "Scores"
|
text = "Scores"
|
||||||
label_settings = SubResource("LabelSettings_xmwgs")
|
label_settings = SubResource("LabelSettings_xmwgs")
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="Panel/VBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="Panel/VBoxContainer"]
|
||||||
layout_mode = 2
|
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="ScoresVBox" type="VBoxContainer" parent="Panel/VBoxContainer/ScrollContainer"]
|
[node name="ScoresVBox" type="VBoxContainer" parent="Panel/VBoxContainer/ScrollContainer"]
|
||||||
layout_mode = 2
|
offset_right = 120.0
|
||||||
|
offset_bottom = 26.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
|
|
||||||
[node name="score" parent="Panel/VBoxContainer/ScrollContainer/ScoresVBox" instance=ExtResource("1_a00v5")]
|
[node name="score" parent="Panel/VBoxContainer/ScrollContainer/ScoresVBox" instance=ExtResource("1_a00v5")]
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/VBoxContainer"]
|
[node name="MarginContainer" type="MarginContainer" parent="Panel/VBoxContainer"]
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/margin_bottom = 2
|
theme_override_constants/margin_bottom = 2
|
||||||
|
|
||||||
[node name="closebtn" type="Button" parent="Panel/VBoxContainer/MarginContainer"]
|
[node name="closebtn" type="Button" parent="Panel/VBoxContainer/MarginContainer"]
|
||||||
custom_minimum_size = Vector2(52, 2.08165e-12)
|
custom_minimum_size = Vector2(52, 2.08165e-12)
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
theme_override_font_sizes/font_size = 0
|
theme_override_font_sizes/font_size = 0
|
||||||
|
|
|
@ -62,11 +62,12 @@ _global_script_class_icons={
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="LD52"
|
config/name="Pineapple SurfA bunnyhopping, retro-looking, first person seed shooter"
|
||||||
|
config/description="A bunnyhopping, retro-looking, first person seed shooters"
|
||||||
run/main_scene="res://base/BaseScene.tscn"
|
run/main_scene="res://base/BaseScene.tscn"
|
||||||
config/features=PackedStringArray("4.0", "GL Compatibility")
|
config/features=PackedStringArray("4.0", "GL Compatibility")
|
||||||
boot_splash/bg_color=Color(0.231373, 0.490196, 0.309804, 1)
|
boot_splash/bg_color=Color(0.231373, 0.490196, 0.309804, 1)
|
||||||
config/icon="res://assets/icon.svg"
|
config/icon="res://assets/pineglasses.png"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue