Compare commits
5 Commits
3352518f08
...
140173c734
Author | SHA1 | Date |
---|---|---|
|
140173c734 | 2 weeks ago |
|
fe516c6ac6 | 4 years ago |
|
b7e7632c00 | 4 years ago |
|
310cbe5221 | 4 years ago |
|
1fa14e54d1 | 4 years ago |
@ -0,0 +1,9 @@ |
|||||||
|
root = true |
||||||
|
|
||||||
|
[*] |
||||||
|
charset = utf-8 |
||||||
|
end_of_line = lf |
||||||
|
indent_style = tab |
||||||
|
indent_size = 4 |
||||||
|
trim_trailing_whitespace = true |
||||||
|
insert_final_newline = true |
@ -1,30 +0,0 @@ |
|||||||
{ |
|
||||||
"version": "0.2.0", |
|
||||||
"configurations": [{ |
|
||||||
"name": "Play in Editor", |
|
||||||
"type": "godot-mono", |
|
||||||
"mode": "playInEditor", |
|
||||||
"request": "launch", |
|
||||||
"preLaunchTask": "build" |
|
||||||
},{ |
|
||||||
"name": "Launch (Linux)", |
|
||||||
"type": "godot-mono", |
|
||||||
"request": "launch", |
|
||||||
"mode": "executable", |
|
||||||
"executable": "${workspaceRoot}/build/linux/${workspaceFolderBasename}.x86_64", |
|
||||||
"executableArguments": [ "--path", "${workspaceRoot}" ] |
|
||||||
},{ |
|
||||||
"name": "Launch (Windows)", |
|
||||||
"type": "godot-mono", |
|
||||||
"request": "launch", |
|
||||||
"mode": "executable", |
|
||||||
"executable": "${workspaceRoot}/build/windows/${workspaceFolderBasename}.exe", |
|
||||||
"executableArguments": [ "--path", "${workspaceRoot}" ] |
|
||||||
},{ |
|
||||||
"name": "Attach", |
|
||||||
"type": "godot-mono", |
|
||||||
"request": "attach", |
|
||||||
"address": "localhost", |
|
||||||
"port": 23685 |
|
||||||
}] |
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
{ |
|
||||||
"editor.tabSize": 4, |
|
||||||
"editor.insertSpaces": true, |
|
||||||
|
|
||||||
"files.trimTrailingWhitespace": true, |
|
||||||
"files.trimFinalNewlines": true, |
|
||||||
"files.insertFinalNewline": true, |
|
||||||
|
|
||||||
"files.exclude": { |
|
||||||
"**/.git": true, |
|
||||||
"**/*.import": true, |
|
||||||
}, |
|
||||||
|
|
||||||
"[markdown]": { |
|
||||||
"files.trimTrailingWhitespace": false, |
|
||||||
} |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
{ |
|
||||||
"version": "2.0.0", |
|
||||||
"tasks": [{ |
|
||||||
"group": "build", |
|
||||||
"label": "build", |
|
||||||
"type": "shell", |
|
||||||
"command": "msbuild", |
|
||||||
"args": [ |
|
||||||
"/property:GenerateFullPaths=true", |
|
||||||
"/consoleloggerparameters:NoSummary", |
|
||||||
"/t:build", |
|
||||||
], |
|
||||||
"presentation": { "reveal": "silent" }, |
|
||||||
"problemMatcher": "$msCompile" |
|
||||||
}] |
|
||||||
} |
|
@ -1,5 +0,0 @@ |
|||||||
<Project Sdk="Godot.NET.Sdk/3.3.0"> |
|
||||||
<PropertyGroup> |
|
||||||
<TargetFramework>net472</TargetFramework> |
|
||||||
</PropertyGroup> |
|
||||||
</Project> |
|
@ -0,0 +1,67 @@ |
|||||||
|
[preset.0] |
||||||
|
|
||||||
|
name="Linux/X11" |
||||||
|
platform="Linux/X11" |
||||||
|
runnable=true |
||||||
|
custom_features="" |
||||||
|
export_filter="all_resources" |
||||||
|
include_filter="" |
||||||
|
exclude_filter="" |
||||||
|
export_path="build/linux/YourFortV.x86_64" |
||||||
|
patch_list=PoolStringArray( ) |
||||||
|
script_export_mode=1 |
||||||
|
script_encryption_key="" |
||||||
|
|
||||||
|
[preset.0.options] |
||||||
|
|
||||||
|
texture_format/bptc=false |
||||||
|
texture_format/s3tc=true |
||||||
|
texture_format/etc=false |
||||||
|
texture_format/etc2=false |
||||||
|
texture_format/no_bptc_fallbacks=true |
||||||
|
binary_format/64_bits=true |
||||||
|
binary_format/embed_pck=false |
||||||
|
custom_template/release="" |
||||||
|
custom_template/debug="" |
||||||
|
|
||||||
|
[preset.1] |
||||||
|
|
||||||
|
name="Windows Desktop" |
||||||
|
platform="Windows Desktop" |
||||||
|
runnable=true |
||||||
|
custom_features="" |
||||||
|
export_filter="all_resources" |
||||||
|
include_filter="" |
||||||
|
exclude_filter="" |
||||||
|
export_path="build/windows/YourFortV.exe" |
||||||
|
patch_list=PoolStringArray( ) |
||||||
|
script_export_mode=1 |
||||||
|
script_encryption_key="" |
||||||
|
|
||||||
|
[preset.1.options] |
||||||
|
|
||||||
|
texture_format/bptc=false |
||||||
|
texture_format/s3tc=true |
||||||
|
texture_format/etc=false |
||||||
|
texture_format/etc2=false |
||||||
|
texture_format/no_bptc_fallbacks=true |
||||||
|
binary_format/64_bits=true |
||||||
|
binary_format/embed_pck=false |
||||||
|
custom_template/release="" |
||||||
|
custom_template/debug="" |
||||||
|
codesign/enable=false |
||||||
|
codesign/identity="" |
||||||
|
codesign/password="" |
||||||
|
codesign/timestamp=true |
||||||
|
codesign/timestamp_server_url="" |
||||||
|
codesign/digest_algorithm=1 |
||||||
|
codesign/description="" |
||||||
|
codesign/custom_options=PoolStringArray( ) |
||||||
|
application/icon="" |
||||||
|
application/file_version="" |
||||||
|
application/product_version="" |
||||||
|
application/company_name="" |
||||||
|
application/product_name="" |
||||||
|
application/file_description="" |
||||||
|
application/copyright="" |
||||||
|
application/trademarks="" |
@ -0,0 +1,26 @@ |
|||||||
|
class_name Game |
||||||
|
extends Node |
||||||
|
|
||||||
|
static var INSTANCE : Game |
||||||
|
static var NETWORK : Network |
||||||
|
static var WORLD : World |
||||||
|
static var PLAYERS : Node |
||||||
|
static var LOCAL_PLAYER : Player |
||||||
|
|
||||||
|
func _enter_tree() -> void: |
||||||
|
INSTANCE = self |
||||||
|
NETWORK = $Network |
||||||
|
WORLD = $World |
||||||
|
PLAYERS = $Players |
||||||
|
LOCAL_PLAYER = $"Players/1" |
||||||
|
|
||||||
|
func change_world(world: World) -> void: |
||||||
|
remove_child(WORLD) |
||||||
|
WORLD.queue_free() |
||||||
|
|
||||||
|
world.name = "World" |
||||||
|
add_child(world) |
||||||
|
WORLD = world |
||||||
|
|
||||||
|
LOCAL_PLAYER.chunk_loader.tracked_chunks.clear() |
||||||
|
LOCAL_PLAYER.position = Vector2.ZERO |
@ -0,0 +1 @@ |
|||||||
|
uid://4rqg0th44b4y |
@ -0,0 +1,63 @@ |
|||||||
|
[gd_scene load_steps=13 format=3 uid="uid://bxhfecc34tahh"] |
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://17f8yypfxgq8" path="res://hud/background.png" id="1_hve3p"] |
||||||
|
[ext_resource type="Script" uid="uid://4rqg0th44b4y" path="res://game.gd" id="1_mfdv2"] |
||||||
|
[ext_resource type="Script" uid="uid://6cd3jkc185pa" path="res://hud/background.gd" id="2_mfdv2"] |
||||||
|
[ext_resource type="Script" uid="uid://yhfl5jhw8xw1" path="res://world/world.gd" id="3_hve3p"] |
||||||
|
[ext_resource type="Script" uid="uid://cayck3pgtxys6" path="res://network/network.gd" id="4_iotsf"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://dnuy2pdb7p1gy" path="res://player/player.tscn" id="4_lc2xo"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://jv30ao4ppc3h" path="res://hud/escape_menu/escape_menu.tscn" id="5_215e1"] |
||||||
|
[ext_resource type="Script" path="res://scripts/hud/Health.gd" id="6_7sc4i"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://br618d1sbfgie" path="res://hud/radial_menu.tscn" id="7_80cx4"] |
||||||
|
[ext_resource type="Texture2D" uid="uid://cjvxdbr5eplcj" path="res://hud/cursor.png" id="8_e8heu"] |
||||||
|
[ext_resource type="Script" uid="uid://dm2ux2aj8pdpn" path="res://hud/cursor.gd" id="9_rvswv"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://vbqf8dv4enpe" path="res://hud/weapon_info.tscn" id="10_boyg6"] |
||||||
|
|
||||||
|
[node name="Game" type="Node"] |
||||||
|
script = ExtResource("1_mfdv2") |
||||||
|
|
||||||
|
[node name="Background" type="TextureRect" parent="."] |
||||||
|
modulate = Color(0.278431, 0.286275, 0.301961, 1) |
||||||
|
offset_right = 1280.0 |
||||||
|
offset_bottom = 720.0 |
||||||
|
mouse_filter = 2 |
||||||
|
texture = ExtResource("1_hve3p") |
||||||
|
stretch_mode = 1 |
||||||
|
script = ExtResource("2_mfdv2") |
||||||
|
|
||||||
|
[node name="Network" type="Node" parent="."] |
||||||
|
script = ExtResource("4_iotsf") |
||||||
|
|
||||||
|
[node name="World" type="Node" parent="."] |
||||||
|
script = ExtResource("3_hve3p") |
||||||
|
|
||||||
|
[node name="Players" type="Node" parent="."] |
||||||
|
|
||||||
|
[node name="1" parent="Players" instance=ExtResource("4_lc2xo")] |
||||||
|
|
||||||
|
[node name="Camera" type="Camera2D" parent="Players/1"] |
||||||
|
|
||||||
|
[node name="HUD" type="CanvasLayer" parent="."] |
||||||
|
|
||||||
|
[node name="EscapeMenu" parent="HUD" instance=ExtResource("5_215e1")] |
||||||
|
visible = false |
||||||
|
z_index = 100 |
||||||
|
|
||||||
|
[node name="RadialMenu" parent="HUD" node_paths=PackedStringArray("cursor", "player") instance=ExtResource("7_80cx4")] |
||||||
|
visible = false |
||||||
|
cursor = NodePath("../../CursorLayer/Cursor") |
||||||
|
player = NodePath("../../Players/1") |
||||||
|
|
||||||
|
[node name="Health" type="Node2D" parent="HUD"] |
||||||
|
script = ExtResource("6_7sc4i") |
||||||
|
|
||||||
|
[node name="CursorLayer" type="CanvasLayer" parent="."] |
||||||
|
process_mode = 3 |
||||||
|
layer = 2 |
||||||
|
follow_viewport_enabled = true |
||||||
|
|
||||||
|
[node name="Cursor" type="Sprite2D" parent="CursorLayer"] |
||||||
|
texture = ExtResource("8_e8heu") |
||||||
|
script = ExtResource("9_rvswv") |
||||||
|
|
||||||
|
[node name="WeaponInfo" parent="CursorLayer/Cursor" instance=ExtResource("10_boyg6")] |
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/background.png-34463f2717b0502091d019b33ae7e4f3.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/background.png" |
|
||||||
dest_files=[ "res://.import/background.png-34463f2717b0502091d019b33ae7e4f3.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=1 |
|
||||||
flags/filter=false |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/block.png-60e5fe55f4421ac5893119a21190be18.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/block.png" |
|
||||||
dest_files=[ "res://.import/block.png-60e5fe55f4421ac5893119a21190be18.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=false |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=true |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/cursor.png-3b96f8448db3dedf6af5b6b7fc13768f.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/cursor.png" |
|
||||||
dest_files=[ "res://.import/cursor.png-3b96f8448db3dedf6af5b6b7fc13768f.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=false |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=true |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/AK47.png-b3a2177e704ef07670dcc3fbcf5fe2b5.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/AK47.png" |
|
||||||
dest_files=[ "res://.import/AK47.png-b3a2177e704ef07670dcc3fbcf5fe2b5.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/Blunderbuss.png-f9541a9afbcc7503436ddb33d87600bd.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/Blunderbuss.png" |
|
||||||
dest_files=[ "res://.import/Blunderbuss.png-f9541a9afbcc7503436ddb33d87600bd.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/BowArrow.png-6b5dd8d866365f0485866a478b6a0cd1.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/BowArrow.png" |
|
||||||
dest_files=[ "res://.import/BowArrow.png-6b5dd8d866365f0485866a478b6a0cd1.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/ColtSingleActionArmy.png-4ffeb11f8b9db175b4a4529b4533c26c.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/ColtSingleActionArmy.png" |
|
||||||
dest_files=[ "res://.import/ColtSingleActionArmy.png-4ffeb11f8b9db175b4a4529b4533c26c.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/Derringer.png-43093e7c64541e63c047f9a45f88d5c6.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/Derringer.png" |
|
||||||
dest_files=[ "res://.import/Derringer.png-43093e7c64541e63c047f9a45f88d5c6.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/DoubleBarrel.png-0d2a0a5877ea0832296b59ab69073d32.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/DoubleBarrel.png" |
|
||||||
dest_files=[ "res://.import/DoubleBarrel.png-0d2a0a5877ea0832296b59ab69073d32.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/FNScar.png-6b3a68f387ec6ab89122d03cf241a16f.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/FNScar.png" |
|
||||||
dest_files=[ "res://.import/FNScar.png-6b3a68f387ec6ab89122d03cf241a16f.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/LaserPistol.png-5913c4141046557751080b5a6a4dcbb9.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/LaserPistol.png" |
|
||||||
dest_files=[ "res://.import/LaserPistol.png-5913c4141046557751080b5a6a4dcbb9.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/M1911.png-fb90f2bf6081ebaaa4570e1f13d26084.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/M1911.png" |
|
||||||
dest_files=[ "res://.import/M1911.png-fb90f2bf6081ebaaa4570e1f13d26084.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/M1Garand.png-8ea72bda0579460c0ab21455199ddf51.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/M1Garand.png" |
|
||||||
dest_files=[ "res://.import/M1Garand.png-8ea72bda0579460c0ab21455199ddf51.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/MP40.png-541ce9f02220339ddd77f7c18bfb102c.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/MP40.png" |
|
||||||
dest_files=[ "res://.import/MP40.png-541ce9f02220339ddd77f7c18bfb102c.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/MauserC96.png-e3f26ff256559f76cbf4380e8c78de28.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/MauserC96.png" |
|
||||||
dest_files=[ "res://.import/MauserC96.png-e3f26ff256559f76cbf4380e8c78de28.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/MoneyLauncher.png-38558cda7f759b8a828a02520ae7fa9d.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/MoneyLauncher.png" |
|
||||||
dest_files=[ "res://.import/MoneyLauncher.png-38558cda7f759b8a828a02520ae7fa9d.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/P90.png-b84ced4c3b84daba88bcb46f3f2fb629.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/P90.png" |
|
||||||
dest_files=[ "res://.import/P90.png-b84ced4c3b84daba88bcb46f3f2fb629.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/PlasmaBlaster.png-662106c2dd5c775f0121fd667460ead0.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/PlasmaBlaster.png" |
|
||||||
dest_files=[ "res://.import/PlasmaBlaster.png-662106c2dd5c775f0121fd667460ead0.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/RocketLauncher.png-fa5fe47507c4a5106da9783313b29ce2.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/RocketLauncher.png" |
|
||||||
dest_files=[ "res://.import/RocketLauncher.png-fa5fe47507c4a5106da9783313b29ce2.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/Sawed-OffWinchester1897.png-1828856c6c85c4c85f9f239d881cc72a.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/Sawed-OffWinchester1897.png" |
|
||||||
dest_files=[ "res://.import/Sawed-OffWinchester1897.png-1828856c6c85c4c85f9f239d881cc72a.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/SuperSoaker.png-ad26a5aee73722ca7f641ac2f8616b8a.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/SuperSoaker.png" |
|
||||||
dest_files=[ "res://.import/SuperSoaker.png-ad26a5aee73722ca7f641ac2f8616b8a.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/ThombsonSMG.png-3e71e65b4033797b49413ad61792d18e.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/ThombsonSMG.png" |
|
||||||
dest_files=[ "res://.import/ThombsonSMG.png-3e71e65b4033797b49413ad61792d18e.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/Uzi.png-1c37865966347d689e7d0d5728dc5079.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/Uzi.png" |
|
||||||
dest_files=[ "res://.import/Uzi.png-1c37865966347d689e7d0d5728dc5079.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/WaltherP38.png-c8185be1b2a1769c60b86322c1f29049.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/WaltherP38.png" |
|
||||||
dest_files=[ "res://.import/WaltherP38.png-c8185be1b2a1769c60b86322c1f29049.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/Winchester1873.png-1b4ec1d71f56d7af98fb910a51fa5323.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/Winchester1873.png" |
|
||||||
dest_files=[ "res://.import/Winchester1873.png-1b4ec1d71f56d7af98fb910a51fa5323.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/Winchester1897.png-a4adb39ab0537aef28a489a5a9e49483.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/guns/Winchester1897.png" |
|
||||||
dest_files=[ "res://.import/Winchester1897.png-a4adb39ab0537aef28a489a5a9e49483.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/hit_decal.png-774262fc5a2cc970463c1e1e2886a094.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/hit_decal.png" |
|
||||||
dest_files=[ "res://.import/hit_decal.png-774262fc5a2cc970463c1e1e2886a094.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=false |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=false |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/icon.png-3866f89624e56ede0f5895d50d47f7c1.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/icon.png" |
|
||||||
dest_files=[ "res://.import/icon.png-3866f89624e56ede0f5895d50d47f7c1.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=true |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=true |
|
||||||
svg/scale=1.0 |
|
@ -1,34 +0,0 @@ |
|||||||
[remap] |
|
||||||
|
|
||||||
importer="texture" |
|
||||||
type="StreamTexture" |
|
||||||
path="res://.import/player.png-3013952efb05378239c0b5ec08f70756.stex" |
|
||||||
metadata={ |
|
||||||
"vram_texture": false |
|
||||||
} |
|
||||||
|
|
||||||
[deps] |
|
||||||
|
|
||||||
source_file="res://gfx/player.png" |
|
||||||
dest_files=[ "res://.import/player.png-3013952efb05378239c0b5ec08f70756.stex" ] |
|
||||||
|
|
||||||
[params] |
|
||||||
|
|
||||||
compress/mode=0 |
|
||||||
compress/lossy_quality=0.7 |
|
||||||
compress/hdr_mode=0 |
|
||||||
compress/bptc_ldr=0 |
|
||||||
compress/normal_map=0 |
|
||||||
flags/repeat=0 |
|
||||||
flags/filter=false |
|
||||||
flags/mipmaps=false |
|
||||||
flags/anisotropic=false |
|
||||||
flags/srgb=2 |
|
||||||
process/fix_alpha_border=true |
|
||||||
process/premult_alpha=false |
|
||||||
process/HDR_as_SRGB=false |
|
||||||
process/invert_color=false |
|
||||||
stream=false |
|
||||||
size_limit=0 |
|
||||||
detect_3d=true |
|
||||||
svg/scale=1.0 |
|
@ -0,0 +1,4 @@ |
|||||||
|
class_name PhysicsLayer |
||||||
|
|
||||||
|
const WORLD := 0b00000001 |
||||||
|
const PLAYERS := 0b00000010 |
@ -0,0 +1 @@ |
|||||||
|
uid://bix4ydqnn8tyf |
@ -0,0 +1,10 @@ |
|||||||
|
class_name Background |
||||||
|
extends TextureRect |
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
var offset := Vector2(8.0, 8.0) |
||||||
|
var tile_size := texture.get_size() |
||||||
|
var viewport_origin := -get_viewport().canvas_transform.origin |
||||||
|
var viewport_size := get_viewport_rect().size |
||||||
|
position = (viewport_origin / tile_size).floor() * tile_size - offset |
||||||
|
size = ((viewport_size + offset) / tile_size + Vector2.ONE).ceil() * tile_size |
@ -0,0 +1 @@ |
|||||||
|
uid://6cd3jkc185pa |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://17f8yypfxgq8" |
||||||
|
path="res://.godot/imported/background.png-5a6727418e72aaf1aa4ee59c6ce8f6b2.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://hud/background.png" |
||||||
|
dest_files=["res://.godot/imported/background.png-5a6727418e72aaf1aa4ee59c6ce8f6b2.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 |
@ -0,0 +1,20 @@ |
|||||||
|
class_name Cursor |
||||||
|
extends Node2D |
||||||
|
|
||||||
|
## Position of the cursor in HUD coordinates. |
||||||
|
var hud_position: Vector2 |
||||||
|
|
||||||
|
func _ready() -> void: |
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_HIDDEN |
||||||
|
|
||||||
|
func _notification(what: int) -> void: |
||||||
|
# TODO: Keep mouse visible when it was pressed down in the game window. |
||||||
|
# Meaning the game will continue to receive mouse move updates. |
||||||
|
match what: |
||||||
|
NOTIFICATION_WM_MOUSE_ENTER: visible = true |
||||||
|
NOTIFICATION_WM_MOUSE_EXIT: visible = false |
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
# FIXME: Fix flickering mouse position when player moves. |
||||||
|
position = get_global_mouse_position() |
||||||
|
hud_position = get_viewport().get_mouse_position() |
@ -0,0 +1 @@ |
|||||||
|
uid://dm2ux2aj8pdpn |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://cjvxdbr5eplcj" |
||||||
|
path="res://.godot/imported/cursor.png-f5d5b937f215ed4ffd5a25acc5a94b3a.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://hud/cursor.png" |
||||||
|
dest_files=["res://.godot/imported/cursor.png-f5d5b937f215ed4ffd5a25acc5a94b3a.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 |
@ -0,0 +1,26 @@ |
|||||||
|
class_name EscapeMenu |
||||||
|
extends Control |
||||||
|
|
||||||
|
@export var return_button : Button |
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void: |
||||||
|
if event.is_action_pressed("ui_cancel"): |
||||||
|
toggle() |
||||||
|
|
||||||
|
func toggle() -> void: |
||||||
|
if visible: close() |
||||||
|
else: open() |
||||||
|
func open() -> void: |
||||||
|
if visible: return |
||||||
|
# get_tree().paused = true |
||||||
|
return_button.grab_focus() |
||||||
|
visible = true |
||||||
|
func close() -> void: |
||||||
|
if not visible: return |
||||||
|
# get_tree().paused = false |
||||||
|
visible = false |
||||||
|
|
||||||
|
func _on_quit_pressed() -> void: |
||||||
|
get_tree().quit() |
||||||
|
func _on_return_pressed() -> void: |
||||||
|
close() |
@ -0,0 +1 @@ |
|||||||
|
uid://bmeafg5lumxiy |
@ -0,0 +1,128 @@ |
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://jv30ao4ppc3h"] |
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://4tevy1my8joc" path="res://hud/theme/ui_theme.tres" id="1"] |
||||||
|
[ext_resource type="Script" uid="uid://bmeafg5lumxiy" path="res://hud/escape_menu/escape_menu.gd" id="2_d0mme"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://bqvs0e08m6hug" path="res://hud/escape_menu/escape_menu_appearance.tscn" id="3_hj3go"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://7jb7w5ef8aw2" path="res://hud/escape_menu/escape_menu_multiplayer.tscn" id="4_1g7ww"] |
||||||
|
[ext_resource type="PackedScene" uid="uid://uu2v0w84blem" path="res://hud/escape_menu/escape_menu_world.tscn" id="4_f42q7"] |
||||||
|
|
||||||
|
[node name="EscapeMenu" type="Control" node_paths=PackedStringArray("return_button")] |
||||||
|
process_mode = 3 |
||||||
|
layout_mode = 3 |
||||||
|
anchors_preset = 15 |
||||||
|
anchor_right = 1.0 |
||||||
|
anchor_bottom = 1.0 |
||||||
|
grow_horizontal = 2 |
||||||
|
grow_vertical = 2 |
||||||
|
theme = ExtResource("1") |
||||||
|
script = ExtResource("2_d0mme") |
||||||
|
return_button = NodePath("CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Return") |
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."] |
||||||
|
layout_mode = 0 |
||||||
|
anchor_right = 1.0 |
||||||
|
anchor_bottom = 1.0 |
||||||
|
color = Color(0, 0, 0, 0.501961) |
||||||
|
|
||||||
|
[node name="CenterContainer" type="CenterContainer" parent="."] |
||||||
|
layout_mode = 1 |
||||||
|
anchors_preset = 15 |
||||||
|
anchor_right = 1.0 |
||||||
|
anchor_bottom = 1.0 |
||||||
|
grow_horizontal = 2 |
||||||
|
grow_vertical = 2 |
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/PanelContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
theme_override_constants/margin_left = 4 |
||||||
|
theme_override_constants/margin_top = 4 |
||||||
|
theme_override_constants/margin_right = 4 |
||||||
|
theme_override_constants/margin_bottom = 4 |
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] |
||||||
|
custom_minimum_size = Vector2(0, 13) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Escape Menu" |
||||||
|
horizontal_alignment = 1 |
||||||
|
vertical_alignment = 1 |
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="TabContainer" type="TabContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_vertical = 3 |
||||||
|
theme_override_constants/side_margin = 0 |
||||||
|
current_tab = 1 |
||||||
|
use_hidden_tabs_for_min_size = true |
||||||
|
|
||||||
|
[node name="Appearance" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer" instance=ExtResource("3_hj3go")] |
||||||
|
visible = false |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Multiplayer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer" instance=ExtResource("4_1g7ww")] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="World" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer" instance=ExtResource("4_f42q7")] |
||||||
|
visible = false |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="HSeparator2" type="HSeparator" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Quit" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
text = " " |
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Quit"] |
||||||
|
layout_mode = 1 |
||||||
|
anchors_preset = 8 |
||||||
|
anchor_left = 0.5 |
||||||
|
anchor_top = 0.5 |
||||||
|
anchor_right = 0.5 |
||||||
|
anchor_bottom = 0.5 |
||||||
|
offset_left = -44.0 |
||||||
|
offset_top = -4.5 |
||||||
|
offset_right = 44.0 |
||||||
|
offset_bottom = 4.5 |
||||||
|
grow_horizontal = 2 |
||||||
|
grow_vertical = 2 |
||||||
|
mouse_filter = 1 |
||||||
|
bbcode_enabled = true |
||||||
|
text = "Quit Game [color=#999999](Alt+F4)[/color]" |
||||||
|
fit_content = true |
||||||
|
scroll_active = false |
||||||
|
autowrap_mode = 0 |
||||||
|
|
||||||
|
[node name="Return" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
text = " " |
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Return"] |
||||||
|
layout_mode = 1 |
||||||
|
anchors_preset = 8 |
||||||
|
anchor_left = 0.5 |
||||||
|
anchor_top = 0.5 |
||||||
|
anchor_right = 0.5 |
||||||
|
anchor_bottom = 0.5 |
||||||
|
offset_left = -49.5 |
||||||
|
offset_top = -4.5 |
||||||
|
offset_right = 49.5 |
||||||
|
offset_bottom = 4.5 |
||||||
|
grow_horizontal = 2 |
||||||
|
grow_vertical = 2 |
||||||
|
mouse_filter = 1 |
||||||
|
bbcode_enabled = true |
||||||
|
text = "Return to Game [color=#999999](Esc)[/color]" |
||||||
|
fit_content = true |
||||||
|
scroll_active = false |
||||||
|
autowrap_mode = 0 |
||||||
|
|
||||||
|
[connection signal="pressed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"] |
||||||
|
[connection signal="pressed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Return" to="." method="_on_return_pressed"] |
@ -0,0 +1,27 @@ |
|||||||
|
class_name EscapeMenuAppearance |
||||||
|
extends CenterContainer |
||||||
|
|
||||||
|
@export var display_name : LineEdit |
||||||
|
@export var color_preview : TextureRect |
||||||
|
@export var color_slider : Slider |
||||||
|
|
||||||
|
var INVALID_CHARS := RegEx.create_from_string("\\s") |
||||||
|
|
||||||
|
func _ready() -> void: |
||||||
|
color_slider.value = randf() |
||||||
|
color_preview.modulate = Color.from_hsv(color_slider.value, 1.0, 1.0) |
||||||
|
|
||||||
|
func _on_display_name_text_changed(new_text: String) -> void: |
||||||
|
var valid_text := INVALID_CHARS.sub(new_text, "", true) |
||||||
|
if valid_text == new_text: return |
||||||
|
|
||||||
|
var previous_caret_column = display_name.caret_column |
||||||
|
display_name.text = valid_text |
||||||
|
display_name.caret_column = previous_caret_column - (new_text.length() - valid_text.length()) |
||||||
|
|
||||||
|
func _on_hue_value_changed(value: float) -> void: |
||||||
|
color_preview.modulate = Color.from_hsv(color_slider.value, 1.0, 1.0) |
||||||
|
|
||||||
|
func _on_visibility_changed() -> void: |
||||||
|
if is_visible_in_tree(): return # only run when hiding |
||||||
|
# TODO: Apply name and color to local player. |
@ -0,0 +1 @@ |
|||||||
|
uid://cn2xq3f6mtmd2 |
@ -0,0 +1,65 @@ |
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://bqvs0e08m6hug"] |
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cn2xq3f6mtmd2" path="res://hud/escape_menu/escape_menu_appearance.gd" id="1_w5wcg"] |
||||||
|
[ext_resource type="Texture2D" uid="uid://bghhc7sjlstuv" path="res://player/player.png" id="2_57ibk"] |
||||||
|
|
||||||
|
[node name="Appearance" type="CenterContainer" node_paths=PackedStringArray("display_name", "color_preview", "color_slider")] |
||||||
|
script = ExtResource("1_w5wcg") |
||||||
|
display_name = NodePath("MarginContainer/VBoxContainer/ContainerName/DisplayName") |
||||||
|
color_preview = NodePath("MarginContainer/VBoxContainer/ContainerColor/Preview") |
||||||
|
color_slider = NodePath("MarginContainer/VBoxContainer/ContainerColor/Hue") |
||||||
|
metadata/_tab_index = 0 |
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."] |
||||||
|
layout_mode = 2 |
||||||
|
theme_override_constants/margin_left = 6 |
||||||
|
theme_override_constants/margin_top = 6 |
||||||
|
theme_override_constants/margin_right = 6 |
||||||
|
theme_override_constants/margin_bottom = 4 |
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="ContainerName" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/ContainerName"] |
||||||
|
custom_minimum_size = Vector2(36, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Name:" |
||||||
|
|
||||||
|
[node name="DisplayName" type="LineEdit" parent="MarginContainer/VBoxContainer/ContainerName"] |
||||||
|
custom_minimum_size = Vector2(142, 0) |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
max_length = 20 |
||||||
|
caret_blink = true |
||||||
|
|
||||||
|
[node name="ContainerColor" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/ContainerColor"] |
||||||
|
custom_minimum_size = Vector2(36, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Color:" |
||||||
|
|
||||||
|
[node name="Preview" type="TextureRect" parent="MarginContainer/VBoxContainer/ContainerColor"] |
||||||
|
layout_mode = 2 |
||||||
|
texture = ExtResource("2_57ibk") |
||||||
|
|
||||||
|
[node name="Hue" type="HSlider" parent="MarginContainer/VBoxContainer/ContainerColor"] |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
max_value = 1.0 |
||||||
|
step = 0.0 |
||||||
|
scrollable = false |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] |
||||||
|
custom_minimum_size = Vector2(0, 12) |
||||||
|
layout_mode = 2 |
||||||
|
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1) |
||||||
|
text = "(Close Menu to apply changes.)" |
||||||
|
|
||||||
|
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"] |
||||||
|
[connection signal="text_changed" from="MarginContainer/VBoxContainer/ContainerName/DisplayName" to="." method="_on_display_name_text_changed"] |
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/ContainerColor/Hue" to="." method="_on_hue_value_changed"] |
@ -0,0 +1,77 @@ |
|||||||
|
class_name EscapeMenuMultiplayer |
||||||
|
extends CenterContainer |
||||||
|
|
||||||
|
# TODO: Display and update player count. |
||||||
|
const STATUS_DEFAULT := [ "No connection" , Color.ORANGE ] |
||||||
|
|
||||||
|
const STATUS_CLIENT_CONNECTING := [ "Connecting ..." , Color.YELLOW ] |
||||||
|
const STATUS_CLIENT_CONNECTED := [ "Connected (%d player%s)" , Color.GREEN ] |
||||||
|
const STATUS_CLIENT_FAILED_TO_CONNECT := [ "Failed to connect" , Color.RED ] |
||||||
|
const STATUS_CLIENT_DISCONNECTED := [ "Disconnected" , Color.ORANGE ] |
||||||
|
const STATUS_SERVER_DISCONNECTED := [ "Server disconnected" , Color.ORANGE ] |
||||||
|
|
||||||
|
const STATUS_SERVER_RUNNING := [ "Server running (%d player%s)" , Color.GREEN ] |
||||||
|
const STATUS_SERVER_STOPPED := [ "Server stopped" , Color.ORANGE ] |
||||||
|
|
||||||
|
const STATUS_ERROR_ALREADY_IN_USE := [ "Already in use" , Color.RED ] |
||||||
|
const STATUS_ERROR_CANT_CREATE := [ "Cant create" , Color.RED ] |
||||||
|
|
||||||
|
@onready var status_label : Label = %Status |
||||||
|
@onready var port_box : SpinBox = %Port |
||||||
|
@onready var address_edit : LineEdit = %Address |
||||||
|
|
||||||
|
@onready var open_close_button : Button = %OpenClose |
||||||
|
@onready var dis_connect_button : Button = %DisConnect |
||||||
|
|
||||||
|
func _ready() -> void: |
||||||
|
_update_status(STATUS_DEFAULT) |
||||||
|
Game.NETWORK.status_changed.connect(_on_status_changed) |
||||||
|
|
||||||
|
func _on_hide_address_toggled(toggled_on: bool) -> void: |
||||||
|
address_edit.secret = toggled_on |
||||||
|
|
||||||
|
func _on_status_changed(new_status: Network.Status, old_status: Network.Status) -> void: |
||||||
|
match new_status: |
||||||
|
Network.Status.SINGLEPLAYER: |
||||||
|
match old_status: |
||||||
|
Network.Status.CLIENT_CONNECTING: _update_status(STATUS_CLIENT_FAILED_TO_CONNECT) |
||||||
|
Network.Status.CLIENT_CONNECTED : _update_status(STATUS_SERVER_DISCONNECTED) |
||||||
|
Network.Status.SERVER_RUNNING : _update_status(STATUS_SERVER_STOPPED) |
||||||
|
open_close_button.text = "Open Server" |
||||||
|
dis_connect_button.disabled = false |
||||||
|
dis_connect_button.text = "Connect" |
||||||
|
open_close_button.disabled = false |
||||||
|
|
||||||
|
Network.Status.CLIENT_CONNECTING: |
||||||
|
_update_status(STATUS_CLIENT_CONNECTING) |
||||||
|
dis_connect_button.text = "Disconnect" |
||||||
|
open_close_button.disabled = true |
||||||
|
|
||||||
|
Network.Status.CLIENT_CONNECTED: |
||||||
|
_update_status(STATUS_CLIENT_CONNECTED) |
||||||
|
|
||||||
|
Network.Status.SERVER_RUNNING: |
||||||
|
_update_status(STATUS_SERVER_RUNNING) |
||||||
|
open_close_button.text = "Close Server" |
||||||
|
dis_connect_button.disabled = true |
||||||
|
|
||||||
|
func _on_open_close_pressed() -> void: |
||||||
|
if open_close_button.text == "Open Server": |
||||||
|
match Game.NETWORK.start_server(int(port_box.value)): |
||||||
|
ERR_ALREADY_IN_USE: _update_status(STATUS_ERROR_ALREADY_IN_USE) |
||||||
|
ERR_CANT_CREATE : _update_status(STATUS_ERROR_CANT_CREATE) |
||||||
|
else: |
||||||
|
Game.NETWORK.stop_server() |
||||||
|
|
||||||
|
func _on_dis_connect_pressed() -> void: |
||||||
|
if dis_connect_button.text == "Connect": |
||||||
|
var address := address_edit.text if address_edit.text else "localhost" |
||||||
|
if Game.NETWORK.connect_to_server(address): _update_status(STATUS_ERROR_CANT_CREATE) |
||||||
|
else: |
||||||
|
Game.NETWORK.disconnect_from_server() |
||||||
|
# Without this it would (incorrectly?) display "failed to connect". |
||||||
|
_update_status(STATUS_CLIENT_DISCONNECTED) |
||||||
|
|
||||||
|
func _update_status(status: Array) -> void: |
||||||
|
status_label.text = status[0] |
||||||
|
status_label.modulate = status[1] |
@ -0,0 +1 @@ |
|||||||
|
uid://bu37wh6sy6bdl |
@ -0,0 +1,92 @@ |
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://7jb7w5ef8aw2"] |
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bu37wh6sy6bdl" path="res://hud/escape_menu/escape_menu_multiplayer.gd" id="1_0u4gd"] |
||||||
|
|
||||||
|
[node name="Multiplayer" type="CenterContainer"] |
||||||
|
script = ExtResource("1_0u4gd") |
||||||
|
metadata/_tab_index = 1 |
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."] |
||||||
|
layout_mode = 2 |
||||||
|
theme_override_constants/margin_left = 6 |
||||||
|
theme_override_constants/margin_top = 6 |
||||||
|
theme_override_constants/margin_right = 6 |
||||||
|
theme_override_constants/margin_bottom = 4 |
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="ContainerStatus" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/ContainerStatus"] |
||||||
|
custom_minimum_size = Vector2(36, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Status:" |
||||||
|
|
||||||
|
[node name="Status" type="Label" parent="MarginContainer/VBoxContainer/ContainerStatus"] |
||||||
|
unique_name_in_owner = true |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
size_flags_vertical = 5 |
||||||
|
|
||||||
|
[node name="ContainerServer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/ContainerServer"] |
||||||
|
custom_minimum_size = Vector2(36, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Port:" |
||||||
|
|
||||||
|
[node name="Port" type="SpinBox" parent="MarginContainer/VBoxContainer/ContainerServer"] |
||||||
|
unique_name_in_owner = true |
||||||
|
layout_mode = 2 |
||||||
|
min_value = 1024.0 |
||||||
|
max_value = 65535.0 |
||||||
|
value = 42005.0 |
||||||
|
alignment = 2 |
||||||
|
|
||||||
|
[node name="OpenClose" type="Button" parent="MarginContainer/VBoxContainer/ContainerServer"] |
||||||
|
unique_name_in_owner = true |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
text = "Open Server" |
||||||
|
|
||||||
|
[node name="ContainerClient" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/ContainerClient"] |
||||||
|
custom_minimum_size = Vector2(36, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Address:" |
||||||
|
|
||||||
|
[node name="Address" type="LineEdit" parent="MarginContainer/VBoxContainer/ContainerClient"] |
||||||
|
unique_name_in_owner = true |
||||||
|
custom_minimum_size = Vector2(120, 0) |
||||||
|
layout_mode = 2 |
||||||
|
placeholder_text = "localhost" |
||||||
|
caret_blink = true |
||||||
|
|
||||||
|
[node name="DisConnect" type="Button" parent="MarginContainer/VBoxContainer/ContainerClient"] |
||||||
|
unique_name_in_owner = true |
||||||
|
custom_minimum_size = Vector2(57, 0) |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
text = "Connect" |
||||||
|
|
||||||
|
[node name="ContainerHideAddress" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="HideAddress" type="CheckBox" parent="MarginContainer/VBoxContainer/ContainerHideAddress"] |
||||||
|
layout_mode = 2 |
||||||
|
button_pressed = true |
||||||
|
text = "Hide Address" |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/ContainerHideAddress"] |
||||||
|
layout_mode = 2 |
||||||
|
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1) |
||||||
|
text = "(for streamers etc.)" |
||||||
|
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/ContainerServer/OpenClose" to="." method="_on_open_close_pressed"] |
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/ContainerClient/DisConnect" to="." method="_on_dis_connect_pressed"] |
||||||
|
[connection signal="toggled" from="MarginContainer/VBoxContainer/ContainerHideAddress/HideAddress" to="." method="_on_hide_address_toggled"] |
@ -0,0 +1,72 @@ |
|||||||
|
class_name EscapeMenuWorld |
||||||
|
extends CenterContainer |
||||||
|
|
||||||
|
@onready var save_file_dialog : FileDialog = %SaveFileDialog |
||||||
|
@onready var load_file_dialog : FileDialog = %LoadFileDialog |
||||||
|
|
||||||
|
@onready var filename_label : Label = %Filename |
||||||
|
@onready var playtime_label : Label = %Playtime |
||||||
|
@onready var last_saved_label : Label = %LastSaved |
||||||
|
|
||||||
|
@onready var quick_save_button : Button = %QuickSave |
||||||
|
@onready var save_as_button : Button = %SaveAs |
||||||
|
@onready var load_from_button : Button = %LoadFrom |
||||||
|
|
||||||
|
var current_world : String |
||||||
|
|
||||||
|
func _ready() -> void: |
||||||
|
# Hide "Quick Save" button until world is loaded/saved, and `current_world` is set. |
||||||
|
quick_save_button.visible = false |
||||||
|
save_as_button.text = "Save World As..." |
||||||
|
|
||||||
|
DirAccess.make_dir_recursive_absolute(World.WORLDS_DIR) |
||||||
|
var global_path := ProjectSettings.globalize_path(World.WORLDS_DIR) |
||||||
|
save_file_dialog.current_path = global_path |
||||||
|
load_file_dialog.current_path = global_path |
||||||
|
|
||||||
|
# this.GetClient().StatusChanged += OnStatusChanged; |
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
var playtime := Game.WORLD.playtime |
||||||
|
var seconds := floori(playtime ) % 60 |
||||||
|
var minutes := floori(playtime / 60 ) % 60 |
||||||
|
var hours := floori(playtime / (60 * 60) ) % 24 |
||||||
|
var days := floori(playtime / (60 * 60 * 24)) |
||||||
|
|
||||||
|
var str = "" |
||||||
|
if days > 0: str += "%dd " % days |
||||||
|
str += "%02dh %02dm %02ds" % [ hours, minutes, seconds ] |
||||||
|
playtime_label.text = str |
||||||
|
|
||||||
|
|
||||||
|
func _on_quick_save_pressed() -> void: |
||||||
|
_on_save_file_dialog_file_selected(current_world) |
||||||
|
|
||||||
|
func _on_save_as_pressed() -> void: |
||||||
|
save_file_dialog.invalidate() |
||||||
|
save_file_dialog.popup_centered() |
||||||
|
func _on_save_file_dialog_file_selected(path: String) -> void: |
||||||
|
Game.WORLD.save(path) |
||||||
|
current_world = path |
||||||
|
filename_label.text = path.get_file() |
||||||
|
last_saved_label.text = _unix_time_to_string(Game.WORLD.last_saved) |
||||||
|
quick_save_button.visible = true |
||||||
|
save_as_button.text = "Save As..." |
||||||
|
|
||||||
|
func _on_load_from_pressed() -> void: |
||||||
|
load_file_dialog.invalidate() |
||||||
|
load_file_dialog.popup_centered() |
||||||
|
func _on_load_file_dialog_file_selected(path: String) -> void: |
||||||
|
var world := World.load(path) |
||||||
|
if not world: return |
||||||
|
Game.INSTANCE.change_world(world) |
||||||
|
|
||||||
|
current_world = path |
||||||
|
filename_label.text = path.get_file() |
||||||
|
last_saved_label.text = _unix_time_to_string(world.last_saved) |
||||||
|
quick_save_button.visible = true |
||||||
|
save_as_button.text = "Save As..." |
||||||
|
|
||||||
|
func _unix_time_to_string(time: int) -> String: |
||||||
|
var d := Time.get_datetime_dict_from_unix_time(time) |
||||||
|
return "%04d-%02d-%02d %02d:%02d" % [ d.year, d.month, d.day, d.hour, d.minute ] |
@ -0,0 +1 @@ |
|||||||
|
uid://q1o7rlr8roy1 |
@ -0,0 +1,121 @@ |
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://uu2v0w84blem"] |
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://q1o7rlr8roy1" path="res://hud/escape_menu/escape_menu_world.gd" id="1_ayi2r"] |
||||||
|
|
||||||
|
[node name="World" type="CenterContainer"] |
||||||
|
script = ExtResource("1_ayi2r") |
||||||
|
metadata/_tab_index = 2 |
||||||
|
|
||||||
|
[node name="SaveFileDialog" type="FileDialog" parent="."] |
||||||
|
unique_name_in_owner = true |
||||||
|
auto_translate_mode = 1 |
||||||
|
title = "Save World" |
||||||
|
size = Vector2i(781, 320) |
||||||
|
mode_overrides_title = false |
||||||
|
access = 2 |
||||||
|
filters = PackedStringArray("*.yf5 ; YourFortV") |
||||||
|
use_native_dialog = true |
||||||
|
|
||||||
|
[node name="LoadFileDialog" type="FileDialog" parent="."] |
||||||
|
unique_name_in_owner = true |
||||||
|
auto_translate_mode = 1 |
||||||
|
title = "Load World" |
||||||
|
size = Vector2i(781, 320) |
||||||
|
ok_button_text = "Load" |
||||||
|
mode_overrides_title = false |
||||||
|
file_mode = 0 |
||||||
|
access = 2 |
||||||
|
filters = PackedStringArray("*.yf5 ; YourFortV") |
||||||
|
use_native_dialog = true |
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."] |
||||||
|
layout_mode = 2 |
||||||
|
theme_override_constants/margin_left = 6 |
||||||
|
theme_override_constants/margin_top = 6 |
||||||
|
theme_override_constants/margin_right = 6 |
||||||
|
theme_override_constants/margin_bottom = 4 |
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] |
||||||
|
custom_minimum_size = Vector2(180, 0) |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"] |
||||||
|
custom_minimum_size = Vector2(58, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Filename:" |
||||||
|
|
||||||
|
[node name="Filename" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"] |
||||||
|
unique_name_in_owner = true |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1) |
||||||
|
text = "-not saved yet-" |
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"] |
||||||
|
custom_minimum_size = Vector2(58, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Playtime:" |
||||||
|
|
||||||
|
[node name="Playtime" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"] |
||||||
|
unique_name_in_owner = true |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1) |
||||||
|
text = "000d 00h 00m 00s" |
||||||
|
|
||||||
|
[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3"] |
||||||
|
custom_minimum_size = Vector2(58, 0) |
||||||
|
layout_mode = 2 |
||||||
|
text = "Last Saved:" |
||||||
|
|
||||||
|
[node name="LastSaved" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3"] |
||||||
|
unique_name_in_owner = true |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1) |
||||||
|
text = "0000-00-00 00:00" |
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="HBoxContainer4" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="QuickSave" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer4"] |
||||||
|
unique_name_in_owner = true |
||||||
|
custom_minimum_size = Vector2(112, 17) |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
text = "Quick Save" |
||||||
|
|
||||||
|
[node name="SaveAs" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer4"] |
||||||
|
unique_name_in_owner = true |
||||||
|
custom_minimum_size = Vector2(0, 17) |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
text = "Save As..." |
||||||
|
|
||||||
|
[node name="HBoxContainer5" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] |
||||||
|
layout_mode = 2 |
||||||
|
|
||||||
|
[node name="LoadFrom" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer5"] |
||||||
|
unique_name_in_owner = true |
||||||
|
custom_minimum_size = Vector2(80, 17) |
||||||
|
layout_mode = 2 |
||||||
|
size_flags_horizontal = 3 |
||||||
|
text = "Load World From..." |
||||||
|
|
||||||
|
[connection signal="file_selected" from="SaveFileDialog" to="." method="_on_save_file_dialog_file_selected"] |
||||||
|
[connection signal="file_selected" from="LoadFileDialog" to="." method="_on_load_file_dialog_file_selected"] |
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer4/QuickSave" to="." method="_on_quick_save_pressed"] |
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer4/SaveAs" to="." method="_on_save_as_pressed"] |
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer5/LoadFrom" to="." method="_on_load_from_pressed"] |
@ -0,0 +1,87 @@ |
|||||||
|
# TODO: Make this work again. |
||||||
|
class_name Health |
||||||
|
extends Node2D |
||||||
|
|
||||||
|
const TIME_VISIBLE := 1.0 |
||||||
|
const TIME_FADE := 1.5 |
||||||
|
|
||||||
|
@export var player : Player |
||||||
|
|
||||||
|
@export var segments := 6 |
||||||
|
@export var inner_radius := 14 |
||||||
|
@export var outer_radius := 24 |
||||||
|
@export var separation := 2.0 |
||||||
|
|
||||||
|
@onready var start_angle := (TAU / 4) - (TAU / segments / 2) |
||||||
|
|
||||||
|
var health : float |
||||||
|
var visibility_timer : float |
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void: |
||||||
|
visible = false |
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
if not player: |
||||||
|
visible = false |
||||||
|
return |
||||||
|
|
||||||
|
if player.health.current >= 1.0: |
||||||
|
if !visible: return |
||||||
|
if visibility_timer > TIME_VISIBLE + TIME_FADE: |
||||||
|
visible = false |
||||||
|
return |
||||||
|
if visibility_timer > TIME_VISIBLE: |
||||||
|
modulate = Color(Color.WHITE, 1.0 - (visibility_timer - TIME_VISIBLE) / TIME_FADE) |
||||||
|
visibility_timer += delta |
||||||
|
|
||||||
|
else: |
||||||
|
visible = true |
||||||
|
modulate = Color.WHITE |
||||||
|
visibility_timer = 0.0 |
||||||
|
|
||||||
|
position = player.get_global_transform_with_canvas().origin; |
||||||
|
health = player.health.current; |
||||||
|
|
||||||
|
|
||||||
|
func _draw() -> void: |
||||||
|
for i in segments: |
||||||
|
var angle_1 := start_angle + TAU * ( i / float(segments)) |
||||||
|
var angle_3 := start_angle + TAU * ((i + 1) / float(segments)) |
||||||
|
var angle_2 := (angle_1 + angle_3) / 2 |
||||||
|
|
||||||
|
var sep_1 := separation * Vector2.from_angle(angle_1 + TAU / 4) |
||||||
|
var sep_2 := separation * Vector2.from_angle(angle_3 - TAU / 4) |
||||||
|
|
||||||
|
draw_colored_polygon([ |
||||||
|
inner_radius * Vector2.from_angle(angle_2) , |
||||||
|
inner_radius * Vector2.from_angle(angle_1) + sep_1, |
||||||
|
outer_radius * Vector2.from_angle(angle_1) + sep_1, |
||||||
|
outer_radius * Vector2.from_angle(angle_2) , |
||||||
|
outer_radius * Vector2.from_angle(angle_3) + sep_2, |
||||||
|
inner_radius * Vector2.from_angle(angle_3) + sep_2, |
||||||
|
], Color(Color.BLACK, 0.4)) # antialiased = true |
||||||
|
|
||||||
|
for i in segments: |
||||||
|
var fullness := clampf((health * segments) - i, 0.0, 1.0) |
||||||
|
if fullness <= 0.1: return |
||||||
|
|
||||||
|
var angle_1 := start_angle + TAU * ( i / float(segments)) |
||||||
|
var angle_3 := start_angle + TAU * ((i + 1) / float(segments)) |
||||||
|
var angle_2 := (angle_1 + angle_3) / 2 |
||||||
|
|
||||||
|
var sep_1 := separation * Vector2.from_angle(angle_1 + TAU / 4) |
||||||
|
var sep_2 := separation * Vector2.from_angle(angle_3 - TAU / 4) |
||||||
|
|
||||||
|
var _inner_radius_2 = inner_radius + 1 |
||||||
|
var _outer_radius_2 = lerpf(inner_radius, outer_radius, fullness) - 1 |
||||||
|
|
||||||
|
draw_colored_polygon([ |
||||||
|
inner_radius * Vector2.from_angle(angle_2) , |
||||||
|
inner_radius * Vector2.from_angle(angle_1) + sep_1, |
||||||
|
outer_radius * Vector2.from_angle(angle_1) + sep_1, |
||||||
|
outer_radius * Vector2.from_angle(angle_2) , |
||||||
|
outer_radius * Vector2.from_angle(angle_3) + sep_2, |
||||||
|
inner_radius * Vector2.from_angle(angle_3) + sep_2, |
||||||
|
], Color(Color.RED, 0.5)) # antialiased = true |
@ -0,0 +1 @@ |
|||||||
|
uid://b12ppoaf6wls4 |
@ -0,0 +1,114 @@ |
|||||||
|
class_name RadialMenu |
||||||
|
extends Node2D |
||||||
|
|
||||||
|
const TIME_FADE := 0.6 |
||||||
|
const TIME_VISIBLE := 0.4 |
||||||
|
|
||||||
|
@export var cursor : Cursor |
||||||
|
@export var player : Player |
||||||
|
|
||||||
|
@export var min_segments := 8 |
||||||
|
@export var inner_radius := 32.0 |
||||||
|
@export var outer_radius := 64.0 |
||||||
|
@export var separation := 2.0 |
||||||
|
|
||||||
|
@onready var label := $Label as Label |
||||||
|
@onready var start_angle := (TAU / 4) - (TAU / min_segments / 2) |
||||||
|
|
||||||
|
var visibility_timer: float |
||||||
|
|
||||||
|
var hovered: Item: |
||||||
|
get: return hovered |
||||||
|
set(value): hovered = value; label.text = str(value.name) if value else "" |
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void: |
||||||
|
if not player or not player.health.is_alive: return |
||||||
|
|
||||||
|
if event.is_action_pressed("interact_select"): |
||||||
|
position = cursor.hud_position.round() |
||||||
|
visible = true |
||||||
|
modulate = Color.WHITE |
||||||
|
|
||||||
|
hovered = player.inventory.equipped |
||||||
|
player.inventory.equipped = null |
||||||
|
|
||||||
|
visibility_timer = INF |
||||||
|
|
||||||
|
var select_dec := event.is_action_pressed("interact_select_dec") |
||||||
|
var select_inc := event.is_action_pressed("interact_select_inc") |
||||||
|
if select_dec != select_inc: # xor would be more fitting here |
||||||
|
if visible and visibility_timer == INF: |
||||||
|
var cursor_offset := to_local(cursor.hud_position) |
||||||
|
if cursor_offset.length() > inner_radius: return |
||||||
|
else: |
||||||
|
position = player.get_global_transform_with_canvas().origin |
||||||
|
hovered = player.inventory.equipped |
||||||
|
|
||||||
|
visible = true |
||||||
|
modulate = Color.WHITE |
||||||
|
visibility_timer = TIME_FADE + TIME_VISIBLE |
||||||
|
|
||||||
|
var items := player.inventory.get_items() |
||||||
|
if items.is_empty(): return |
||||||
|
|
||||||
|
var new_index := 0 |
||||||
|
if hovered: |
||||||
|
var index := hovered.get_index() |
||||||
|
var diff := 1 if select_inc else -1 |
||||||
|
new_index = posmod(index + diff, items.size()) |
||||||
|
hovered = items[new_index] |
||||||
|
player.inventory.equipped = hovered |
||||||
|
queue_redraw() |
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
if not player or not player.health.is_alive: visible = false |
||||||
|
if not visible: return |
||||||
|
|
||||||
|
visibility_timer -= delta |
||||||
|
if visibility_timer <= 0.0: visible = false |
||||||
|
if visibility_timer < TIME_FADE: modulate = Color(Color.WHITE, visibility_timer / TIME_FADE) |
||||||
|
if visibility_timer < INF: return |
||||||
|
|
||||||
|
var cursor_offset := to_local(cursor.hud_position) |
||||||
|
var angle := cursor_offset.angle() - start_angle |
||||||
|
var index := floori(fmod((angle / TAU + 1), 1) * min_segments) |
||||||
|
|
||||||
|
var items := player.inventory.get_items() |
||||||
|
if cursor_offset.length() > inner_radius and index < items.size() and items[index] != hovered: |
||||||
|
hovered = items[index] |
||||||
|
|
||||||
|
if not Input.is_action_pressed("interact_select"): |
||||||
|
player.inventory.equipped = hovered |
||||||
|
visibility_timer = TIME_FADE |
||||||
|
|
||||||
|
queue_redraw() |
||||||
|
|
||||||
|
func _draw() -> void: |
||||||
|
var items := player.inventory.get_items() |
||||||
|
var segments := maxi(min_segments, items.size()) |
||||||
|
for i in segments: |
||||||
|
var angle_1 := start_angle + TAU * ( i / float(segments)) |
||||||
|
var angle_3 := start_angle + TAU * ((i + 1) / float(segments)) |
||||||
|
var angle_2 := (angle_1 + angle_3) / 2 |
||||||
|
|
||||||
|
var sep_1 := separation * Vector2.from_angle(angle_1 + TAU / 4) |
||||||
|
var sep_2 := separation * Vector2.from_angle(angle_3 - TAU / 4) |
||||||
|
|
||||||
|
var is_hovered := i < items.size() and items[i] == hovered |
||||||
|
var inner_radius_2 := inner_radius + (5.0 if is_hovered else 0.0) |
||||||
|
var outer_radius_2 := outer_radius + (5.0 if is_hovered else 0.0) |
||||||
|
|
||||||
|
var color := Color(0.1, 0.1, 0.1, 0.7 if is_hovered else 0.4) |
||||||
|
draw_colored_polygon([ |
||||||
|
inner_radius_2 * Vector2.from_angle(angle_1) + sep_1, |
||||||
|
outer_radius_2 * Vector2.from_angle(angle_1) + sep_1, |
||||||
|
(outer_radius_2 + separation) * Vector2.from_angle(angle_2) , |
||||||
|
outer_radius_2 * Vector2.from_angle(angle_3) + sep_2, |
||||||
|
inner_radius_2 * Vector2.from_angle(angle_3) + sep_2, |
||||||
|
], color) |
||||||
|
|
||||||
|
if i < items.size(): |
||||||
|
var sprite := items[i] |
||||||
|
var pos := (inner_radius_2 + outer_radius_2) / 2 * Vector2.from_angle(angle_2) |
||||||
|
if sprite.centered: pos -= sprite.texture.get_size() / 2 |
||||||
|
draw_texture(sprite.texture, pos, sprite.modulate) |
@ -0,0 +1 @@ |
|||||||
|
uid://doey28skdr0ty |
@ -0,0 +1,24 @@ |
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://br618d1sbfgie"] |
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://doey28skdr0ty" path="res://hud/radial_menu.gd" id="1_pmlck"] |
||||||
|
[ext_resource type="Theme" uid="uid://4tevy1my8joc" path="res://hud/theme/ui_theme.tres" id="2_ahx0k"] |
||||||
|
|
||||||
|
[node name="RadialMenu" type="Node2D"] |
||||||
|
script = ExtResource("1_pmlck") |
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."] |
||||||
|
anchors_preset = 8 |
||||||
|
anchor_left = 0.5 |
||||||
|
anchor_top = 0.5 |
||||||
|
anchor_right = 0.5 |
||||||
|
anchor_bottom = 0.5 |
||||||
|
offset_left = -29.0 |
||||||
|
offset_top = -16.0 |
||||||
|
offset_right = 29.0 |
||||||
|
offset_bottom = 16.0 |
||||||
|
grow_horizontal = 2 |
||||||
|
grow_vertical = 2 |
||||||
|
theme = ExtResource("2_ahx0k") |
||||||
|
horizontal_alignment = 1 |
||||||
|
vertical_alignment = 1 |
||||||
|
autowrap_mode = 2 |
@ -0,0 +1,40 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="font_data_dynamic" |
||||||
|
type="FontFile" |
||||||
|
uid="uid://swxa7umqpfwu" |
||||||
|
path="res://.godot/imported/HeartbitXX.ttf-0f40fa5f8905572711540edfa78ad592.fontdata" |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://hud/theme/HeartbitXX.ttf" |
||||||
|
dest_files=["res://.godot/imported/HeartbitXX.ttf-0f40fa5f8905572711540edfa78ad592.fontdata"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
Rendering=null |
||||||
|
antialiasing=0 |
||||||
|
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 |
||||||
|
hinting=0 |
||||||
|
subpixel_positioning=0 |
||||||
|
keep_rounding_remainders=true |
||||||
|
oversampling=0.0 |
||||||
|
Fallbacks=null |
||||||
|
fallbacks=[] |
||||||
|
Compress=null |
||||||
|
compress=true |
||||||
|
preload=[{ |
||||||
|
"chars": [], |
||||||
|
"glyphs": [], |
||||||
|
"name": "New Configuration", |
||||||
|
"size": Vector2i(16, 0) |
||||||
|
}] |
||||||
|
language_support={} |
||||||
|
script_support={} |
||||||
|
opentype_features={} |
After Width: | Height: | Size: 232 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://c7rhuvmdwfkk" |
||||||
|
path="res://.godot/imported/checkbox_check.png-bbe69d46e6b7f8266782ba329dde8bcf.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://hud/theme/checkbox_check.png" |
||||||
|
dest_files=["res://.godot/imported/checkbox_check.png-bbe69d46e6b7f8266782ba329dde8bcf.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 |
After Width: | Height: | Size: 219 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://cxk2noaybwgrv" |
||||||
|
path="res://.godot/imported/checkbox_uncheck.png-644d262213e0aa5438792b360402e2f7.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://hud/theme/checkbox_uncheck.png" |
||||||
|
dest_files=["res://.godot/imported/checkbox_uncheck.png-644d262213e0aa5438792b360402e2f7.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 |
@ -0,0 +1,38 @@ |
|||||||
|
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://4tevy1my8joc"] |
||||||
|
|
||||||
|
[ext_resource type="FontFile" uid="uid://swxa7umqpfwu" path="res://hud/theme/HeartbitXX.ttf" id="1"] |
||||||
|
[ext_resource type="Texture2D" uid="uid://c7rhuvmdwfkk" path="res://hud/theme/checkbox_check.png" id="1_tbeor"] |
||||||
|
[ext_resource type="Texture2D" uid="uid://cxk2noaybwgrv" path="res://hud/theme/checkbox_uncheck.png" id="2_mk0s6"] |
||||||
|
|
||||||
|
[sub_resource type="FontVariation" id="FontVariation_touxu"] |
||||||
|
base_font = ExtResource("1") |
||||||
|
spacing_top = -3 |
||||||
|
spacing_bottom = -1 |
||||||
|
|
||||||
|
[resource] |
||||||
|
default_font = SubResource("FontVariation_touxu") |
||||||
|
Button/colors/font_color = Color(0.88, 0.88, 0.88, 1) |
||||||
|
Button/colors/font_color_disabled = Color(0.9, 0.9, 0.9, 0.2) |
||||||
|
Button/colors/font_color_hover = Color(0.94, 0.94, 0.94, 1) |
||||||
|
Button/colors/font_color_pressed = Color(1, 1, 1, 1) |
||||||
|
Button/constants/hseparation = 2 |
||||||
|
Button/constants/outline_size = 4 |
||||||
|
Button/styles/disabled = null |
||||||
|
Button/styles/focus = null |
||||||
|
Button/styles/hover = null |
||||||
|
Button/styles/normal = null |
||||||
|
Button/styles/pressed = null |
||||||
|
CheckBox/constants/icon_max_width = 11 |
||||||
|
CheckBox/constants/outline_size = 4 |
||||||
|
CheckBox/icons/checked = ExtResource("1_tbeor") |
||||||
|
CheckBox/icons/checked_disabled = null |
||||||
|
CheckBox/icons/radio_checked = null |
||||||
|
CheckBox/icons/radio_checked_disabled = null |
||||||
|
CheckBox/icons/radio_unchecked = null |
||||||
|
CheckBox/icons/radio_unchecked_disabled = null |
||||||
|
CheckBox/icons/unchecked = ExtResource("2_mk0s6") |
||||||
|
CheckBox/icons/unchecked_disabled = null |
||||||
|
HSeparator/constants/separation = 3 |
||||||
|
Label/constants/outline_size = 4 |
||||||
|
RichTextLabel/constants/outline_size = 4 |
||||||
|
VBoxContainer/constants/separation = 3 |
@ -0,0 +1,36 @@ |
|||||||
|
class_name WeaponInfo |
||||||
|
extends Node2D |
||||||
|
|
||||||
|
# TODO: Render rounds as sprites? |
||||||
|
|
||||||
|
const VISIBLE_DURATION := 0.8 |
||||||
|
|
||||||
|
@onready var rounds := $Rounds as Label |
||||||
|
@onready var reloading := $Reloading as ProgressBar |
||||||
|
|
||||||
|
var _visible_delay : float |
||||||
|
var _previous_weapon : Weapon |
||||||
|
var _previous_rounds : int |
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
var player := Game.LOCAL_PLAYER |
||||||
|
var weapon := player.inventory.equipped as Weapon if player else null |
||||||
|
if not weapon: visible = false; _previous_weapon = null; return |
||||||
|
|
||||||
|
visible = true |
||||||
|
_visible_delay -= delta |
||||||
|
if _visible_delay <= 0: |
||||||
|
modulate = Color(modulate, modulate.a - delta) |
||||||
|
if modulate.a <= 0: visible = false |
||||||
|
|
||||||
|
if weapon != _previous_weapon or weapon.rounds != _previous_rounds or weapon.is_reloading: |
||||||
|
_visible_delay = VISIBLE_DURATION |
||||||
|
modulate = Color.WHITE |
||||||
|
|
||||||
|
rounds.visible = weapon.capacity > 1 |
||||||
|
rounds.text = "%d/%d" % [ weapon.rounds, weapon.capacity ] |
||||||
|
reloading.value = weapon.reload_progress |
||||||
|
reloading.visible = weapon.is_reloading |
||||||
|
|
||||||
|
_previous_weapon = weapon |
||||||
|
_previous_rounds = weapon.rounds |
@ -0,0 +1 @@ |
|||||||
|
uid://b8mob2xa2uq51 |
@ -0,0 +1,53 @@ |
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://vbqf8dv4enpe"] |
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://4tevy1my8joc" path="res://hud/theme/ui_theme.tres" id="1_q5pwl"] |
||||||
|
[ext_resource type="Script" uid="uid://b8mob2xa2uq51" path="res://hud/weapon_info.gd" id="1_qxd8k"] |
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="1"] |
||||||
|
bg_color = Color(0, 0, 0, 0.752941) |
||||||
|
border_width_left = 1 |
||||||
|
border_width_top = 1 |
||||||
|
border_width_right = 1 |
||||||
|
border_width_bottom = 1 |
||||||
|
border_color = Color(0, 0, 0, 0.501961) |
||||||
|
corner_detail = 1 |
||||||
|
expand_margin_left = 1.0 |
||||||
|
expand_margin_top = 1.0 |
||||||
|
expand_margin_right = 1.0 |
||||||
|
expand_margin_bottom = 1.0 |
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="2"] |
||||||
|
bg_color = Color(0, 0.752941, 0, 0.752941) |
||||||
|
corner_detail = 1 |
||||||
|
|
||||||
|
[sub_resource type="Theme" id="3"] |
||||||
|
ProgressBar/colors/font_color = Color(0.94, 0.94, 0.94, 1) |
||||||
|
ProgressBar/colors/font_color_shadow = Color(0, 0, 0, 1) |
||||||
|
ProgressBar/fonts/font = null |
||||||
|
ProgressBar/styles/bg = SubResource("1") |
||||||
|
ProgressBar/styles/fg = SubResource("2") |
||||||
|
|
||||||
|
[node name="WeaponInfo" type="Node2D"] |
||||||
|
script = ExtResource("1_qxd8k") |
||||||
|
|
||||||
|
[node name="Rounds" type="Label" parent="."] |
||||||
|
anchors_preset = 5 |
||||||
|
anchor_left = 0.5 |
||||||
|
anchor_right = 0.5 |
||||||
|
offset_left = -40.0 |
||||||
|
offset_top = 7.0 |
||||||
|
offset_right = 40.0 |
||||||
|
offset_bottom = 16.0 |
||||||
|
theme = ExtResource("1_q5pwl") |
||||||
|
text = "12/12" |
||||||
|
horizontal_alignment = 1 |
||||||
|
|
||||||
|
[node name="Reloading" type="ProgressBar" parent="."] |
||||||
|
offset_left = -16.0 |
||||||
|
offset_top = 22.0 |
||||||
|
offset_right = 16.0 |
||||||
|
offset_bottom = 26.0 |
||||||
|
theme = SubResource("3") |
||||||
|
max_value = 1.0 |
||||||
|
value = 0.5 |
||||||
|
show_percentage = false |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dupictrmg4l3v" |
||||||
|
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://icon.png" |
||||||
|
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.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 |
@ -0,0 +1,102 @@ |
|||||||
|
class_name Bullet |
||||||
|
extends Node2D |
||||||
|
|
||||||
|
const LIFE_TIME := 0.6 |
||||||
|
const FADE_TIME := 0.6 |
||||||
|
|
||||||
|
var direction : Vector2 |
||||||
|
var effective_range : float |
||||||
|
var maximum_range : float |
||||||
|
var velocity : float |
||||||
|
var damage : float |
||||||
|
var color : Color |
||||||
|
|
||||||
|
var _start_position : Vector2 |
||||||
|
var _age := 0.0 |
||||||
|
var _distance := 0.0 |
||||||
|
|
||||||
|
func _init( |
||||||
|
position : Vector2, |
||||||
|
direction : Vector2, |
||||||
|
effective_range : float, |
||||||
|
maximum_range : float, |
||||||
|
velocity : float, |
||||||
|
damage : float, |
||||||
|
color : Color, |
||||||
|
) -> void: |
||||||
|
_start_position = position |
||||||
|
self.position = position |
||||||
|
self.direction = direction |
||||||
|
self.effective_range = effective_range |
||||||
|
self.maximum_range = maximum_range |
||||||
|
self.velocity = velocity |
||||||
|
self.damage = damage |
||||||
|
self.color = color |
||||||
|
|
||||||
|
func _on_collide(obj: CollisionObject2D, hit_position: Vector2) -> void: |
||||||
|
# TODO: Add a global game setting to specify whether shooter or server announces successful hit. |
||||||
|
# For now, server is the most straight-forward. Eventually, support client predictive movement? |
||||||
|
pass |
||||||
|
|
||||||
|
# protected virtual void OnCollide(CollisionObject2D obj, Vector2 hitPosition) |
||||||
|
# { |
||||||
|
# // TODO: Add a global game setting to specify whether shooter or server announces successful hit. |
||||||
|
# // For now, server is the most straight-forward. Eventually, support client predictive movement? |
||||||
|
# if (!(this.GetGame() is Server) || !(obj.GetNodeOrNull("Sprite2D") is Sprite2D sprite)) return; |
||||||
|
# var world = this.GetWorld3d(); |
||||||
|
# var path = world.GetPathTo(sprite); |
||||||
|
# var color = new Color(Color, (1 + Color.a) / 2); |
||||||
|
# RPC.Reliable(world.GetPlayersTracking(BlockPos.FromVector(obj.GlobalPosition).ToChunkPos()), |
||||||
|
# world.SpawnHit, path, hitPosition, color); |
||||||
|
# if (obj is Player player) { |
||||||
|
# var rangeFactor = Math.Min(1.0F, (MaximumRange - _distance) / (MaximumRange - EffectiveRange)); |
||||||
|
# player.Health -= Damage * rangeFactor; |
||||||
|
# } |
||||||
|
# // TODO: Also spawn a ghost of the player who was hit so they can see where they got shot? |
||||||
|
# } |
||||||
|
|
||||||
|
func _process(delta: float) -> void: |
||||||
|
if _age > LIFE_TIME: |
||||||
|
modulate = Color(modulate, modulate.a - delta / FADE_TIME) |
||||||
|
if modulate.a <= 0: queue_free() |
||||||
|
_age += delta |
||||||
|
|
||||||
|
func _physics_process(delta: float) -> void: |
||||||
|
var previous_position := position |
||||||
|
_distance = min(maximum_range, velocity * _age) |
||||||
|
position = _start_position + direction * _distance |
||||||
|
|
||||||
|
var mask := PhysicsLayer.WORLD | PhysicsLayer.PLAYERS |
||||||
|
var ray := PhysicsRayQueryParameters2D.create(previous_position, position, mask) |
||||||
|
var result := get_world_2d().direct_space_state.intersect_ray(ray) |
||||||
|
if !result.is_empty(): |
||||||
|
position = result.position as Vector2 |
||||||
|
_distance = _start_position.distance_to(position) |
||||||
|
var obj := result.collider as CollisionObject2D |
||||||
|
if obj: _on_collide(obj, position - obj.global_position) |
||||||
|
set_physics_process(false) |
||||||
|
|
||||||
|
if _distance > maximum_range: |
||||||
|
set_physics_process(false) |
||||||
|
|
||||||
|
queue_redraw() |
||||||
|
|
||||||
|
func _draw() -> void: |
||||||
|
var points: Array[Vector2] |
||||||
|
var colors: Array[Color] |
||||||
|
|
||||||
|
if _distance > 16: |
||||||
|
points.append(Vector2.ZERO) |
||||||
|
colors.append(Color(color, color.a * minf(1, 1 - (_distance - effective_range) / (maximum_range - effective_range)))) |
||||||
|
|
||||||
|
if _distance > effective_range: |
||||||
|
points.append(direction * -(_distance - effective_range)) |
||||||
|
colors.append(color) |
||||||
|
|
||||||
|
points.append(direction * -maxf(0.0, _distance - 16)) |
||||||
|
colors.append(color) |
||||||
|
|
||||||
|
points.append(direction * -_distance) |
||||||
|
colors.append(Color(color, 0.0)) |
||||||
|
|
||||||
|
draw_polyline_colors(points, colors, 1.5, true) |
@ -0,0 +1 @@ |
|||||||
|
uid://dtxrt2lq1vuhh |
@ -0,0 +1,37 @@ |
|||||||
|
class_name CreativeBuilding |
||||||
|
extends Item |
||||||
|
|
||||||
|
func _process(_delta: float) -> void: |
||||||
|
if not player.network.is_local: return |
||||||
|
if not is_equipped: return |
||||||
|
|
||||||
|
var mouse_pos := get_global_mouse_position() |
||||||
|
var block_pos := Block.pos_from_vec(mouse_pos) |
||||||
|
var block := Game.WORLD.get_block(block_pos) |
||||||
|
|
||||||
|
rotation = player.position.angle_to_point(mouse_pos) |
||||||
|
|
||||||
|
if Input.is_action_pressed("interact_primary"): |
||||||
|
if block.matter == Matter.NONE: |
||||||
|
set_block(block, Matter.PLASTIC, Shape.FULL) |
||||||
|
|
||||||
|
if Input.is_action_pressed("interact_secondary"): |
||||||
|
set_block(block, Matter.NONE, Shape.EMPTY) |
||||||
|
|
||||||
|
|
||||||
|
func set_block(block: Block, matter: Matter, shape: Shape) -> void: |
||||||
|
block.matter = matter |
||||||
|
block.shape = shape |
||||||
|
if not multiplayer.is_server(): |
||||||
|
# Inform the server about the requested change. |
||||||
|
_on_set_block.rpc_id(1, block.pos, matter.id, shape.id) |
||||||
|
|
||||||
|
@rpc("reliable") |
||||||
|
func _on_set_block(block_pos: Vector2i, matter_id: int, shape_id: int) -> void: |
||||||
|
if not multiplayer.is_server(): return # Can only be processed by server. |
||||||
|
var block := Game.WORLD.get_block(block_pos) |
||||||
|
# TODO: Standerdize on one of these registry methods? |
||||||
|
block.matter = Matter.REGISTRY.lookup_by_id(matter_id) |
||||||
|
block.shape = Shape.lookup(shape_id) |
||||||
|
# TODO: This will cause the player who sent the message to receive |
||||||
|
# a block change even though they already changed said block. |
@ -0,0 +1 @@ |
|||||||
|
uid://dv62vpu4lkr87 |
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://cvwd84agvfpmh" |
||||||
|
path="res://.godot/imported/AK47.png-9e0de10706fa2125046af78c6951bba1.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/AK47.png" |
||||||
|
dest_files=["res://.godot/imported/AK47.png-9e0de10706fa2125046af78c6951bba1.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 |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dkrp5gulnscj6" |
||||||
|
path="res://.godot/imported/Blunderbuss.png-ea4df78a817b1c20f211b870aa1bd0c2.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/Blunderbuss.png" |
||||||
|
dest_files=["res://.godot/imported/Blunderbuss.png-ea4df78a817b1c20f211b870aa1bd0c2.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 |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://bgxqkxshjqt7m" |
||||||
|
path="res://.godot/imported/BowArrow.png-b88568c99a9a6cb163a082a5424495d7.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/BowArrow.png" |
||||||
|
dest_files=["res://.godot/imported/BowArrow.png-b88568c99a9a6cb163a082a5424495d7.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 |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 255 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dkbjlb3ie6eo7" |
||||||
|
path="res://.godot/imported/ColtSingleActionArmy.png-53f5d63d5c6f6c53d1718f1b3495fa5b.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/ColtSingleActionArmy.png" |
||||||
|
dest_files=["res://.godot/imported/ColtSingleActionArmy.png-53f5d63d5c6f6c53d1718f1b3495fa5b.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 |
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dp5ndpw6wo20p" |
||||||
|
path="res://.godot/imported/Derringer.png-edcaf811e99acb87033922d6561f5c13.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/Derringer.png" |
||||||
|
dest_files=["res://.godot/imported/Derringer.png-edcaf811e99acb87033922d6561f5c13.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 |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://bwk4k706icgq" |
||||||
|
path="res://.godot/imported/DoubleBarrel.png-54aa633aff2593c0bf4cf861dc8dd82b.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/DoubleBarrel.png" |
||||||
|
dest_files=["res://.godot/imported/DoubleBarrel.png-54aa633aff2593c0bf4cf861dc8dd82b.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 |
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dddw8o4powkib" |
||||||
|
path="res://.godot/imported/FNScar.png-b105fd117f81dc1354218f6b6955b43d.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/FNScar.png" |
||||||
|
dest_files=["res://.godot/imported/FNScar.png-b105fd117f81dc1354218f6b6955b43d.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 |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://3g6me8fpg35s" |
||||||
|
path="res://.godot/imported/LaserPistol.png-9394305269d8d63186368029700440c6.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://item/guns/LaserPistol.png" |
||||||
|
dest_files=["res://.godot/imported/LaserPistol.png-9394305269d8d63186368029700440c6.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 |