Initial commit
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://bco4seshb8fjf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://fvwy57of2gvq" path="res://Maps/Lobby/lobby.gd" id="1_3j6ah"]
|
||||
[ext_resource type="Texture2D" uid="uid://cimsjl61nhh5s" path="res://assets/2D/HDR_blue_nebulae-1.hdr" id="1_o7c6e"]
|
||||
[ext_resource type="Texture2D" uid="uid://icwcdyvrtcwe" path="res://test/TestTex1.png" id="3_b4v87"]
|
||||
[ext_resource type="Script" uid="uid://cjgxd88k1bntf" path="res://script/pathfindingGridLoad.gd" id="3_bhyb3"]
|
||||
[ext_resource type="Script" uid="uid://cjiiw7cybj24b" path="res://script/ButtonLogicImpulse.gd" id="4_2vvmy"]
|
||||
[ext_resource type="Script" uid="uid://ymaax1x5fos3" path="res://script/interactBox.gd" id="5_f6mem"]
|
||||
[ext_resource type="AudioStream" uid="uid://1bkjenax2g3s" path="res://assets/Audio/Ambience 1 SpaceBots Audio.mp3" id="6_f6mem"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_skcuv"]
|
||||
interpolation_mode = 1
|
||||
offsets = PackedFloat32Array(0, 0.25, 0.361502, 0.375, 0.488263, 0.5, 0.615023, 0.625, 0.732394, 0.75, 0.859155, 0.875, 1)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 0.25, 0.25, 0.25, 1, 0.28169, 0.28169, 0.28169, 1, 0.375, 0.375, 0.375, 1, 0.408451, 0.408451, 0.408451, 1, 0.5, 0.5, 0.5, 1, 0.530516, 0.530516, 0.530516, 1, 0.625, 0.625, 0.625, 1, 0.661972, 0.661972, 0.661972, 1, 0.75, 0.75, 0.75, 1, 0.802817, 0.802817, 0.802817, 1, 0.875, 0.875, 0.875, 1, 1, 1, 1, 1)
|
||||
metadata/_snap_enabled = true
|
||||
metadata/_snap_count = 8
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_h11mn"]
|
||||
gradient = SubResource("Gradient_skcuv")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_3j6ah"]
|
||||
offsets = PackedFloat32Array(0.187793, 0.704225, 0.929577)
|
||||
colors = PackedColorArray(0, 0, 0, 1, 0.58042, 0.58042, 0.58042, 1, 0.860369, 0.860369, 0.860369, 1)
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_bhyb3"]
|
||||
frequency = 0.03
|
||||
fractal_octaves = 8
|
||||
fractal_lacunarity = 5.0
|
||||
fractal_gain = 0.495
|
||||
fractal_weighted_strength = 0.23
|
||||
domain_warp_enabled = true
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_jyrsd"]
|
||||
noise = SubResource("FastNoiseLite_bhyb3")
|
||||
color_ramp = SubResource("Gradient_3j6ah")
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_2vvmy"]
|
||||
panorama = ExtResource("1_o7c6e")
|
||||
|
||||
[sub_resource type="Sky" id="Sky_bs3qb"]
|
||||
sky_material = SubResource("PanoramaSkyMaterial_2vvmy")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_f6mem"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_bs3qb")
|
||||
glow_enabled = true
|
||||
glow_levels/1 = 1.38
|
||||
glow_levels/2 = 1.55
|
||||
glow_levels/3 = 5.63
|
||||
glow_levels/5 = 1.75
|
||||
glow_levels/6 = 0.9
|
||||
glow_levels/7 = 0.75
|
||||
glow_strength = 1.73
|
||||
glow_mix = 0.03
|
||||
glow_bloom = 0.05
|
||||
glow_blend_mode = 4
|
||||
glow_hdr_luminance_cap = 1.5
|
||||
glow_map = SubResource("NoiseTexture2D_jyrsd")
|
||||
volumetric_fog_emission = Color(1, 1, 1, 1)
|
||||
volumetric_fog_emission_energy = 0.04
|
||||
adjustment_brightness = 1.5
|
||||
adjustment_color_correction = SubResource("GradientTexture1D_h11mn")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1nbv0"]
|
||||
albedo_color = Color(0.8819366, 0.8819366, 0.88193655, 1)
|
||||
albedo_texture = ExtResource("3_b4v87")
|
||||
metallic = 0.4
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_b4v87"]
|
||||
size = Vector3(4.5, 1, 1)
|
||||
|
||||
[node name="Lobby" type="Node3D"]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0, 0, 0)
|
||||
script = ExtResource("1_3j6ah")
|
||||
metadata/_custom_type_script = "uid://cbjn7f7r081q8"
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_f6mem")
|
||||
|
||||
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10.1725, 0)
|
||||
material_overlay = SubResource("StandardMaterial3D_1nbv0")
|
||||
use_collision = true
|
||||
|
||||
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00969505, 0)
|
||||
operation = 2
|
||||
size = Vector3(49, 19, 49)
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"]
|
||||
flip_faces = true
|
||||
size = Vector3(50, 20, 50)
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.47177, 0)
|
||||
omni_range = 19.6325
|
||||
|
||||
[node name="PathfindingGridLoader" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25, 2.01037, -25)
|
||||
script = ExtResource("3_bhyb3")
|
||||
lengthX = 25
|
||||
lengthZ = 25
|
||||
metadata/_custom_type_script = "uid://cjgxd88k1bntf"
|
||||
|
||||
[node name="StartMission" type="Label3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.69191, 1.21511)
|
||||
pixel_size = 0.02
|
||||
text = "Start Mission"
|
||||
|
||||
[node name="ButtonLogicImpulse" type="Timer" parent="StartMission" node_paths=PackedStringArray("interactBox")]
|
||||
script = ExtResource("4_2vvmy")
|
||||
interactBox = NodePath("../InteractBox")
|
||||
metadata/_custom_type_script = "uid://cjiiw7cybj24b"
|
||||
|
||||
[node name="InteractBox" type="Area3D" parent="StartMission" node_paths=PackedStringArray("object")]
|
||||
script = ExtResource("5_f6mem")
|
||||
object = NodePath("../ButtonLogicImpulse")
|
||||
metadata/_custom_type_script = "uid://ymaax1x5fos3"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StartMission/InteractBox"]
|
||||
shape = SubResource("BoxShape3D_b4v87")
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("6_f6mem")
|
||||
parameters/looping = true
|
||||
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bu2k5m2goye0i"
|
||||
path="res://.godot/imported/PCB.glb-91ec23b12cefdfbade05cd7fa81514d9.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/3D/PCB.glb"
|
||||
dest_files=["res://.godot/imported/PCB.glb-91ec23b12cefdfbade05cd7fa81514d9.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
extends MapLogic
|
||||
|
||||
var main: Main
|
||||
|
||||
@onready var startMissionButton: ButtonLogicImpulse = $StartMission/ButtonLogicImpulse
|
||||
var spaceshipScene: PackedScene = preload("res://test/spaceship_test.tscn")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
main = get_node("/root/Main")
|
||||
|
||||
startMissionButton.onPressed.connect(startMission)
|
||||
|
||||
func startMission() -> void:
|
||||
if not is_multiplayer_authority(): return
|
||||
main.changeMap.rpc(spaceshipScene)
|
||||
@@ -0,0 +1,146 @@
|
||||
extends RefCounted
|
||||
class_name _NetfoxLogger
|
||||
|
||||
enum {
|
||||
LOG_MIN,
|
||||
LOG_TRACE,
|
||||
LOG_DEBUG,
|
||||
LOG_INFO,
|
||||
LOG_WARN,
|
||||
LOG_ERROR,
|
||||
LOG_MAX
|
||||
}
|
||||
|
||||
const DEFAULT_LOG_LEVEL := LOG_DEBUG
|
||||
|
||||
static var log_level: int
|
||||
static var module_log_level: Dictionary
|
||||
|
||||
static var _tags: Dictionary = {}
|
||||
static var _ordered_tags: Array[Callable] = []
|
||||
|
||||
var module: String
|
||||
var name: String
|
||||
|
||||
const level_prefixes: Array[String] = [
|
||||
"",
|
||||
"TRC",
|
||||
"DBG",
|
||||
"INF",
|
||||
"WRN",
|
||||
"ERR",
|
||||
""
|
||||
]
|
||||
|
||||
static func for_netfox(p_name: String) -> _NetfoxLogger:
|
||||
return _NetfoxLogger.new("netfox", p_name)
|
||||
|
||||
static func for_noray(p_name: String) -> _NetfoxLogger:
|
||||
return _NetfoxLogger.new("netfox.noray", p_name)
|
||||
|
||||
static func for_extras(p_name: String) -> _NetfoxLogger:
|
||||
return _NetfoxLogger.new("netfox.extras", p_name)
|
||||
|
||||
static func make_setting(name: String) -> Dictionary:
|
||||
return {
|
||||
"name": name,
|
||||
"value": DEFAULT_LOG_LEVEL,
|
||||
"type": TYPE_INT,
|
||||
"hint": PROPERTY_HINT_ENUM,
|
||||
"hint_string": "All,Trace,Debug,Info,Warning,Error,None"
|
||||
}
|
||||
|
||||
static func register_tag(tag: Callable, priority: int = 0) -> void:
|
||||
# Save tag
|
||||
if not _tags.has(priority):
|
||||
_tags[priority] = [tag]
|
||||
else:
|
||||
_tags[priority].push_back(tag)
|
||||
|
||||
# Recalculate tag order
|
||||
_ordered_tags.clear()
|
||||
|
||||
var prio_groups = _tags.keys()
|
||||
prio_groups.sort()
|
||||
|
||||
for prio_group in prio_groups:
|
||||
var tag_group = _tags[prio_group]
|
||||
_ordered_tags.append_array(tag_group)
|
||||
|
||||
static func free_tag(tag: Callable) -> void:
|
||||
for priority in _tags.keys():
|
||||
var priority_group := _tags[priority] as Array
|
||||
priority_group.erase(tag)
|
||||
|
||||
# NOTE: Arrays are passed as reference, no need to re-assign after modifying
|
||||
if priority_group.is_empty():
|
||||
_tags.erase(priority)
|
||||
|
||||
_ordered_tags.erase(tag)
|
||||
|
||||
static func _static_init():
|
||||
log_level = ProjectSettings.get_setting("netfox/logging/log_level", DEFAULT_LOG_LEVEL)
|
||||
module_log_level = {
|
||||
"netfox": ProjectSettings.get_setting("netfox/logging/netfox_log_level", DEFAULT_LOG_LEVEL),
|
||||
"netfox.noray": ProjectSettings.get_setting("netfox/logging/netfox_noray_log_level", DEFAULT_LOG_LEVEL),
|
||||
"netfox.extras": ProjectSettings.get_setting("netfox/logging/netfox_extras_log_level", DEFAULT_LOG_LEVEL)
|
||||
}
|
||||
|
||||
func _init(p_module: String, p_name: String):
|
||||
module = p_module
|
||||
name = p_name
|
||||
|
||||
func _check_log_level(level: int) -> bool:
|
||||
var cmp_level = log_level
|
||||
if level < cmp_level:
|
||||
return false
|
||||
|
||||
if module_log_level.has(module):
|
||||
var module_level = module_log_level.get(module)
|
||||
return level >= module_level
|
||||
|
||||
return true
|
||||
|
||||
func _format_text(text: String, values: Array, level: int) -> String:
|
||||
level = clampi(level, LOG_MIN, LOG_MAX)
|
||||
|
||||
var result := PackedStringArray()
|
||||
|
||||
result.append("[%s]" % [level_prefixes[level]])
|
||||
for tag in _ordered_tags:
|
||||
result.append("[%s]" % [tag.call()])
|
||||
result.append("[%s::%s] " % [module, name])
|
||||
|
||||
if values.is_empty():
|
||||
result.append(text)
|
||||
else:
|
||||
result.append(text % values)
|
||||
|
||||
return "".join(result)
|
||||
|
||||
func _log_text(text: String, values: Array, level: int):
|
||||
if _check_log_level(level):
|
||||
print(_format_text(text, values, level))
|
||||
|
||||
func trace(text: String, values: Array = []):
|
||||
_log_text(text, values, LOG_TRACE)
|
||||
|
||||
func debug(text: String, values: Array = []):
|
||||
_log_text(text, values, LOG_DEBUG)
|
||||
|
||||
func info(text: String, values: Array = []):
|
||||
_log_text(text, values, LOG_INFO)
|
||||
|
||||
func warning(text: String, values: Array = []):
|
||||
if _check_log_level(LOG_WARN):
|
||||
var formatted_text = _format_text(text, values, LOG_WARN)
|
||||
push_warning(formatted_text)
|
||||
# Print so it shows up in the Output panel too
|
||||
print(formatted_text)
|
||||
|
||||
func error(text: String, values: Array = []):
|
||||
if _check_log_level(LOG_ERROR):
|
||||
var formatted_text = _format_text(text, values, LOG_ERROR)
|
||||
push_error(formatted_text)
|
||||
# Print so it shows up in the Output panel too
|
||||
print(formatted_text)
|
||||
Reference in New Issue
Block a user