initial shit
4
.editorconfig
Normal file
@@ -0,0 +1,4 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Normalize EOL for all files that Git considers text files.
|
||||
* text=auto eol=lf
|
||||
1
Assets/ModelProjects/I3PositionSwitch.bbmodel
Normal file
1
Assets/ModelProjects/IButton.bbmodel
Normal file
1
Assets/ModelProjects/ISwitch.bbmodel
Normal file
1
Assets/ModelProjects/MTerrain.bbmodel
Normal file
2
Assets/Models/I3PositionSwitchBase.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl none
|
||||
3173
Assets/Models/I3PositionSwitchBase.obj
Normal file
25
Assets/Models/I3PositionSwitchBase.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://do5kbmfabhhvr"
|
||||
path="res://.godot/imported/I3PositionSwitchBase.obj-dc07a67a65f6e19692eeeee0a58d3195.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/I3PositionSwitchBase.obj-dc07a67a65f6e19692eeeee0a58d3195.mesh"]
|
||||
|
||||
source_file="res://Assets/Models/I3PositionSwitchBase.obj"
|
||||
dest_files=["res://.godot/imported/I3PositionSwitchBase.obj-dc07a67a65f6e19692eeeee0a58d3195.mesh", "res://.godot/imported/I3PositionSwitchBase.obj-dc07a67a65f6e19692eeeee0a58d3195.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
2
Assets/Models/I3PositionSwitchCap.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl none
|
||||
1219
Assets/Models/I3PositionSwitchCap.obj
Normal file
25
Assets/Models/I3PositionSwitchCap.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://dkhw5hal4yx0b"
|
||||
path="res://.godot/imported/I3PositionSwitchCap.obj-119996fee664ddcafaea75050801fa37.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/I3PositionSwitchCap.obj-119996fee664ddcafaea75050801fa37.mesh"]
|
||||
|
||||
source_file="res://Assets/Models/I3PositionSwitchCap.obj"
|
||||
dest_files=["res://.godot/imported/I3PositionSwitchCap.obj-119996fee664ddcafaea75050801fa37.mesh", "res://.godot/imported/I3PositionSwitchCap.obj-119996fee664ddcafaea75050801fa37.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
2
Assets/Models/IButtonBase.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl none
|
||||
1849
Assets/Models/IButtonBase.obj
Normal file
25
Assets/Models/IButtonBase.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://bn0u7x5cdhqeq"
|
||||
path="res://.godot/imported/IButtonBase.obj-88e67638a4fbc9ebb607866e7e5891f3.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/IButtonBase.obj-88e67638a4fbc9ebb607866e7e5891f3.mesh"]
|
||||
|
||||
source_file="res://Assets/Models/IButtonBase.obj"
|
||||
dest_files=["res://.godot/imported/IButtonBase.obj-88e67638a4fbc9ebb607866e7e5891f3.mesh", "res://.godot/imported/IButtonBase.obj-88e67638a4fbc9ebb607866e7e5891f3.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
2
Assets/Models/IButtonCap.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl none
|
||||
1113
Assets/Models/IButtonCap.obj
Normal file
25
Assets/Models/IButtonCap.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://c14lv8v6bduhu"
|
||||
path="res://.godot/imported/IButtonCap.obj-32c39fc93f48cace929c066df68adb88.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/IButtonCap.obj-32c39fc93f48cace929c066df68adb88.mesh"]
|
||||
|
||||
source_file="res://Assets/Models/IButtonCap.obj"
|
||||
dest_files=["res://.godot/imported/IButtonCap.obj-32c39fc93f48cace929c066df68adb88.mesh", "res://.godot/imported/IButtonCap.obj-32c39fc93f48cace929c066df68adb88.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
2
Assets/Models/ISwitchBase.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl none
|
||||
3869
Assets/Models/ISwitchBase.obj
Normal file
25
Assets/Models/ISwitchBase.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://b5ok22cbta76k"
|
||||
path="res://.godot/imported/ISwitchBase.obj-1855ae362a9328a76eb4c6ac41acbc39.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/ISwitchBase.obj-1855ae362a9328a76eb4c6ac41acbc39.mesh"]
|
||||
|
||||
source_file="res://Assets/Models/ISwitchBase.obj"
|
||||
dest_files=["res://.godot/imported/ISwitchBase.obj-1855ae362a9328a76eb4c6ac41acbc39.mesh", "res://.godot/imported/ISwitchBase.obj-1855ae362a9328a76eb4c6ac41acbc39.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
2
Assets/Models/ISwitchCap.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl none
|
||||
26393
Assets/Models/ISwitchCap.obj
Normal file
25
Assets/Models/ISwitchCap.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://bdjr38o7iuajh"
|
||||
path="res://.godot/imported/ISwitchCap.obj-3a4e0db86ed9254e5ad5fee949304494.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/ISwitchCap.obj-3a4e0db86ed9254e5ad5fee949304494.mesh"]
|
||||
|
||||
source_file="res://Assets/Models/ISwitchCap.obj"
|
||||
dest_files=["res://.godot/imported/ISwitchCap.obj-3a4e0db86ed9254e5ad5fee949304494.mesh", "res://.godot/imported/ISwitchCap.obj-3a4e0db86ed9254e5ad5fee949304494.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
BIN
Assets/font.otf
Normal file
36
Assets/font.otf.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://drt3ca0d33tq7"
|
||||
path="res://.godot/imported/font.otf-3a10bc3f30cfc449c4ac1c41fc25f575.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/font.otf"
|
||||
dest_files=["res://.godot/imported/font.otf-3a10bc3f30cfc449c4ac1c41fc25f575.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
Assets/gauge.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
42
Assets/gauge.png.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d3cn3q6h2uyyw"
|
||||
path.s3tc="res://.godot/imported/gauge.png-70a3dd00e36dfbe372ec39b9f20cd6b7.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/gauge.png-70a3dd00e36dfbe372ec39b9f20cd6b7.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/gauge.png"
|
||||
dest_files=["res://.godot/imported/gauge.png-70a3dd00e36dfbe372ec39b9f20cd6b7.s3tc.ctex", "res://.godot/imported/gauge.png-70a3dd00e36dfbe372ec39b9f20cd6b7.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
1
Assets/gauge.svg
Normal file
|
After Width: | Height: | Size: 31 KiB |
45
Assets/gauge.svg.import
Normal file
@@ -0,0 +1,45 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://g6tb0l6bf0v"
|
||||
path.s3tc="res://.godot/imported/gauge.svg-c26e0b33e3c7868f555efca13d7251c0.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/gauge.svg-c26e0b33e3c7868f555efca13d7251c0.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/gauge.svg"
|
||||
dest_files=["res://.godot/imported/gauge.svg-c26e0b33e3c7868f555efca13d7251c0.s3tc.ctex", "res://.godot/imported/gauge.svg-c26e0b33e3c7868f555efca13d7251c0.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
BIN
Assets/gerald.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
40
Assets/gerald.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://7tio5gdc4oon"
|
||||
path="res://.godot/imported/gerald.png-232a8568be308406ffe5125bf0275884.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/gerald.png"
|
||||
dest_files=["res://.godot/imported/gerald.png-232a8568be308406ffe5125bf0275884.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Assets/grass.jpg
Normal file
|
After Width: | Height: | Size: 78 KiB |
42
Assets/grass.jpg.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cisnwwf0h8n20"
|
||||
path.s3tc="res://.godot/imported/grass.jpg-a807c661017f5cb8ef8de151216c8350.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/grass.jpg-a807c661017f5cb8ef8de151216c8350.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/grass.jpg"
|
||||
dest_files=["res://.godot/imported/grass.jpg-a807c661017f5cb8ef8de151216c8350.s3tc.ctex", "res://.godot/imported/grass.jpg-a807c661017f5cb8ef8de151216c8350.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
BIN
Assets/switch.mp3
Normal file
19
Assets/switch.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://3u4ofv7lf7oq"
|
||||
path="res://.godot/imported/switch.mp3-82a07c777423ba76b8f384e745a419cd.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/switch.mp3"
|
||||
dest_files=["res://.godot/imported/switch.mp3-82a07c777423ba76b8f384e745a419cd.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
4
Assets/terrain/MTerrain.mtl
Normal file
@@ -0,0 +1,4 @@
|
||||
# Made in Blockbench 5.1.4
|
||||
newmtl m_529abcca-f46d-fc9c-fb7e-173209d07689
|
||||
map_Kd MTerrain.png
|
||||
newmtl none
|
||||
452126
Assets/terrain/MTerrain.obj
Normal file
25
Assets/terrain/MTerrain.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://bsy3nuebmvinh"
|
||||
path="res://.godot/imported/MTerrain.obj-f52e7d1fdeef034b6cbff303f37ce5fb.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/MTerrain.obj-f52e7d1fdeef034b6cbff303f37ce5fb.mesh"]
|
||||
|
||||
source_file="res://Assets/terrain/MTerrain.obj"
|
||||
dest_files=["res://.godot/imported/MTerrain.obj-f52e7d1fdeef034b6cbff303f37ce5fb.mesh", "res://.godot/imported/MTerrain.obj-f52e7d1fdeef034b6cbff303f37ce5fb.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=true
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
BIN
Assets/terrain/MTerrain.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
42
Assets/terrain/MTerrain.png.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://di2at0o6mjkib"
|
||||
path.s3tc="res://.godot/imported/MTerrain.png-03c0035fbd71bf035bcdd6d2ce62a440.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/MTerrain.png-03c0035fbd71bf035bcdd6d2ce62a440.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/terrain/MTerrain.png"
|
||||
dest_files=["res://.godot/imported/MTerrain.png-03c0035fbd71bf035bcdd6d2ce62a440.s3tc.ctex", "res://.godot/imported/MTerrain.png-03c0035fbd71bf035bcdd6d2ce62a440.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
BIN
Assets/textures/Dirt.png
Normal file
|
After Width: | Height: | Size: 414 B |
40
Assets/textures/Dirt.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djybyd6myepyf"
|
||||
path="res://.godot/imported/Dirt.png-9b993ad7a25b82468a9ee800c286136e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/Dirt.png"
|
||||
dest_files=["res://.godot/imported/Dirt.png-9b993ad7a25b82468a9ee800c286136e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Assets/textures/Grass.png
Normal file
|
After Width: | Height: | Size: 420 B |
42
Assets/textures/Grass.png.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b7nvmswy13r2c"
|
||||
path.s3tc="res://.godot/imported/Grass.png-07084bfc0f345a78e269ef1ec09ee7db.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/Grass.png-07084bfc0f345a78e269ef1ec09ee7db.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/Grass.png"
|
||||
dest_files=["res://.godot/imported/Grass.png-07084bfc0f345a78e269ef1ec09ee7db.s3tc.ctex", "res://.godot/imported/Grass.png-07084bfc0f345a78e269ef1ec09ee7db.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=1
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
BIN
Assets/textures/Stone.png
Normal file
|
After Width: | Height: | Size: 280 B |
42
Assets/textures/Stone.png.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d0aqp2i4stybu"
|
||||
path.s3tc="res://.godot/imported/Stone.png-cefda0a0cfe8c67ae5ef9efc8a2b1e26.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/Stone.png-cefda0a0cfe8c67ae5ef9efc8a2b1e26.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/Stone.png"
|
||||
dest_files=["res://.godot/imported/Stone.png-cefda0a0cfe8c67ae5ef9efc8a2b1e26.s3tc.ctex", "res://.godot/imported/Stone.png-cefda0a0cfe8c67ae5ef9efc8a2b1e26.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=1
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
BIN
Assets/textures/hammer.png
Normal file
|
After Width: | Height: | Size: 367 B |
40
Assets/textures/hammer.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bywcem8skp767"
|
||||
path="res://.godot/imported/hammer.png-a6ce75ea254ee97c602e895e5c42fee5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/hammer.png"
|
||||
dest_files=["res://.godot/imported/hammer.png-a6ce75ea254ee97c602e895e5c42fee5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Assets/textures/interact.png
Normal file
|
After Width: | Height: | Size: 224 B |
40
Assets/textures/interact.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c0ypn10bhavvb"
|
||||
path="res://.godot/imported/interact.png-7a858c4952df94b8ffed520d7dd0c335.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/interact.png"
|
||||
dest_files=["res://.godot/imported/interact.png-7a858c4952df94b8ffed520d7dd0c335.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Assets/textures/marble_cliff_06_diff_4k.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
42
Assets/textures/marble_cliff_06_diff_4k.jpg.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cjt4s8ybt0vlt"
|
||||
path.s3tc="res://.godot/imported/marble_cliff_06_diff_4k.jpg-82db6fb112b8dd9e8a9f5cd00d6ae989.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/marble_cliff_06_diff_4k.jpg-82db6fb112b8dd9e8a9f5cd00d6ae989.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/marble_cliff_06_diff_4k.jpg"
|
||||
dest_files=["res://.godot/imported/marble_cliff_06_diff_4k.jpg-82db6fb112b8dd9e8a9f5cd00d6ae989.s3tc.ctex", "res://.godot/imported/marble_cliff_06_diff_4k.jpg-82db6fb112b8dd9e8a9f5cd00d6ae989.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
BIN
Assets/textures/rocky_terrain_02_diff_4k.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
42
Assets/textures/rocky_terrain_02_diff_4k.jpg.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cig2cl2tw2brx"
|
||||
path.s3tc="res://.godot/imported/rocky_terrain_02_diff_4k.jpg-895ed9624c297176228c598fd5d6e5dc.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/rocky_terrain_02_diff_4k.jpg-895ed9624c297176228c598fd5d6e5dc.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/textures/rocky_terrain_02_diff_4k.jpg"
|
||||
dest_files=["res://.godot/imported/rocky_terrain_02_diff_4k.jpg-895ed9624c297176228c598fd5d6e5dc.s3tc.ctex", "res://.godot/imported/rocky_terrain_02_diff_4k.jpg-895ed9624c297176228c598fd5d6e5dc.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
5
EventManagers/CommandBus.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends Node
|
||||
|
||||
signal sendChatMessage(message:String)
|
||||
signal sendChatMessageAs(user:String,message:String)
|
||||
signal castError(err:Dictionary)
|
||||
1
EventManagers/CommandBus.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://csa2l3h2dohp1
|
||||
3
EventManagers/InventoryBus.gd
Normal file
@@ -0,0 +1,3 @@
|
||||
extends Node
|
||||
signal givePlayerItem(id:String)
|
||||
signal removeFromSlot(slot:int)
|
||||
1
EventManagers/InventoryBus.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://1esfwguw47p3
|
||||
10
GameShit/ItemHandlers/base/air.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="ItemData" format=3 uid="uid://cnu2f5ec7qb48"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjb16s8q73wkx" path="res://GameShit/PlayerController/Hotbar/ItemData.gd" id="1_udtmv"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_udtmv")
|
||||
Name = "air"
|
||||
ID = "base:air"
|
||||
description = "air"
|
||||
metadata/_custom_type_script = "uid://cjb16s8q73wkx"
|
||||
12
GameShit/ItemHandlers/base/hammer.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="ItemData" format=3 uid="uid://bw6nhoeremely"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjb16s8q73wkx" path="res://GameShit/PlayerController/Hotbar/ItemData.gd" id="1_sp53r"]
|
||||
[ext_resource type="Texture2D" uid="uid://bywcem8skp767" path="res://Assets/textures/hammer.png" id="2_hsm3r"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_sp53r")
|
||||
Name = "Hammer"
|
||||
ID = "base:hammer"
|
||||
description = "A hammer to destroy blocks"
|
||||
texture = ExtResource("2_hsm3r")
|
||||
metadata/_custom_type_script = "uid://cjb16s8q73wkx"
|
||||
12
GameShit/ItemHandlers/base/interact.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="ItemData" format=3 uid="uid://cwv45kgf8soiw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjb16s8q73wkx" path="res://GameShit/PlayerController/Hotbar/ItemData.gd" id="1_e0ofu"]
|
||||
[ext_resource type="Texture2D" uid="uid://c0ypn10bhavvb" path="res://Assets/textures/interact.png" id="2_121r2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_e0ofu")
|
||||
Name = "Interact"
|
||||
ID = "base:interact"
|
||||
description = "a blank item for holding a slot for interacting"
|
||||
texture = ExtResource("2_121r2")
|
||||
metadata/_custom_type_script = "uid://cjb16s8q73wkx"
|
||||
12
GameShit/ItemHandlers/base/test_machine.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="ItemData" format=3 uid="uid://c6sayeu6ky2ye"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjb16s8q73wkx" path="res://GameShit/PlayerController/Hotbar/ItemData.gd" id="1_ifkot"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0aqp2i4stybu" path="res://Assets/textures/Stone.png" id="2_e2kbk"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ifkot")
|
||||
Name = "Test Machine"
|
||||
ID = "base:testMachine"
|
||||
description = "its uhh, its a test machine"
|
||||
texture = ExtResource("2_e2kbk")
|
||||
metadata/_custom_type_script = "uid://cjb16s8q73wkx"
|
||||
31
GameShit/MainGame/MainGame.gd
Normal file
@@ -0,0 +1,31 @@
|
||||
extends Node3D
|
||||
|
||||
|
||||
## define all of the game variables, ill replace this with a settings file later
|
||||
## ignore duplicate keys, idrc atp
|
||||
## this game is jus a mess of spaghetti anyhow
|
||||
var selectedBlockID : String = "base:testMachine"
|
||||
var selectedSlot = 0
|
||||
var currentHeldItemID : String = "base:air"
|
||||
var canPlaceBlock : bool = false
|
||||
var username = "Xtimhedi"
|
||||
var loadedLanguage = "en-US"
|
||||
var isInputLocked = false
|
||||
|
||||
signal hideChatbox
|
||||
|
||||
|
||||
|
||||
|
||||
func getIfIDExists(ID:String) -> bool:
|
||||
var segments = ID.split(":")
|
||||
return ResourceLoader.exists("res://WorldObjects/{namespace}/{id}.tscn".format({"namespace": segments[0], "id": segments[1]}))
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if currentHeldItemID != "base:air" and getIfIDExists(currentHeldItemID):
|
||||
canPlaceBlock = true
|
||||
selectedBlockID = currentHeldItemID
|
||||
else:
|
||||
canPlaceBlock = false
|
||||
selectedBlockID = "base:air"
|
||||
1
GameShit/MainGame/MainGame.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://eudofx4u58h0
|
||||
56
GameShit/MainGame/MainGame.gdshader
Normal file
@@ -0,0 +1,56 @@
|
||||
shader_type spatial;
|
||||
|
||||
// Texture Inputs
|
||||
uniform sampler2D flat_albedo : source_color, filter_linear_mipmap_anisotropic; // e.g., Grass
|
||||
uniform sampler2D flat_normal : hint_normal, filter_linear_mipmap_anisotropic;
|
||||
uniform sampler2D steep_albedo : source_color, filter_linear_mipmap_anisotropic; // e.g., Cliff/Rock
|
||||
uniform sampler2D steep_normal : hint_normal, filter_linear_mipmap_anisotropic;
|
||||
|
||||
// Shader Control Knobs
|
||||
uniform float texture_scale = 0.05;
|
||||
uniform float slope_threshold : hint_range(0.0, 1.0) = 0.7;
|
||||
uniform float slope_blend : hint_range(0.01, 0.5) = 0.1;
|
||||
|
||||
// Triplanar helper function to prevent stretching on procedural cliffs
|
||||
vec4 triplanar_sample(sampler2D tex, vec3 world_pos, vec3 normal) {
|
||||
vec3 blending = abs(normal);
|
||||
blending = normalize(max(blending, 0.00001)); // Avoid division by zero
|
||||
blending /= (blending.x + blending.y + blending.z);
|
||||
|
||||
vec4 x_tex = texture(tex, world_pos.zy * texture_scale);
|
||||
vec4 y_tex = texture(tex, world_pos.xz * texture_scale);
|
||||
vec4 z_tex = texture(tex, world_pos.xy * texture_scale);
|
||||
|
||||
return x_tex * blending.x + y_tex * blending.y + z_tex * blending.z;
|
||||
}
|
||||
|
||||
varying vec3 world_position;
|
||||
varying vec3 world_normal;
|
||||
|
||||
void vertex() {
|
||||
// Grab real-world coordinates from Terrainy's procedural vertices
|
||||
world_position = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
|
||||
world_normal = MODEL_NORMAL_MATRIX * NORMAL;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Normalize vectors for accurate angle calculations
|
||||
vec3 normal = normalize(world_normal);
|
||||
|
||||
// Sample textures using triplanar projection mapping
|
||||
vec4 grass_c = triplanar_sample(flat_albedo, world_position, normal);
|
||||
vec4 grass_n = triplanar_sample(flat_normal, world_position, normal);
|
||||
vec4 rock_c = triplanar_sample(steep_albedo, world_position, normal);
|
||||
vec4 rock_n = triplanar_sample(steep_normal, world_position, normal);
|
||||
|
||||
// Calculate slope: dot product against the world UP vector (0, 1, 0)
|
||||
float slope = dot(normal, vec3(0.0, 1.0, 0.0));
|
||||
|
||||
// Create a smooth mask transitioning between flat areas and cliffs
|
||||
float weight = smoothstep(slope_threshold - slope_blend, slope_threshold + slope_blend, slope);
|
||||
|
||||
// Blend the textures together based on the procedural terrain angles
|
||||
ALBEDO = mix(rock_c.rgb, grass_c.rgb, weight);
|
||||
NORMAL_MAP = mix(rock_n.rgb, grass_n.rgb, weight);
|
||||
ROUGHNESS = 0.8; // Uniform roughness default
|
||||
}
|
||||
1
GameShit/MainGame/MainGame.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b1q2d4464nd5g
|
||||
BIN
GameShit/MainGame/MainGame.scn
Normal file
66
GameShit/PlayerController/ChatSystem/ChatBox.gd
Normal file
@@ -0,0 +1,66 @@
|
||||
extends Control
|
||||
|
||||
## This entire script is just for handling the ChatBox UI
|
||||
## if you are here looking for command handlers
|
||||
## they are in GameShit/ChatSystem/commands
|
||||
|
||||
## if you are looking for chat var storage
|
||||
## they are in GameShit/ChatSystem/ChatBox.gd
|
||||
|
||||
var Commands : Dictionary = {
|
||||
"give": CommandHandler.registerCommand("base:giveItem").new(),
|
||||
"say": CommandHandler.registerCommand("base:say").new()
|
||||
}
|
||||
|
||||
var language = LanguageManager.loadLanguage()
|
||||
|
||||
func _parseMessage():
|
||||
var messageContents : String = %Input.text
|
||||
|
||||
if messageContents.begins_with("/"):
|
||||
var command = messageContents.right(-1)
|
||||
runCommand(command)
|
||||
%Input.text = ""
|
||||
MainGame.hideChatbox.emit()
|
||||
else:
|
||||
sendMessage(messageContents)
|
||||
%Input.text = ""
|
||||
MainGame.hideChatbox.emit()
|
||||
|
||||
func sendMessage(message):
|
||||
%TextDisplay.newline()
|
||||
%TextDisplay.add_text("{a}: {b}".format({"a": MainGame.username, "b": message}))
|
||||
|
||||
func sendMessageAs(user, message):
|
||||
%TextDisplay.newline()
|
||||
%TextDisplay.add_text("{a}: {b}".format({"a": user, "b": message}))
|
||||
|
||||
func sendSystemErrorMessage(error:Dictionary):
|
||||
%TextDisplay.newline()
|
||||
%TextDisplay.add_text("Error: {Error} {Details}".format({"Error": language[error["type"]], "Details": error["caller"]}))
|
||||
func _ready() -> void:
|
||||
## here imma add callbacks to signals for chatbox
|
||||
CommandBus.sendChatMessage.connect(sendMessage)
|
||||
CommandBus.sendChatMessageAs.connect(sendMessageAs)
|
||||
CommandBus.castError.connect(sendSystemErrorMessage)
|
||||
|
||||
func runCommand(message: String):
|
||||
var regex = RegEx.new()
|
||||
regex.compile("(\"[^\"]*\"|'[^']*'|\\S+)")
|
||||
var matches = regex.search_all(message)
|
||||
var commandArgs = []
|
||||
for m in matches:
|
||||
var arg = m.get_string()
|
||||
if (arg.begins_with("\"") and arg.ends_with("\"")) or (arg.begins_with("'") and arg.ends_with("'")):
|
||||
arg = arg.substr(1, arg.length() - 2)
|
||||
commandArgs.append(arg)
|
||||
if commandArgs.size() > 0:
|
||||
var command_name = commandArgs[0]
|
||||
if Commands.has(command_name):
|
||||
Commands[command_name].runCommand(commandArgs.slice(1))
|
||||
else:
|
||||
CommandBus.castError.emit({"type": "base.command.commandNotFoundError", "caller": command_name})
|
||||
|
||||
|
||||
func _on_input_text_submitted(new_text: String) -> void:
|
||||
_parseMessage()
|
||||
1
GameShit/PlayerController/ChatSystem/ChatBox.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bv7jebheo3yyf
|
||||
73
GameShit/PlayerController/ChatSystem/ChatBox.tscn
Normal file
@@ -0,0 +1,73 @@
|
||||
[gd_scene format=3 uid="uid://bliihydr5ja7g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bv7jebheo3yyf" path="res://GameShit/PlayerController/ChatSystem/ChatBox.gd" id="1_u837s"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bq26o"]
|
||||
bg_color = Color(0.043137256, 0.043137256, 0.043137256, 0.6509804)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u837s"]
|
||||
bg_color = Color(0.14767182, 0.14767182, 0.14767176, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_aksbt"]
|
||||
bg_color = Color(0.24840015, 0.24840021, 0.24840006, 1)
|
||||
|
||||
[node name="ChatBox" type="Control" unique_id=756491211]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_u837s")
|
||||
|
||||
[node name="Panel" type="Panel" parent="." unique_id=1311922339]
|
||||
layout_mode = 0
|
||||
offset_right = 384.0
|
||||
offset_bottom = 264.0
|
||||
|
||||
[node name="Panel2" type="Panel" parent="Panel" unique_id=1474934579]
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = 8.0
|
||||
offset_right = 376.0
|
||||
offset_bottom = 256.0
|
||||
|
||||
[node name="TextDisplay" type="RichTextLabel" parent="Panel/Panel2" unique_id=575967085]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = 8.0
|
||||
offset_right = 360.0
|
||||
offset_bottom = 200.0
|
||||
theme_override_font_sizes/normal_font_size = 10
|
||||
theme_override_font_sizes/bold_font_size = 10
|
||||
theme_override_font_sizes/bold_italics_font_size = 10
|
||||
theme_override_font_sizes/italics_font_size = 10
|
||||
theme_override_font_sizes/mono_font_size = 10
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_bq26o")
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_u837s")
|
||||
bbcode_enabled = true
|
||||
|
||||
[node name="Input" type="LineEdit" parent="Panel/Panel2" unique_id=484855696]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = 208.0
|
||||
offset_right = 304.0
|
||||
offset_bottom = 239.0
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_aksbt")
|
||||
theme_override_styles/read_only = SubResource("StyleBoxFlat_aksbt")
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_aksbt")
|
||||
placeholder_text = "Type a message or command!"
|
||||
|
||||
[node name="Send" type="Button" parent="Panel/Panel2" unique_id=1540729483]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 312.0
|
||||
offset_top = 208.0
|
||||
offset_right = 360.0
|
||||
offset_bottom = 240.0
|
||||
text = "Send"
|
||||
|
||||
[connection signal="text_submitted" from="Panel/Panel2/Input" to="." method="_on_input_text_submitted"]
|
||||
[connection signal="pressed" from="Panel/Panel2/Send" to="." method="_parseMessage"]
|
||||
10
GameShit/PlayerController/ChatSystem/CommandHandler.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends Node
|
||||
|
||||
## all command variables are stuck in here, idk why i did this but its like 5am and im done with this shit atp
|
||||
|
||||
var lastMessage = ""
|
||||
|
||||
|
||||
func registerCommand(CommandID:String):
|
||||
var parts = CommandID.split(":")
|
||||
return load("res://GameShit/PlayerController/ChatSystem/commands/{namespace}/{id}.gd".format({"namespace": parts[0], "id": parts[1]}))
|
||||
@@ -0,0 +1 @@
|
||||
uid://jo7ml3jp3sd7
|
||||
@@ -0,0 +1,5 @@
|
||||
extends Node
|
||||
|
||||
func runCommand(args:Array):
|
||||
print("test")
|
||||
InventoryBus.givePlayerItem.emit(args[0])
|
||||
@@ -0,0 +1 @@
|
||||
uid://bvqkox22uye4s
|
||||
@@ -0,0 +1,4 @@
|
||||
extends Node
|
||||
|
||||
func runCommand(args:Array):
|
||||
CommandBus.sendChatMessageAs.emit(args[0], args[1])
|
||||
@@ -0,0 +1 @@
|
||||
uid://bxu4o5bts4nwf
|
||||
42
GameShit/PlayerController/ControllerSystem/CameraDrag.gd
Normal file
@@ -0,0 +1,42 @@
|
||||
extends Camera3D
|
||||
|
||||
@export var sensitivity: float = 0.002
|
||||
@export var smooth_speed: float = 15.0
|
||||
|
||||
var target_yaw: float = 0.0
|
||||
var target_pitch: float = 0.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
target_yaw = rotation.y
|
||||
target_pitch = rotation.x
|
||||
# Capture the mouse immediately so you don't need to click to look around
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
# Allows you to hit 'Escape' to free your mouse cursor if needed
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
else:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
# Always looks around when the mouse moves (as long as it's captured)
|
||||
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
|
||||
target_yaw -= event.relative.x * sensitivity
|
||||
target_pitch -= event.relative.y * sensitivity
|
||||
target_pitch = clamp(target_pitch, deg_to_rad(-89), deg_to_rad(89))
|
||||
|
||||
# Zoom implementation (Clamped safely between 10 and 75 FOV)
|
||||
if event is InputEventMouseButton:
|
||||
if Input.is_key_pressed(KEY_ALT):
|
||||
if event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
|
||||
fov = clamp(fov + 5, 10, 75)
|
||||
elif event.button_index == MOUSE_BUTTON_WHEEL_UP:
|
||||
fov = clamp(fov - 5, 10, 75)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
# Smooth Rotation
|
||||
rotation.y = lerp_angle(rotation.y, target_yaw, smooth_speed * delta)
|
||||
rotation.x = lerp(rotation.x, target_pitch, smooth_speed * delta)
|
||||
@@ -0,0 +1 @@
|
||||
uid://bcx7cyoq31cw6
|
||||
111
GameShit/PlayerController/ControllerSystem/Gerald.gd
Normal file
@@ -0,0 +1,111 @@
|
||||
extends CharacterBody3D
|
||||
|
||||
@export var isShiny : bool = false;
|
||||
@export var geraldColor : Color = Color(0.673, 0.03, 0.35, 1.0);
|
||||
@export var glowStrength : int = 2;
|
||||
|
||||
@export_group("Movement")
|
||||
@export var speed = 5.0
|
||||
@export var jump_velocity = 4.5
|
||||
@export var fly_speed = 8.0 # How fast you fly up/down/around
|
||||
@export var is_flying : bool = false # Toggle this in the inspector or via code
|
||||
|
||||
# Get the gravity from the project settings
|
||||
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
|
||||
var PlayerMaterial : StandardMaterial3D = StandardMaterial3D.new();
|
||||
|
||||
func save():
|
||||
Save.saveGameData("test.tres")
|
||||
|
||||
func loadGame():
|
||||
Save.loadGameData("test.tres")
|
||||
|
||||
func fcm():
|
||||
$Camera3D/CanvasLayer/ChatBox.visible = not $Camera3D/CanvasLayer/ChatBox.visible
|
||||
if $Camera3D/CanvasLayer/ChatBox.visible:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
MainGame.isInputLocked = true
|
||||
else:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
MainGame.isInputLocked = false
|
||||
|
||||
func _ready() -> void:
|
||||
MainGame.hideChatbox.connect(fcm)
|
||||
$Camera3D/MeshInstance3D.material_override = PlayerMaterial
|
||||
if isShiny:
|
||||
PlayerMaterial.emission_enabled = true;
|
||||
PlayerMaterial.emission = geraldColor;
|
||||
PlayerMaterial.emission_energy_multiplier = glowStrength;
|
||||
PlayerMaterial.roughness = 0.05;
|
||||
PlayerMaterial.metallic = 1.0;
|
||||
PlayerMaterial.albedo_color = geraldColor;
|
||||
$Label3D.text=MainGame.username
|
||||
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Input.is_action_just_pressed("fly"):
|
||||
is_flying = not is_flying
|
||||
if !MainGame.isInputLocked:
|
||||
if Input.is_action_just_pressed("save"):
|
||||
save()
|
||||
elif Input.is_action_just_pressed("load"):
|
||||
loadGame()
|
||||
if !$Camera3D/CanvasLayer/ChatBox/Panel/Panel2/Input.has_focus():
|
||||
if Input.is_action_just_pressed("chat"):
|
||||
$Camera3D/CanvasLayer/ChatBox.visible = not $Camera3D/CanvasLayer/ChatBox.visible
|
||||
if $Camera3D/CanvasLayer/ChatBox.visible:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
MainGame.isInputLocked = true
|
||||
else:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
MainGame.isInputLocked = false
|
||||
|
||||
func _physics_process(delta):
|
||||
|
||||
|
||||
if is_flying:
|
||||
handle_flight_movement(delta)
|
||||
else:
|
||||
if !MainGame.isInputLocked:
|
||||
handle_ground_movement(delta)
|
||||
move_and_slide()
|
||||
|
||||
func handle_ground_movement(delta):
|
||||
if not is_on_floor():
|
||||
velocity.y -= gravity * delta
|
||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
||||
velocity.y = jump_velocity
|
||||
var input_dir = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
var cam_basis = $Camera3D.global_transform.basis
|
||||
var forward = Vector3(cam_basis.z.x, 0, cam_basis.z.z).normalized()
|
||||
var right = Vector3(cam_basis.x.x, 0, cam_basis.x.z).normalized()
|
||||
var direction = (forward * input_dir.y + right * input_dir.x).normalized()
|
||||
if direction != Vector3.ZERO:
|
||||
velocity.x = direction.x * speed
|
||||
velocity.z = direction.z * speed
|
||||
else:
|
||||
velocity.x = 0
|
||||
velocity.z = 0
|
||||
|
||||
func handle_flight_movement(delta):
|
||||
var input_dir = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
var cam_basis = $Camera3D.global_transform.basis
|
||||
var forward = Vector3(cam_basis.z.x, 0, cam_basis.z.z).normalized()
|
||||
var right = Vector3(cam_basis.x.x, 0, cam_basis.x.z).normalized()
|
||||
var direction = (forward * input_dir.y + right * input_dir.x).normalized()
|
||||
if direction != Vector3.ZERO:
|
||||
velocity.x = direction.x * fly_speed
|
||||
velocity.z = direction.z * fly_speed
|
||||
else:
|
||||
velocity.x = 0
|
||||
velocity.z = 0
|
||||
var fly_up = Input.is_physical_key_pressed(KEY_SPACE)
|
||||
var fly_down = Input.is_physical_key_pressed(KEY_C)
|
||||
var fly_dir = 0
|
||||
if fly_up:
|
||||
fly_dir += 1
|
||||
if fly_down:
|
||||
fly_dir -= 1
|
||||
velocity.y = fly_dir * fly_speed
|
||||
1
GameShit/PlayerController/ControllerSystem/Gerald.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b7x6n68hgibrl
|
||||
84
GameShit/PlayerController/ControllerSystem/Interact.gd
Normal file
@@ -0,0 +1,84 @@
|
||||
extends RayCast3D
|
||||
|
||||
var current_target: Node = null
|
||||
var curTarget: Node = null
|
||||
@export var mode = 0;
|
||||
var rot : int = 0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Input.is_key_pressed(KEY_E):
|
||||
rot += 2
|
||||
if Input.is_key_pressed(KEY_Q):
|
||||
rot -= 2
|
||||
|
||||
if Input.is_key_pressed(KEY_1):
|
||||
mode = 0
|
||||
elif Input.is_key_pressed(KEY_2):
|
||||
mode = 1
|
||||
elif Input.is_key_pressed(KEY_3):
|
||||
mode = 2
|
||||
|
||||
|
||||
func spawnObjectByID(ObjectID:String, position:Vector3, rotation:int):
|
||||
var segments = ObjectID.split(":")
|
||||
var objectScene = load("res://WorldObjects/{namespace}/{id}.tscn".format({"namespace": segments[0], "id": segments[1]}))
|
||||
|
||||
var object = objectScene.instantiate()
|
||||
object.global_position = position
|
||||
object.rotation_degrees = Vector3(0, rotation, 0)
|
||||
|
||||
get_tree().current_scene.get_node("objects").add_child(object)
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if not MainGame.canPlaceBlock:
|
||||
var is_left = event.button_index == MOUSE_BUTTON_LEFT
|
||||
var is_right = event.button_index == MOUSE_BUTTON_RIGHT
|
||||
|
||||
if is_left or is_right:
|
||||
if event.pressed:
|
||||
if is_colliding():
|
||||
var collider = get_collider()
|
||||
var target = _find_interactable_node(collider)
|
||||
if target:
|
||||
current_target = target
|
||||
if current_target.has_method("_interact_press"):
|
||||
# If it's a right click, pass true for the alt interaction
|
||||
current_target._interact_press(is_right)
|
||||
else:
|
||||
# Handle releasing the click
|
||||
if current_target and current_target.has_method("_interact_release"):
|
||||
current_target._interact_release()
|
||||
current_target = null
|
||||
elif MainGame.canPlaceBlock:
|
||||
var is_left = event.button_index == MOUSE_BUTTON_LEFT
|
||||
|
||||
if is_left:
|
||||
if event.pressed:
|
||||
spawnObjectByID(MainGame.selectedBlockID, get_collision_point(), rot)
|
||||
if MainGame.currentHeldItemID == "base:hammer":
|
||||
var is_left = event.button_index == MOUSE_BUTTON_LEFT
|
||||
if is_left:
|
||||
if event.pressed:
|
||||
var collider = get_collider()
|
||||
var target = _findBreakableNode(collider)
|
||||
if target:
|
||||
curTarget = target
|
||||
if curTarget.has_method("_destroy"):
|
||||
curTarget._destroy()
|
||||
|
||||
|
||||
func _find_interactable_node(node: Node) -> Node:
|
||||
while node != null:
|
||||
if node.has_method("_interact_press"):
|
||||
return node
|
||||
node = node.get_parent()
|
||||
return null
|
||||
|
||||
func _findBreakableNode(node: Node) -> Node:
|
||||
while node != null:
|
||||
if node.has_method("_destroy"):
|
||||
return node
|
||||
node = node.get_parent()
|
||||
return null
|
||||
@@ -0,0 +1 @@
|
||||
uid://d2r0ovdfa5y18
|
||||
104
GameShit/PlayerController/ControllerSystem/PlayerController.tscn
Normal file
@@ -0,0 +1,104 @@
|
||||
[gd_scene format=3 uid="uid://h6pvjvocpe1y"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bcx7cyoq31cw6" path="res://GameShit/PlayerController/ControllerSystem/CameraDrag.gd" id="1_2be4l"]
|
||||
[ext_resource type="Script" uid="uid://b7x6n68hgibrl" path="res://GameShit/PlayerController/ControllerSystem/Gerald.gd" id="1_3mwrl"]
|
||||
[ext_resource type="Texture2D" uid="uid://djghgojdnndiq" path="res://GameShit/PlayerController/ControllerSystem/crosshair.png" id="3_1hgir"]
|
||||
[ext_resource type="Script" uid="uid://d2r0ovdfa5y18" path="res://GameShit/PlayerController/ControllerSystem/Interact.gd" id="3_y00gc"]
|
||||
[ext_resource type="Script" uid="uid://csqbc3n5gn47h" path="res://GameShit/PlayerController/Hotbar/HotBar.gd" id="6_y6phc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjdago36f5tk1" path="res://GameShit/PlayerController/Hotbar/HotbarSlot.tscn" id="7_eb4xd"]
|
||||
[ext_resource type="Resource" uid="uid://ng8hm4a1u2ya" path="res://GameShit/PlayerController/Hotbar/MainBar.res" id="8_jteqg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bliihydr5ja7g" path="res://GameShit/PlayerController/ChatSystem/ChatBox.tscn" id="8_x05u2"]
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_3mwrl"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_3mwrl"]
|
||||
|
||||
[node name="PlayerController" type="CharacterBody3D" unique_id=1597560541 groups=["saveable"]]
|
||||
script = ExtResource("1_3mwrl")
|
||||
glowStrength = 140000
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." unique_id=866350707]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.496, 0)
|
||||
current = true
|
||||
script = ExtResource("1_2be4l")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Camera3D" unique_id=1586810034]
|
||||
mesh = SubResource("SphereMesh_3mwrl")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Camera3D" unique_id=725234463]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, -0.51586515)
|
||||
target_position = Vector3(0, -4, 0)
|
||||
script = ExtResource("3_y00gc")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="Camera3D" unique_id=1005709652]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Camera3D/CanvasLayer" unique_id=1252526888]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -10.400024
|
||||
offset_top = -9.740021
|
||||
offset_right = 10.400024
|
||||
offset_bottom = 9.740021
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(0.5, 0.5)
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("3_1hgir")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="HotBar" type="Control" parent="Camera3D/CanvasLayer" unique_id=1228004643 node_paths=PackedStringArray("HotbarContainer")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
script = ExtResource("6_y6phc")
|
||||
slotScene = ExtResource("7_eb4xd")
|
||||
HotbarContainer = NodePath("HBoxContainer")
|
||||
hotbar = ExtResource("8_jteqg")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Camera3D/CanvasLayer/HotBar" unique_id=569216010]
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -196.0
|
||||
offset_top = -40.0
|
||||
offset_right = 196.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_constants/separation = 50
|
||||
alignment = 1
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="ChatBox" parent="Camera3D/CanvasLayer" unique_id=756491211 instance=ExtResource("8_x05u2")]
|
||||
visible = false
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.5
|
||||
grow_horizontal = 1
|
||||
pivot_offset = Vector2(0, 120)
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=639269486]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 1, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
shape = SubResource("CapsuleShape3D_3mwrl")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="." unique_id=2066773761]
|
||||
transform = Transform3D(-0.9999846, 0, 0.0055676177, 0, 1, 0, -0.0055676177, 0, -0.9999846, 0, 1.6802876, 0)
|
||||
text = "USERNAME"
|
||||
BIN
GameShit/PlayerController/ControllerSystem/crosshair.png
Normal file
|
After Width: | Height: | Size: 197 B |
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djghgojdnndiq"
|
||||
path.s3tc="res://.godot/imported/crosshair.png-6671a2781fe821ac2264c60589cc7d1e.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/crosshair.png-6671a2781fe821ac2264c60589cc7d1e.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameShit/PlayerController/ControllerSystem/crosshair.png"
|
||||
dest_files=["res://.godot/imported/crosshair.png-6671a2781fe821ac2264c60589cc7d1e.s3tc.ctex", "res://.godot/imported/crosshair.png-6671a2781fe821ac2264c60589cc7d1e.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
83
GameShit/PlayerController/Hotbar/HotBar.gd
Normal file
@@ -0,0 +1,83 @@
|
||||
extends Control
|
||||
|
||||
@export var slotScene : PackedScene
|
||||
@export var HotbarContainer : HBoxContainer
|
||||
@export var hotbar : HotbarResource
|
||||
|
||||
|
||||
|
||||
func updateHotbar(hotbar: HotbarResource):
|
||||
for child in HotbarContainer.get_children():
|
||||
child.queue_free()
|
||||
for index in hotbar.slots.size():
|
||||
var item = hotbar.slots[index]
|
||||
var slotInstance = slotScene.instantiate()
|
||||
HotbarContainer.add_child(slotInstance)
|
||||
|
||||
if item:
|
||||
var is_selected = (MainGame.selectedSlot == index)
|
||||
if is_selected:
|
||||
MainGame.currentHeldItemID = item.ID
|
||||
slotInstance.setItem(item, is_selected)
|
||||
|
||||
func givePlayerItem(ID:String, ):
|
||||
var segments = ID.split(":")
|
||||
|
||||
for index in hotbar.slots.size():
|
||||
var item = hotbar.slots[index]
|
||||
if item.ID == "base:air":
|
||||
hotbar.slots[index] = load("res://GameShit/ItemHandlers/{namespace}/{id}.tres".format({"namespace": segments[0], "id": segments[1]}))
|
||||
updateHotbar(hotbar)
|
||||
return
|
||||
else:
|
||||
print("there will be a UIThrowException call eventually but im too lazy to implement it rn")
|
||||
print("UI.Command.give.InventoryFullException")
|
||||
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
## connect the InventoryBus signal for the shit
|
||||
InventoryBus.givePlayerItem.connect(givePlayerItem)
|
||||
|
||||
## throw in some default slots
|
||||
if hotbar.slots.is_empty():
|
||||
hotbar.slots.clear()
|
||||
for i in range(0,12):
|
||||
hotbar.slots.append(load("res://GameShit/ItemHandlers/base/air.tres"))
|
||||
|
||||
## give the player the default tools
|
||||
givePlayerItem("base:hammer")
|
||||
givePlayerItem("base:interact")
|
||||
|
||||
updateHotbar(hotbar)
|
||||
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Input.is_key_pressed(KEY_1):
|
||||
MainGame.selectedSlot = 0
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_2):
|
||||
MainGame.selectedSlot = 1
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_3):
|
||||
MainGame.selectedSlot = 2
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_4):
|
||||
MainGame.selectedSlot = 3
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_5):
|
||||
MainGame.selectedSlot = 4
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_6):
|
||||
MainGame.selectedSlot = 5
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_7):
|
||||
MainGame.selectedSlot = 6
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_8):
|
||||
MainGame.selectedSlot = 7
|
||||
updateHotbar(hotbar)
|
||||
elif Input.is_key_pressed(KEY_9):
|
||||
MainGame.selectedSlot = 8
|
||||
updateHotbar(hotbar)
|
||||
1
GameShit/PlayerController/Hotbar/HotBar.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://csqbc3n5gn47h
|
||||
7
GameShit/PlayerController/Hotbar/HotbarData.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
extends Resource
|
||||
class_name HotbarResource
|
||||
|
||||
@export var slots: Array[ItemData] = []
|
||||
|
||||
func add_item(item: ItemData):
|
||||
slots.append(item)
|
||||
1
GameShit/PlayerController/Hotbar/HotbarData.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cn3kiiwucv8kg
|
||||
29
GameShit/PlayerController/Hotbar/HotbarSlot.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[gd_scene format=3 uid="uid://cjdago36f5tk1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c0tnorcgu7dev" path="res://GameShit/PlayerController/Hotbar/hotbar_slot.gd" id="1_hqux7"]
|
||||
|
||||
[node name="HotbarSlot" type="Control" unique_id=395686084]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_hqux7")
|
||||
|
||||
[node name="Button" type="Button" parent="." unique_id=342233194]
|
||||
layout_mode = 0
|
||||
offset_left = -24.0
|
||||
offset_top = -24.0
|
||||
offset_right = 24.0
|
||||
offset_bottom = 24.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." unique_id=1767675987]
|
||||
layout_mode = 0
|
||||
offset_left = -16.0
|
||||
offset_top = -16.0
|
||||
offset_right = 16.0
|
||||
offset_bottom = 16.0
|
||||
mouse_filter = 2
|
||||
|
||||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||
7
GameShit/PlayerController/Hotbar/ItemData.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
extends Resource
|
||||
class_name ItemData
|
||||
|
||||
@export var Name : String = ""
|
||||
@export var ID : String = "base:null"
|
||||
@export var description: String = ""
|
||||
@export var texture : Texture2D
|
||||
1
GameShit/PlayerController/Hotbar/ItemData.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cjb16s8q73wkx
|
||||
BIN
GameShit/PlayerController/Hotbar/MainBar.res
Normal file
28
GameShit/PlayerController/Hotbar/hotbar_slot.gd
Normal file
@@ -0,0 +1,28 @@
|
||||
extends Control
|
||||
|
||||
# Pre-create flat styles to override the engine's default skin
|
||||
var active_style = StyleBoxFlat.new()
|
||||
var inactive_style = StyleBoxFlat.new()
|
||||
|
||||
func _ready():
|
||||
# Configure your exact custom colors
|
||||
active_style.bg_color = Color(0.378, 0.378, 0.378, 0.988)
|
||||
inactive_style.bg_color = Color(0.075, 0.075, 0.075, 0.988)
|
||||
|
||||
func setItem(item, isActive):
|
||||
$TextureRect.texture = item.texture
|
||||
|
||||
if isActive:
|
||||
# Force-override all basic button background states
|
||||
$Button.add_theme_stylebox_override("normal", active_style)
|
||||
$Button.add_theme_stylebox_override("hover", active_style)
|
||||
$Button.add_theme_stylebox_override("pressed", active_style)
|
||||
else:
|
||||
$Button.add_theme_stylebox_override("normal", inactive_style)
|
||||
$Button.add_theme_stylebox_override("hover", inactive_style)
|
||||
$Button.add_theme_stylebox_override("pressed", inactive_style)
|
||||
|
||||
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
1
GameShit/PlayerController/Hotbar/hotbar_slot.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c0tnorcgu7dev
|
||||
18
Globals.torch
Normal file
@@ -0,0 +1,18 @@
|
||||
[orchestration type="OScript" load_steps=3 format=3 uid="uid://bu2uolph3gknp"]
|
||||
|
||||
[obj type="OScriptGraph" id="OScriptGraph_orolp"]
|
||||
graph_name = &"EventGraph"
|
||||
flags = 8
|
||||
|
||||
[obj type="OScriptVariable" id="OScriptVariable_17qkh"]
|
||||
name = "GlobalMachine1Temp"
|
||||
category = "Default"
|
||||
classification = "type:int"
|
||||
type = 2
|
||||
default_value = 0
|
||||
|
||||
[resource]
|
||||
base_type = &"Node"
|
||||
brief_description = "Empty template suitable for all Objects"
|
||||
variables = Array[OScriptVariable]([SubResource("OScriptVariable_17qkh")])
|
||||
graphs = Array[OScriptGraph]([SubResource("OScriptGraph_orolp")])
|
||||
8
Language/LanguageManager.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends Node
|
||||
|
||||
var langs : Dictionary = {
|
||||
"en-US": "res://Language/locale/en-US.gd"
|
||||
}
|
||||
|
||||
func loadLanguage():
|
||||
return load(langs[MainGame.loadedLanguage]).new().keys
|
||||
1
Language/LanguageManager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cq1njdji6gak6
|
||||
6
Language/locale/en-US.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends Node
|
||||
|
||||
var keys = {
|
||||
"base.command.commandNotFoundError": "Unknown command!",
|
||||
"base.ui.chatAndCommands": "Chat"
|
||||
}
|
||||