Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

SVR-230: 마을 집 위치 선택 화면 #116

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 2 additions & 0 deletions frontend/Savor-22b-godot/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
3 changes: 3 additions & 0 deletions frontend/Savor-22b-godot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
config.json
15 changes: 15 additions & 0 deletions frontend/Savor-22b-godot/Saver-22b-godot.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Godot.NET.Sdk/4.2.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
<RootNamespace>Saver22bgodot</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL.Client" Version="6.0.2" />
<PackageReference Include="GraphQL.Client.Serializer.Newtonsoft" Version="6.0.2" />
<PackageReference Include="Libplanet.Crypto" Version="3.9.2" />
</ItemGroup>
</Project>
19 changes: 19 additions & 0 deletions frontend/Savor-22b-godot/Saver-22b-godot.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Saver-22b-godot", "Saver-22b-godot.csproj", "{FF5B7943-8988-4850-8752-AEBDBCFD113F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
ExportDebug|Any CPU = ExportDebug|Any CPU
ExportRelease|Any CPU = ExportRelease|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FF5B7943-8988-4850-8752-AEBDBCFD113F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF5B7943-8988-4850-8752-AEBDBCFD113F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF5B7943-8988-4850-8752-AEBDBCFD113F}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{FF5B7943-8988-4850-8752-AEBDBCFD113F}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{FF5B7943-8988-4850-8752-AEBDBCFD113F}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{FF5B7943-8988-4850-8752-AEBDBCFD113F}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
EndGlobalSection
EndGlobal
25 changes: 25 additions & 0 deletions frontend/Savor-22b-godot/gql/query.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var get_villages_query = "query {
villages {
id
name
width
height
worldX
worldY
}
}"

var place_house_query_format = "query {
createAction_PlaceUserHouse(
publicKey: {},
villageId: {},
x: {},
y: {}
)
}"

var stage_tx_query_format = "mutation {
stageTransaction(
unsignedTransaction:\"%s\",
signature:\"%s\")
}"
10 changes: 10 additions & 0 deletions frontend/Savor-22b-godot/gql/svr_gql_client.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends GQLClient

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

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

func raw_mutation(query:String):
return GQLQueryExecuter.new(endpoint, use_ssl, Mutation.new(query))
1 change: 1 addition & 0 deletions frontend/Savor-22b-godot/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions frontend/Savor-22b-godot/icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dnj5868p8yh07"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
45 changes: 45 additions & 0 deletions frontend/Savor-22b-godot/project.godot
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters

config_version=5

[application]

config/name="Savor-22b-godot"
run/main_scene="res://scenes/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"
SceneContext="*res://scripts/global/scene_context.gd"
GlobalInventory="*res://scripts/global/inventory.gd"

[display]

window/size/viewport_width=1920
window/size/viewport_height=1080
window/stretch/mode="canvas_items"

[dotnet]

project/assembly_name="Saver-22b-godot"

[file_customization]

folder_colors={
"res://scenes/": "yellow"
}

[rendering]

renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
88 changes: 88 additions & 0 deletions frontend/Savor-22b-godot/scenes/farm.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[gd_scene load_steps=2 format=3 uid="uid://vy5r0acj44oh"]

[ext_resource type="Script" path="res://scripts/scenes/farm.gd" id="1_q2tum"]

[node name="Farm" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_q2tum")

[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 0

[node name="ColorRect" type="ColorRect" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.7
color = Color(0, 0, 0, 1)

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer/ColorRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="GridContainer" type="GridContainer" parent="MarginContainer/HBoxContainer/ColorRect/MarginContainer"]
layout_mode = 2
theme_override_constants/h_separation = 10
theme_override_constants/v_separation = 10
columns = 2

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.3

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer/MarginContainer"]
layout_mode = 2

[node name="HomeButton" type="Button" parent="MarginContainer/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 0
theme_override_font_sizes/font_size = 50
text = "Home"

[node name="InventoryButton" type="Button" parent="MarginContainer/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 0
theme_override_font_sizes/font_size = 50
text = "Inventory"
21 changes: 21 additions & 0 deletions frontend/Savor-22b-godot/scenes/install_kitchen_equipment.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[gd_scene format=3 uid="uid://c7g8if1jb33im"]

[node name="InstallKitchenEquipment" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Background" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -1.0
offset_right = -1120.0
offset_bottom = -581.0
grow_horizontal = 2
grow_vertical = 2
color = Color(1, 0.623529, 0, 1)
100 changes: 100 additions & 0 deletions frontend/Savor-22b-godot/scenes/intro.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
[gd_scene load_steps=2 format=3 uid="uid://cg773cnsx4rb0"]

[ext_resource type="Script" path="res://scripts/scenes/intro.gd" id="1_0m54y"]

[node name="Intro" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_0m54y")

[node name="Background" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -1.0
offset_bottom = -1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Title" type="ColorRect" parent="."]
custom_minimum_size = Vector2(800, 250)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -400.0
offset_top = -240.0
offset_right = 400.0
offset_bottom = 10.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)

[node name="Label" type="Label" parent="Title"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 70
text = "SAVOR 22B"
horizontal_alignment = 1
vertical_alignment = 1

[node name="QuitButtonContainer" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 100.0
offset_top = -280.0
offset_right = 600.0
offset_bottom = -160.0
grow_vertical = 0
color = Color(0, 0, 0, 1)

[node name="Button" type="Button" parent="QuitButtonContainer"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 70
text = "Quit"

[node name="PlayButtonContainer" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -600.0
offset_top = -280.0
offset_right = -100.0
offset_bottom = -160.0
grow_horizontal = 0
grow_vertical = 0
color = Color(0, 0, 0, 1)

[node name="Button" type="Button" parent="PlayButtonContainer"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 70
text = "Play"

[connection signal="button_down" from="QuitButtonContainer/Button" to="." method="_on_quit_button_button_down"]
[connection signal="button_down" from="PlayButtonContainer/Button" to="." method="_on_play_button_button_down"]
Loading
Loading