diff --git a/assets/stickers/hundred_points_3d.png b/assets/stickers/hundred_points_3d.png new file mode 100644 index 0000000..21ee6d6 --- /dev/null +++ b/assets/stickers/hundred_points_3d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c9411a425e60a538a7ee5125d21c9fa2610e827f8d38d0c953e5d8cda8562cf +size 35871 diff --git a/assets/stickers/hundred_points_3d.png.import b/assets/stickers/hundred_points_3d.png.import new file mode 100644 index 0000000..def56b4 --- /dev/null +++ b/assets/stickers/hundred_points_3d.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ck6n427v1uh4m" +path="res://.godot/imported/hundred_points_3d.png-60516c05d8945ed8a9024154cfc0db6b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/stickers/hundred_points_3d.png" +dest_files=["res://.godot/imported/hundred_points_3d.png-60516c05d8945ed8a9024154cfc0db6b.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=0 diff --git a/assets/stickers/rolling_on_the_floor_laughing_3d.png b/assets/stickers/rolling_on_the_floor_laughing_3d.png new file mode 100644 index 0000000..4de94d5 --- /dev/null +++ b/assets/stickers/rolling_on_the_floor_laughing_3d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22ebfd950c4df297e784babe1e31bc1713144615f78cb0262c8dc2ce0da90ca0 +size 45925 diff --git a/assets/stickers/rolling_on_the_floor_laughing_3d.png.import b/assets/stickers/rolling_on_the_floor_laughing_3d.png.import new file mode 100644 index 0000000..3ce66b6 --- /dev/null +++ b/assets/stickers/rolling_on_the_floor_laughing_3d.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgoceatem5kd4" +path="res://.godot/imported/rolling_on_the_floor_laughing_3d.png-80f304d04a0b0e7474c7719f656ead4a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/stickers/rolling_on_the_floor_laughing_3d.png" +dest_files=["res://.godot/imported/rolling_on_the_floor_laughing_3d.png-80f304d04a0b0e7474c7719f656ead4a.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=0 diff --git a/src/equipment/sticker_pack/sticker_pack.gd b/src/equipment/sticker_pack/sticker_pack.gd index d583596..faa3f1b 100644 --- a/src/equipment/sticker_pack/sticker_pack.gd +++ b/src/equipment/sticker_pack/sticker_pack.gd @@ -1,25 +1,43 @@ extends SurfaceSnapTool -const USER_STICKER_DIR := "user://stickers" +const USER_STICKER_PATH := "user://stickers" const RUMBLE_INTENSITY = 0.0009 const RUMBLE_DROPOFF = 0.8 -@export var stickers_available: Array[Texture2D] = [] +@export var builtin_stickers: Array[Texture2D] = [] @export var selection_idx: int = 0: set = _set_selection_idx @export_category("Game Scenes") @export var sticker_scene: PackedScene +var stickers_available: Array[Texture2D] @onready var rumbler: Rumbler3D = %Rumbler @onready var sticker_texture: TextureRect = %StickerTexture func _ready() -> void: + _import_stickers() _set_selection_idx(0) +func _import_stickers() -> void: + print_debug("Loading custom stickers from ", USER_STICKER_PATH) + + var custom_stickers: Array[Texture2D] = [] + for filename: String in DirAccess.get_files_at(USER_STICKER_PATH): + var fullpath := USER_STICKER_PATH.path_join(filename) + var image := Image.new() + var err := image.load(fullpath) + if err != OK: + continue + custom_stickers.append(ImageTexture.create_from_image(image)) + print_debug("Loaded custom sticker from ", fullpath) + + stickers_available = builtin_stickers + custom_stickers + + func unlocked() -> bool: return World.instance.manager.stickers_unlocked diff --git a/src/equipment/sticker_pack/sticker_pack.tscn b/src/equipment/sticker_pack/sticker_pack.tscn index f9e3e1f..c7ff5b7 100644 --- a/src/equipment/sticker_pack/sticker_pack.tscn +++ b/src/equipment/sticker_pack/sticker_pack.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://cmnokjbv3vuqt"] +[gd_scene load_steps=11 format=3 uid="uid://cmnokjbv3vuqt"] [ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="1_8t584"] [ext_resource type="Script" uid="uid://bgj4es0w5b30e" path="res://src/equipment/sticker_pack/sticker_pack.gd" id="1_eaw05"] @@ -7,11 +7,13 @@ [ext_resource type="Texture2D" uid="uid://cl8ui8nnoaa1i" path="res://assets/stickers/heart_suit_3d.png" id="3_8t584"] [ext_resource type="Texture2D" uid="uid://db85cfwlticnb" path="res://assets/ui/hud/tools/hand_bg.png" id="3_o1h4s"] [ext_resource type="Texture2D" uid="uid://dsrm2mw4e4gx1" path="res://assets/stickers/glowing_star_3d.png" id="3_p2skl"] +[ext_resource type="Texture2D" uid="uid://dgoceatem5kd4" path="res://assets/stickers/rolling_on_the_floor_laughing_3d.png" id="4_rw51e"] [ext_resource type="Texture2D" uid="uid://cju4oxjgaf0ee" path="res://assets/ui/hud/tools/hand_fg.png" id="4_vcsmi"] +[ext_resource type="Texture2D" uid="uid://ck6n427v1uh4m" path="res://assets/stickers/hundred_points_3d.png" id="5_rkig1"] [node name="StickerPack" type="Node3D"] script = ExtResource("1_eaw05") -stickers_available = Array[Texture2D]([ExtResource("3_8t584"), ExtResource("3_p2skl")]) +builtin_stickers = Array[Texture2D]([ExtResource("3_8t584"), ExtResource("3_p2skl"), ExtResource("4_rw51e"), ExtResource("5_rkig1")]) sticker_scene = ExtResource("2_yigow") [node name="Raycast" type="RayCast3D" parent="."] diff --git a/src/equipment/sticker_pack/world_sticker.gd b/src/equipment/sticker_pack/world_sticker.gd index 7480525..ea1909f 100644 --- a/src/equipment/sticker_pack/world_sticker.gd +++ b/src/equipment/sticker_pack/world_sticker.gd @@ -14,7 +14,7 @@ func place(texture: Texture2D, point: Vector3, normal: Vector3, src_up: Vector3) global_position = point # Build basis - var up := normal + var up := -normal var right := up.cross(src_up).normalized() var forward := -right.cross(up).normalized() global_basis = Basis(right, up, forward) diff --git a/src/world/world.tscn b/src/world/world.tscn index 4d2d566..a67352d 100644 --- a/src/world/world.tscn +++ b/src/world/world.tscn @@ -4,7 +4,7 @@ [ext_resource type="Resource" uid="uid://tgac5tnfx56r" path="res://src/world/world_manager.tres" id="2_5kmgb"] [ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="2_6fy3g"] [ext_resource type="Resource" uid="uid://0i72bf8ip1lx" path="res://src/world/spook_manager.tres" id="3_l0av5"] -[ext_resource type="PackedScene" uid="uid://dc4tts6342cuj" path="res://levels/prop_test/prop_test.tscn" id="4_5kmgb"] +[ext_resource type="PackedScene" uid="uid://bov4ok76woyc" path="res://levels/ghost_ship/ghost_ship.tscn" id="4_5kmgb"] [ext_resource type="PackedScene" uid="uid://c0uitm5cg88h1" path="res://src/ui/menus/kill_screen/kill_screen.tscn" id="6_l0av5"] [ext_resource type="PackedScene" uid="uid://brknr57xc2cp0" path="res://src/ui/elements/save_icon/save_icon.tscn" id="7_5kmgb"] diff --git a/vault/TODO.md b/vault/TODO.md index 17b412f..220011c 100644 --- a/vault/TODO.md +++ b/vault/TODO.md @@ -4,16 +4,18 @@ - [x] Clear rate checking / signals - [x] [[nodules]] - [ ] #equipment - - [ ] [[spray beam]] + - [x] [[spray beam]] - [x] Spray nozzle asset - [x] Point spray - [x] Wide-angle spray - [x] Tall-angle spray? - [ ] #maybe Spray-can - [x] [[toothbrush]] - - [ ] [[radar]] - - [ ] [[mp3 player]] + - [ ] #maybe [[radar]] + - [x] [[mp3 player]] - [ ] [[manual]] + - [x] stickers + - [ ] NOTE redo sticker mechanics to use shader layer, not decals - [ ] [[roomba]] - [ ] #mechanics - [x] [[grunk alert]] @@ -40,12 +42,20 @@ - [x] [[medbay]] - [x] [[ops center]] - [ ] [[cargo bay]] +- [ ] puzzle design + - [x] airlock? + - [ ] mess hall + - [ ] crew quarters + - [x] medbay + - [ ] ops center + - [ ] cargo bay - [ ] [[story]] - [ ] ***ASSETS*** - [ ] HUD tools: - [x] [[spray beam]] - [x] [[toothbrush]] - [x] [[mp3 player]] + - [x] stickers - [ ] [[manual]] - [ ] [[radar]] - [ ] [[roomba]] @@ -98,6 +108,9 @@ - [ ] #maybe ops ambiance - [ ] #maybe cargo bay ambiance - [ ] #maybe grunk node ambiance + - [ ] sticker sticking + - [ ] tool switch noise + - [ ] mp3 player ui noises - [ ] models: - [ ] [[grunk]] nodes: - [x] [[alarm]] @@ -117,6 +130,7 @@ - [x] tall crate - [ ] other scatter - [ ] external station model + - [ ] audio cassette - [ ] [[player ship]] props: - [ ] ship - [ ] bunk