Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

프론트 네이밍 컨벤션 전체 수정 #172

Merged
merged 3 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
extends Node

const inventory_scene = preload("res://scenes/inventory/inventory.tscn");
const inventory_scene = preload("res://scenes/inventory/inventory.tscn")

func open_inventory(data: Dictionary):
var inventory_instance := inventory_scene.instantiate()
inventory_instance.data = data;
inventory_instance.data = data

get_tree().root.add_child(inventory_instance)
Original file line number Diff line number Diff line change
@@ -1,42 +1,5 @@
extends Node

#var villages_json_string := """{
#"villages": [
#{
#"id": 1,
#"name": "평범한 도시 1",
#"width": 3,
#"height": 11,
#"worldX": 5,
#"worldY": 1,
#"houses": [
#{
#"x": 1,
#"y": 1,
#"owner": "0x53103C2D7875D2f5f02AeC3075155e268a6e3A94"
#}
#]
#},
#{
#"id": 2,
#"name": "외로운 섬",
#"width": 7,
#"height": 13,
#"worldX": -2,
#"worldY": 7,
#"houses": []
#},
#{
#"id": 3,
#"name": "정글",
#"width": 3,
#"height": 5,
#"worldX": 1,
#"worldY": -3,
#"houses": []
#}
#]
#}"""
var villages: Array
var selected_village_index := 0
var user_state: Dictionary
Expand All @@ -56,7 +19,7 @@ var selected_field_index := 0
var selected_item_index := 0
var selected_item_name : String

var selected_recipe_index := 0
var selected_recipe_index := 1
var selected_ingredients : Array
var selected_tools : Array

Expand All @@ -66,14 +29,6 @@ var installed_tool_info : Array

var block_index : Dictionary

#func _ready():
#var json = JSON.new()
#var error = json.parse(villages_json_string)
#if error != OK:
#print(error)
#else:
#villages = json.data.villages

func set_villages(query_data: Dictionary):
villages = query_data.data.villages

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends Node;
extends Node

var signer
var signer_address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
extends GQLClient

func _ready():
print("client 2 ready")
#set_endpoint(false, "1.230.253.103", 38080, "/graphql")


set_endpoint(false, "localhost", 38080, "/graphql/explorer")


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
extends GQLClient

func _ready():
print("client ready")
#set_endpoint(false, "1.230.253.103", 38080, "/graphql")

set_endpoint(false, "localhost", 38080, "/graphql")

Expand Down
2 changes: 1 addition & 1 deletion frontend/Savor-22b/gql/query.gd
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ var calculate_relocation_cost_query = SvrGqlClient.query(
"villageId": "Int!",
"relocationVillageId": "Int!",
},
calculate_relocation_cost_query_template)
calculate_relocation_cost_query_template)
15 changes: 7 additions & 8 deletions frontend/Savor-22b/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ config_version=5
[application]

config/name="Savor-22b"
run/main_scene="res://scenes/intro.tscn"
run/main_scene="res://scenes/intro/intro.tscn"
config/features=PackedStringArray("4.2", "C#", "GL Compatibility")
boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 1)
config/icon="res://icon.svg"

[autoload]

GlobalSigner="*res://scripts/sign/Signer.gd"
SvrGqlClient="*res://gql/svr_gql_client.gd"
SvrGqlClient2="*res://gql/svr_gql_client_2.gd"
SceneContext="*res://scripts/global/scene_context.gd"
GlobalInventory="*res://scripts/global/inventory.gd"
Intro="*res://scripts/scenes/intro.gd"
TestPanel="*res://scenes/testpanel/test_panel.gd"
GlobalSigner="*res://global/signer.gd"
SvrGqlClient="*res://global/svr_gql_client.gd"
SvrExplorerGqlClient="*res://global/svr_explorer_gql_client.gd"
SceneContext="*res://global/scene_context.gd"
GlobalInventory="*res://global/inventory.gd"
Intro="*res://scenes/intro/intro.gd"

[display]

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extends LineEdit


# Called when the node enters the scene tree for the first time.
func _ready():
self.text = str(GlobalSigner.signer_address)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://co4t4p5pawylr"]

[ext_resource type="Script" path="res://Asset.gd" id="1_dxu6y"]
[ext_resource type="Script" path="res://scenes/asset.gd" id="1_2uqhq"]

[node name="Asset" type="ColorRect"]
custom_minimum_size = Vector2(550, 77)
offset_right = 400.0
offset_bottom = 100.0
color = Color(0.490196, 1, 1, 0)
script = ExtResource("1_dxu6y")
script = ExtResource("1_2uqhq")

[node name="Text" type="Label" parent="."]
layout_mode = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dmgv25t8i3882"]

[ext_resource type="Script" path="res://ui/confirm_popup.gd" id="1_xg6hf"]
[ext_resource type="Script" path="res://scenes/common/prefabs/confirm_popup.gd" id="1_xg6hf"]

[node name="NoticePopup" type="ColorRect"]
offset_left = 5.0
Expand Down
19 changes: 19 additions & 0 deletions frontend/Savor-22b/scenes/common/prefabs/done_notice_popup.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extends ColorRect

@onready var info_text = $VBoxContainer/Label

var format_string = "%s %s"
var seed_name: String

func _ready():
if info_text == null:
return

info_text.text = format_string % [seed_name, "(이)가 수확되었습니다."]

func set_seed_name(name: String):
seed_name = name


func _on_button_down():
queue_free()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://b0q2f8i3thy08"]

[ext_resource type="Script" path="res://ui/done_notice_popup.gd" id="1_4j1h2"]
[ext_resource type="Script" path="res://scenes/common/prefabs/done_notice_popup.gd" id="1_4j1h2"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ol5a4"]
bg_color = Color(0, 0, 0, 1)
Expand Down Expand Up @@ -47,4 +47,4 @@ text = " 확인 "
layout_mode = 2
theme_override_constants/margin_top = 30

[connection signal="button_down" from="VBoxContainer/Button" to="." method="_on_button_button_down"]
[connection signal="button_down" from="VBoxContainer/Button" to="." method="_on_button_down"]
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
extends ColorRect



func _on_button_pressed():
queue_free()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://fdq3w641k4h1"]

[ext_resource type="Script" path="res://ui/notice_popup.gd" id="1_ftdb6"]
[ext_resource type="Script" path="res://scenes/common/prefabs/notice_popup.gd" id="1_ftdb6"]

[node name="NoticePopup" type="ColorRect"]
offset_left = 5.0
Expand Down
Loading
Loading