diff --git a/ASSET-LICENSE.md b/ASSET-LICENSE.md index c438995..9519836 100644 --- a/ASSET-LICENSE.md +++ b/ASSET-LICENSE.md @@ -1,15 +1,15 @@ -# NETfishing Asset License 1.1 +# straywild Asset License 1.1 Copyright © 2026 Woofmeow. All rights reserved except for the permissions expressly granted below. ## 1. Scope -This license applies to original NETfishing artwork, graphics, textures, +This license applies to original straywild artwork, graphics, textures, models, animations, music, sound recordings, narrative content, visual -designs, characters, and other creative assets owned by the NETfishing owners +designs, characters, and other creative assets owned by the straywild owners or licensed to them with authority to sublicense, publishing as Woofmeow (the -**“NETfishing Assets”**). +**“straywild Assets”**). It does not apply to: @@ -17,77 +17,77 @@ It does not apply to: - third-party material identified in the source repository's `docs/ATTRIBUTION.md` or the packaged `ATTRIBUTION.md` notice; - material accompanied by a different license; or -- the NETfishing and Woofmeow names and logos, which are addressed in +- the straywild and Woofmeow names and logos, which are addressed in `TRADEMARKS.md`. Repository location alone does not change third-party ownership or licensing. ## 2. Definitions -**Official NETfishing Software** means: +**Official straywild Software** means: -- an unmodified binary release published by the NETfishing owners through an - official NETfishing distribution channel; or -- a build made from an unmodified official NETfishing source release or tagged +- an unmodified binary release published by the straywild owners through an + official straywild distribution channel; or +- a build made from an unmodified official straywild source release or tagged revision. **Mod** means a non-standalone add-on created to operate with Official -NETfishing Software. A Mod may add, replace, or alter content loaded by the -Official NETfishing Software, but it may not redistribute a replacement copy +straywild Software. A Mod may add, replace, or alter content loaded by the +Official straywild Software, but it may not redistribute a replacement copy of the game or represent a fork, clone, sequel, or separate game. **Contribution Fork** means a source-control fork or clone of an official -NETfishing source repository that is created and maintained in good faith +straywild source repository that is created and maintained in good faith primarily to prepare, test, review, or submit changes for possible inclusion -in Official NETfishing Software. It does not include a fork presented or +in Official straywild Software. It does not include a fork presented or developed as an independent game, community edition, replacement distribution, -or ongoing product separate from the official NETfishing project. +or ongoing product separate from the official straywild project. ## 3. Permission to use the official game -You may reproduce NETfishing Assets as technically necessary to install, run, -back up, and privately modify a lawfully obtained copy of Official NETfishing +You may reproduce straywild Assets as technically necessary to install, run, +back up, and privately modify a lawfully obtained copy of Official straywild Software. You may capture, publish, and monetize screenshots, gameplay videos, livestreams, reviews, tutorials, and similar commentary showing a lawfully -obtained copy of NETfishing. This permission does not authorize redistribution +obtained copy of straywild. This permission does not authorize redistribution of the source asset files or imply endorsement. ## 4. Community Mod license -Subject to this license, you may create, modify, and distribute NETfishing -Assets solely as part of a Mod for Official NETfishing Software. +Subject to this license, you may create, modify, and distribute straywild +Assets solely as part of a Mod for Official straywild Software. This permission is worldwide, nonexclusive, royalty-free, and available for as long as you comply with this license. It permits only the copies of -NETfishing Assets reasonably necessary for the Mod to function. It does not +straywild Assets reasonably necessary for the Mod to function. It does not permit distributing the original game, a substantially complete collection of its assets, or a general-purpose asset pack. A distributed Mod must: -1. require a separately obtained copy of Official NETfishing Software; +1. require a separately obtained copy of Official straywild Software; 2. be presented as unofficial community content; 3. include the following notice in its documentation or distribution page: - > Contains or adapts NETfishing assets © 2026 Woofmeow, used under the - > NETfishing Asset License 1.1. This Mod is unofficial and is not endorsed + > Contains or adapts straywild assets © 2026 Woofmeow, used under the + > straywild Asset License 1.1. This Mod is unofficial and is not endorsed > by Woofmeow. -4. identify material created by the Mod author separately from NETfishing +4. identify material created by the Mod author separately from straywild Assets; and 5. comply with `TRADEMARKS.md`. Mods may be shared without charge and may accept voluntary donations that do not purchase access, features, or preferential treatment. Selling a Mod, -charging for access to it, licensing it commercially, or using NETfishing +charging for access to it, licensing it commercially, or using straywild Assets in paid products requires separate written permission from both -NETfishing owners. +straywild owners. ## 5. Contribution Fork license -Subject to this license, you may reproduce, modify, and distribute NETfishing +Subject to this license, you may reproduce, modify, and distribute straywild Assets within a Contribution Fork. You may also make the nonpublic builds reasonably necessary to develop, test, and review its proposed contribution. @@ -99,8 +99,8 @@ fork are permitted distributions. A Contribution Fork must: 1. remain primarily directed toward preparing changes for possible inclusion - in the official NETfishing project; -2. preserve this license and the official NETfishing project's applicable + in the official straywild project; +2. preserve this license and the official straywild project's applicable attribution, third-party license, and copyright notices; 3. remain visibly linked to or identified as a fork of the official source repository and not be presented as official or endorsed; @@ -109,63 +109,63 @@ A Contribution Fork must: contribution; 5. not publish general-audience binaries, releases, packages, or downloads, operate a persistent public alternative service, or monetize access; -6. not distribute the NETfishing Assets as a standalone extraction, archive, +6. not distribute the straywild Assets as a standalone extraction, archive, or general-purpose asset pack; and 7. comply with `TRADEMARKS.md`. Temporary access-controlled servers may be operated when reasonably necessary to test a proposed contribution. They may not be promoted or maintained as a -public alternative to Official NETfishing Software or its services. +public alternative to Official straywild Software or its services. Submitting work from a Contribution Fork is governed separately by -`CONTRIBUTOR-TERMS.md` and does not require the NETfishing owners to accept the +`CONTRIBUTOR-TERMS.md` and does not require the straywild owners to accept the work. Declining or closing a proposed contribution does not retroactively invalidate good-faith use under this section. A compliant Contribution Fork may remain publicly accessible as an archival development record, but it may not be repurposed for continued development or distribution of a separate -product containing NETfishing Assets. +product containing straywild Assets. ## 6. Uses not permitted Except as expressly permitted by Sections 3, 4, and 5 or by separate written -permission from both NETfishing owners, you may not use or distribute -NETfishing Assets: +permission from both straywild owners, you may not use or distribute +straywild Assets: - in a fork, clone, remake, sequel, or standalone game that is not a qualifying Contribution Fork; -- with a modified distribution of the GPL-covered NETfishing code that is not - Official NETfishing Software, except for nonpublic contribution-testing +- with a modified distribution of the GPL-covered straywild code that is not + Official straywild Software, except for nonpublic contribution-testing builds permitted by Section 5; - in another game, application, asset library, template, or merchandise; - as a substantially complete asset extraction or archive; - in a way that implies sponsorship, endorsement, or official status; - to register a confusingly similar trademark, domain, account, or product identity; or -- under terms that claim ownership of the NETfishing Assets themselves. +- under terms that claim ownership of the straywild Assets themselves. The GPL permits forks and redistribution of the GPL-covered code. Except for a qualifying Contribution Fork under Section 5, this asset license does not -permit those forks to carry NETfishing Assets. A code fork that is not a -Contribution Fork must remove or replace the NETfishing Assets and reserved +permit those forks to carry straywild Assets. A code fork that is not a +Contribution Fork must remove or replace the straywild Assets and reserved branding unless both owners grant separate written permission. ## 7. Ownership of Mods and contribution work You retain ownership of your original Mod material and original material -created in a Contribution Fork. The NETfishing owners retain ownership of the -NETfishing Assets and adaptations of those assets to the extent provided by +created in a Contribution Fork. The straywild owners retain ownership of the +straywild Assets and adaptations of those assets to the extent provided by applicable law. This license does not require you to assign or submit your original material. -It also does not grant you ownership of the underlying NETfishing Assets. If -you intentionally submit material for inclusion in NETfishing, +It also does not grant you ownership of the underlying straywild Assets. If +you intentionally submit material for inclusion in straywild, `CONTRIBUTOR-TERMS.md` applies separately. ## 8. Termination and cure Your permissions under this license terminate automatically if you violate its terms. They are reinstated provisionally when you stop the violation and -permanently if both NETfishing owners do not notify you of the violation +permanently if both straywild owners do not notify you of the violation within sixty days after it has been cured. Termination does not limit remedies available for activity outside this @@ -173,15 +173,15 @@ license. ## 9. No warranty -THE NETFISHING ASSETS ARE PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, +THE straywild ASSETS ARE PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE OWNERS WILL NOT BE LIABLE FOR ANY CLAIM, DAMAGES, OR -OTHER LIABILITY ARISING FROM THIS LICENSE OR USE OF THE NETFISHING ASSETS. +OTHER LIABILITY ARISING FROM THIS LICENSE OR USE OF THE straywild ASSETS. ## 10. Additional permission -Uses not granted here require written permission from both NETfishing owners. +Uses not granted here require written permission from both straywild owners. A permission granted to one person or project does not amend this license for others. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7017110..2dc5724 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contribution policy -NETfishing is an owner-directed Woofmeow project and is not accepting +straywild is an owner-directed Woofmeow project and is not accepting unsolicited contributions. Please do not submit pull requests, patches, code, artwork, models, audio, writing, documentation, translations, designs, or other implementation work. Pull requests are disabled for the official @@ -17,7 +17,7 @@ work; it is not a standing invitation to contribute. ## Contribution forks -The [NETfishing Asset License](ASSET-LICENSE.md) contains limited permissions +The [straywild Asset License](ASSET-LICENSE.md) contains limited permissions for qualifying Contribution Forks. Those permissions do not promise review or acceptance and do not override the policy above. Keep the hosting platform's fork relationship visible, preserve all license and attribution notices, and @@ -79,4 +79,4 @@ using display strings as persistent identifiers. New standalone source files should use `SPDX-License-Identifier: GPL-3.0-or-later` where the file format permits comments. Do not add that -identifier to asset files governed by the NETfishing Asset License. +identifier to asset files governed by the straywild Asset License. diff --git a/CONTRIBUTOR-TERMS.md b/CONTRIBUTOR-TERMS.md index e0d801a..261de60 100644 --- a/CONTRIBUTOR-TERMS.md +++ b/CONTRIBUTOR-TERMS.md @@ -1,6 +1,6 @@ -# NETfishing contributor terms +# straywild contributor terms -NETfishing does not accept unsolicited contributions. These terms are retained +straywild does not accept unsolicited contributions. These terms are retained as the governing record for contributions previously accepted after their publication and for specific future work that both Owners expressly invite in writing before submission. They are not a request or standing invitation for @@ -9,9 +9,9 @@ patches, pull requests, assets, or other material. These terms do not retroactively change ownership of earlier work or replace a separately signed agreement. -“Owners” means the two NETfishing co-owners who publish the Project as +“Owners” means the two straywild co-owners who publish the Project as Woofmeow and are publicly credited as Voyager and Endeavour. “Project” means -the official NETfishing game, its servers, tools, documentation, websites, +the official straywild game, its servers, tools, documentation, websites, ports, updates, and promotional materials. ## 1. Your ownership and authority @@ -56,8 +56,8 @@ royalty-free, transferable, and sublicensable license to: - license it to Project users under `ASSET-LICENSE.md` or a later Project asset license jointly approved by the Owners. -This grant is limited to NETfishing, its promotion, and official successor or -derived NETfishing products. It does not transfer your copyright or authorize +This grant is limited to straywild, its promotion, and official successor or +derived straywild products. It does not transfer your copyright or authorize the Owners to sell your contribution as an unrelated standalone asset. ## 4. Documentation accompanying code @@ -78,7 +78,7 @@ or release. ## 6. No automatic ownership, employment, or payment -Submitting a contribution does not provide ownership of NETfishing, create an +Submitting a contribution does not provide ownership of straywild, create an employment, agency, partnership, or fiduciary relationship, or create a right to compensation. Any payment, ownership, or employment arrangement requires a separate written agreement signed by the appropriate parties. diff --git a/README.md b/README.md index ac3635b..e228e7b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# NETfishing +# straywild -NETfishing is a multiplayer-first fishing game built with Godot 4.7. The +straywild is a multiplayer-first fishing game built with Godot 4.7. The current pre-alpha includes host-authoritative fishing and economy flows, freshwater and saltwater habitats, persistent player data, social features, customization, jobs, and a controller-aware interface. @@ -8,23 +8,39 @@ customization, jobs, and a controller-aware interface. The project is under active development. Interfaces, balance, content, and save migrations may continue to change before a stable release. -NETfishing is developed and published by **Woofmeow**, the independent team of +straywild is developed and published by **Woofmeow**, the independent team of co-owners publicly credited as Voyager and Endeavour. +## Links +Patreon: https://www.patreon.com/cw/woofmeowgames + +Steam: https://store.steampowered.com/app/5068950/straywild/ + +Itch.io: https://sol6-vi.itch.io/straywild + +Discord: https://discord.gg/5gP22447kc + +Matrix: https://matrix.to/#/#straywild:matrix.makearmy.io + +Repo: https://forge.makearmy.io/woofmeow/straywild + +Releases: https://forge.makearmy.io/woofmeow/straywild/releases + + ## Installing release builds Download and extract the archive for your platform from the official release -page, then run NETfishing from the extracted platform folder. +page, then run straywild from the extracted platform folder. ### macOS Current macOS builds are not signed or notarized. macOS may block the first -launch because it cannot verify the developer. Control-click the NETfishing +launch because it cannot verify the developer. Control-click the straywild application, choose **Open**, then confirm **Open**. If that option is not available, attempt to open the application once, then use **System Settings → Privacy & Security → Open Anyway**. -Only bypass this warning for a NETfishing build downloaded from an official +Only bypass this warning for a straywild build downloaded from an official project release. ## Requirements @@ -94,10 +110,10 @@ world and UI authoring, and testing are consolidated in - Project-owned software code is licensed under [GPL-3.0-or-later](LICENSE). - Project-owned artwork, models, music, and other creative assets are covered - by the [NETfishing Asset License](ASSET-LICENSE.md). It permits community - Mods for official NETfishing software and narrowly scoped contribution forks, + by the [straywild Asset License](ASSET-LICENSE.md). It permits community + Mods for official straywild software and narrowly scoped contribution forks, but not independent forks, clones, or unrelated products. -- The NETfishing and Woofmeow names and branding are reserved as described in +- The straywild and Woofmeow names and branding are reserved as described in [TRADEMARKS.md](TRADEMARKS.md). - Third-party materials retain their own terms; see the consolidated [credits, notices, and provenance record](docs/ATTRIBUTION.md). diff --git a/TRADEMARKS.md b/TRADEMARKS.md index 363248b..fbf49d5 100644 --- a/TRADEMARKS.md +++ b/TRADEMARKS.md @@ -1,7 +1,7 @@ -# NETfishing and Woofmeow branding +# straywild and Woofmeow branding -The NETfishing and Woofmeow names, logos, icons, trade dress, and other source -identifiers are reserved by the NETfishing owners, publishing as Woofmeow. +The straywild and Woofmeow names, logos, icons, trade dress, and other source +identifiers are reserved by the straywild owners, publishing as Woofmeow. Their presence in a GPL-licensed repository does not grant trademark rights or imply permission to represent another product as official. @@ -10,30 +10,30 @@ exist through use and other law. ## Permitted references -You may use the names NETfishing and Woofmeow truthfully to: +You may use the names straywild and Woofmeow truthfully to: - refer to the official game or development team; -- state that software interoperates with or is a Mod for NETfishing; +- state that software interoperates with or is a Mod for straywild; - link to an official repository or distribution page; and - discuss, review, criticize, or report on the Project. Use only the amount of branding reasonably necessary to identify the Project. Do not imply sponsorship, certification, endorsement, or official status. -An unofficial Mod may use wording such as “Example Mod for NETfishing” if its +An unofficial Mod may use wording such as “Example Mod for straywild” if its name and presentation remain clearly distinct and it displays an unofficial notice. ## Contribution forks A qualifying Contribution Fork under `ASSET-LICENSE.md` may retain the -NETfishing and Woofmeow names, logos, icons, and trade dress already present in +straywild and Woofmeow names, logos, icons, and trade dress already present in the official source repository solely as necessary to reproduce, modify, and test the Project while preparing a proposed contribution. The source-control host's visible fork relationship or an equivalent repository notice must make its unofficial contribution purpose clear. -This permission does not allow a Contribution Fork to use NETfishing or +This permission does not allow a Contribution Fork to use straywild or Woofmeow branding to advertise a public build, release, service, community edition, or independent product. It does not imply acceptance, sponsorship, endorsement, or official status. @@ -44,7 +44,7 @@ The GNU GPL permits forks and redistribution of covered code. A fork or modified distribution that is not a qualifying Contribution Fork must: - use a distinct product name; -- remove NETfishing and Woofmeow logos, icons, and official trade dress; +- remove straywild and Woofmeow logos, icons, and official trade dress; - avoid confusingly similar names, domains, package identifiers, and account names; and - clearly identify itself as independent and unofficial. @@ -53,4 +53,4 @@ These branding terms do not limit rights granted by the GPL to the software code or lawful nominative, descriptive, comparative, or fair use. Permission for broader branding use must be obtained in writing from both -NETfishing owners. +straywild owners. diff --git a/addons/netfishing_shoreline_baker/plugin.cfg b/addons/straywild_shoreline_baker/plugin.cfg similarity index 81% rename from addons/netfishing_shoreline_baker/plugin.cfg rename to addons/straywild_shoreline_baker/plugin.cfg index c8c4d06..c3f4e47 100644 --- a/addons/netfishing_shoreline_baker/plugin.cfg +++ b/addons/straywild_shoreline_baker/plugin.cfg @@ -1,6 +1,6 @@ [plugin] -name="NETfishing Shoreline Auto-Baker" +name="straywild Shoreline Auto-Baker" description="Rebuilds configured static shoreline ribbons after authored terrain reimports." author="woofmeow" version="1.0.0" diff --git a/addons/netfishing_shoreline_baker/shoreline_auto_baker.gd b/addons/straywild_shoreline_baker/shoreline_auto_baker.gd similarity index 100% rename from addons/netfishing_shoreline_baker/shoreline_auto_baker.gd rename to addons/straywild_shoreline_baker/shoreline_auto_baker.gd diff --git a/addons/netfishing_shoreline_baker/shoreline_auto_baker.gd.uid b/addons/straywild_shoreline_baker/shoreline_auto_baker.gd.uid similarity index 100% rename from addons/netfishing_shoreline_baker/shoreline_auto_baker.gd.uid rename to addons/straywild_shoreline_baker/shoreline_auto_baker.gd.uid diff --git a/art/exported/characters/base/netfishing_base_character.glb b/art/exported/characters/base/straywild_base_character.glb similarity index 100% rename from art/exported/characters/base/netfishing_base_character.glb rename to art/exported/characters/base/straywild_base_character.glb diff --git a/art/exported/characters/base/netfishing_base_character.glb.import b/art/exported/characters/base/straywild_base_character.glb.import similarity index 77% rename from art/exported/characters/base/netfishing_base_character.glb.import rename to art/exported/characters/base/straywild_base_character.glb.import index b1409e1..96925de 100644 --- a/art/exported/characters/base/netfishing_base_character.glb.import +++ b/art/exported/characters/base/straywild_base_character.glb.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://w7n4gjqq1juc" -path="res://.godot/imported/netfishing_base_character.glb-0167c087f16181d405afb962dc877d2c.scn" +path="res://.godot/imported/straywild_base_character.glb-65021653e51a906d3b4a3494f170317f.scn" [deps] -source_file="res://art/exported/characters/base/netfishing_base_character.glb" -dest_files=["res://.godot/imported/netfishing_base_character.glb-0167c087f16181d405afb962dc877d2c.scn"] +source_file="res://art/exported/characters/base/straywild_base_character.glb" +dest_files=["res://.godot/imported/straywild_base_character.glb-65021653e51a906d3b4a3494f170317f.scn"] [params] diff --git a/art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png b/art/exported/characters/base/straywild_base_character_eyes_simple_shine.png similarity index 100% rename from art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png rename to art/exported/characters/base/straywild_base_character_eyes_simple_shine.png diff --git a/art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png.import b/art/exported/characters/base/straywild_base_character_eyes_simple_shine.png.import similarity index 58% rename from art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png.import rename to art/exported/characters/base/straywild_base_character_eyes_simple_shine.png.import index 4141bca..ddf8bb7 100644 --- a/art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png.import +++ b/art/exported/characters/base/straywild_base_character_eyes_simple_shine.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://dyjwgkgw0syo8" -path.s3tc="res://.godot/imported/netfishing_base_character_eyes_simple_shine.png-140bfa3aa0b6f662e8ff9e5721213a61.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_base_character_eyes_simple_shine.png-140bfa3aa0b6f662e8ff9e5721213a61.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_base_character_eyes_simple_shine.png-200a946ddace2078bbe44addb4e4524c.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_base_character_eyes_simple_shine.png-200a946ddace2078bbe44addb4e4524c.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png" -dest_files=["res://.godot/imported/netfishing_base_character_eyes_simple_shine.png-140bfa3aa0b6f662e8ff9e5721213a61.s3tc.ctex", "res://.godot/imported/netfishing_base_character_eyes_simple_shine.png-140bfa3aa0b6f662e8ff9e5721213a61.etc2.ctex"] +source_file="res://art/exported/characters/base/straywild_base_character_eyes_simple_shine.png" +dest_files=["res://.godot/imported/straywild_base_character_eyes_simple_shine.png-200a946ddace2078bbe44addb4e4524c.s3tc.ctex", "res://.godot/imported/straywild_base_character_eyes_simple_shine.png-200a946ddace2078bbe44addb4e4524c.etc2.ctex"] [params] diff --git a/art/exported/characters/base/netfishing_base_character_mouth_three.png b/art/exported/characters/base/straywild_base_character_mouth_three.png similarity index 100% rename from art/exported/characters/base/netfishing_base_character_mouth_three.png rename to art/exported/characters/base/straywild_base_character_mouth_three.png diff --git a/art/exported/characters/base/netfishing_base_character_mouth_three.png.import b/art/exported/characters/base/straywild_base_character_mouth_three.png.import similarity index 59% rename from art/exported/characters/base/netfishing_base_character_mouth_three.png.import rename to art/exported/characters/base/straywild_base_character_mouth_three.png.import index 10d0721..ba0ec2c 100644 --- a/art/exported/characters/base/netfishing_base_character_mouth_three.png.import +++ b/art/exported/characters/base/straywild_base_character_mouth_three.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://dt5gitdtjdvcd" -path.s3tc="res://.godot/imported/netfishing_base_character_mouth_three.png-90b4a98403d2a291a56a8ed42aaa8473.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_base_character_mouth_three.png-90b4a98403d2a291a56a8ed42aaa8473.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_base_character_mouth_three.png-5bcf329b31a11eff496760a63e62d0e2.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_base_character_mouth_three.png-5bcf329b31a11eff496760a63e62d0e2.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/exported/characters/base/netfishing_base_character_mouth_three.png" -dest_files=["res://.godot/imported/netfishing_base_character_mouth_three.png-90b4a98403d2a291a56a8ed42aaa8473.s3tc.ctex", "res://.godot/imported/netfishing_base_character_mouth_three.png-90b4a98403d2a291a56a8ed42aaa8473.etc2.ctex"] +source_file="res://art/exported/characters/base/straywild_base_character_mouth_three.png" +dest_files=["res://.godot/imported/straywild_base_character_mouth_three.png-5bcf329b31a11eff496760a63e62d0e2.s3tc.ctex", "res://.godot/imported/straywild_base_character_mouth_three.png-5bcf329b31a11eff496760a63e62d0e2.etc2.ctex"] [params] diff --git a/art/exported/characters/base/netfishing_base_character_nose_dog_round.png b/art/exported/characters/base/straywild_base_character_nose_dog_round.png similarity index 100% rename from art/exported/characters/base/netfishing_base_character_nose_dog_round.png rename to art/exported/characters/base/straywild_base_character_nose_dog_round.png diff --git a/art/exported/characters/base/netfishing_base_character_nose_dog_round.png.import b/art/exported/characters/base/straywild_base_character_nose_dog_round.png.import similarity index 59% rename from art/exported/characters/base/netfishing_base_character_nose_dog_round.png.import rename to art/exported/characters/base/straywild_base_character_nose_dog_round.png.import index 71d25b6..cb2c573 100644 --- a/art/exported/characters/base/netfishing_base_character_nose_dog_round.png.import +++ b/art/exported/characters/base/straywild_base_character_nose_dog_round.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://bmho1ryst3smt" -path.s3tc="res://.godot/imported/netfishing_base_character_nose_dog_round.png-0008adff5271dd0403e610ef13dd52cf.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_base_character_nose_dog_round.png-0008adff5271dd0403e610ef13dd52cf.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_base_character_nose_dog_round.png-e6909a2c139cf4a2748c2b79d1e12d92.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_base_character_nose_dog_round.png-e6909a2c139cf4a2748c2b79d1e12d92.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/exported/characters/base/netfishing_base_character_nose_dog_round.png" -dest_files=["res://.godot/imported/netfishing_base_character_nose_dog_round.png-0008adff5271dd0403e610ef13dd52cf.s3tc.ctex", "res://.godot/imported/netfishing_base_character_nose_dog_round.png-0008adff5271dd0403e610ef13dd52cf.etc2.ctex"] +source_file="res://art/exported/characters/base/straywild_base_character_nose_dog_round.png" +dest_files=["res://.godot/imported/straywild_base_character_nose_dog_round.png-e6909a2c139cf4a2748c2b79d1e12d92.s3tc.ctex", "res://.godot/imported/straywild_base_character_nose_dog_round.png-e6909a2c139cf4a2748c2b79d1e12d92.etc2.ctex"] [params] diff --git a/art/exported/creatures/101.png b/art/exported/creatures/101.png new file mode 100644 index 0000000..e6e431c Binary files /dev/null and b/art/exported/creatures/101.png differ diff --git a/art/exported/creatures/101.png.import b/art/exported/creatures/101.png.import new file mode 100644 index 0000000..3dc8865 --- /dev/null +++ b/art/exported/creatures/101.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://x5e744k11k70" +path.s3tc="res://.godot/imported/101.png-81f7f90e29292575c1a9727aa6060fa0.s3tc.ctex" +path.etc2="res://.godot/imported/101.png-81f7f90e29292575c1a9727aa6060fa0.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/101.png" +dest_files=["res://.godot/imported/101.png-81f7f90e29292575c1a9727aa6060fa0.s3tc.ctex", "res://.godot/imported/101.png-81f7f90e29292575c1a9727aa6060fa0.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/102.png b/art/exported/creatures/102.png new file mode 100644 index 0000000..b1b66a6 Binary files /dev/null and b/art/exported/creatures/102.png differ diff --git a/art/exported/creatures/102.png.import b/art/exported/creatures/102.png.import new file mode 100644 index 0000000..c958e5f --- /dev/null +++ b/art/exported/creatures/102.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://1kla4jewitot" +path.s3tc="res://.godot/imported/102.png-2ab8ac9408a482b1042b6ba3cd3bd718.s3tc.ctex" +path.etc2="res://.godot/imported/102.png-2ab8ac9408a482b1042b6ba3cd3bd718.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/102.png" +dest_files=["res://.godot/imported/102.png-2ab8ac9408a482b1042b6ba3cd3bd718.s3tc.ctex", "res://.godot/imported/102.png-2ab8ac9408a482b1042b6ba3cd3bd718.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/103.png b/art/exported/creatures/103.png new file mode 100644 index 0000000..98dd618 Binary files /dev/null and b/art/exported/creatures/103.png differ diff --git a/art/exported/creatures/103.png.import b/art/exported/creatures/103.png.import new file mode 100644 index 0000000..2972cde --- /dev/null +++ b/art/exported/creatures/103.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfdsg4tevv0jm" +path.s3tc="res://.godot/imported/103.png-f8985f10e04b19499cd6f5ffbadc83c9.s3tc.ctex" +path.etc2="res://.godot/imported/103.png-f8985f10e04b19499cd6f5ffbadc83c9.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/103.png" +dest_files=["res://.godot/imported/103.png-f8985f10e04b19499cd6f5ffbadc83c9.s3tc.ctex", "res://.godot/imported/103.png-f8985f10e04b19499cd6f5ffbadc83c9.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/104.png b/art/exported/creatures/104.png new file mode 100644 index 0000000..09eec3c Binary files /dev/null and b/art/exported/creatures/104.png differ diff --git a/art/exported/creatures/104.png.import b/art/exported/creatures/104.png.import new file mode 100644 index 0000000..01a9393 --- /dev/null +++ b/art/exported/creatures/104.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://pgm364g5qlgs" +path.s3tc="res://.godot/imported/104.png-e164f67032648af2cc0a545d2a861c7d.s3tc.ctex" +path.etc2="res://.godot/imported/104.png-e164f67032648af2cc0a545d2a861c7d.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/104.png" +dest_files=["res://.godot/imported/104.png-e164f67032648af2cc0a545d2a861c7d.s3tc.ctex", "res://.godot/imported/104.png-e164f67032648af2cc0a545d2a861c7d.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/105.png b/art/exported/creatures/105.png new file mode 100644 index 0000000..3ba1000 Binary files /dev/null and b/art/exported/creatures/105.png differ diff --git a/art/exported/creatures/105.png.import b/art/exported/creatures/105.png.import new file mode 100644 index 0000000..de797a7 --- /dev/null +++ b/art/exported/creatures/105.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwanip2j561n7" +path.s3tc="res://.godot/imported/105.png-a2b440912e59b3375c6e61e17d08287b.s3tc.ctex" +path.etc2="res://.godot/imported/105.png-a2b440912e59b3375c6e61e17d08287b.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/105.png" +dest_files=["res://.godot/imported/105.png-a2b440912e59b3375c6e61e17d08287b.s3tc.ctex", "res://.godot/imported/105.png-a2b440912e59b3375c6e61e17d08287b.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/106.png b/art/exported/creatures/106.png new file mode 100644 index 0000000..4227b44 Binary files /dev/null and b/art/exported/creatures/106.png differ diff --git a/art/exported/creatures/106.png.import b/art/exported/creatures/106.png.import new file mode 100644 index 0000000..3032c38 --- /dev/null +++ b/art/exported/creatures/106.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cr7tc11ievso5" +path.s3tc="res://.godot/imported/106.png-306ce449448588714e5a0e883ae441ac.s3tc.ctex" +path.etc2="res://.godot/imported/106.png-306ce449448588714e5a0e883ae441ac.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/106.png" +dest_files=["res://.godot/imported/106.png-306ce449448588714e5a0e883ae441ac.s3tc.ctex", "res://.godot/imported/106.png-306ce449448588714e5a0e883ae441ac.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/107.png b/art/exported/creatures/107.png new file mode 100644 index 0000000..c843bbe Binary files /dev/null and b/art/exported/creatures/107.png differ diff --git a/art/exported/creatures/107.png.import b/art/exported/creatures/107.png.import new file mode 100644 index 0000000..c4d28e8 --- /dev/null +++ b/art/exported/creatures/107.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8rf4tnxx8mov" +path.s3tc="res://.godot/imported/107.png-062740d0bdad6e3ac4ecc1cf92ee6b9d.s3tc.ctex" +path.etc2="res://.godot/imported/107.png-062740d0bdad6e3ac4ecc1cf92ee6b9d.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/107.png" +dest_files=["res://.godot/imported/107.png-062740d0bdad6e3ac4ecc1cf92ee6b9d.s3tc.ctex", "res://.godot/imported/107.png-062740d0bdad6e3ac4ecc1cf92ee6b9d.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/201.png b/art/exported/creatures/201.png new file mode 100644 index 0000000..3994912 Binary files /dev/null and b/art/exported/creatures/201.png differ diff --git a/art/exported/creatures/201.png.import b/art/exported/creatures/201.png.import new file mode 100644 index 0000000..9d5decf --- /dev/null +++ b/art/exported/creatures/201.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0q8o1sc8hlv0" +path.s3tc="res://.godot/imported/201.png-1b2063c63e42271e8f3910da8e3f1277.s3tc.ctex" +path.etc2="res://.godot/imported/201.png-1b2063c63e42271e8f3910da8e3f1277.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/201.png" +dest_files=["res://.godot/imported/201.png-1b2063c63e42271e8f3910da8e3f1277.s3tc.ctex", "res://.godot/imported/201.png-1b2063c63e42271e8f3910da8e3f1277.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2502.png b/art/exported/creatures/2502.png new file mode 100644 index 0000000..467431b Binary files /dev/null and b/art/exported/creatures/2502.png differ diff --git a/art/exported/creatures/2502.png.import b/art/exported/creatures/2502.png.import new file mode 100644 index 0000000..17bcad9 --- /dev/null +++ b/art/exported/creatures/2502.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://busj0feq2dncu" +path.s3tc="res://.godot/imported/2502.png-3922e306611b91541a86520cf32cbdbd.s3tc.ctex" +path.etc2="res://.godot/imported/2502.png-3922e306611b91541a86520cf32cbdbd.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2502.png" +dest_files=["res://.godot/imported/2502.png-3922e306611b91541a86520cf32cbdbd.s3tc.ctex", "res://.godot/imported/2502.png-3922e306611b91541a86520cf32cbdbd.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2504.png b/art/exported/creatures/2504.png new file mode 100644 index 0000000..d0279d8 Binary files /dev/null and b/art/exported/creatures/2504.png differ diff --git a/art/exported/creatures/2504.png.import b/art/exported/creatures/2504.png.import new file mode 100644 index 0000000..73fa801 --- /dev/null +++ b/art/exported/creatures/2504.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://4a7c1aat4777" +path.s3tc="res://.godot/imported/2504.png-c9f47ab152b933d8158b8c058ec5fcc2.s3tc.ctex" +path.etc2="res://.godot/imported/2504.png-c9f47ab152b933d8158b8c058ec5fcc2.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2504.png" +dest_files=["res://.godot/imported/2504.png-c9f47ab152b933d8158b8c058ec5fcc2.s3tc.ctex", "res://.godot/imported/2504.png-c9f47ab152b933d8158b8c058ec5fcc2.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2505.png b/art/exported/creatures/2505.png new file mode 100644 index 0000000..7463c25 Binary files /dev/null and b/art/exported/creatures/2505.png differ diff --git a/art/exported/creatures/2505.png.import b/art/exported/creatures/2505.png.import new file mode 100644 index 0000000..130cedb --- /dev/null +++ b/art/exported/creatures/2505.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8u3lw242yr3c" +path.s3tc="res://.godot/imported/2505.png-fe14d70a6372dbe0cc4a8275d0816cad.s3tc.ctex" +path.etc2="res://.godot/imported/2505.png-fe14d70a6372dbe0cc4a8275d0816cad.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2505.png" +dest_files=["res://.godot/imported/2505.png-fe14d70a6372dbe0cc4a8275d0816cad.s3tc.ctex", "res://.godot/imported/2505.png-fe14d70a6372dbe0cc4a8275d0816cad.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2508.png b/art/exported/creatures/2508.png new file mode 100644 index 0000000..4cefefd Binary files /dev/null and b/art/exported/creatures/2508.png differ diff --git a/art/exported/creatures/2508.png.import b/art/exported/creatures/2508.png.import new file mode 100644 index 0000000..0fdbbe4 --- /dev/null +++ b/art/exported/creatures/2508.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2k6ghkng6081" +path.s3tc="res://.godot/imported/2508.png-0478df4a4cb2af8e08ada8086efda0c3.s3tc.ctex" +path.etc2="res://.godot/imported/2508.png-0478df4a4cb2af8e08ada8086efda0c3.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2508.png" +dest_files=["res://.godot/imported/2508.png-0478df4a4cb2af8e08ada8086efda0c3.s3tc.ctex", "res://.godot/imported/2508.png-0478df4a4cb2af8e08ada8086efda0c3.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2601.png b/art/exported/creatures/2601.png new file mode 100644 index 0000000..f7565d8 Binary files /dev/null and b/art/exported/creatures/2601.png differ diff --git a/art/exported/creatures/2601.png.import b/art/exported/creatures/2601.png.import new file mode 100644 index 0000000..7444643 --- /dev/null +++ b/art/exported/creatures/2601.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d14jvhurcfryb" +path.s3tc="res://.godot/imported/2601.png-912942ea4c6b2c66982e089ee46fde12.s3tc.ctex" +path.etc2="res://.godot/imported/2601.png-912942ea4c6b2c66982e089ee46fde12.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2601.png" +dest_files=["res://.godot/imported/2601.png-912942ea4c6b2c66982e089ee46fde12.s3tc.ctex", "res://.godot/imported/2601.png-912942ea4c6b2c66982e089ee46fde12.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2801.png b/art/exported/creatures/2801.png new file mode 100644 index 0000000..ad8294d Binary files /dev/null and b/art/exported/creatures/2801.png differ diff --git a/art/exported/creatures/2801.png.import b/art/exported/creatures/2801.png.import new file mode 100644 index 0000000..512f812 --- /dev/null +++ b/art/exported/creatures/2801.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cc7el34sfad78" +path.s3tc="res://.godot/imported/2801.png-d1c5df9faa2d1eb1cc3453c8e18d4049.s3tc.ctex" +path.etc2="res://.godot/imported/2801.png-d1c5df9faa2d1eb1cc3453c8e18d4049.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2801.png" +dest_files=["res://.godot/imported/2801.png-d1c5df9faa2d1eb1cc3453c8e18d4049.s3tc.ctex", "res://.godot/imported/2801.png-d1c5df9faa2d1eb1cc3453c8e18d4049.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2802.png b/art/exported/creatures/2802.png new file mode 100644 index 0000000..4190610 Binary files /dev/null and b/art/exported/creatures/2802.png differ diff --git a/art/exported/creatures/2802.png.import b/art/exported/creatures/2802.png.import new file mode 100644 index 0000000..4d014d1 --- /dev/null +++ b/art/exported/creatures/2802.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bawecr4tv52p1" +path.s3tc="res://.godot/imported/2802.png-6319ce264fbd950e232fd0b428319265.s3tc.ctex" +path.etc2="res://.godot/imported/2802.png-6319ce264fbd950e232fd0b428319265.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2802.png" +dest_files=["res://.godot/imported/2802.png-6319ce264fbd950e232fd0b428319265.s3tc.ctex", "res://.godot/imported/2802.png-6319ce264fbd950e232fd0b428319265.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2803.png b/art/exported/creatures/2803.png new file mode 100644 index 0000000..6360f26 Binary files /dev/null and b/art/exported/creatures/2803.png differ diff --git a/art/exported/creatures/2803.png.import b/art/exported/creatures/2803.png.import new file mode 100644 index 0000000..5096057 --- /dev/null +++ b/art/exported/creatures/2803.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjwm07240ehr2" +path.s3tc="res://.godot/imported/2803.png-c2e31a8adbab3bf9899bc74b3feb4abb.s3tc.ctex" +path.etc2="res://.godot/imported/2803.png-c2e31a8adbab3bf9899bc74b3feb4abb.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2803.png" +dest_files=["res://.godot/imported/2803.png-c2e31a8adbab3bf9899bc74b3feb4abb.s3tc.ctex", "res://.godot/imported/2803.png-c2e31a8adbab3bf9899bc74b3feb4abb.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2804.png b/art/exported/creatures/2804.png new file mode 100644 index 0000000..90952fd Binary files /dev/null and b/art/exported/creatures/2804.png differ diff --git a/art/exported/creatures/2804.png.import b/art/exported/creatures/2804.png.import new file mode 100644 index 0000000..e6147c2 --- /dev/null +++ b/art/exported/creatures/2804.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgcrfxo1k4juj" +path.s3tc="res://.godot/imported/2804.png-f86c52a01f04302b057cf526a498e87a.s3tc.ctex" +path.etc2="res://.godot/imported/2804.png-f86c52a01f04302b057cf526a498e87a.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2804.png" +dest_files=["res://.godot/imported/2804.png-f86c52a01f04302b057cf526a498e87a.s3tc.ctex", "res://.godot/imported/2804.png-f86c52a01f04302b057cf526a498e87a.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2806.png b/art/exported/creatures/2806.png new file mode 100644 index 0000000..acb930e Binary files /dev/null and b/art/exported/creatures/2806.png differ diff --git a/art/exported/creatures/2806.png.import b/art/exported/creatures/2806.png.import new file mode 100644 index 0000000..9d444cd --- /dev/null +++ b/art/exported/creatures/2806.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c5be8db5ppkq4" +path.s3tc="res://.godot/imported/2806.png-ed0484fec72605166ddb723c1a1bc7d0.s3tc.ctex" +path.etc2="res://.godot/imported/2806.png-ed0484fec72605166ddb723c1a1bc7d0.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2806.png" +dest_files=["res://.godot/imported/2806.png-ed0484fec72605166ddb723c1a1bc7d0.s3tc.ctex", "res://.godot/imported/2806.png-ed0484fec72605166ddb723c1a1bc7d0.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/2807.png b/art/exported/creatures/2807.png new file mode 100644 index 0000000..5c2a6da Binary files /dev/null and b/art/exported/creatures/2807.png differ diff --git a/art/exported/creatures/2807.png.import b/art/exported/creatures/2807.png.import new file mode 100644 index 0000000..af51ff5 --- /dev/null +++ b/art/exported/creatures/2807.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bdus4qo0ebs3e" +path.s3tc="res://.godot/imported/2807.png-aceaf0f586f975d29e318a9513fc3125.s3tc.ctex" +path.etc2="res://.godot/imported/2807.png-aceaf0f586f975d29e318a9513fc3125.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/2807.png" +dest_files=["res://.godot/imported/2807.png-aceaf0f586f975d29e318a9513fc3125.s3tc.ctex", "res://.godot/imported/2807.png-aceaf0f586f975d29e318a9513fc3125.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3002.png b/art/exported/creatures/3002.png new file mode 100644 index 0000000..2ae7e73 Binary files /dev/null and b/art/exported/creatures/3002.png differ diff --git a/art/exported/creatures/3002.png.import b/art/exported/creatures/3002.png.import new file mode 100644 index 0000000..e193cfd --- /dev/null +++ b/art/exported/creatures/3002.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b68vlgtclvkfg" +path.s3tc="res://.godot/imported/3002.png-a87d71158798b43b6bf702a6e1664b4d.s3tc.ctex" +path.etc2="res://.godot/imported/3002.png-a87d71158798b43b6bf702a6e1664b4d.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3002.png" +dest_files=["res://.godot/imported/3002.png-a87d71158798b43b6bf702a6e1664b4d.s3tc.ctex", "res://.godot/imported/3002.png-a87d71158798b43b6bf702a6e1664b4d.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3102.png b/art/exported/creatures/3102.png new file mode 100644 index 0000000..fe4d8fb Binary files /dev/null and b/art/exported/creatures/3102.png differ diff --git a/art/exported/creatures/3102.png.import b/art/exported/creatures/3102.png.import new file mode 100644 index 0000000..47e9c80 --- /dev/null +++ b/art/exported/creatures/3102.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c4d3f28rf86bb" +path.s3tc="res://.godot/imported/3102.png-951ca90331737e3057749e1bdbd88c44.s3tc.ctex" +path.etc2="res://.godot/imported/3102.png-951ca90331737e3057749e1bdbd88c44.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3102.png" +dest_files=["res://.godot/imported/3102.png-951ca90331737e3057749e1bdbd88c44.s3tc.ctex", "res://.godot/imported/3102.png-951ca90331737e3057749e1bdbd88c44.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3103.png b/art/exported/creatures/3103.png new file mode 100644 index 0000000..3d3d615 Binary files /dev/null and b/art/exported/creatures/3103.png differ diff --git a/art/exported/creatures/3103.png.import b/art/exported/creatures/3103.png.import new file mode 100644 index 0000000..9743e89 --- /dev/null +++ b/art/exported/creatures/3103.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjtncgnb0hcsj" +path.s3tc="res://.godot/imported/3103.png-f3b4b5bb43b7611f7c448dbdfff36375.s3tc.ctex" +path.etc2="res://.godot/imported/3103.png-f3b4b5bb43b7611f7c448dbdfff36375.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3103.png" +dest_files=["res://.godot/imported/3103.png-f3b4b5bb43b7611f7c448dbdfff36375.s3tc.ctex", "res://.godot/imported/3103.png-f3b4b5bb43b7611f7c448dbdfff36375.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3104.png b/art/exported/creatures/3104.png new file mode 100644 index 0000000..425932e Binary files /dev/null and b/art/exported/creatures/3104.png differ diff --git a/art/exported/creatures/3104.png.import b/art/exported/creatures/3104.png.import new file mode 100644 index 0000000..fbc70d7 --- /dev/null +++ b/art/exported/creatures/3104.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dlme86lrrhyg8" +path.s3tc="res://.godot/imported/3104.png-fa31dd69bf22b484cf3ac0d99197b886.s3tc.ctex" +path.etc2="res://.godot/imported/3104.png-fa31dd69bf22b484cf3ac0d99197b886.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3104.png" +dest_files=["res://.godot/imported/3104.png-fa31dd69bf22b484cf3ac0d99197b886.s3tc.ctex", "res://.godot/imported/3104.png-fa31dd69bf22b484cf3ac0d99197b886.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3107.png b/art/exported/creatures/3107.png new file mode 100644 index 0000000..7dee611 Binary files /dev/null and b/art/exported/creatures/3107.png differ diff --git a/art/exported/creatures/3107.png.import b/art/exported/creatures/3107.png.import new file mode 100644 index 0000000..241bac9 --- /dev/null +++ b/art/exported/creatures/3107.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csv1dsgvifh4l" +path.s3tc="res://.godot/imported/3107.png-5b981d56f7094a29a92b2f5035a47b11.s3tc.ctex" +path.etc2="res://.godot/imported/3107.png-5b981d56f7094a29a92b2f5035a47b11.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3107.png" +dest_files=["res://.godot/imported/3107.png-5b981d56f7094a29a92b2f5035a47b11.s3tc.ctex", "res://.godot/imported/3107.png-5b981d56f7094a29a92b2f5035a47b11.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3201.png b/art/exported/creatures/3201.png new file mode 100644 index 0000000..bcc639b Binary files /dev/null and b/art/exported/creatures/3201.png differ diff --git a/art/exported/creatures/3201.png.import b/art/exported/creatures/3201.png.import new file mode 100644 index 0000000..a8d6a43 --- /dev/null +++ b/art/exported/creatures/3201.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cd8u0ow8cqsbh" +path.s3tc="res://.godot/imported/3201.png-846cb0fbb88950bb70d5b03c50a88457.s3tc.ctex" +path.etc2="res://.godot/imported/3201.png-846cb0fbb88950bb70d5b03c50a88457.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3201.png" +dest_files=["res://.godot/imported/3201.png-846cb0fbb88950bb70d5b03c50a88457.s3tc.ctex", "res://.godot/imported/3201.png-846cb0fbb88950bb70d5b03c50a88457.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3401.png b/art/exported/creatures/3401.png new file mode 100644 index 0000000..c14c2ae Binary files /dev/null and b/art/exported/creatures/3401.png differ diff --git a/art/exported/creatures/3401.png.import b/art/exported/creatures/3401.png.import new file mode 100644 index 0000000..096d0fb --- /dev/null +++ b/art/exported/creatures/3401.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://begsj5tj035e1" +path.s3tc="res://.godot/imported/3401.png-cd8c7ec154f8248110ec396b3f8a76c9.s3tc.ctex" +path.etc2="res://.godot/imported/3401.png-cd8c7ec154f8248110ec396b3f8a76c9.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3401.png" +dest_files=["res://.godot/imported/3401.png-cd8c7ec154f8248110ec396b3f8a76c9.s3tc.ctex", "res://.godot/imported/3401.png-cd8c7ec154f8248110ec396b3f8a76c9.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3902.png b/art/exported/creatures/3902.png new file mode 100644 index 0000000..d231239 Binary files /dev/null and b/art/exported/creatures/3902.png differ diff --git a/art/exported/creatures/3902.png.import b/art/exported/creatures/3902.png.import new file mode 100644 index 0000000..a8e5440 --- /dev/null +++ b/art/exported/creatures/3902.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddc556gcby50v" +path.s3tc="res://.godot/imported/3902.png-485bc4f9f1a505225bdc037111e32499.s3tc.ctex" +path.etc2="res://.godot/imported/3902.png-485bc4f9f1a505225bdc037111e32499.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3902.png" +dest_files=["res://.godot/imported/3902.png-485bc4f9f1a505225bdc037111e32499.s3tc.ctex", "res://.godot/imported/3902.png-485bc4f9f1a505225bdc037111e32499.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/3906.png b/art/exported/creatures/3906.png new file mode 100644 index 0000000..6cc1d1b Binary files /dev/null and b/art/exported/creatures/3906.png differ diff --git a/art/exported/creatures/3906.png.import b/art/exported/creatures/3906.png.import new file mode 100644 index 0000000..9bce5e4 --- /dev/null +++ b/art/exported/creatures/3906.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bdmm1jfod7gq0" +path.s3tc="res://.godot/imported/3906.png-39cc349a6d3e716822bc9e12bd0ac7a2.s3tc.ctex" +path.etc2="res://.godot/imported/3906.png-39cc349a6d3e716822bc9e12bd0ac7a2.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/3906.png" +dest_files=["res://.godot/imported/3906.png-39cc349a6d3e716822bc9e12bd0ac7a2.s3tc.ctex", "res://.godot/imported/3906.png-39cc349a6d3e716822bc9e12bd0ac7a2.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/403.png b/art/exported/creatures/403.png new file mode 100644 index 0000000..a1eb283 Binary files /dev/null and b/art/exported/creatures/403.png differ diff --git a/art/exported/creatures/403.png.import b/art/exported/creatures/403.png.import new file mode 100644 index 0000000..da790e8 --- /dev/null +++ b/art/exported/creatures/403.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bypagdb0ollh0" +path.s3tc="res://.godot/imported/403.png-57b9dd64545d97bbd63b86e7f3d61562.s3tc.ctex" +path.etc2="res://.godot/imported/403.png-57b9dd64545d97bbd63b86e7f3d61562.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/403.png" +dest_files=["res://.godot/imported/403.png-57b9dd64545d97bbd63b86e7f3d61562.s3tc.ctex", "res://.godot/imported/403.png-57b9dd64545d97bbd63b86e7f3d61562.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/4101.png b/art/exported/creatures/4101.png new file mode 100644 index 0000000..74a068b Binary files /dev/null and b/art/exported/creatures/4101.png differ diff --git a/art/exported/creatures/4101.png.import b/art/exported/creatures/4101.png.import new file mode 100644 index 0000000..d906da5 --- /dev/null +++ b/art/exported/creatures/4101.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bahd6nks2g7ik" +path.s3tc="res://.godot/imported/4101.png-163a8880f3559279d2acc129509430bc.s3tc.ctex" +path.etc2="res://.godot/imported/4101.png-163a8880f3559279d2acc129509430bc.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/4101.png" +dest_files=["res://.godot/imported/4101.png-163a8880f3559279d2acc129509430bc.s3tc.ctex", "res://.godot/imported/4101.png-163a8880f3559279d2acc129509430bc.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/4401.png b/art/exported/creatures/4401.png new file mode 100644 index 0000000..d043f4c Binary files /dev/null and b/art/exported/creatures/4401.png differ diff --git a/art/exported/creatures/4401.png.import b/art/exported/creatures/4401.png.import new file mode 100644 index 0000000..809a146 --- /dev/null +++ b/art/exported/creatures/4401.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7dbcbicxwvlo" +path.s3tc="res://.godot/imported/4401.png-0fd242cb090b49614af9b4d07503b2db.s3tc.ctex" +path.etc2="res://.godot/imported/4401.png-0fd242cb090b49614af9b4d07503b2db.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/4401.png" +dest_files=["res://.godot/imported/4401.png-0fd242cb090b49614af9b4d07503b2db.s3tc.ctex", "res://.godot/imported/4401.png-0fd242cb090b49614af9b4d07503b2db.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/4701.png b/art/exported/creatures/4701.png new file mode 100644 index 0000000..afd6a85 Binary files /dev/null and b/art/exported/creatures/4701.png differ diff --git a/art/exported/creatures/4701.png.import b/art/exported/creatures/4701.png.import new file mode 100644 index 0000000..5f4ed32 --- /dev/null +++ b/art/exported/creatures/4701.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://do6hcv3omivv5" +path.s3tc="res://.godot/imported/4701.png-dcb44d4ce6dfdc812a2e185e7f9511be.s3tc.ctex" +path.etc2="res://.godot/imported/4701.png-dcb44d4ce6dfdc812a2e185e7f9511be.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/4701.png" +dest_files=["res://.godot/imported/4701.png-dcb44d4ce6dfdc812a2e185e7f9511be.s3tc.ctex", "res://.godot/imported/4701.png-dcb44d4ce6dfdc812a2e185e7f9511be.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/5001.png b/art/exported/creatures/5001.png new file mode 100644 index 0000000..cf39422 Binary files /dev/null and b/art/exported/creatures/5001.png differ diff --git a/art/exported/creatures/5001.png.import b/art/exported/creatures/5001.png.import new file mode 100644 index 0000000..c87c852 --- /dev/null +++ b/art/exported/creatures/5001.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://byil5mr6w3j1q" +path.s3tc="res://.godot/imported/5001.png-ebe37fb8bd4263bb83e36bb5890b5641.s3tc.ctex" +path.etc2="res://.godot/imported/5001.png-ebe37fb8bd4263bb83e36bb5890b5641.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/5001.png" +dest_files=["res://.godot/imported/5001.png-ebe37fb8bd4263bb83e36bb5890b5641.s3tc.ctex", "res://.godot/imported/5001.png-ebe37fb8bd4263bb83e36bb5890b5641.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/5702.png b/art/exported/creatures/5702.png new file mode 100644 index 0000000..aba6b80 Binary files /dev/null and b/art/exported/creatures/5702.png differ diff --git a/art/exported/creatures/5702.png.import b/art/exported/creatures/5702.png.import new file mode 100644 index 0000000..527c367 --- /dev/null +++ b/art/exported/creatures/5702.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dxwr7yv5h30s" +path.s3tc="res://.godot/imported/5702.png-b0cead42bd9a5851c3f6775a7d0e469e.s3tc.ctex" +path.etc2="res://.godot/imported/5702.png-b0cead42bd9a5851c3f6775a7d0e469e.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/5702.png" +dest_files=["res://.godot/imported/5702.png-b0cead42bd9a5851c3f6775a7d0e469e.s3tc.ctex", "res://.godot/imported/5702.png-b0cead42bd9a5851c3f6775a7d0e469e.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/5901.png b/art/exported/creatures/5901.png new file mode 100644 index 0000000..a75039f Binary files /dev/null and b/art/exported/creatures/5901.png differ diff --git a/art/exported/creatures/5901.png.import b/art/exported/creatures/5901.png.import new file mode 100644 index 0000000..e52ad8c --- /dev/null +++ b/art/exported/creatures/5901.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dovitajskavmi" +path.s3tc="res://.godot/imported/5901.png-10c9e77992ad31ce54d34b95a6db6f61.s3tc.ctex" +path.etc2="res://.godot/imported/5901.png-10c9e77992ad31ce54d34b95a6db6f61.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/5901.png" +dest_files=["res://.godot/imported/5901.png-10c9e77992ad31ce54d34b95a6db6f61.s3tc.ctex", "res://.godot/imported/5901.png-10c9e77992ad31ce54d34b95a6db6f61.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/5902.png b/art/exported/creatures/5902.png new file mode 100644 index 0000000..809057d Binary files /dev/null and b/art/exported/creatures/5902.png differ diff --git a/art/exported/creatures/5902.png.import b/art/exported/creatures/5902.png.import new file mode 100644 index 0000000..2c8a5fb --- /dev/null +++ b/art/exported/creatures/5902.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://0k4qnt7wusam" +path.s3tc="res://.godot/imported/5902.png-e3a13a1e827488fa86f34c2aad883127.s3tc.ctex" +path.etc2="res://.godot/imported/5902.png-e3a13a1e827488fa86f34c2aad883127.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/5902.png" +dest_files=["res://.godot/imported/5902.png-e3a13a1e827488fa86f34c2aad883127.s3tc.ctex", "res://.godot/imported/5902.png-e3a13a1e827488fa86f34c2aad883127.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/5903.png b/art/exported/creatures/5903.png new file mode 100644 index 0000000..74a8af6 Binary files /dev/null and b/art/exported/creatures/5903.png differ diff --git a/art/exported/creatures/5903.png.import b/art/exported/creatures/5903.png.import new file mode 100644 index 0000000..22946e8 --- /dev/null +++ b/art/exported/creatures/5903.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bjb8gqbta2oxw" +path.s3tc="res://.godot/imported/5903.png-44743c2e322f48eefaeedcd3defec27d.s3tc.ctex" +path.etc2="res://.godot/imported/5903.png-44743c2e322f48eefaeedcd3defec27d.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/5903.png" +dest_files=["res://.godot/imported/5903.png-44743c2e322f48eefaeedcd3defec27d.s3tc.ctex", "res://.godot/imported/5903.png-44743c2e322f48eefaeedcd3defec27d.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/5904.png b/art/exported/creatures/5904.png new file mode 100644 index 0000000..924ba4b Binary files /dev/null and b/art/exported/creatures/5904.png differ diff --git a/art/exported/creatures/5904.png.import b/art/exported/creatures/5904.png.import new file mode 100644 index 0000000..23458ae --- /dev/null +++ b/art/exported/creatures/5904.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtapwjgdbcgr7" +path.s3tc="res://.godot/imported/5904.png-e43ba3245eadac7081a6a23e64ccc940.s3tc.ctex" +path.etc2="res://.godot/imported/5904.png-e43ba3245eadac7081a6a23e64ccc940.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/5904.png" +dest_files=["res://.godot/imported/5904.png-e43ba3245eadac7081a6a23e64ccc940.s3tc.ctex", "res://.godot/imported/5904.png-e43ba3245eadac7081a6a23e64ccc940.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6001.png b/art/exported/creatures/6001.png new file mode 100644 index 0000000..9219597 Binary files /dev/null and b/art/exported/creatures/6001.png differ diff --git a/art/exported/creatures/6001.png.import b/art/exported/creatures/6001.png.import new file mode 100644 index 0000000..a63cf85 --- /dev/null +++ b/art/exported/creatures/6001.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0164i40101lq" +path.s3tc="res://.godot/imported/6001.png-6fd8c3ef0885c466baece687cd24d38d.s3tc.ctex" +path.etc2="res://.godot/imported/6001.png-6fd8c3ef0885c466baece687cd24d38d.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6001.png" +dest_files=["res://.godot/imported/6001.png-6fd8c3ef0885c466baece687cd24d38d.s3tc.ctex", "res://.godot/imported/6001.png-6fd8c3ef0885c466baece687cd24d38d.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6103.png b/art/exported/creatures/6103.png new file mode 100644 index 0000000..f45e607 Binary files /dev/null and b/art/exported/creatures/6103.png differ diff --git a/art/exported/creatures/6103.png.import b/art/exported/creatures/6103.png.import new file mode 100644 index 0000000..ac97dac --- /dev/null +++ b/art/exported/creatures/6103.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://k3ser2dy6wj7" +path.s3tc="res://.godot/imported/6103.png-5fc95bf908f801d5397114bde5081f55.s3tc.ctex" +path.etc2="res://.godot/imported/6103.png-5fc95bf908f801d5397114bde5081f55.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6103.png" +dest_files=["res://.godot/imported/6103.png-5fc95bf908f801d5397114bde5081f55.s3tc.ctex", "res://.godot/imported/6103.png-5fc95bf908f801d5397114bde5081f55.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6406.png b/art/exported/creatures/6406.png new file mode 100644 index 0000000..15c3b83 Binary files /dev/null and b/art/exported/creatures/6406.png differ diff --git a/art/exported/creatures/6406.png.import b/art/exported/creatures/6406.png.import new file mode 100644 index 0000000..ac060ee --- /dev/null +++ b/art/exported/creatures/6406.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gnlehenln3kp" +path.s3tc="res://.godot/imported/6406.png-67ebebdd8d13cd88e0a209b3ed00024c.s3tc.ctex" +path.etc2="res://.godot/imported/6406.png-67ebebdd8d13cd88e0a209b3ed00024c.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6406.png" +dest_files=["res://.godot/imported/6406.png-67ebebdd8d13cd88e0a209b3ed00024c.s3tc.ctex", "res://.godot/imported/6406.png-67ebebdd8d13cd88e0a209b3ed00024c.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6601.png b/art/exported/creatures/6601.png new file mode 100644 index 0000000..93c05c0 Binary files /dev/null and b/art/exported/creatures/6601.png differ diff --git a/art/exported/creatures/6601.png.import b/art/exported/creatures/6601.png.import new file mode 100644 index 0000000..f5facf7 --- /dev/null +++ b/art/exported/creatures/6601.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://jauudro8rgay" +path.s3tc="res://.godot/imported/6601.png-7d5f9459e449f3aa7ae72a9e069e6a21.s3tc.ctex" +path.etc2="res://.godot/imported/6601.png-7d5f9459e449f3aa7ae72a9e069e6a21.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6601.png" +dest_files=["res://.godot/imported/6601.png-7d5f9459e449f3aa7ae72a9e069e6a21.s3tc.ctex", "res://.godot/imported/6601.png-7d5f9459e449f3aa7ae72a9e069e6a21.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6801.png b/art/exported/creatures/6801.png new file mode 100644 index 0000000..bcdf70b Binary files /dev/null and b/art/exported/creatures/6801.png differ diff --git a/art/exported/creatures/6801.png.import b/art/exported/creatures/6801.png.import new file mode 100644 index 0000000..c257a50 --- /dev/null +++ b/art/exported/creatures/6801.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cuik8y4tqqetk" +path.s3tc="res://.godot/imported/6801.png-f771f612f1db1d1b99cb446dfebc4992.s3tc.ctex" +path.etc2="res://.godot/imported/6801.png-f771f612f1db1d1b99cb446dfebc4992.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6801.png" +dest_files=["res://.godot/imported/6801.png-f771f612f1db1d1b99cb446dfebc4992.s3tc.ctex", "res://.godot/imported/6801.png-f771f612f1db1d1b99cb446dfebc4992.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6804.png b/art/exported/creatures/6804.png new file mode 100644 index 0000000..14cc738 Binary files /dev/null and b/art/exported/creatures/6804.png differ diff --git a/art/exported/creatures/6804.png.import b/art/exported/creatures/6804.png.import new file mode 100644 index 0000000..12be7af --- /dev/null +++ b/art/exported/creatures/6804.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5ejex5wtfoun" +path.s3tc="res://.godot/imported/6804.png-28bcc10060d656f6d7f080ea81e2d1d3.s3tc.ctex" +path.etc2="res://.godot/imported/6804.png-28bcc10060d656f6d7f080ea81e2d1d3.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6804.png" +dest_files=["res://.godot/imported/6804.png-28bcc10060d656f6d7f080ea81e2d1d3.s3tc.ctex", "res://.godot/imported/6804.png-28bcc10060d656f6d7f080ea81e2d1d3.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6807.png b/art/exported/creatures/6807.png new file mode 100644 index 0000000..270004f Binary files /dev/null and b/art/exported/creatures/6807.png differ diff --git a/art/exported/creatures/6807.png.import b/art/exported/creatures/6807.png.import new file mode 100644 index 0000000..026d3d9 --- /dev/null +++ b/art/exported/creatures/6807.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cu5s2rxrc0dh5" +path.s3tc="res://.godot/imported/6807.png-35d499aa8b3f10cc974cc7df8b70f89e.s3tc.ctex" +path.etc2="res://.godot/imported/6807.png-35d499aa8b3f10cc974cc7df8b70f89e.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6807.png" +dest_files=["res://.godot/imported/6807.png-35d499aa8b3f10cc974cc7df8b70f89e.s3tc.ctex", "res://.godot/imported/6807.png-35d499aa8b3f10cc974cc7df8b70f89e.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6901.png b/art/exported/creatures/6901.png new file mode 100644 index 0000000..0c34e37 Binary files /dev/null and b/art/exported/creatures/6901.png differ diff --git a/art/exported/creatures/6901.png.import b/art/exported/creatures/6901.png.import new file mode 100644 index 0000000..651f116 --- /dev/null +++ b/art/exported/creatures/6901.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://umjy47x208xb" +path.s3tc="res://.godot/imported/6901.png-f9ff2d1fc8e00eabd73822b5031f91d8.s3tc.ctex" +path.etc2="res://.godot/imported/6901.png-f9ff2d1fc8e00eabd73822b5031f91d8.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6901.png" +dest_files=["res://.godot/imported/6901.png-f9ff2d1fc8e00eabd73822b5031f91d8.s3tc.ctex", "res://.godot/imported/6901.png-f9ff2d1fc8e00eabd73822b5031f91d8.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6902.png b/art/exported/creatures/6902.png new file mode 100644 index 0000000..3d4517e Binary files /dev/null and b/art/exported/creatures/6902.png differ diff --git a/art/exported/creatures/6902.png.import b/art/exported/creatures/6902.png.import new file mode 100644 index 0000000..35f84df --- /dev/null +++ b/art/exported/creatures/6902.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csdl6u3uvft45" +path.s3tc="res://.godot/imported/6902.png-f8899611759244b42c6c786ff118dcba.s3tc.ctex" +path.etc2="res://.godot/imported/6902.png-f8899611759244b42c6c786ff118dcba.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6902.png" +dest_files=["res://.godot/imported/6902.png-f8899611759244b42c6c786ff118dcba.s3tc.ctex", "res://.godot/imported/6902.png-f8899611759244b42c6c786ff118dcba.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6904.png b/art/exported/creatures/6904.png new file mode 100644 index 0000000..f2e8a7b Binary files /dev/null and b/art/exported/creatures/6904.png differ diff --git a/art/exported/creatures/6904.png.import b/art/exported/creatures/6904.png.import new file mode 100644 index 0000000..75051e3 --- /dev/null +++ b/art/exported/creatures/6904.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bqh7d4v8jrbpr" +path.s3tc="res://.godot/imported/6904.png-38739e4e48fbb83e3f65074a93d681bb.s3tc.ctex" +path.etc2="res://.godot/imported/6904.png-38739e4e48fbb83e3f65074a93d681bb.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6904.png" +dest_files=["res://.godot/imported/6904.png-38739e4e48fbb83e3f65074a93d681bb.s3tc.ctex", "res://.godot/imported/6904.png-38739e4e48fbb83e3f65074a93d681bb.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/6905.png b/art/exported/creatures/6905.png new file mode 100644 index 0000000..296848e Binary files /dev/null and b/art/exported/creatures/6905.png differ diff --git a/art/exported/creatures/6905.png.import b/art/exported/creatures/6905.png.import new file mode 100644 index 0000000..f267dc2 --- /dev/null +++ b/art/exported/creatures/6905.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c4d8x6qyhahvn" +path.s3tc="res://.godot/imported/6905.png-a52c1647421059618698e17d7a3f8f98.s3tc.ctex" +path.etc2="res://.godot/imported/6905.png-a52c1647421059618698e17d7a3f8f98.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/6905.png" +dest_files=["res://.godot/imported/6905.png-a52c1647421059618698e17d7a3f8f98.s3tc.ctex", "res://.godot/imported/6905.png-a52c1647421059618698e17d7a3f8f98.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/701.png b/art/exported/creatures/701.png new file mode 100644 index 0000000..4f7d8f8 Binary files /dev/null and b/art/exported/creatures/701.png differ diff --git a/art/exported/creatures/701.png.import b/art/exported/creatures/701.png.import new file mode 100644 index 0000000..7598ee8 --- /dev/null +++ b/art/exported/creatures/701.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://jw5xt0cfjn1d" +path.s3tc="res://.godot/imported/701.png-8a66c28a9f49fa465ce3b5342fa08dbc.s3tc.ctex" +path.etc2="res://.godot/imported/701.png-8a66c28a9f49fa465ce3b5342fa08dbc.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/701.png" +dest_files=["res://.godot/imported/701.png-8a66c28a9f49fa465ce3b5342fa08dbc.s3tc.ctex", "res://.godot/imported/701.png-8a66c28a9f49fa465ce3b5342fa08dbc.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/704.png b/art/exported/creatures/704.png new file mode 100644 index 0000000..526d090 Binary files /dev/null and b/art/exported/creatures/704.png differ diff --git a/art/exported/creatures/704.png.import b/art/exported/creatures/704.png.import new file mode 100644 index 0000000..e80e19e --- /dev/null +++ b/art/exported/creatures/704.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bonpxkp6uwxq6" +path.s3tc="res://.godot/imported/704.png-649669246217a14c9609a7e929841827.s3tc.ctex" +path.etc2="res://.godot/imported/704.png-649669246217a14c9609a7e929841827.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/704.png" +dest_files=["res://.godot/imported/704.png-649669246217a14c9609a7e929841827.s3tc.ctex", "res://.godot/imported/704.png-649669246217a14c9609a7e929841827.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/7101.png b/art/exported/creatures/7101.png new file mode 100644 index 0000000..93a13af Binary files /dev/null and b/art/exported/creatures/7101.png differ diff --git a/art/exported/creatures/7101.png.import b/art/exported/creatures/7101.png.import new file mode 100644 index 0000000..2d312b3 --- /dev/null +++ b/art/exported/creatures/7101.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dd5lpjei8ix4d" +path.s3tc="res://.godot/imported/7101.png-9be787a05b48075222e923e556de87ac.s3tc.ctex" +path.etc2="res://.godot/imported/7101.png-9be787a05b48075222e923e556de87ac.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/7101.png" +dest_files=["res://.godot/imported/7101.png-9be787a05b48075222e923e556de87ac.s3tc.ctex", "res://.godot/imported/7101.png-9be787a05b48075222e923e556de87ac.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/7403.png b/art/exported/creatures/7403.png new file mode 100644 index 0000000..ad73c17 Binary files /dev/null and b/art/exported/creatures/7403.png differ diff --git a/art/exported/creatures/7403.png.import b/art/exported/creatures/7403.png.import new file mode 100644 index 0000000..bef32c4 --- /dev/null +++ b/art/exported/creatures/7403.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bl7ru6gm5xnpb" +path.s3tc="res://.godot/imported/7403.png-54b51089a6ff5c2091372d659ba4bdc7.s3tc.ctex" +path.etc2="res://.godot/imported/7403.png-54b51089a6ff5c2091372d659ba4bdc7.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/7403.png" +dest_files=["res://.godot/imported/7403.png-54b51089a6ff5c2091372d659ba4bdc7.s3tc.ctex", "res://.godot/imported/7403.png-54b51089a6ff5c2091372d659ba4bdc7.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/7506.png b/art/exported/creatures/7506.png new file mode 100644 index 0000000..7e8c5b2 Binary files /dev/null and b/art/exported/creatures/7506.png differ diff --git a/art/exported/creatures/7506.png.import b/art/exported/creatures/7506.png.import new file mode 100644 index 0000000..c2c99a0 --- /dev/null +++ b/art/exported/creatures/7506.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6qm3sujp8xvg" +path.s3tc="res://.godot/imported/7506.png-5c0f871c623e61a890015626ea315de9.s3tc.ctex" +path.etc2="res://.godot/imported/7506.png-5c0f871c623e61a890015626ea315de9.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/7506.png" +dest_files=["res://.godot/imported/7506.png-5c0f871c623e61a890015626ea315de9.s3tc.ctex", "res://.godot/imported/7506.png-5c0f871c623e61a890015626ea315de9.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/7508.png b/art/exported/creatures/7508.png new file mode 100644 index 0000000..27f1a59 Binary files /dev/null and b/art/exported/creatures/7508.png differ diff --git a/art/exported/creatures/7508.png.import b/art/exported/creatures/7508.png.import new file mode 100644 index 0000000..a14d42f --- /dev/null +++ b/art/exported/creatures/7508.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnw0dw14iyxbh" +path.s3tc="res://.godot/imported/7508.png-555eff33a2cb66622ccca9d7f063522e.s3tc.ctex" +path.etc2="res://.godot/imported/7508.png-555eff33a2cb66622ccca9d7f063522e.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/7508.png" +dest_files=["res://.godot/imported/7508.png-555eff33a2cb66622ccca9d7f063522e.s3tc.ctex", "res://.godot/imported/7508.png-555eff33a2cb66622ccca9d7f063522e.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/801.png b/art/exported/creatures/801.png new file mode 100644 index 0000000..f2e6390 Binary files /dev/null and b/art/exported/creatures/801.png differ diff --git a/art/exported/creatures/801.png.import b/art/exported/creatures/801.png.import new file mode 100644 index 0000000..3721440 --- /dev/null +++ b/art/exported/creatures/801.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dkocdkoyy2udh" +path.s3tc="res://.godot/imported/801.png-b0324ef8c10934464b8be69cb9eca981.s3tc.ctex" +path.etc2="res://.godot/imported/801.png-b0324ef8c10934464b8be69cb9eca981.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/801.png" +dest_files=["res://.godot/imported/801.png-b0324ef8c10934464b8be69cb9eca981.s3tc.ctex", "res://.godot/imported/801.png-b0324ef8c10934464b8be69cb9eca981.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/802.png b/art/exported/creatures/802.png new file mode 100644 index 0000000..f786031 Binary files /dev/null and b/art/exported/creatures/802.png differ diff --git a/art/exported/creatures/802.png.import b/art/exported/creatures/802.png.import new file mode 100644 index 0000000..f7e4cc6 --- /dev/null +++ b/art/exported/creatures/802.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6pkx1koopl7p" +path.s3tc="res://.godot/imported/802.png-1e79f95b56c444a9c7183dada8a14dc3.s3tc.ctex" +path.etc2="res://.godot/imported/802.png-1e79f95b56c444a9c7183dada8a14dc3.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/802.png" +dest_files=["res://.godot/imported/802.png-1e79f95b56c444a9c7183dada8a14dc3.s3tc.ctex", "res://.godot/imported/802.png-1e79f95b56c444a9c7183dada8a14dc3.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/805.png b/art/exported/creatures/805.png new file mode 100644 index 0000000..727793c Binary files /dev/null and b/art/exported/creatures/805.png differ diff --git a/art/exported/creatures/805.png.import b/art/exported/creatures/805.png.import new file mode 100644 index 0000000..db359af --- /dev/null +++ b/art/exported/creatures/805.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cyo0ihvopej4" +path.s3tc="res://.godot/imported/805.png-f508211dd3f15d8b9090675eef9939f7.s3tc.ctex" +path.etc2="res://.godot/imported/805.png-f508211dd3f15d8b9090675eef9939f7.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/805.png" +dest_files=["res://.godot/imported/805.png-f508211dd3f15d8b9090675eef9939f7.s3tc.ctex", "res://.godot/imported/805.png-f508211dd3f15d8b9090675eef9939f7.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/806.png b/art/exported/creatures/806.png new file mode 100644 index 0000000..a8acdb1 Binary files /dev/null and b/art/exported/creatures/806.png differ diff --git a/art/exported/creatures/806.png.import b/art/exported/creatures/806.png.import new file mode 100644 index 0000000..8078cb6 --- /dev/null +++ b/art/exported/creatures/806.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c31dw2wqjat40" +path.s3tc="res://.godot/imported/806.png-640099ab90a2d2daf3c4e7229634452c.s3tc.ctex" +path.etc2="res://.godot/imported/806.png-640099ab90a2d2daf3c4e7229634452c.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/806.png" +dest_files=["res://.godot/imported/806.png-640099ab90a2d2daf3c4e7229634452c.s3tc.ctex", "res://.godot/imported/806.png-640099ab90a2d2daf3c4e7229634452c.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/808.png b/art/exported/creatures/808.png new file mode 100644 index 0000000..e218b8e Binary files /dev/null and b/art/exported/creatures/808.png differ diff --git a/art/exported/creatures/808.png.import b/art/exported/creatures/808.png.import new file mode 100644 index 0000000..1126876 --- /dev/null +++ b/art/exported/creatures/808.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://x2d4nglo0rlk" +path.s3tc="res://.godot/imported/808.png-bc683347c2e3b627379b7eb047e12a89.s3tc.ctex" +path.etc2="res://.godot/imported/808.png-bc683347c2e3b627379b7eb047e12a89.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/808.png" +dest_files=["res://.godot/imported/808.png-bc683347c2e3b627379b7eb047e12a89.s3tc.ctex", "res://.godot/imported/808.png-bc683347c2e3b627379b7eb047e12a89.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/creatures/fish_placeholder.png b/art/exported/creatures/fish_placeholder.png new file mode 100644 index 0000000..de69afb Binary files /dev/null and b/art/exported/creatures/fish_placeholder.png differ diff --git a/art/exported/creatures/fish_placeholder.png.import b/art/exported/creatures/fish_placeholder.png.import new file mode 100644 index 0000000..87111f4 --- /dev/null +++ b/art/exported/creatures/fish_placeholder.png.import @@ -0,0 +1,42 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d08ce7q8vmlfs" +path.s3tc="res://.godot/imported/fish_placeholder.png-41ecfc07b87417338ce888ac1e2c2362.s3tc.ctex" +path.etc2="res://.godot/imported/fish_placeholder.png-41ecfc07b87417338ce888ac1e2c2362.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/exported/creatures/fish_placeholder.png" +dest_files=["res://.godot/imported/fish_placeholder.png-41ecfc07b87417338ce888ac1e2c2362.s3tc.ctex", "res://.godot/imported/fish_placeholder.png-41ecfc07b87417338ce888ac1e2c2362.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/items/equipment/net.glb b/art/exported/items/equipment/net.glb new file mode 100644 index 0000000..db4fa34 Binary files /dev/null and b/art/exported/items/equipment/net.glb differ diff --git a/art/exported/items/equipment/net.glb.import b/art/exported/items/equipment/net.glb.import new file mode 100644 index 0000000..28667d6 --- /dev/null +++ b/art/exported/items/equipment/net.glb.import @@ -0,0 +1,45 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dsa6yss1sxfcy" +path="res://.godot/imported/net.glb-cbbc53905aec6a50c4a3322ca7a93b1e.scn" + +[deps] + +source_file="res://art/exported/items/equipment/net.glb" +dest_files=["res://.godot/imported/net.glb-cbbc53905aec6a50c4a3322ca7a93b1e.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +mesh_library/use_node_names_as_mesh_names=false +array_mesh/deduplicate_surfaces=true +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=2 +gltf/embedded_image_handling=1 +gltf/texture_map_mode=1 diff --git a/art/exported/items/equipment/net_Material.png b/art/exported/items/equipment/net_Material.png new file mode 100644 index 0000000..bd5eff2 Binary files /dev/null and b/art/exported/items/equipment/net_Material.png differ diff --git a/art/exported/items/equipment/net_Material.png.import b/art/exported/items/equipment/net_Material.png.import new file mode 100644 index 0000000..0723973 --- /dev/null +++ b/art/exported/items/equipment/net_Material.png.import @@ -0,0 +1,45 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://binoqhg45vgbs" +path.s3tc="res://.godot/imported/net_Material.png-f4c4b0400561bc2751fe719b6b1a1e1a.s3tc.ctex" +path.etc2="res://.godot/imported/net_Material.png-f4c4b0400561bc2751fe719b6b1a1e1a.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} +generator_parameters={ +"md5": "ef2c2ae657c9460c90eb808ba5217f39" +} + +[deps] + +source_file="res://art/exported/items/equipment/net_Material.png" +dest_files=["res://.godot/imported/net_Material.png-f4c4b0400561bc2751fe719b6b1a1e1a.s3tc.ctex", "res://.godot/imported/net_Material.png-f4c4b0400561bc2751fe719b6b1a1e1a.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/items/equipment/net_Plane Base Color.png b/art/exported/items/equipment/net_Plane Base Color.png new file mode 100644 index 0000000..795d0a3 Binary files /dev/null and b/art/exported/items/equipment/net_Plane Base Color.png differ diff --git a/art/exported/items/equipment/net_Plane Base Color.png.import b/art/exported/items/equipment/net_Plane Base Color.png.import new file mode 100644 index 0000000..61077be --- /dev/null +++ b/art/exported/items/equipment/net_Plane Base Color.png.import @@ -0,0 +1,45 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdsabucjy5rpk" +path.s3tc="res://.godot/imported/net_Plane Base Color.png-3875ae3dd186ddf319c55aabb13e663f.s3tc.ctex" +path.etc2="res://.godot/imported/net_Plane Base Color.png-3875ae3dd186ddf319c55aabb13e663f.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} +generator_parameters={ +"md5": "a6001c381d4c8e16bd2d64ea74ccff82" +} + +[deps] + +source_file="res://art/exported/items/equipment/net_Plane Base Color.png" +dest_files=["res://.godot/imported/net_Plane Base Color.png-3875ae3dd186ddf319c55aabb13e663f.s3tc.ctex", "res://.godot/imported/net_Plane Base Color.png-3875ae3dd186ddf319c55aabb13e663f.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/art/exported/system_icons/netfishing.ico b/art/exported/system_icons/netfishing.ico deleted file mode 100644 index dc5bdae..0000000 Binary files a/art/exported/system_icons/netfishing.ico and /dev/null differ diff --git a/art/exported/system_icons/netfishing_1024.png b/art/exported/system_icons/netfishing_1024.png deleted file mode 100644 index a433e80..0000000 Binary files a/art/exported/system_icons/netfishing_1024.png and /dev/null differ diff --git a/art/exported/system_icons/netfishing_256.png b/art/exported/system_icons/netfishing_256.png deleted file mode 100644 index 1e7be72..0000000 Binary files a/art/exported/system_icons/netfishing_256.png and /dev/null differ diff --git a/art/exported/system_icons/straywild.ico b/art/exported/system_icons/straywild.ico new file mode 100644 index 0000000..c03de8e Binary files /dev/null and b/art/exported/system_icons/straywild.ico differ diff --git a/art/exported/system_icons/straywild_1024.png b/art/exported/system_icons/straywild_1024.png new file mode 100644 index 0000000..2a3b204 Binary files /dev/null and b/art/exported/system_icons/straywild_1024.png differ diff --git a/art/exported/system_icons/netfishing_1024.png.import b/art/exported/system_icons/straywild_1024.png.import similarity index 74% rename from art/exported/system_icons/netfishing_1024.png.import rename to art/exported/system_icons/straywild_1024.png.import index 08aa925..dea156a 100644 --- a/art/exported/system_icons/netfishing_1024.png.import +++ b/art/exported/system_icons/straywild_1024.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bkh5hw8wwu8pc" -path="res://.godot/imported/netfishing_1024.png-7c53a099ed2743b4a623c258641b1d29.ctex" +path="res://.godot/imported/straywild_1024.png-b9b5c159c9fcecc21b04324370d4522f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/exported/system_icons/netfishing_1024.png" -dest_files=["res://.godot/imported/netfishing_1024.png-7c53a099ed2743b4a623c258641b1d29.ctex"] +source_file="res://art/exported/system_icons/straywild_1024.png" +dest_files=["res://.godot/imported/straywild_1024.png-b9b5c159c9fcecc21b04324370d4522f.ctex"] [params] diff --git a/art/exported/system_icons/straywild_256.png b/art/exported/system_icons/straywild_256.png new file mode 100644 index 0000000..98275eb Binary files /dev/null and b/art/exported/system_icons/straywild_256.png differ diff --git a/art/exported/system_icons/netfishing_256.png.import b/art/exported/system_icons/straywild_256.png.import similarity index 74% rename from art/exported/system_icons/netfishing_256.png.import rename to art/exported/system_icons/straywild_256.png.import index 34d5d27..5726347 100644 --- a/art/exported/system_icons/netfishing_256.png.import +++ b/art/exported/system_icons/straywild_256.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cty16m8ydla06" -path="res://.godot/imported/netfishing_256.png-d9dfc9c7871ac38bc73d09d00df679be.ctex" +path="res://.godot/imported/straywild_256.png-87b7e62e710eae4d3e3ed24a8454ca6d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/exported/system_icons/netfishing_256.png" -dest_files=["res://.godot/imported/netfishing_256.png-d9dfc9c7871ac38bc73d09d00df679be.ctex"] +source_file="res://art/exported/system_icons/straywild_256.png" +dest_files=["res://.godot/imported/straywild_256.png-87b7e62e710eae4d3e3ed24a8454ca6d.ctex"] [params] diff --git a/art/source/characters/base/netfishing_base_character.blend b/art/source/characters/base/straywild_base_character.blend similarity index 100% rename from art/source/characters/base/netfishing_base_character.blend rename to art/source/characters/base/straywild_base_character.blend diff --git a/art/source/characters/base/netfishing_base_character.blend.import b/art/source/characters/base/straywild_base_character.blend.import similarity index 84% rename from art/source/characters/base/netfishing_base_character.blend.import rename to art/source/characters/base/straywild_base_character.blend.import index f6df489..2cab53c 100644 --- a/art/source/characters/base/netfishing_base_character.blend.import +++ b/art/source/characters/base/straywild_base_character.blend.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://cb4bcakhoprm8" -path="res://.godot/imported/netfishing_base_character.blend-65bf3bc5b77cc1a37fa3f81ebd808d37.scn" +path="res://.godot/imported/straywild_base_character.blend-02abbfdb9b1d393f1bd3cfface615e27.scn" [deps] -source_file="res://art/source/characters/base/netfishing_base_character.blend" -dest_files=["res://.godot/imported/netfishing_base_character.blend-65bf3bc5b77cc1a37fa3f81ebd808d37.scn"] +source_file="res://art/source/characters/base/straywild_base_character.blend" +dest_files=["res://.godot/imported/straywild_base_character.blend-02abbfdb9b1d393f1bd3cfface615e27.scn"] [params] diff --git a/art/source/characters/base/netfishing_base_character.glb.import b/art/source/characters/base/straywild_base_character.glb.import similarity index 77% rename from art/source/characters/base/netfishing_base_character.glb.import rename to art/source/characters/base/straywild_base_character.glb.import index 5a38b76..bda93c0 100644 --- a/art/source/characters/base/netfishing_base_character.glb.import +++ b/art/source/characters/base/straywild_base_character.glb.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://bfhnup14638r7" -path="res://.godot/imported/netfishing_base_character.glb-cbdc33eaa4fcd1d2d2a8f4a463b228d6.scn" +path="res://.godot/imported/straywild_base_character.glb-c9650c715a1b5b9ae0d8541191f7d7a9.scn" [deps] -source_file="res://art/source/characters/base/netfishing_base_character.glb" -dest_files=["res://.godot/imported/netfishing_base_character.glb-cbdc33eaa4fcd1d2d2a8f4a463b228d6.scn"] +source_file="res://art/source/characters/base/straywild_base_character.glb" +dest_files=["res://.godot/imported/straywild_base_character.glb-c9650c715a1b5b9ae0d8541191f7d7a9.scn"] [params] diff --git a/art/source/characters/base/netfishing_character_source.blend b/art/source/characters/base/straywild_character_source.blend similarity index 100% rename from art/source/characters/base/netfishing_character_source.blend rename to art/source/characters/base/straywild_character_source.blend diff --git a/art/source/characters/base/netfishing_character_source.blend.import b/art/source/characters/base/straywild_character_source.blend.import similarity index 84% rename from art/source/characters/base/netfishing_character_source.blend.import rename to art/source/characters/base/straywild_character_source.blend.import index 8288280..741c389 100644 --- a/art/source/characters/base/netfishing_character_source.blend.import +++ b/art/source/characters/base/straywild_character_source.blend.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://d38y8blk2w5c5" -path="res://.godot/imported/netfishing_character_source.blend-1d18c95606937d4c8bcb87e334e02ee5.scn" +path="res://.godot/imported/straywild_character_source.blend-0e7b8a87008f88e309ad73a63561ef5b.scn" [deps] -source_file="res://art/source/characters/base/netfishing_character_source.blend" -dest_files=["res://.godot/imported/netfishing_character_source.blend-1d18c95606937d4c8bcb87e334e02ee5.scn"] +source_file="res://art/source/characters/base/straywild_character_source.blend" +dest_files=["res://.godot/imported/straywild_character_source.blend-0e7b8a87008f88e309ad73a63561ef5b.scn"] [params] diff --git a/art/source/characters/base/netfishing_character_source.glb.import b/art/source/characters/base/straywild_character_source.glb.import similarity index 76% rename from art/source/characters/base/netfishing_character_source.glb.import rename to art/source/characters/base/straywild_character_source.glb.import index 61158c5..bbcee6a 100644 --- a/art/source/characters/base/netfishing_character_source.glb.import +++ b/art/source/characters/base/straywild_character_source.glb.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://3uq4cxiomttt" -path="res://.godot/imported/netfishing_character_source.glb-9c98ee44b142c5b3d06f0838b7d2c9c4.scn" +path="res://.godot/imported/straywild_character_source.glb-3a8ccc55dbe60da1b70b62110b206353.scn" [deps] -source_file="res://art/source/characters/base/netfishing_character_source.glb" -dest_files=["res://.godot/imported/netfishing_character_source.glb-9c98ee44b142c5b3d06f0838b7d2c9c4.scn"] +source_file="res://art/source/characters/base/straywild_character_source.glb" +dest_files=["res://.godot/imported/straywild_character_source.glb-3a8ccc55dbe60da1b70b62110b206353.scn"] [params] diff --git a/art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png b/art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png similarity index 100% rename from art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png rename to art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png diff --git a/art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png.import b/art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png.import similarity index 58% rename from art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png.import rename to art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png.import index e7aade1..dba5a5f 100644 --- a/art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png.import +++ b/art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://bdomsntfeovnc" -path.s3tc="res://.godot/imported/netfishing_character_source_eyes1_eyebrows1.png-a0b9f287e407afd9688e141dc5f2b801.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_character_source_eyes1_eyebrows1.png-a0b9f287e407afd9688e141dc5f2b801.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_character_source_eyes1_eyebrows1.png-3c638377e631a94b998336d0ca1d8b8e.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_character_source_eyes1_eyebrows1.png-3c638377e631a94b998336d0ca1d8b8e.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png" -dest_files=["res://.godot/imported/netfishing_character_source_eyes1_eyebrows1.png-a0b9f287e407afd9688e141dc5f2b801.s3tc.ctex", "res://.godot/imported/netfishing_character_source_eyes1_eyebrows1.png-a0b9f287e407afd9688e141dc5f2b801.etc2.ctex"] +source_file="res://art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png" +dest_files=["res://.godot/imported/straywild_character_source_eyes1_eyebrows1.png-3c638377e631a94b998336d0ca1d8b8e.s3tc.ctex", "res://.godot/imported/straywild_character_source_eyes1_eyebrows1.png-3c638377e631a94b998336d0ca1d8b8e.etc2.ctex"] [params] diff --git a/art/source/characters/base/netfishing_character_source_eyes_simple_shine.png b/art/source/characters/base/straywild_character_source_eyes_simple_shine.png similarity index 100% rename from art/source/characters/base/netfishing_character_source_eyes_simple_shine.png rename to art/source/characters/base/straywild_character_source_eyes_simple_shine.png diff --git a/art/source/characters/base/netfishing_character_source_eyes_simple_shine.png.import b/art/source/characters/base/straywild_character_source_eyes_simple_shine.png.import similarity index 58% rename from art/source/characters/base/netfishing_character_source_eyes_simple_shine.png.import rename to art/source/characters/base/straywild_character_source_eyes_simple_shine.png.import index e49d401..8b99f72 100644 --- a/art/source/characters/base/netfishing_character_source_eyes_simple_shine.png.import +++ b/art/source/characters/base/straywild_character_source_eyes_simple_shine.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://du4u6meapay05" -path.s3tc="res://.godot/imported/netfishing_character_source_eyes_simple_shine.png-965743f3716320bbc385096956ffef2d.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_character_source_eyes_simple_shine.png-965743f3716320bbc385096956ffef2d.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_character_source_eyes_simple_shine.png-97500ad873e0da3aaf0e9e3c3198e38a.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_character_source_eyes_simple_shine.png-97500ad873e0da3aaf0e9e3c3198e38a.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/source/characters/base/netfishing_character_source_eyes_simple_shine.png" -dest_files=["res://.godot/imported/netfishing_character_source_eyes_simple_shine.png-965743f3716320bbc385096956ffef2d.s3tc.ctex", "res://.godot/imported/netfishing_character_source_eyes_simple_shine.png-965743f3716320bbc385096956ffef2d.etc2.ctex"] +source_file="res://art/source/characters/base/straywild_character_source_eyes_simple_shine.png" +dest_files=["res://.godot/imported/straywild_character_source_eyes_simple_shine.png-97500ad873e0da3aaf0e9e3c3198e38a.s3tc.ctex", "res://.godot/imported/straywild_character_source_eyes_simple_shine.png-97500ad873e0da3aaf0e9e3c3198e38a.etc2.ctex"] [params] diff --git a/art/source/characters/base/netfishing_character_source_mouth1.png b/art/source/characters/base/straywild_character_source_mouth1.png similarity index 100% rename from art/source/characters/base/netfishing_character_source_mouth1.png rename to art/source/characters/base/straywild_character_source_mouth1.png diff --git a/art/source/characters/base/netfishing_character_source_mouth1.png.import b/art/source/characters/base/straywild_character_source_mouth1.png.import similarity index 60% rename from art/source/characters/base/netfishing_character_source_mouth1.png.import rename to art/source/characters/base/straywild_character_source_mouth1.png.import index 8ff49a4..5dd84f4 100644 --- a/art/source/characters/base/netfishing_character_source_mouth1.png.import +++ b/art/source/characters/base/straywild_character_source_mouth1.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://css0k0virgoph" -path.s3tc="res://.godot/imported/netfishing_character_source_mouth1.png-b323b9153acd3f552f35c1d1108567c8.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_character_source_mouth1.png-b323b9153acd3f552f35c1d1108567c8.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_character_source_mouth1.png-ff2ed280ca7e84bdd0749ed5b5b16f54.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_character_source_mouth1.png-ff2ed280ca7e84bdd0749ed5b5b16f54.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/source/characters/base/netfishing_character_source_mouth1.png" -dest_files=["res://.godot/imported/netfishing_character_source_mouth1.png-b323b9153acd3f552f35c1d1108567c8.s3tc.ctex", "res://.godot/imported/netfishing_character_source_mouth1.png-b323b9153acd3f552f35c1d1108567c8.etc2.ctex"] +source_file="res://art/source/characters/base/straywild_character_source_mouth1.png" +dest_files=["res://.godot/imported/straywild_character_source_mouth1.png-ff2ed280ca7e84bdd0749ed5b5b16f54.s3tc.ctex", "res://.godot/imported/straywild_character_source_mouth1.png-ff2ed280ca7e84bdd0749ed5b5b16f54.etc2.ctex"] [params] diff --git a/art/source/characters/base/netfishing_character_source_mouth_three.png b/art/source/characters/base/straywild_character_source_mouth_three.png similarity index 100% rename from art/source/characters/base/netfishing_character_source_mouth_three.png rename to art/source/characters/base/straywild_character_source_mouth_three.png diff --git a/art/source/characters/base/netfishing_character_source_mouth_three.png.import b/art/source/characters/base/straywild_character_source_mouth_three.png.import similarity index 59% rename from art/source/characters/base/netfishing_character_source_mouth_three.png.import rename to art/source/characters/base/straywild_character_source_mouth_three.png.import index 6abae09..4b2413d 100644 --- a/art/source/characters/base/netfishing_character_source_mouth_three.png.import +++ b/art/source/characters/base/straywild_character_source_mouth_three.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://di20c1x8vksi1" -path.s3tc="res://.godot/imported/netfishing_character_source_mouth_three.png-6bf79d4c9c660d30fb7fc365f0039313.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_character_source_mouth_three.png-6bf79d4c9c660d30fb7fc365f0039313.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_character_source_mouth_three.png-adf40ee30e725bafadf6a8fa4dbd8abf.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_character_source_mouth_three.png-adf40ee30e725bafadf6a8fa4dbd8abf.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/source/characters/base/netfishing_character_source_mouth_three.png" -dest_files=["res://.godot/imported/netfishing_character_source_mouth_three.png-6bf79d4c9c660d30fb7fc365f0039313.s3tc.ctex", "res://.godot/imported/netfishing_character_source_mouth_three.png-6bf79d4c9c660d30fb7fc365f0039313.etc2.ctex"] +source_file="res://art/source/characters/base/straywild_character_source_mouth_three.png" +dest_files=["res://.godot/imported/straywild_character_source_mouth_three.png-adf40ee30e725bafadf6a8fa4dbd8abf.s3tc.ctex", "res://.godot/imported/straywild_character_source_mouth_three.png-adf40ee30e725bafadf6a8fa4dbd8abf.etc2.ctex"] [params] diff --git a/art/source/characters/base/netfishing_character_source_nose1.2.png b/art/source/characters/base/straywild_character_source_nose1.2.png similarity index 100% rename from art/source/characters/base/netfishing_character_source_nose1.2.png rename to art/source/characters/base/straywild_character_source_nose1.2.png diff --git a/art/source/characters/base/netfishing_character_source_nose1.2.png.import b/art/source/characters/base/straywild_character_source_nose1.2.png.import similarity index 60% rename from art/source/characters/base/netfishing_character_source_nose1.2.png.import rename to art/source/characters/base/straywild_character_source_nose1.2.png.import index 2fbb165..e0c3667 100644 --- a/art/source/characters/base/netfishing_character_source_nose1.2.png.import +++ b/art/source/characters/base/straywild_character_source_nose1.2.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://7dwa0bfev1rk" -path.s3tc="res://.godot/imported/netfishing_character_source_nose1.2.png-ef4dd456c5b0f0db73b3dc063bfba941.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_character_source_nose1.2.png-ef4dd456c5b0f0db73b3dc063bfba941.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_character_source_nose1.2.png-0a8355472731651768eaa5fc2ee168d4.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_character_source_nose1.2.png-0a8355472731651768eaa5fc2ee168d4.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/source/characters/base/netfishing_character_source_nose1.2.png" -dest_files=["res://.godot/imported/netfishing_character_source_nose1.2.png-ef4dd456c5b0f0db73b3dc063bfba941.s3tc.ctex", "res://.godot/imported/netfishing_character_source_nose1.2.png-ef4dd456c5b0f0db73b3dc063bfba941.etc2.ctex"] +source_file="res://art/source/characters/base/straywild_character_source_nose1.2.png" +dest_files=["res://.godot/imported/straywild_character_source_nose1.2.png-0a8355472731651768eaa5fc2ee168d4.s3tc.ctex", "res://.godot/imported/straywild_character_source_nose1.2.png-0a8355472731651768eaa5fc2ee168d4.etc2.ctex"] [params] diff --git a/art/source/characters/base/netfishing_character_source_nose_dog_round.png b/art/source/characters/base/straywild_character_source_nose_dog_round.png similarity index 100% rename from art/source/characters/base/netfishing_character_source_nose_dog_round.png rename to art/source/characters/base/straywild_character_source_nose_dog_round.png diff --git a/art/source/characters/base/netfishing_character_source_nose_dog_round.png.import b/art/source/characters/base/straywild_character_source_nose_dog_round.png.import similarity index 59% rename from art/source/characters/base/netfishing_character_source_nose_dog_round.png.import rename to art/source/characters/base/straywild_character_source_nose_dog_round.png.import index 12333e8..5fe079e 100644 --- a/art/source/characters/base/netfishing_character_source_nose_dog_round.png.import +++ b/art/source/characters/base/straywild_character_source_nose_dog_round.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://b0p55hwdry2cr" -path.s3tc="res://.godot/imported/netfishing_character_source_nose_dog_round.png-1c89150861ebff3f930698c1747a0369.s3tc.ctex" -path.etc2="res://.godot/imported/netfishing_character_source_nose_dog_round.png-1c89150861ebff3f930698c1747a0369.etc2.ctex" +path.s3tc="res://.godot/imported/straywild_character_source_nose_dog_round.png-d1ea0db61e41dfeeed3b599286ffb82c.s3tc.ctex" +path.etc2="res://.godot/imported/straywild_character_source_nose_dog_round.png-d1ea0db61e41dfeeed3b599286ffb82c.etc2.ctex" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -source_file="res://art/source/characters/base/netfishing_character_source_nose_dog_round.png" -dest_files=["res://.godot/imported/netfishing_character_source_nose_dog_round.png-1c89150861ebff3f930698c1747a0369.s3tc.ctex", "res://.godot/imported/netfishing_character_source_nose_dog_round.png-1c89150861ebff3f930698c1747a0369.etc2.ctex"] +source_file="res://art/source/characters/base/straywild_character_source_nose_dog_round.png" +dest_files=["res://.godot/imported/straywild_character_source_nose_dog_round.png-d1ea0db61e41dfeeed3b599286ffb82c.s3tc.ctex", "res://.godot/imported/straywild_character_source_nose_dog_round.png-d1ea0db61e41dfeeed3b599286ffb82c.etc2.ctex"] [params] diff --git a/art/source/items/equipment/net.blend b/art/source/items/equipment/net.blend new file mode 100644 index 0000000..0a7ba4c Binary files /dev/null and b/art/source/items/equipment/net.blend differ diff --git a/collection/collection_log.gd b/collection/collection_log.gd index da36eb8..59d33d1 100644 --- a/collection/collection_log.gd +++ b/collection/collection_log.gd @@ -6,9 +6,11 @@ signal fish_quality_discovered(fish_id: StringName, quality: int) signal collection_changed const FishQualityType = preload("res://fish/fish_quality.gd") +const MAX_CATCH_COUNT: int = 1000000000 var _discovered: Dictionary[StringName, bool] = {} var _quality_masks: Dictionary[StringName, int] = {} +var _catch_counts: Dictionary[StringName, int] = {} func has_discovered(fish_id: StringName) -> bool: @@ -41,6 +43,26 @@ func mark_quality_discovered(fish_id: StringName, quality: int) -> void: collection_changed.emit() +func record_catch(fish_id: StringName, quality: int) -> void: + if fish_id.is_empty() or not FishQualityType.is_valid(quality): + return + var species_was_discovered: bool = has_discovered(fish_id) + if not species_was_discovered: + _discovered[fish_id] = true + var previous_mask: int = _quality_masks.get(fish_id, 0) + var next_mask: int = previous_mask | FishQualityType.bit_for(quality) + _quality_masks[fish_id] = next_mask + _catch_counts[fish_id] = mini( + int(_catch_counts.get(fish_id, 0)) + 1, + MAX_CATCH_COUNT, + ) + if not species_was_discovered: + fish_discovered.emit(fish_id) + if next_mask != previous_mask: + fish_quality_discovered.emit(fish_id, quality) + collection_changed.emit() + + func get_discovered_ids() -> Array[StringName]: var discovered_ids: Array[StringName] = [] for fish_id: StringName in _discovered: @@ -65,6 +87,14 @@ func get_discovered_quality_masks() -> Dictionary[StringName, int]: return _quality_masks.duplicate() +func get_catch_count(fish_id: StringName) -> int: + return _catch_counts.get(fish_id, 0) if has_discovered(fish_id) else 0 + + +func get_catch_counts() -> Dictionary[StringName, int]: + return _catch_counts.duplicate() + + func has_mastered(fish_id: StringName) -> bool: return get_quality_mask(fish_id) == FishQualityType.ALL_TIERS_MASK @@ -77,6 +107,22 @@ func replace_discovered_ids(fish_ids: Array[StringName]) -> bool: func replace_discovery_state( fish_ids: Array[StringName], quality_masks: Dictionary[StringName, int], +) -> bool: + var preserved_counts: Dictionary[StringName, int] = {} + for fish_id: StringName in fish_ids: + if _catch_counts.has(fish_id): + preserved_counts[fish_id] = _catch_counts[fish_id] + return replace_collection_state( + fish_ids, + quality_masks, + preserved_counts, + ) + + +func replace_collection_state( + fish_ids: Array[StringName], + quality_masks: Dictionary[StringName, int], + catch_counts: Dictionary[StringName, int], ) -> bool: var replacement: Dictionary[StringName, bool] = {} for fish_id: StringName in fish_ids: @@ -95,7 +141,19 @@ func replace_discovery_state( return false if mask != 0: replacement_masks[fish_id] = mask + var replacement_counts: Dictionary[StringName, int] = {} + for fish_id: StringName in catch_counts: + var count: int = catch_counts[fish_id] + if ( + fish_id.is_empty() + or not replacement.has(fish_id) + or count <= 0 + or count > MAX_CATCH_COUNT + ): + return false + replacement_counts[fish_id] = count _discovered = replacement _quality_masks = replacement_masks + _catch_counts = replacement_counts collection_changed.emit() return true diff --git a/docs/ATTRIBUTION.md b/docs/ATTRIBUTION.md index 2eac3e5..d8676f0 100644 --- a/docs/ATTRIBUTION.md +++ b/docs/ATTRIBUTION.md @@ -7,19 +7,19 @@ prove authorship or licensing. ## Ownership and credits -NETfishing is jointly owned, developed, and published by its creators, +straywild is jointly owned, developed, and published by its creators, publicly credited as Voyager and Endeavour and operating collectively as the independent team Woofmeow. - Voyager: co-owner, developer, project director, creator of the game's - current provisional fish artwork and original 3D work except where another - creator is credited, and composer of the original title track + provisional fish placeholder artwork and original 3D work except where + another creator is credited, and composer of the original title track `audio/music/title/as_in_four_wolves.ogg`, dusk/world track `audio/music/world/craft.mp3`, and the synthesized robot animalese tones. - Endeavour: co-owner, developer, and 2D artist. Her incorporated work includes - character pattern/channel-map art, environment and UI art, and item art. - Planned work is not described as incorporated until its files enter the - project. + character pattern/channel-map art, environment and UI art, item art, and + finished fish and creature artwork. Planned work is not described as + incorporated until its files enter the project. - chillnfill: contributor of original 3D models for the character bodies and arms, ears and tails, and multiple world props and decorative assets, including trees and bridges. The contributor requested to be credited as @@ -31,7 +31,7 @@ independent team Woofmeow. Voyager is also the original catalog porter credit in PortMaster metadata. Third-party creators are credited with their individual records below. Those -credits do not imply endorsement of NETfishing, Woofmeow, or its owners. +credits do not imply endorsement of straywild, Woofmeow, or its owners. ## License map @@ -41,7 +41,7 @@ Do not describe the complete repository as covered only by the GPL. | --- | --- | | Project-owned software code, shaders, code-oriented scene/resource configuration, tests, build tooling, and server software | GPL-3.0-or-later; source-root `LICENSE` and packaged `GPL-3.0-or-later.txt` | | Project-owned artwork, textures, models, animation, music, audio, narrative content, characters, and other creative assets | Source-root or packaged `ASSET-LICENSE.md` | -| NETfishing and Woofmeow names, logos, icons, and official identity | Source-root or packaged `TRADEMARKS.md` | +| straywild and Woofmeow names, logos, icons, and official identity | Source-root or packaged `TRADEMARKS.md` | | Third-party engines, fonts, sounds, and other external material | Their original terms, recorded below and in adjacent license texts where applicable | | Previously accepted or expressly invited outside contributions | Source-root `CONTRIBUTOR-TERMS.md` plus any separately signed agreement | @@ -50,22 +50,22 @@ the terms of their source material or generating code. Repository location alone does not relicense third-party material. The GPL permits study, modification, redistribution, and forks of covered -code. It does not grant rights to NETfishing creative assets or branding. The -NETfishing Asset License separately permits qualifying noncommercial add-on -Mods for official NETfishing software and narrowly scoped Contribution Forks +code. It does not grant rights to straywild creative assets or branding. The +straywild Asset License separately permits qualifying noncommercial add-on +Mods for official straywild software and narrowly scoped Contribution Forks used to prepare changes for possible upstream inclusion. It does not permit those assets to accompany independent code forks, clones, standalone games, unrelated products, or general-purpose asset packs. A GPL fork that is not a -qualifying Contribution Fork must replace NETfishing assets and reserved +qualifying Contribution Fork must replace straywild assets and reserved branding with independently licensed material and a distinct identity. Project-wide code, asset, branding, or contributor-license changes require -written approval from both NETfishing owners under their private joint +written approval from both straywild owners under their private joint ownership agreement. ## Godot Engine notice -NETfishing uses Godot Engine under the MIT License: +straywild uses Godot Engine under the MIT License: > Copyright (c) 2014-present Godot Engine contributors. > Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. @@ -103,7 +103,7 @@ FreeType for font rendering; portions are copyright The FreeType Project Runtime file: `ui/fonts/seattle_avenue.otf`; source, hash, and original notice: `ui/fonts/Seattle-Avenue-LICENSE.txt`. -Public-domain fonts are not governed by the NETfishing Asset License. +Public-domain fonts are not governed by the straywild Asset License. ## Intake policy @@ -122,7 +122,7 @@ owners' private project records. This public document should contain the credits and license notices needed by recipients; it should not duplicate a changing file inventory that can be derived from the repository itself. -NETfishing does not accept unsolicited contributions. For work expressly +straywild does not accept unsolicited contributions. For work expressly invited by both Owners, maintainers must obtain affirmative agreement to the source-root `CONTRIBUTOR-TERMS.md` and retain the written invitation and agreement in a durable Project record. @@ -132,17 +132,20 @@ locations only and must never appear in scenes or resources. ## Project-created artwork and music -The current in-game fish images are provisional artwork by Voyager. Endeavour -is creating replacement fish artwork, but work that has not been incorporated -into this repository is not presented here as part of the game or attributed -as a shipped asset. +Fish entries without finished replacement artwork use provisional placeholder +artwork by Voyager. Incorporated finished fish and creature artwork is by +Endeavour; work that has not entered this repository is not presented here as +part of the game or attributed as a shipped asset. Endeavour's incorporated 2D contributions include the inventory notepad, -environment and UI artwork, item artwork, and character customization pattern -and channel-map artwork. Voyager's incorporated original work includes 3D -assets, the provisional fish artwork, the title and dusk music identified -above, and the robot animalese tones. Specific contributor exceptions are -recorded below and in the in-game credits. +environment and UI artwork, item artwork, finished fish and creature artwork, +and character customization pattern and channel-map artwork. Voyager's +incorporated original work includes 3D assets, the provisional fish +placeholder artwork, the title and dusk music identified above, and the robot +animalese tones. The current starter motorcoach exterior was supplied by a +contributing artist who released its copyright to the project; the original +and cleaned source files are retained in the owners' source-work archive. +Specific contributor exceptions are recorded below and in the in-game credits. These credits intentionally describe work by creator and contribution family instead of maintaining a second file-by-file asset catalog. Runtime resources @@ -158,8 +161,8 @@ against the repository when this record was revised. | Material | Runtime location | Credit or terms | | --- | --- | --- | -| Kat animalese alphabet and number sounds | `sound/dialogue/animalese/alphanumeric/` | Project-processed derivatives of the original source voice recording supplied by NETfishing community member kat. | -| Kim animalese alphabet and number sounds | `sound/dialogue/animalese/kim/` | Project-processed derivatives of the original source voice recording supplied by NETfishing community member kim. | +| Kat animalese alphabet and number sounds | `sound/dialogue/animalese/alphanumeric/` | Project-processed derivatives of the original source voice recording supplied by straywild community member kat. | +| Kim animalese alphabet and number sounds | `sound/dialogue/animalese/kim/` | Project-processed derivatives of the original source voice recording supplied by straywild community member kim. | | Tuffy font | `ui/fonts/Tuffy_Bold.otf` | Public-domain dedication in `ui/fonts/Tuffy-LICENSE.txt`. | | Seattle Avenue font | `ui/fonts/seattle_avenue.otf` | Public-domain font by JLH Fonts; notice in `ui/fonts/Seattle-Avenue-LICENSE.txt`. | | Fishing fight loop | `audio/sfx/fishing/fighting.wav` | Edited from “Spinning reel.wav” by Freesound user tosha73, sound 509902, CC0. | @@ -192,9 +195,10 @@ https://creativecommons.org/licenses/by/3.0/legalcode. ### Endeavour 2D contribution record Endeavour created the incorporated character customization patterns and -channel maps as well as additional UI, environment, and item artwork. The -current provisional fish artwork is not part of this credit. New or replacement -art is added to this record only after it is accepted into the repository. +channel maps as well as additional UI, environment, item, fish, and creature +artwork. Voyager's provisional fish placeholder is not part of this credit. +New or replacement art is added to this record only after it is accepted into +the repository. The exact current filenames and bytes are intentionally not copied into this document. The character appearance resources and Git history are the diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 6e19e1c..76ed032 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -1,6 +1,6 @@ # Development reference -This is the authoritative reference for NETfishing architecture, engineering +This is the authoritative reference for straywild architecture, engineering decisions, content policy, authoring, and validation. ## Architecture @@ -43,9 +43,19 @@ open host may publish a short-lived room lease, and the shared Join Game page may browse compatible leases before handing the selected address back to the existing direct ENet connection flow. The directory does not carry gameplay traffic or become a gameplay authority. Its base URL comes from -`network/discovery/base_url`, with `NETFISHING_DISCOVERY_URL` available as a +`network/discovery/base_url`, with `straywild_DISCOVERY_URL` available as a development/deployment override. +Friendships are local identity relationships shared across save slots. A live, +authenticated gameplay session is required to exchange the directional +capabilities that establish a friendship. Blocking an identity removes that +friendship; unblocking does not recreate it. Discovery may publish opt-in, +short-lived friend presence and deliver invitations only while both games are +online. It stores hashed capability identifiers rather than identity +fingerprints or a complete friend graph, keeps no durable social records, and +provides no offline delivery. Direct joins still use the existing verified +public-room and ENet connection path. + The host is authoritative. Clients submit requests or evidence; the host derives trusted context from registered peers, authoritative regions, and server-owned state before mutating inventory, wallet, progression, or shared @@ -68,8 +78,12 @@ release version is not a reason to change the protocol number. `PlayerDataRoot` selects and validates a portable data root. Stores receive paths from that owner rather than inventing unrelated locations. Progression is -written by `PlayerSaveManager`; device settings and social/identity stores have -separate formats and lifecycles. +written by `PlayerSaveManager` and indexed as named slots by +`PlayerSaveSlotCatalog`. Existing single-save installations are adopted as the +first slot in place. Device settings, appearance, and social/identity stores +remain shared across slots and have separate formats and lifecycles. +Progression archive import and export belong to the title-screen Play page: +imports create a new slot, while exports copy only the selected progression. Save migrations are sequential and explicit. Existing catches and ownership are keyed by stable IDs so authored metadata can evolve without rewriting @@ -247,9 +261,11 @@ copies of the entire customization catalog. ### Texture sampling -NETfishing artwork always uses nearest-neighbor sampling. Do not enable linear, -bilinear, trilinear, or anisotropic texture filtering, and do not generate -mipmaps. Shader samplers must declare `filter_nearest`. The +straywild artwork uses nearest-neighbor sampling. Do not enable linear, +bilinear, trilinear, or anisotropic texture filtering. Shader samplers must +declare `filter_nearest`. The three canonical repeating terrain textures are +the sole mipmap exception: their projected shader uses nearest-filtered +mipmaps to prevent distance aliasing without smoothing nearby pixels. The `TextureSamplingPolicy` autoload applies nearest sampling to 2D canvas items, Sprite3D presentations, imported 3D materials, and dynamically constructed mesh materials at runtime. @@ -335,10 +351,10 @@ godot --headless --path . --script tests/fish_catalog_content_validation.gd rm -rf -- "$test_root" ``` -Do not point `NETFISHING_DATA_DIR` at an arbitrary empty directory; it is an +Do not point `straywild_DATA_DIR` at an arbitrary empty directory; it is an explicit portable-data override and must identify a valid data root. The PortMaster launcher is the narrow exception: it also sets -`NETFISHING_CREATE_DATA_DIR=1`, allowing the game to initialize its known empty +`straywild_CREATE_DATA_DIR=1`, allowing the game to initialize its known empty external save directory on first launch. Headless tests cannot prove visual alignment, mouse routing, shader appearance, diff --git a/docs/PORTMASTER.md b/docs/PORTMASTER.md index e8c24f6..803f72f 100644 --- a/docs/PORTMASTER.md +++ b/docs/PORTMASTER.md @@ -1,15 +1,15 @@ # PortMaster reference -NETfishing's PortMaster release is a canonical PortMaster package, not a +straywild's PortMaster release is a canonical PortMaster package, not a version-named generic ZIP. The installer-facing archive must be named -`netfishing.zip`, and its root must contain exactly: +`straywild.zip`, and its root must contain exactly: ```text -NETfishing.sh -netfishing/ +straywild.sh +straywild/ ``` -`port.json` belongs at `netfishing/port.json` in the distributable archive. +`port.json` belongs at `straywild/port.json` in the distributable archive. The upstream source-submission layout keeps it beside the launcher and port directory, but PortMaster's release builder relocates it into the declared port directory. Do not copy the source-submission layout directly into a @@ -17,7 +17,7 @@ release ZIP. HarbourMaster's installer also relocates recognized non-script files found at an archive root into the detected port directory. That compatibility behavior -masked NETfishing's former root-level `port.json` during auto-install tests. +masked straywild's former root-level `port.json` during auto-install tests. Directly extracting the same archive into `/ports` did not perform the repair. Do not rely on installer relocation; build the distributable layout correctly. @@ -26,30 +26,34 @@ directory. The templates in `scripts/portmaster/` are authoritative. ## Release contract -- `port.json` uses schema version 4, names `netfishing.zip`, and marks the +- `port.json` uses schema version 4, names `straywild.zip`, and marks the self-contained package ready to run. -- `NETfishing.sh` does not contain a `# PORTMASTER:` signature in the source or +- `straywild.sh` does not contain a `# PORTMASTER:` signature in the source or distributable archive. HarbourMaster adds that installation marker when it installs the port. -- The executable is `netfishing/NETfishing.aarch64`. +- The executable is `straywild/straywild.aarch64`. - The package declares AArch64, two analog sticks, GLIBC 2.28, and `weston_pkg_0.2.squashfs`. -- The launcher starts GPTOKEYB with the explicit `netfishing.gptk` no-op map. +- The launcher starts GPTOKEYB with the explicit `straywild.gptk` no-op map. Every keyboard and mouse binding is disabled, leaving only GPTOKEYB's - device-specific force-quit chord while Godot and NETfishing's controller + device-specific force-quit chord while Godot and straywild's controller mapping manager handle gameplay input. The explicit map also avoids the anomalous controller behavior observed on ROCKNIX without a passthrough map. - The launcher calls `pm_platform_helper` for the game executable after starting GPTOKEYB and calls `pm_finish` after the game exits. -- NETfishing automatically creates player data for new installations under - `ports/saves/netfishing/` and does not present the in-game folder picker. +- straywild automatically creates player data for new installations under + `ports/saves/straywild/` and does not present the in-game folder picker. - Existing installations with a selected data root keep that location when upgraded. Device-local data, configuration, and cache remain under - `netfishing/conf/data`, `netfishing/conf/config`, and - `netfishing/conf/cache`. + `straywild/conf/data`, `straywild/conf/config`, and + `straywild/conf/cache`. +- A rebrand upgrade copies an existing `netfishing/conf/` tree into the new + `straywild/conf/` tree when the latter does not exist. It also reuses an + existing `ports/saves/netfishing/` data root rather than creating an empty + replacement. New installations use straywild paths exclusively. - The archive must not contain `conf/`, saves, identities, logs, source files, `.git`, or `.godot` content. -- Release downloads must publish only the canonical `netfishing.zip` for this +- Release downloads must publish only the canonical `straywild.zip` for this platform. Do not also publish a byte-identical versioned PortMaster ZIP; HarbourMaster identifies the port by its canonical archive name and the Forgejo release tag already supplies the version. @@ -67,7 +71,7 @@ The script deletes and regenerates the Linux ARM64 export, stages the package, validates its structure, and writes: ```text -builds/v/netfishing.zip +builds/v/straywild.zip ``` `--package-only` is reserved for repackaging an already validated ARM64 export. @@ -83,7 +87,7 @@ bash scripts/build_portmaster.sh --package-only --hotfix The hotfix keeps the game executable and PCK tied to the release tag while recording the newer packaging commit separately in `BUILD-INFO.txt`. Replace -the release's existing `netfishing.zip`; never move the game release tag. +the release's existing `straywild.zip`; never move the game release tag. ## Local muOS installation @@ -93,22 +97,22 @@ The muOS auto-install directory is: /mnt/mmc/MUOS/PortMaster/autoinstall/ ``` -For an explicit offline installation test, copy `netfishing.zip` to a temporary +For an explicit offline installation test, copy `straywild.zip` to a temporary device directory and run: ```bash /mnt/mmc/MUOS/PortMaster/harbourmaster \ - --offline --no-check install ./netfishing.zip + --offline --no-check install ./straywild.zip ``` -Before upgrading an existing installation, preserve -`/mnt/mmc/ports/netfishing/conf/` and `/mnt/mmc/ports/saves/netfishing/` on the -device. After installation: +Before upgrading an existing installation, preserve either the current +`/mnt/mmc/ports/straywild/` paths or the former `/mnt/mmc/ports/netfishing/` +paths on the device. After installation: 1. Confirm the installed executable and PCK hashes match the staged release. 2. Confirm HarbourMaster added its `# PORTMASTER:` installation signature to the installed launcher, then confirm the launcher starts GPTOKEYB with - `netfishing.gptk` and calls `pm_platform_helper` for the game executable. + `straywild.gptk` and calls `pm_platform_helper` for the game executable. 3. Confirm `conf/` and the external save directory were not replaced or removed. 4. Launch the installed port through the normal muOS menu. @@ -117,7 +121,7 @@ device. After installation: Start+Select on most devices. Installing the public PortMaster catalog entry can still install an older -catalog build until the upstream `netfishing.zip` is updated. A local release +catalog build until the upstream `straywild.zip` is updated. A local release test must install the generated local archive explicitly. ## Template provenance @@ -130,7 +134,7 @@ f24daae48f543b3a270a5aa46b5e73a31904bf0c7216d4c8a9e15a8dc48a5eed screenshot.png ``` The remaining catalog metadata assets were copied from the installed official -`netfishing.zip` package and are intentionally preserved byte-for-byte: +`straywild.zip` package and are intentionally preserved byte-for-byte: ```text e2a9d132744684c67865c01eca027a8c9946b4c5a19da57c82f1af0373dc83b7 gameinfo.xml @@ -160,7 +164,7 @@ The device-verified Godot mapping is: - left-stick click `b9`, left trigger `b10`, right trigger `b11`, right-stick click `b12` - D-pad `h0`; left and right sticks `a0..a3` -`scripts/portmaster/NETfishing.sh` must replace the incompatible SDL2 entry +`scripts/portmaster/straywild.sh` must replace the incompatible SDL2 entry with the Godot entry when that SDL2 GUID is selected. Do not append the two entries with a newline. WestonPack reconstructs the wrapped game command through a shell, so raw mapping values passed in that command can be split into @@ -169,14 +173,14 @@ this failure with the `GO-Super Gamepad` mapping. The outer Weston environment also does not reliably preserve the corrected muOS mapping for the game. Write the exact selected mapping to `conf/cache/controller_mapping.txt` before -starting Weston. Weston must launch `launch-netfishing.sh`, which reads that +starting Weston. Weston must launch `launch-straywild.sh`, which reads that file, exports `SDL_GAMECONTROLLERCONFIG`, and immediately replaces itself with the game process. This applies the mapping at the same point as the working 0.10.1 launcher without passing its raw text through WestonPack's command reconstruction. Do not move the mapping back to either side of `westonwrap.sh`. -Always pass `netfishing.gptk`, which explicitly unassigns every direct and +Always pass `straywild.gptk`, which explicitly unassigns every direct and hotkey binding with GPTOKEYB's `\"` value. This keeps GPTOKEYB from injecting keyboard or mouse events on top of Godot's native controller input and retains the device-specific kill chord. Supplying the explicit passthrough map also @@ -209,8 +213,8 @@ The light profile passes these Godot options: - `--max-fps 30` - `--audio-output-latency 40` -It also passes `NETFISHING_PERFORMANCE_PROFILE=light` and -`NETFISHING_LOW_END=1`. The game renders the 3D world at 37.5% linear +It also passes `straywild_PERFORMANCE_PROFILE=light` and +`straywild_LOW_END=1`. The game renders the 3D world at 37.5% linear resolution with nearest-neighbor scaling, reducing 3D pixel work by about 86% while the separately rendered UI retains its canonical resolution. The light profile also: @@ -244,7 +248,7 @@ omitted ambience or replace the micro textures with desktop-resolution assets. The normal profile otherwise retains the full visual presentation. To opt a capable device into the normal profile, create the persistent file -`netfishing/conf/performance_profile` containing exactly: +`straywild/conf/performance_profile` containing exactly: ```text normal @@ -253,13 +257,13 @@ normal On a typical muOS installation, the full path is: ```text -/mnt/mmc/ports/netfishing/conf/performance_profile +/mnt/mmc/ports/straywild/conf/performance_profile ``` Set the file to `light`, or remove it, to restore the default. An externally -provided `NETFISHING_PERFORMANCE_PROFILE=normal` or `light` environment value +provided `straywild_PERFORMANCE_PROFILE=normal` or `light` environment value takes precedence over the persistent file. Invalid values safely fall back to -the light profile and are reported in `netfishing/log.txt`. +the light profile and are reported in `straywild/log.txt`. Do not use Godot's low processor mode for the light profile. It reduces idle CPU usage by sleeping between updates and is not a game-performance diff --git a/docs/README-PLAYTEST.txt b/docs/README-PLAYTEST.txt index f42ce3c..f187182 100644 --- a/docs/README-PLAYTEST.txt +++ b/docs/README-PLAYTEST.txt @@ -1,10 +1,10 @@ -NETfishing -v0.16.1-alpha -Alpha 0.16.1 +straywild +v0.20.2-alpha +Alpha 0.20.2 -Thank you for trying this early private playtest. +Thank you for supporting this private testing release. -NETfishing is an early multiplayer fishing game. This alpha includes local +straywild is an early multiplayer fishing game. This alpha includes local progression, player-hosted and dedicated multiplayer sessions, public room discovery, and direct UDP connections. Expect rough edges and please keep a backup of any save or identity data you care about. @@ -12,15 +12,15 @@ backup of any save or identity data you care about. INSTALLATION 1. Extract the entire ZIP into a new folder. -2. Keep the executable and netfishing.pck together. -3. Launch netfishing.exe on Windows or netfishing on Linux. +2. Keep the executable and straywild.pck together. +3. Launch straywild.exe on Windows or straywild on Linux. Windows may show a warning for an unsigned application. This private build is not code signed. Only run a copy received from the playtest organizer. Linux users may need to allow execution: - chmod +x netfishing + chmod +x straywild CONTROLS @@ -33,6 +33,7 @@ Rotate camera Hold right mouse, or use right stick Cycle active hotbar slot Mouse wheel or D-pad left/right Select hotbar slot 1 through 9 Zoom camera Shift + mouse wheel + (swap wheel controls in Settings > Controls) Primary tool / fishing Left mouse or right trigger Inventory and player pages Tab Game Menu / back Escape @@ -82,6 +83,8 @@ FEATURES TO TRY - Fishing, net gathering, and beach digging - Equipment and consumable use from the hotbar - Fishing Shop sell tray, wallet updates, and persistent upgrades +- Portable RV homes, multiplayer visits, RV storage, and the early decor + purchasing and placement prototype - Seeded generated worlds and the authored starter-island layout - Generated beaches, ponds, lakes, complete rivers, denser forests, varied elevation, and closed coastal cliffs @@ -116,5 +119,6 @@ KNOWN ALPHA LIMITATIONS networks may prevent some players from joining. - Multiplayer, dedicated-server deployment, UI, and balance are still alpha. - Some fish and character artwork remains temporary. +- RV exteriors and decor use temporary prototype geometry and presentation. - There is no installer or automatic updater. - Windows builds are unsigned. diff --git a/docs/README.md b/docs/README.md index 05ac0b4..444ebc7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# NETfishing documentation +# straywild documentation This directory is the single home for maintained project documentation. Start here instead of searching feature, asset, world, or script directories @@ -17,10 +17,10 @@ for local README files. ## Related repositories -- [Discovery service API](https://forge.makearmy.io/woofmeow/netfishing-discovery-server/src/branch/main/docs/API.md) +- [Discovery service API](https://forge.makearmy.io/woofmeow/straywild-discovery-server/src/branch/main/docs/API.md) stays with the service implementation and defines its versioned HTTP contract. -- [Dedicated-server packaging](https://forge.makearmy.io/woofmeow/netfishing-dedicated-server/src/branch/main/README.md) +- [Dedicated-server packaging](https://forge.makearmy.io/woofmeow/straywild-dedicated-server/src/branch/main/README.md) stays with its installer and update scripts. It consumes this repository's attribution and legal notices from the exact pinned game commit instead of maintaining copies. diff --git a/drawing/surface_drawing_protocol.gd b/drawing/surface_drawing_protocol.gd index 8fdb054..ff132f8 100644 --- a/drawing/surface_drawing_protocol.gd +++ b/drawing/surface_drawing_protocol.gd @@ -2,7 +2,7 @@ class_name SurfaceDrawingProtocol extends RefCounted const CAPABILITY: StringName = &"surface_drawing_v2" -const RELIABLE_CHANNEL: int = NetworkProtocol.ITEM_RELIABLE_CHANNEL +const RELIABLE_CHANNEL: int = NetworkProtocol.DRAWING_RELIABLE_CHANNEL const GRID_SIZES: Array[int] = [16, 32, 64, 128] const DEFAULT_GRID_SIZE: int = 16 const MAX_GRID_SIZE: int = 128 diff --git a/export_presets.cfg b/export_presets.cfg index b7e8c1a..a49f01f 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -9,7 +9,7 @@ custom_features="" export_filter="all_resources" include_filter="LICENSE,ASSET-LICENSE.md,TRADEMARKS.md,docs/ATTRIBUTION.md,ui/fonts/*LICENSE.txt" exclude_filter="builds/*,scripts/*" -export_path="builds/v0.16.1-alpha/windows-x86_64/NETfishing.exe" +export_path="builds/v0.20.2-alpha/windows-x86_64/straywild.exe" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -32,16 +32,16 @@ codesign/digest_algorithm=1 codesign/description="" codesign/custom_options=PackedStringArray() application/modify_resources=true -application/icon="res://art/exported/system_icons/netfishing.ico" +application/icon="res://art/exported/system_icons/straywild.ico" application/console_wrapper_icon="" -application/icon_interpolation=4 -application/file_version="0.16.1.0" -application/product_version="0.16.1.0" +application/icon_interpolation=0 +application/file_version="0.20.2.0" +application/product_version="0.20.2.0" application/company_name="Woofmeow" -application/product_name="NETfishing" -application/file_description="NETfishing v0.16.1-alpha" +application/product_name="straywild" +application/file_description="straywild v0.20.2-alpha" application/copyright="Copyright © 2026 Woofmeow" -application/trademarks="NETfishing and Woofmeow branding is reserved; see TRADEMARKS.md" +application/trademarks="straywild and Woofmeow branding is reserved; see TRADEMARKS.md" application/export_angle=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" @@ -62,7 +62,7 @@ custom_features="" export_filter="all_resources" include_filter="LICENSE,ASSET-LICENSE.md,TRADEMARKS.md,docs/ATTRIBUTION.md,ui/fonts/*LICENSE.txt" exclude_filter="builds/*,scripts/*" -export_path="builds/v0.16.1-alpha/linux-arm64/NETfishing.arm64" +export_path="builds/v0.20.2-alpha/linux-arm64/straywild.arm64" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -92,7 +92,7 @@ custom_features="" export_filter="all_resources" include_filter="LICENSE,ASSET-LICENSE.md,TRADEMARKS.md,docs/ATTRIBUTION.md,ui/fonts/*LICENSE.txt" exclude_filter="builds/*,scripts/*" -export_path="builds/v0.16.1-alpha/macos/NETfishing.zip" +export_path="builds/v0.20.2-alpha/macos/straywild.zip" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -106,10 +106,10 @@ script_export_mode=2 custom_template/debug="" custom_template/release="" application/bundle_identifier="io.woofmeow.netfishing" -application/icon="res://art/exported/system_icons/netfishing_1024.png" +application/icon="res://art/exported/system_icons/straywild_1024.png" application/icon_interpolation=0 -application/short_version="0.16.1" -application/version="0.16.1" +application/short_version="0.20.2" +application/version="0.20.2" application/architecture="universal" codesign/enable=false notarization/enable=false @@ -125,7 +125,7 @@ custom_features="" export_filter="all_resources" include_filter="LICENSE,ASSET-LICENSE.md,TRADEMARKS.md,docs/ATTRIBUTION.md,ui/fonts/*LICENSE.txt" exclude_filter="builds/*,scripts/*,tests/*" -export_path="builds/v0.16.1-alpha/server-linux-x86_64/NETfishingServer.x86_64" +export_path="builds/v0.20.2-alpha/server-linux-x86_64/straywildServer.x86_64" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -155,7 +155,7 @@ custom_features="" export_filter="all_resources" include_filter="LICENSE,ASSET-LICENSE.md,TRADEMARKS.md,docs/ATTRIBUTION.md,ui/fonts/*LICENSE.txt" exclude_filter="builds/*,scripts/*" -export_path="builds/v0.16.1-alpha/android/NETfishing.apk" +export_path="builds/v0.20.2-alpha/android/straywild.apk" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -176,10 +176,10 @@ architectures/armeabi-v7a=false architectures/arm64-v8a=true architectures/x86=false architectures/x86_64=false -version/code=160100 -version/name="v0.16.1-alpha" +version/code=200200 +version/name="v0.20.2-alpha" package/unique_name="io.woofmeow.netfishing" -package/name="NETfishing" +package/name="straywild" package/signed=true package/app_category=0 package/retain_data_on_uninstall=false @@ -187,7 +187,7 @@ package/exclude_from_recents=false package/show_in_android_tv=false package/show_in_app_library=true package/show_as_launcher_app=true -launcher_icons/main_192x192="res://art/exported/system_icons/netfishing_256.png" +launcher_icons/main_192x192="res://art/exported/system_icons/straywild_256.png" graphics/opengl_debug=false screen/immersive_mode=true screen/edge_to_edge=false @@ -214,7 +214,7 @@ custom_features="" export_filter="all_resources" include_filter="LICENSE,ASSET-LICENSE.md,TRADEMARKS.md,docs/ATTRIBUTION.md,ui/fonts/*LICENSE.txt" exclude_filter="builds/*,scripts/*" -export_path="builds/v0.16.1-alpha/linux-x86_64/NETfishing.x86_64" +export_path="builds/v0.20.2-alpha/linux-x86_64/straywild.x86_64" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" diff --git a/fish/pools/generated_lake_pool.tres b/fish/pools/generated_lake_pool.tres index ac095b8..c0ff343 100644 --- a/fish/pools/generated_lake_pool.tres +++ b/fish/pools/generated_lake_pool.tres @@ -1,13 +1,27 @@ -[gd_resource type="Resource" load_steps=8 format=3] +[gd_resource type="Resource" load_steps=22 format=3] [ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"] -[ext_resource type="Resource" path="res://fish/species/sturgeon_lake/sturgeon_lake.tres" id="2_sturgeon"] -[ext_resource type="Resource" path="res://fish/species/trout_golden/trout_golden.tres" id="3_trout"] -[ext_resource type="Resource" path="res://fish/species/chub_lake/chub_lake.tres" id="4_chub"] -[ext_resource type="Resource" path="res://fish/species/saugeye/saugeye.tres" id="5_saugeye"] -[ext_resource type="Resource" path="res://fish/species/walleye/walleye.tres" id="6_walleye"] -[ext_resource type="Resource" path="res://fish/species/goby_round/goby_round.tres" id="7_goby"] +[ext_resource type="Resource" path="res://fish/species/sturgeon_lake/sturgeon_lake.tres" id="2_sturgeon_lake"] +[ext_resource type="Resource" path="res://fish/species/burbot/burbot.tres" id="3_burbot"] +[ext_resource type="Resource" path="res://fish/species/cisco/cisco.tres" id="4_cisco"] +[ext_resource type="Resource" path="res://fish/species/whitefish_lake/whitefish_lake.tres" id="5_whitefish_lake"] +[ext_resource type="Resource" path="res://fish/species/char_arctic/char_arctic.tres" id="6_char_arctic"] +[ext_resource type="Resource" path="res://fish/species/trout_golden/trout_golden.tres" id="7_trout_golden"] +[ext_resource type="Resource" path="res://fish/species/axolotl/axolotl.tres" id="8_axolotl"] +[ext_resource type="Resource" path="res://fish/species/bream_common/bream_common.tres" id="9_bream_common"] +[ext_resource type="Resource" path="res://fish/species/muskellunge/muskellunge.tres" id="10_muskellunge"] +[ext_resource type="Resource" path="res://fish/species/shiner_emerald/shiner_emerald.tres" id="11_shiner_emerald"] +[ext_resource type="Resource" path="res://fish/species/chub_lake/chub_lake.tres" id="12_chub_lake"] +[ext_resource type="Resource" path="res://fish/species/crappie_white/crappie_white.tres" id="13_crappie_white"] +[ext_resource type="Resource" path="res://fish/species/yellow_perch/yellow_perch.tres" id="14_yellow_perch"] +[ext_resource type="Resource" path="res://fish/species/pike_northern/pike_northern.tres" id="15_pike_northern"] +[ext_resource type="Resource" path="res://fish/species/saugeye/saugeye.tres" id="16_saugeye"] +[ext_resource type="Resource" path="res://fish/species/walleye/walleye.tres" id="17_walleye"] +[ext_resource type="Resource" path="res://fish/species/goby_round/goby_round.tres" id="18_goby_round"] +[ext_resource type="Resource" path="res://fish/species/smelt_rainbow/smelt_rainbow.tres" id="19_smelt_rainbow"] +[ext_resource type="Resource" path="res://fish/species/gourami_giant/gourami_giant.tres" id="20_gourami_giant"] +[ext_resource type="Resource" path="res://fish/species/tilapia_nile/tilapia_nile.tres" id="21_tilapia_nile"] [resource] script = ExtResource("1_pool") -candidates = [ExtResource("2_sturgeon"), ExtResource("3_trout"), ExtResource("4_chub"), ExtResource("5_saugeye"), ExtResource("6_walleye"), ExtResource("7_goby")] +candidates = [ExtResource("2_sturgeon_lake"), ExtResource("3_burbot"), ExtResource("4_cisco"), ExtResource("5_whitefish_lake"), ExtResource("6_char_arctic"), ExtResource("7_trout_golden"), ExtResource("8_axolotl"), ExtResource("9_bream_common"), ExtResource("10_muskellunge"), ExtResource("11_shiner_emerald"), ExtResource("12_chub_lake"), ExtResource("13_crappie_white"), ExtResource("14_yellow_perch"), ExtResource("15_pike_northern"), ExtResource("16_saugeye"), ExtResource("17_walleye"), ExtResource("18_goby_round"), ExtResource("19_smelt_rainbow"), ExtResource("20_gourami_giant"), ExtResource("21_tilapia_nile")] diff --git a/fish/pools/generated_pond_pool.tres b/fish/pools/generated_pond_pool.tres index 2b01e7d..9da4ed5 100644 --- a/fish/pools/generated_pond_pool.tres +++ b/fish/pools/generated_pond_pool.tres @@ -1,16 +1,40 @@ -[gd_resource type="Resource" load_steps=11 format=3] +[gd_resource type="Resource" load_steps=35 format=3] [ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"] [ext_resource type="Resource" path="res://fish/species/bowfin/bowfin.tres" id="2_bowfin"] [ext_resource type="Resource" path="res://fish/species/gar_spotted/gar_spotted.tres" id="3_gar_spotted"] -[ext_resource type="Resource" path="res://fish/species/lungfish_west_african/lungfish_west_african.tres" id="4_lungfish"] -[ext_resource type="Resource" path="res://fish/species/catfish_channel/catfish_channel.tres" id="5_catfish_channel"] -[ext_resource type="Resource" path="res://fish/species/catfish_white/catfish_white.tres" id="6_catfish_white"] -[ext_resource type="Resource" path="res://fish/species/carp/carp.tres" id="7_carp"] -[ext_resource type="Resource" path="res://fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres" id="8_bubbleeye"] -[ext_resource type="Resource" path="res://fish/species/goldfish/goldfish.tres" id="9_goldfish"] -[ext_resource type="Resource" path="res://fish/species/bluegill/bluegill.tres" id="10_bluegill"] +[ext_resource type="Resource" path="res://fish/species/lungfish_west_african/lungfish_west_african.tres" id="4_lungfish_west_african"] +[ext_resource type="Resource" path="res://fish/species/guppy/guppy.tres" id="5_guppy"] +[ext_resource type="Resource" path="res://fish/species/tetra_neon/tetra_neon.tres" id="6_tetra_neon"] +[ext_resource type="Resource" path="res://fish/species/danio_zebra/danio_zebra.tres" id="7_danio_zebra"] +[ext_resource type="Resource" path="res://fish/species/largemouth_bass/largemouth_bass.tres" id="8_largemouth_bass"] +[ext_resource type="Resource" path="res://fish/species/bullhead_black/bullhead_black.tres" id="9_bullhead_black"] +[ext_resource type="Resource" path="res://fish/species/bullhead_brown/bullhead_brown.tres" id="10_bullhead_brown"] +[ext_resource type="Resource" path="res://fish/species/catfish_channel/catfish_channel.tres" id="11_catfish_channel"] +[ext_resource type="Resource" path="res://fish/species/catfish_white/catfish_white.tres" id="12_catfish_white"] +[ext_resource type="Resource" path="res://fish/species/bullhead_yellow/bullhead_yellow.tres" id="13_bullhead_yellow"] +[ext_resource type="Resource" path="res://fish/species/carp/carp.tres" id="14_carp"] +[ext_resource type="Resource" path="res://fish/species/roach_common/roach_common.tres" id="15_roach_common"] +[ext_resource type="Resource" path="res://fish/species/rudd/rudd.tres" id="16_rudd"] +[ext_resource type="Resource" path="res://fish/species/tench/tench.tres" id="17_tench"] +[ext_resource type="Resource" path="res://fish/species/crayfish_red_swamp/crayfish_red_swamp.tres" id="18_crayfish_red_swamp"] +[ext_resource type="Resource" path="res://fish/species/minnow_fathead/minnow_fathead.tres" id="19_minnow_fathead"] +[ext_resource type="Resource" path="res://fish/species/shiner_golden/shiner_golden.tres" id="20_shiner_golden"] +[ext_resource type="Resource" path="res://fish/species/loach_weather/loach_weather.tres" id="21_loach_weather"] +[ext_resource type="Resource" path="res://fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres" id="22_goldfish_bubbleeye"] +[ext_resource type="Resource" path="res://fish/species/goldfish/goldfish.tres" id="23_goldfish"] +[ext_resource type="Resource" path="res://fish/species/koi/koi.tres" id="24_koi"] +[ext_resource type="Resource" path="res://fish/species/crappie_black/crappie_black.tres" id="25_crappie_black"] +[ext_resource type="Resource" path="res://fish/species/bluegill/bluegill.tres" id="26_bluegill"] +[ext_resource type="Resource" path="res://fish/species/green_sunfish/green_sunfish.tres" id="27_green_sunfish"] +[ext_resource type="Resource" path="res://fish/species/pumpkinseed/pumpkinseed.tres" id="28_pumpkinseed"] +[ext_resource type="Resource" path="res://fish/species/redear_sunfish/redear_sunfish.tres" id="29_redear_sunfish"] +[ext_resource type="Resource" path="res://fish/species/warmouth/warmouth.tres" id="30_warmouth"] +[ext_resource type="Resource" path="res://fish/species/pickerel_chain/pickerel_chain.tres" id="31_pickerel_chain"] +[ext_resource type="Resource" path="res://fish/species/pickerel_grass/pickerel_grass.tres" id="32_pickerel_grass"] +[ext_resource type="Resource" path="res://fish/species/betta_siamese/betta_siamese.tres" id="33_betta_siamese"] +[ext_resource type="Resource" path="res://fish/species/catfish_walking/catfish_walking.tres" id="34_catfish_walking"] [resource] script = ExtResource("1_pool") -candidates = [ExtResource("2_bowfin"), ExtResource("3_gar_spotted"), ExtResource("4_lungfish"), ExtResource("5_catfish_channel"), ExtResource("6_catfish_white"), ExtResource("7_carp"), ExtResource("8_bubbleeye"), ExtResource("9_goldfish"), ExtResource("10_bluegill")] +candidates = [ExtResource("2_bowfin"), ExtResource("3_gar_spotted"), ExtResource("4_lungfish_west_african"), ExtResource("5_guppy"), ExtResource("6_tetra_neon"), ExtResource("7_danio_zebra"), ExtResource("8_largemouth_bass"), ExtResource("9_bullhead_black"), ExtResource("10_bullhead_brown"), ExtResource("11_catfish_channel"), ExtResource("12_catfish_white"), ExtResource("13_bullhead_yellow"), ExtResource("14_carp"), ExtResource("15_roach_common"), ExtResource("16_rudd"), ExtResource("17_tench"), ExtResource("18_crayfish_red_swamp"), ExtResource("19_minnow_fathead"), ExtResource("20_shiner_golden"), ExtResource("21_loach_weather"), ExtResource("22_goldfish_bubbleeye"), ExtResource("23_goldfish"), ExtResource("24_koi"), ExtResource("25_crappie_black"), ExtResource("26_bluegill"), ExtResource("27_green_sunfish"), ExtResource("28_pumpkinseed"), ExtResource("29_redear_sunfish"), ExtResource("30_warmouth"), ExtResource("31_pickerel_chain"), ExtResource("32_pickerel_grass"), ExtResource("33_betta_siamese"), ExtResource("34_catfish_walking")] diff --git a/fish/pools/generated_river_pool.tres b/fish/pools/generated_river_pool.tres index 34b8f72..66102ef 100644 --- a/fish/pools/generated_river_pool.tres +++ b/fish/pools/generated_river_pool.tres @@ -1,18 +1,60 @@ -[gd_resource type="Resource" load_steps=13 format=3] +[gd_resource type="Resource" load_steps=55 format=3] [ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"] -[ext_resource type="Resource" path="res://fish/species/gar_longnose/gar_longnose.tres" id="2_gar"] +[ext_resource type="Resource" path="res://fish/species/gar_longnose/gar_longnose.tres" id="2_gar_longnose"] [ext_resource type="Resource" path="res://fish/species/paddlefish/paddlefish.tres" id="3_paddlefish"] -[ext_resource type="Resource" path="res://fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres" id="4_sturgeon"] -[ext_resource type="Resource" path="res://fish/species/trout_cutthroat/trout_cutthroat.tres" id="5_cutthroat"] -[ext_resource type="Resource" path="res://fish/species/trout_rainbow/trout_rainbow.tres" id="6_rainbow"] -[ext_resource type="Resource" path="res://fish/species/catfish_blue/catfish_blue.tres" id="7_blue_catfish"] -[ext_resource type="Resource" path="res://fish/species/catfish_flathead/catfish_flathead.tres" id="8_flathead"] -[ext_resource type="Resource" path="res://fish/species/chub_european/chub_european.tres" id="9_chub_european"] -[ext_resource type="Resource" path="res://fish/species/chub_flame/chub_flame.tres" id="10_chub_flame"] -[ext_resource type="Resource" path="res://fish/species/sauger/sauger.tres" id="11_sauger"] -[ext_resource type="Resource" path="res://fish/species/trout_steelhead/trout_steelhead.tres" id="12_steelhead"] +[ext_resource type="Resource" path="res://fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres" id="4_sturgeon_shovelnose"] +[ext_resource type="Resource" path="res://fish/species/foureyes_largescale/foureyes_largescale.tres" id="5_foureyes_largescale"] +[ext_resource type="Resource" path="res://fish/species/grayling_arctic/grayling_arctic.tres" id="6_grayling_arctic"] +[ext_resource type="Resource" path="res://fish/species/trout_brown/trout_brown.tres" id="7_trout_brown"] +[ext_resource type="Resource" path="res://fish/species/trout_cutthroat/trout_cutthroat.tres" id="8_trout_cutthroat"] +[ext_resource type="Resource" path="res://fish/species/trout_rainbow/trout_rainbow.tres" id="9_trout_rainbow"] +[ext_resource type="Resource" path="res://fish/species/hellbender/hellbender.tres" id="10_hellbender"] +[ext_resource type="Resource" path="res://fish/species/smallmouth_bass/smallmouth_bass.tres" id="11_smallmouth_bass"] +[ext_resource type="Resource" path="res://fish/species/buffalo_bigmouth/buffalo_bigmouth.tres" id="12_buffalo_bigmouth"] +[ext_resource type="Resource" path="res://fish/species/redhorse_golden/redhorse_golden.tres" id="13_redhorse_golden"] +[ext_resource type="Resource" path="res://fish/species/quillback/quillback.tres" id="14_quillback"] +[ext_resource type="Resource" path="res://fish/species/buffalo_smallmouth/buffalo_smallmouth.tres" id="15_buffalo_smallmouth"] +[ext_resource type="Resource" path="res://fish/species/sucker_white/sucker_white.tres" id="16_sucker_white"] +[ext_resource type="Resource" path="res://fish/species/catfish_blue/catfish_blue.tres" id="17_catfish_blue"] +[ext_resource type="Resource" path="res://fish/species/catfish_flathead/catfish_flathead.tres" id="18_catfish_flathead"] +[ext_resource type="Resource" path="res://fish/species/madtom_tadpole/madtom_tadpole.tres" id="19_madtom_tadpole"] +[ext_resource type="Resource" path="res://fish/species/barbel_common/barbel_common.tres" id="20_barbel_common"] +[ext_resource type="Resource" path="res://fish/species/chub_european/chub_european.tres" id="21_chub_european"] +[ext_resource type="Resource" path="res://fish/species/fallfish/fallfish.tres" id="22_fallfish"] +[ext_resource type="Resource" path="res://fish/species/ide/ide.tres" id="23_ide"] +[ext_resource type="Resource" path="res://fish/species/gar_alligator/gar_alligator.tres" id="24_gar_alligator"] +[ext_resource type="Resource" path="res://fish/species/arapaima/arapaima.tres" id="25_arapaima"] +[ext_resource type="Resource" path="res://fish/species/tigerfish_goliath/tigerfish_goliath.tres" id="26_tigerfish_goliath"] +[ext_resource type="Resource" path="res://fish/species/shiner_common/shiner_common.tres" id="27_shiner_common"] +[ext_resource type="Resource" path="res://fish/species/chub_creek/chub_creek.tres" id="28_chub_creek"] +[ext_resource type="Resource" path="res://fish/species/chub_flame/chub_flame.tres" id="29_chub_flame"] +[ext_resource type="Resource" path="res://fish/species/electric_eel/electric_eel.tres" id="30_electric_eel"] +[ext_resource type="Resource" path="res://fish/species/freshwater_drum/freshwater_drum.tres" id="31_freshwater_drum"] +[ext_resource type="Resource" path="res://fish/species/goldeye/goldeye.tres" id="32_goldeye"] +[ext_resource type="Resource" path="res://fish/species/mooneye/mooneye.tres" id="33_mooneye"] +[ext_resource type="Resource" path="res://fish/species/sauger/sauger.tres" id="34_sauger"] +[ext_resource type="Resource" path="res://fish/species/eel_american/eel_american.tres" id="35_eel_american"] +[ext_resource type="Resource" path="res://fish/species/eel_european/eel_european.tres" id="36_eel_european"] +[ext_resource type="Resource" path="res://fish/species/smelt_eulachon/smelt_eulachon.tres" id="37_smelt_eulachon"] +[ext_resource type="Resource" path="res://fish/species/sturgeon_white/sturgeon_white.tres" id="38_sturgeon_white"] +[ext_resource type="Resource" path="res://fish/species/trout_steelhead/trout_steelhead.tres" id="39_trout_steelhead"] +[ext_resource type="Resource" path="res://fish/species/stingray_ocellate_river/stingray_ocellate_river.tres" id="40_stingray_ocellate_river"] +[ext_resource type="Resource" path="res://fish/species/white_perch/white_perch.tres" id="41_white_perch"] +[ext_resource type="Resource" path="res://fish/species/barramundi/barramundi.tres" id="42_barramundi"] +[ext_resource type="Resource" path="res://fish/species/knifefish_clown/knifefish_clown.tres" id="43_knifefish_clown"] +[ext_resource type="Resource" path="res://fish/species/loach_clown/loach_clown.tres" id="44_loach_clown"] +[ext_resource type="Resource" path="res://fish/species/discus/discus.tres" id="45_discus"] +[ext_resource type="Resource" path="res://fish/species/angelfish_freshwater/angelfish_freshwater.tres" id="46_angelfish_freshwater"] +[ext_resource type="Resource" path="res://fish/species/oscar/oscar.tres" id="47_oscar"] +[ext_resource type="Resource" path="res://fish/species/tambaqui/tambaqui.tres" id="48_tambaqui"] +[ext_resource type="Resource" path="res://fish/species/snakehead_giant/snakehead_giant.tres" id="49_snakehead_giant"] +[ext_resource type="Resource" path="res://fish/species/dorado_golden/dorado_golden.tres" id="50_dorado_golden"] +[ext_resource type="Resource" path="res://fish/species/mahseer_golden/mahseer_golden.tres" id="51_mahseer_golden"] +[ext_resource type="Resource" path="res://fish/species/peacock_bass/peacock_bass.tres" id="52_peacock_bass"] +[ext_resource type="Resource" path="res://fish/species/piranha_red_bellied/piranha_red_bellied.tres" id="53_piranha_red_bellied"] +[ext_resource type="Resource" path="res://fish/species/arowana_silver/arowana_silver.tres" id="54_arowana_silver"] [resource] script = ExtResource("1_pool") -candidates = [ExtResource("2_gar"), ExtResource("3_paddlefish"), ExtResource("4_sturgeon"), ExtResource("5_cutthroat"), ExtResource("6_rainbow"), ExtResource("7_blue_catfish"), ExtResource("8_flathead"), ExtResource("9_chub_european"), ExtResource("10_chub_flame"), ExtResource("11_sauger"), ExtResource("12_steelhead")] +candidates = [ExtResource("2_gar_longnose"), ExtResource("3_paddlefish"), ExtResource("4_sturgeon_shovelnose"), ExtResource("5_foureyes_largescale"), ExtResource("6_grayling_arctic"), ExtResource("7_trout_brown"), ExtResource("8_trout_cutthroat"), ExtResource("9_trout_rainbow"), ExtResource("10_hellbender"), ExtResource("11_smallmouth_bass"), ExtResource("12_buffalo_bigmouth"), ExtResource("13_redhorse_golden"), ExtResource("14_quillback"), ExtResource("15_buffalo_smallmouth"), ExtResource("16_sucker_white"), ExtResource("17_catfish_blue"), ExtResource("18_catfish_flathead"), ExtResource("19_madtom_tadpole"), ExtResource("20_barbel_common"), ExtResource("21_chub_european"), ExtResource("22_fallfish"), ExtResource("23_ide"), ExtResource("24_gar_alligator"), ExtResource("25_arapaima"), ExtResource("26_tigerfish_goliath"), ExtResource("27_shiner_common"), ExtResource("28_chub_creek"), ExtResource("29_chub_flame"), ExtResource("30_electric_eel"), ExtResource("31_freshwater_drum"), ExtResource("32_goldeye"), ExtResource("33_mooneye"), ExtResource("34_sauger"), ExtResource("35_eel_american"), ExtResource("36_eel_european"), ExtResource("37_smelt_eulachon"), ExtResource("38_sturgeon_white"), ExtResource("39_trout_steelhead"), ExtResource("40_stingray_ocellate_river"), ExtResource("41_white_perch"), ExtResource("42_barramundi"), ExtResource("43_knifefish_clown"), ExtResource("44_loach_clown"), ExtResource("45_discus"), ExtResource("46_angelfish_freshwater"), ExtResource("47_oscar"), ExtResource("48_tambaqui"), ExtResource("49_snakehead_giant"), ExtResource("50_dorado_golden"), ExtResource("51_mahseer_golden"), ExtResource("52_peacock_bass"), ExtResource("53_piranha_red_bellied"), ExtResource("54_arowana_silver")] diff --git a/fish/pools/starter_ocean_pool.tres b/fish/pools/starter_ocean_pool.tres index 1e47a2b..274b58d 100644 --- a/fish/pools/starter_ocean_pool.tres +++ b/fish/pools/starter_ocean_pool.tres @@ -1,41 +1,211 @@ -[gd_resource type="Resource" load_steps=36 format=3] +[gd_resource type="Resource" load_steps=206 format=3] [ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"] -[ext_resource type="Resource" path="res://fish/species/bass/bass.tres" id="2_bass"] -[ext_resource type="Resource" path="res://fish/species/sunfish/sunfish.tres" id="3_sunfish"] -[ext_resource type="Resource" path="res://fish/species/tuna_albacore/tuna_albacore.tres" id="4_tuna_albacore"] -[ext_resource type="Resource" path="res://fish/species/tuna_bigeye/tuna_bigeye.tres" id="5_tuna_bigeye"] -[ext_resource type="Resource" path="res://fish/species/tuna_bluefin/tuna_bluefin.tres" id="6_tuna_bluefin"] -[ext_resource type="Resource" path="res://fish/species/tuna_skipjack/tuna_skipjack.tres" id="7_tuna_skipjack"] -[ext_resource type="Resource" path="res://fish/species/tuna_yellowfin/tuna_yellowfin.tres" id="8_tuna_yellowfin"] -[ext_resource type="Resource" path="res://fish/species/salmon_atlantic/salmon_atlantic.tres" id="9_salmon_atlantic"] -[ext_resource type="Resource" path="res://fish/species/salmon_chum/salmon_chum.tres" id="10_salmon_chum"] -[ext_resource type="Resource" path="res://fish/species/salmon_coho/salmon_coho.tres" id="11_salmon_coho"] -[ext_resource type="Resource" path="res://fish/species/salmon_pink/salmon_pink.tres" id="12_salmon_pink"] -[ext_resource type="Resource" path="res://fish/species/salmon_sockeye/salmon_sockeye.tres" id="13_salmon_sockeye"] -[ext_resource type="Resource" path="res://fish/species/anchovy_european/anchovy_european.tres" id="14_anchovy_european"] -[ext_resource type="Resource" path="res://fish/species/anchovy_northern/anchovy_northern.tres" id="15_anchovy_northern"] -[ext_resource type="Resource" path="res://fish/species/grouper_gulf/grouper_gulf.tres" id="16_grouper_gulf"] -[ext_resource type="Resource" path="res://fish/species/grouper_red/grouper_red.tres" id="17_grouper_red"] -[ext_resource type="Resource" path="res://fish/species/mackerel_atlantic/mackerel_atlantic.tres" id="18_mackerel_atlantic"] -[ext_resource type="Resource" path="res://fish/species/mackerel_cero/mackerel_cero.tres" id="19_mackerel_cero"] -[ext_resource type="Resource" path="res://fish/species/mackerel_chub/mackerel_chub.tres" id="20_mackerel_chub"] +[ext_resource type="Resource" path="res://fish/species/mudskipper_atlantic/mudskipper_atlantic.tres" id="2_mudskipper_atlantic"] +[ext_resource type="Resource" path="res://fish/species/mullet_red/mullet_red.tres" id="3_mullet_red"] +[ext_resource type="Resource" path="res://fish/species/plaice_european/plaice_european.tres" id="4_plaice_european"] +[ext_resource type="Resource" path="res://fish/species/flounder_summer/flounder_summer.tres" id="5_flounder_summer"] +[ext_resource type="Resource" path="res://fish/species/flounder_winter/flounder_winter.tres" id="6_flounder_winter"] +[ext_resource type="Resource" path="res://fish/species/dugong/dugong.tres" id="7_dugong"] +[ext_resource type="Resource" path="res://fish/species/seal_harbor/seal_harbor.tres" id="8_seal_harbor"] +[ext_resource type="Resource" path="res://fish/species/sea_otter/sea_otter.tres" id="9_sea_otter"] +[ext_resource type="Resource" path="res://fish/species/walrus/walrus.tres" id="10_walrus"] +[ext_resource type="Resource" path="res://fish/species/manatee_west_indian/manatee_west_indian.tres" id="11_manatee_west_indian"] +[ext_resource type="Resource" path="res://fish/species/pipefish_bay/pipefish_bay.tres" id="12_pipefish_bay"] +[ext_resource type="Resource" path="res://fish/species/seahorse_lined/seahorse_lined.tres" id="13_seahorse_lined"] +[ext_resource type="Resource" path="res://fish/species/monkfish/monkfish.tres" id="14_monkfish"] +[ext_resource type="Resource" path="res://fish/species/tripletail/tripletail.tres" id="15_tripletail"] +[ext_resource type="Resource" path="res://fish/species/mackerel_atlantic/mackerel_atlantic.tres" id="16_mackerel_atlantic"] +[ext_resource type="Resource" path="res://fish/species/bluefish/bluefish.tres" id="17_bluefish"] +[ext_resource type="Resource" path="res://fish/species/mackerel_cero/mackerel_cero.tres" id="18_mackerel_cero"] +[ext_resource type="Resource" path="res://fish/species/mackerel_chub/mackerel_chub.tres" id="19_mackerel_chub"] +[ext_resource type="Resource" path="res://fish/species/jack_crevalle/jack_crevalle.tres" id="20_jack_crevalle"] [ext_resource type="Resource" path="res://fish/species/mackerel_king/mackerel_king.tres" id="21_mackerel_king"] [ext_resource type="Resource" path="res://fish/species/mackerel_spanish/mackerel_spanish.tres" id="22_mackerel_spanish"] -[ext_resource type="Resource" path="res://fish/species/marlin_black/marlin_black.tres" id="23_marlin_black"] -[ext_resource type="Resource" path="res://fish/species/marlin_blue/marlin_blue.tres" id="24_marlin_blue"] -[ext_resource type="Resource" path="res://fish/species/marlin_white/marlin_white.tres" id="25_marlin_white"] +[ext_resource type="Resource" path="res://fish/species/queenfish_talang/queenfish_talang.tres" id="23_queenfish_talang"] +[ext_resource type="Resource" path="res://fish/species/sand_lance_american/sand_lance_american.tres" id="24_sand_lance_american"] +[ext_resource type="Resource" path="res://fish/species/menhaden_atlantic/menhaden_atlantic.tres" id="25_menhaden_atlantic"] [ext_resource type="Resource" path="res://fish/species/pomfret_black/pomfret_black.tres" id="26_pomfret_black"] [ext_resource type="Resource" path="res://fish/species/pomfret_chinese/pomfret_chinese.tres" id="27_pomfret_chinese"] -[ext_resource type="Resource" path="res://fish/species/pomfret_golden/pomfret_golden.tres" id="28_pomfret_golden"] -[ext_resource type="Resource" path="res://fish/species/pomfret_white/pomfret_white.tres" id="29_pomfret_white"] -[ext_resource type="Resource" path="res://fish/species/sailfish/sailfish.tres" id="30_sailfish"] -[ext_resource type="Resource" path="res://fish/species/snapper_lane/snapper_lane.tres" id="31_snapper_lane"] -[ext_resource type="Resource" path="res://fish/species/snapper_mangrove/snapper_mangrove.tres" id="32_snapper_mangrove"] -[ext_resource type="Resource" path="res://fish/species/snapper_mutton/snapper_mutton.tres" id="33_snapper_mutton"] -[ext_resource type="Resource" path="res://fish/species/snapper_red/snapper_red.tres" id="34_snapper_red"] -[ext_resource type="Resource" path="res://fish/species/swordfish/swordfish.tres" id="35_swordfish"] +[ext_resource type="Resource" path="res://fish/species/anchovy_european/anchovy_european.tres" id="28_anchovy_european"] +[ext_resource type="Resource" path="res://fish/species/sardine_european/sardine_european.tres" id="29_sardine_european"] +[ext_resource type="Resource" path="res://fish/species/pomfret_golden/pomfret_golden.tres" id="30_pomfret_golden"] +[ext_resource type="Resource" path="res://fish/species/anchovy_northern/anchovy_northern.tres" id="31_anchovy_northern"] +[ext_resource type="Resource" path="res://fish/species/sardine_pacific/sardine_pacific.tres" id="32_sardine_pacific"] +[ext_resource type="Resource" path="res://fish/species/pomfret_white/pomfret_white.tres" id="33_pomfret_white"] +[ext_resource type="Resource" path="res://fish/species/shark_blacktip/shark_blacktip.tres" id="34_shark_blacktip"] +[ext_resource type="Resource" path="res://fish/species/shark_great_hammerhead/shark_great_hammerhead.tres" id="35_shark_great_hammerhead"] +[ext_resource type="Resource" path="res://fish/species/shark_great_white/shark_great_white.tres" id="36_shark_great_white"] +[ext_resource type="Resource" path="res://fish/species/shark_tiger/shark_tiger.tres" id="37_shark_tiger"] +[ext_resource type="Resource" path="res://fish/species/shark_whale/shark_whale.tres" id="38_shark_whale"] +[ext_resource type="Resource" path="res://fish/species/wolffish_atlantic/wolffish_atlantic.tres" id="39_wolffish_atlantic"] +[ext_resource type="Resource" path="res://fish/species/cusk/cusk.tres" id="40_cusk"] +[ext_resource type="Resource" path="res://fish/species/wolffish_spotted/wolffish_spotted.tres" id="41_wolffish_spotted"] +[ext_resource type="Resource" path="res://fish/species/herring_atlantic/herring_atlantic.tres" id="42_herring_atlantic"] +[ext_resource type="Resource" path="res://fish/species/capelin/capelin.tres" id="43_capelin"] +[ext_resource type="Resource" path="res://fish/species/sprat_european/sprat_european.tres" id="44_sprat_european"] +[ext_resource type="Resource" path="res://fish/species/herring_pacific/herring_pacific.tres" id="45_herring_pacific"] +[ext_resource type="Resource" path="res://fish/species/pollock_alaska/pollock_alaska.tres" id="46_pollock_alaska"] +[ext_resource type="Resource" path="res://fish/species/cod_atlantic/cod_atlantic.tres" id="47_cod_atlantic"] +[ext_resource type="Resource" path="res://fish/species/pollock_atlantic/pollock_atlantic.tres" id="48_pollock_atlantic"] +[ext_resource type="Resource" path="res://fish/species/sole_dover/sole_dover.tres" id="49_sole_dover"] +[ext_resource type="Resource" path="res://fish/species/haddock/haddock.tres" id="50_haddock"] +[ext_resource type="Resource" path="res://fish/species/cod_pacific/cod_pacific.tres" id="51_cod_pacific"] +[ext_resource type="Resource" path="res://fish/species/hake_pacific/hake_pacific.tres" id="52_hake_pacific"] +[ext_resource type="Resource" path="res://fish/species/hake_silver/hake_silver.tres" id="53_hake_silver"] +[ext_resource type="Resource" path="res://fish/species/nautilus_chambered/nautilus_chambered.tres" id="54_nautilus_chambered"] +[ext_resource type="Resource" path="res://fish/species/cuttlefish_common/cuttlefish_common.tres" id="55_cuttlefish_common"] +[ext_resource type="Resource" path="res://fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres" id="56_cuttlefish_flamboyant"] +[ext_resource type="Resource" path="res://fish/species/tilefish_blueline/tilefish_blueline.tres" id="57_tilefish_blueline"] +[ext_resource type="Resource" path="res://fish/species/tilefish_golden/tilefish_golden.tres" id="58_tilefish_golden"] +[ext_resource type="Resource" path="res://fish/species/ocean_perch_pacific/ocean_perch_pacific.tres" id="59_ocean_perch_pacific"] +[ext_resource type="Resource" path="res://fish/species/sea_bass_chilean/sea_bass_chilean.tres" id="60_sea_bass_chilean"] +[ext_resource type="Resource" path="res://fish/species/sablefish/sablefish.tres" id="61_sablefish"] +[ext_resource type="Resource" path="res://fish/species/wreckfish/wreckfish.tres" id="62_wreckfish"] +[ext_resource type="Resource" path="res://fish/species/oarfish_giant/oarfish_giant.tres" id="63_oarfish_giant"] +[ext_resource type="Resource" path="res://fish/species/coelacanth_west_indian/coelacanth_west_indian.tres" id="64_coelacanth_west_indian"] +[ext_resource type="Resource" path="res://fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres" id="65_anglerfish_black_seadevil"] +[ext_resource type="Resource" path="res://fish/species/fangtooth_common/fangtooth_common.tres" id="66_fangtooth_common"] +[ext_resource type="Resource" path="res://fish/species/gulper_eel/gulper_eel.tres" id="67_gulper_eel"] +[ext_resource type="Resource" path="res://fish/species/barreleye_pacific/barreleye_pacific.tres" id="68_barreleye_pacific"] +[ext_resource type="Resource" path="res://fish/species/blobfish_smooth_head/blobfish_smooth_head.tres" id="69_blobfish_smooth_head"] +[ext_resource type="Resource" path="res://fish/species/lanternfish_spotted/lanternfish_spotted.tres" id="70_lanternfish_spotted"] +[ext_resource type="Resource" path="res://fish/species/sea_star_crown_of_thorns/sea_star_crown_of_thorns.tres" id="71_sea_star_crown_of_thorns"] +[ext_resource type="Resource" path="res://fish/species/sea_cucumber_giant_california/sea_cucumber_giant_california.tres" id="72_sea_cucumber_giant_california"] +[ext_resource type="Resource" path="res://fish/species/urchin_purple/urchin_purple.tres" id="73_urchin_purple"] +[ext_resource type="Resource" path="res://fish/species/sand_dollar/sand_dollar.tres" id="74_sand_dollar"] +[ext_resource type="Resource" path="res://fish/species/sea_star_sunflower/sea_star_sunflower.tres" id="75_sea_star_sunflower"] +[ext_resource type="Resource" path="res://fish/species/jelly_crystal/jelly_crystal.tres" id="76_jelly_crystal"] +[ext_resource type="Resource" path="res://fish/species/jelly_lions_mane/jelly_lions_mane.tres" id="77_jelly_lions_mane"] +[ext_resource type="Resource" path="res://fish/species/jelly_moon/jelly_moon.tres" id="78_jelly_moon"] +[ext_resource type="Resource" path="res://fish/species/jelly_pacific_sea_nettle/jelly_pacific_sea_nettle.tres" id="79_jelly_pacific_sea_nettle"] +[ext_resource type="Resource" path="res://fish/species/jelly_sea_wasp/jelly_sea_wasp.tres" id="80_jelly_sea_wasp"] +[ext_resource type="Resource" path="res://fish/species/pompano_african/pompano_african.tres" id="81_pompano_african"] +[ext_resource type="Resource" path="res://fish/species/cobia/cobia.tres" id="82_cobia"] +[ext_resource type="Resource" path="res://fish/species/trevally_giant/trevally_giant.tres" id="83_trevally_giant"] +[ext_resource type="Resource" path="res://fish/species/amberjack_greater/amberjack_greater.tres" id="84_amberjack_greater"] +[ext_resource type="Resource" path="res://fish/species/amberjack_lesser/amberjack_lesser.tres" id="85_amberjack_lesser"] +[ext_resource type="Resource" path="res://fish/species/halibut_atlantic/halibut_atlantic.tres" id="86_halibut_atlantic"] +[ext_resource type="Resource" path="res://fish/species/halibut_pacific/halibut_pacific.tres" id="87_halibut_pacific"] +[ext_resource type="Resource" path="res://fish/species/turbot/turbot.tres" id="88_turbot"] +[ext_resource type="Resource" path="res://fish/species/lobster_american/lobster_american.tres" id="89_lobster_american"] +[ext_resource type="Resource" path="res://fish/species/krill_antarctic/krill_antarctic.tres" id="90_krill_antarctic"] +[ext_resource type="Resource" path="res://fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres" id="91_lobster_caribbean_spiny"] +[ext_resource type="Resource" path="res://fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres" id="92_shrimp_peacock_mantis"] +[ext_resource type="Resource" path="res://fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres" id="93_shrimp_skunk_cleaner"] +[ext_resource type="Resource" path="res://fish/species/crab_japanese_spider/crab_japanese_spider.tres" id="94_crab_japanese_spider"] +[ext_resource type="Resource" path="res://fish/species/crab_red_king/crab_red_king.tres" id="95_crab_red_king"] +[ext_resource type="Resource" path="res://fish/species/salmon_atlantic/salmon_atlantic.tres" id="96_salmon_atlantic"] +[ext_resource type="Resource" path="res://fish/species/salmon_chum/salmon_chum.tres" id="97_salmon_chum"] +[ext_resource type="Resource" path="res://fish/species/salmon_coho/salmon_coho.tres" id="98_salmon_coho"] +[ext_resource type="Resource" path="res://fish/species/salmon_pink/salmon_pink.tres" id="99_salmon_pink"] +[ext_resource type="Resource" path="res://fish/species/salmon_sockeye/salmon_sockeye.tres" id="100_salmon_sockeye"] +[ext_resource type="Resource" path="res://fish/species/marlin_black/marlin_black.tres" id="101_marlin_black"] +[ext_resource type="Resource" path="res://fish/species/marlin_blue/marlin_blue.tres" id="102_marlin_blue"] +[ext_resource type="Resource" path="res://fish/species/sailfish/sailfish.tres" id="103_sailfish"] +[ext_resource type="Resource" path="res://fish/species/swordfish/swordfish.tres" id="104_swordfish"] +[ext_resource type="Resource" path="res://fish/species/marlin_white/marlin_white.tres" id="105_marlin_white"] +[ext_resource type="Resource" path="res://fish/species/mahi_mahi/mahi_mahi.tres" id="106_mahi_mahi"] +[ext_resource type="Resource" path="res://fish/species/opah/opah.tres" id="107_opah"] +[ext_resource type="Resource" path="res://fish/species/wahoo/wahoo.tres" id="108_wahoo"] +[ext_resource type="Resource" path="res://fish/species/tuna_albacore/tuna_albacore.tres" id="109_tuna_albacore"] +[ext_resource type="Resource" path="res://fish/species/tuna_bigeye/tuna_bigeye.tres" id="110_tuna_bigeye"] +[ext_resource type="Resource" path="res://fish/species/tuna_bluefin/tuna_bluefin.tres" id="111_tuna_bluefin"] +[ext_resource type="Resource" path="res://fish/species/tuna_skipjack/tuna_skipjack.tres" id="112_tuna_skipjack"] +[ext_resource type="Resource" path="res://fish/species/tuna_yellowfin/tuna_yellowfin.tres" id="113_tuna_yellowfin"] +[ext_resource type="Resource" path="res://fish/species/octopus_common/octopus_common.tres" id="114_octopus_common"] +[ext_resource type="Resource" path="res://fish/species/octopus_day/octopus_day.tres" id="115_octopus_day"] +[ext_resource type="Resource" path="res://fish/species/octopus_giant_pacific/octopus_giant_pacific.tres" id="116_octopus_giant_pacific"] +[ext_resource type="Resource" path="res://fish/species/octopus_greater_blue_ringed/octopus_greater_blue_ringed.tres" id="117_octopus_greater_blue_ringed"] +[ext_resource type="Resource" path="res://fish/species/sunfish/sunfish.tres" id="118_sunfish"] +[ext_resource type="Resource" path="res://fish/species/skate_barndoor/skate_barndoor.tres" id="119_skate_barndoor"] +[ext_resource type="Resource" path="res://fish/species/manta_ray_giant/manta_ray_giant.tres" id="120_manta_ray_giant"] +[ext_resource type="Resource" path="res://fish/species/sawfish_largetooth/sawfish_largetooth.tres" id="121_sawfish_largetooth"] +[ext_resource type="Resource" path="res://fish/species/stingray_southern/stingray_southern.tres" id="122_stingray_southern"] +[ext_resource type="Resource" path="res://fish/species/lionfish_red/lionfish_red.tres" id="123_lionfish_red"] +[ext_resource type="Resource" path="res://fish/species/scorpionfish_red/scorpionfish_red.tres" id="124_scorpionfish_red"] +[ext_resource type="Resource" path="res://fish/species/moray_green/moray_green.tres" id="125_moray_green"] +[ext_resource type="Resource" path="res://fish/species/flounder_peacock/flounder_peacock.tres" id="126_flounder_peacock"] +[ext_resource type="Resource" path="res://fish/species/surgeonfish_blue/surgeonfish_blue.tres" id="127_surgeonfish_blue"] +[ext_resource type="Resource" path="res://fish/species/parrotfish_rainbow/parrotfish_rainbow.tres" id="128_parrotfish_rainbow"] +[ext_resource type="Resource" path="res://fish/species/parrotfish_stoplight/parrotfish_stoplight.tres" id="129_parrotfish_stoplight"] +[ext_resource type="Resource" path="res://fish/species/tang_yellow/tang_yellow.tres" id="130_tang_yellow"] +[ext_resource type="Resource" path="res://fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres" id="131_trumpetfish_atlantic"] +[ext_resource type="Resource" path="res://fish/species/triggerfish_gray/triggerfish_gray.tres" id="132_triggerfish_gray"] +[ext_resource type="Resource" path="res://fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres" id="133_pufferfish_guineafowl"] +[ext_resource type="Resource" path="res://fish/species/cowfish_longhorn/cowfish_longhorn.tres" id="134_cowfish_longhorn"] +[ext_resource type="Resource" path="res://fish/species/triggerfish_queen/triggerfish_queen.tres" id="135_triggerfish_queen"] +[ext_resource type="Resource" path="res://fish/species/cornetfish_red/cornetfish_red.tres" id="136_cornetfish_red"] +[ext_resource type="Resource" path="res://fish/species/porcupinefish_spotted/porcupinefish_spotted.tres" id="137_porcupinefish_spotted"] +[ext_resource type="Resource" path="res://fish/species/boxfish_yellow/boxfish_yellow.tres" id="138_boxfish_yellow"] +[ext_resource type="Resource" path="res://fish/species/butterflyfish_copperband/butterflyfish_copperband.tres" id="139_butterflyfish_copperband"] +[ext_resource type="Resource" path="res://fish/species/clownfish_ocellaris/clownfish_ocellaris.tres" id="140_clownfish_ocellaris"] +[ext_resource type="Resource" path="res://fish/species/angelfish_queen/angelfish_queen.tres" id="141_angelfish_queen"] +[ext_resource type="Resource" path="res://fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres" id="142_grouper_atlantic_goliath"] +[ext_resource type="Resource" path="res://fish/species/trevally_bluefin/trevally_bluefin.tres" id="143_trevally_bluefin"] +[ext_resource type="Resource" path="res://fish/species/grouper_giant/grouper_giant.tres" id="144_grouper_giant"] +[ext_resource type="Resource" path="res://fish/species/barracuda_great/barracuda_great.tres" id="145_barracuda_great"] +[ext_resource type="Resource" path="res://fish/species/grouper_gulf/grouper_gulf.tres" id="146_grouper_gulf"] +[ext_resource type="Resource" path="res://fish/species/grouper_nassau/grouper_nassau.tres" id="147_grouper_nassau"] +[ext_resource type="Resource" path="res://fish/species/grouper_red/grouper_red.tres" id="148_grouper_red"] +[ext_resource type="Resource" path="res://fish/species/chromis_blue_green/chromis_blue_green.tres" id="149_chromis_blue_green"] +[ext_resource type="Resource" path="res://fish/species/grunt_bluestriped/grunt_bluestriped.tres" id="150_grunt_bluestriped"] +[ext_resource type="Resource" path="res://fish/species/grunt_french/grunt_french.tres" id="151_grunt_french"] +[ext_resource type="Resource" path="res://fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres" id="152_damselfish_sergeant_major"] +[ext_resource type="Resource" path="res://fish/species/snapper_lane/snapper_lane.tres" id="153_snapper_lane"] +[ext_resource type="Resource" path="res://fish/species/snapper_mangrove/snapper_mangrove.tres" id="154_snapper_mangrove"] +[ext_resource type="Resource" path="res://fish/species/snapper_mutton/snapper_mutton.tres" id="155_snapper_mutton"] +[ext_resource type="Resource" path="res://fish/species/snapper_red/snapper_red.tres" id="156_snapper_red"] +[ext_resource type="Resource" path="res://fish/species/wrasse_ballan/wrasse_ballan.tres" id="157_wrasse_ballan"] +[ext_resource type="Resource" path="res://fish/species/wrasse_cleaner/wrasse_cleaner.tres" id="158_wrasse_cleaner"] +[ext_resource type="Resource" path="res://fish/species/hogfish/hogfish.tres" id="159_hogfish"] +[ext_resource type="Resource" path="res://fish/species/turtle_green/turtle_green.tres" id="160_turtle_green"] +[ext_resource type="Resource" path="res://fish/species/turtle_hawksbill/turtle_hawksbill.tres" id="161_turtle_hawksbill"] +[ext_resource type="Resource" path="res://fish/species/turtle_leatherback/turtle_leatherback.tres" id="162_turtle_leatherback"] +[ext_resource type="Resource" path="res://fish/species/turtle_loggerhead/turtle_loggerhead.tres" id="163_turtle_loggerhead"] +[ext_resource type="Resource" path="res://fish/species/seadragon_leafy/seadragon_leafy.tres" id="164_seadragon_leafy"] +[ext_resource type="Resource" path="res://fish/species/seadragon_weedy/seadragon_weedy.tres" id="165_seadragon_weedy"] +[ext_resource type="Resource" path="res://fish/species/oyster_black_lip_pearl/oyster_black_lip_pearl.tres" id="166_oyster_black_lip_pearl"] +[ext_resource type="Resource" path="res://fish/species/clam_giant/clam_giant.tres" id="167_clam_giant"] +[ext_resource type="Resource" path="res://fish/species/clam_geoduck/clam_geoduck.tres" id="168_clam_geoduck"] +[ext_resource type="Resource" path="res://fish/species/conch_queen/conch_queen.tres" id="169_conch_queen"] +[ext_resource type="Resource" path="res://fish/species/abalone_red/abalone_red.tres" id="170_abalone_red"] +[ext_resource type="Resource" path="res://fish/species/squid_bigfin_reef/squid_bigfin_reef.tres" id="171_squid_bigfin_reef"] +[ext_resource type="Resource" path="res://fish/species/squid_colossal/squid_colossal.tres" id="172_squid_colossal"] +[ext_resource type="Resource" path="res://fish/species/squid_giant/squid_giant.tres" id="173_squid_giant"] +[ext_resource type="Resource" path="res://fish/species/squid_humboldt/squid_humboldt.tres" id="174_squid_humboldt"] +[ext_resource type="Resource" path="res://fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres" id="175_halfbeak_ballyhoo"] +[ext_resource type="Resource" path="res://fish/species/needlefish_hound/needlefish_hound.tres" id="176_needlefish_hound"] +[ext_resource type="Resource" path="res://fish/species/flyingfish_tropical/flyingfish_tropical.tres" id="177_flyingfish_tropical"] +[ext_resource type="Resource" path="res://fish/species/bass/bass.tres" id="178_bass"] +[ext_resource type="Resource" path="res://fish/species/croaker_atlantic/croaker_atlantic.tres" id="179_croaker_atlantic"] +[ext_resource type="Resource" path="res://fish/species/black_drum/black_drum.tres" id="180_black_drum"] +[ext_resource type="Resource" path="res://fish/species/red_drum/red_drum.tres" id="181_red_drum"] +[ext_resource type="Resource" path="res://fish/species/mullet_striped/mullet_striped.tres" id="182_mullet_striped"] +[ext_resource type="Resource" path="res://fish/species/weakfish/weakfish.tres" id="183_weakfish"] +[ext_resource type="Resource" path="res://fish/species/croaker_yellowfin/croaker_yellowfin.tres" id="184_croaker_yellowfin"] +[ext_resource type="Resource" path="res://fish/species/rockfish_black/rockfish_black.tres" id="185_rockfish_black"] +[ext_resource type="Resource" path="res://fish/species/sea_bass_black/sea_bass_black.tres" id="186_sea_bass_black"] +[ext_resource type="Resource" path="res://fish/species/rockfish_canary/rockfish_canary.tres" id="187_rockfish_canary"] +[ext_resource type="Resource" path="res://fish/species/porgy_scup/porgy_scup.tres" id="188_porgy_scup"] +[ext_resource type="Resource" path="res://fish/species/sheepshead/sheepshead.tres" id="189_sheepshead"] +[ext_resource type="Resource" path="res://fish/species/tautog/tautog.tres" id="190_tautog"] +[ext_resource type="Resource" path="res://fish/species/rockfish_yelloweye/rockfish_yelloweye.tres" id="191_rockfish_yelloweye"] +[ext_resource type="Resource" path="res://fish/species/lingcod/lingcod.tres" id="192_lingcod"] +[ext_resource type="Resource" path="res://fish/species/milkfish/milkfish.tres" id="193_milkfish"] +[ext_resource type="Resource" path="res://fish/species/roosterfish/roosterfish.tres" id="194_roosterfish"] +[ext_resource type="Resource" path="res://fish/species/tarpon_atlantic/tarpon_atlantic.tres" id="195_tarpon_atlantic"] +[ext_resource type="Resource" path="res://fish/species/snook_common/snook_common.tres" id="196_snook_common"] +[ext_resource type="Resource" path="res://fish/species/bonefish/bonefish.tres" id="197_bonefish"] +[ext_resource type="Resource" path="res://fish/species/pompano_florida/pompano_florida.tres" id="198_pompano_florida"] +[ext_resource type="Resource" path="res://fish/species/ladyfish/ladyfish.tres" id="199_ladyfish"] +[ext_resource type="Resource" path="res://fish/species/permit/permit.tres" id="200_permit"] +[ext_resource type="Resource" path="res://fish/species/whale_blue/whale_blue.tres" id="201_whale_blue"] +[ext_resource type="Resource" path="res://fish/species/dolphin_bottlenose/dolphin_bottlenose.tres" id="202_dolphin_bottlenose"] +[ext_resource type="Resource" path="res://fish/species/whale_humpback/whale_humpback.tres" id="203_whale_humpback"] +[ext_resource type="Resource" path="res://fish/species/whale_killer/whale_killer.tres" id="204_whale_killer"] +[ext_resource type="Resource" path="res://fish/species/whale_sperm/whale_sperm.tres" id="205_whale_sperm"] [resource] script = ExtResource("1_pool") -candidates = [ExtResource("2_bass"), ExtResource("3_sunfish"), ExtResource("4_tuna_albacore"), ExtResource("5_tuna_bigeye"), ExtResource("6_tuna_bluefin"), ExtResource("7_tuna_skipjack"), ExtResource("8_tuna_yellowfin"), ExtResource("9_salmon_atlantic"), ExtResource("10_salmon_chum"), ExtResource("11_salmon_coho"), ExtResource("12_salmon_pink"), ExtResource("13_salmon_sockeye"), ExtResource("14_anchovy_european"), ExtResource("15_anchovy_northern"), ExtResource("16_grouper_gulf"), ExtResource("17_grouper_red"), ExtResource("18_mackerel_atlantic"), ExtResource("19_mackerel_cero"), ExtResource("20_mackerel_chub"), ExtResource("21_mackerel_king"), ExtResource("22_mackerel_spanish"), ExtResource("23_marlin_black"), ExtResource("24_marlin_blue"), ExtResource("25_marlin_white"), ExtResource("26_pomfret_black"), ExtResource("27_pomfret_chinese"), ExtResource("28_pomfret_golden"), ExtResource("29_pomfret_white"), ExtResource("30_sailfish"), ExtResource("31_snapper_lane"), ExtResource("32_snapper_mangrove"), ExtResource("33_snapper_mutton"), ExtResource("34_snapper_red"), ExtResource("35_swordfish")] +candidates = [ExtResource("2_mudskipper_atlantic"), ExtResource("3_mullet_red"), ExtResource("4_plaice_european"), ExtResource("5_flounder_summer"), ExtResource("6_flounder_winter"), ExtResource("7_dugong"), ExtResource("8_seal_harbor"), ExtResource("9_sea_otter"), ExtResource("10_walrus"), ExtResource("11_manatee_west_indian"), ExtResource("12_pipefish_bay"), ExtResource("13_seahorse_lined"), ExtResource("14_monkfish"), ExtResource("15_tripletail"), ExtResource("16_mackerel_atlantic"), ExtResource("17_bluefish"), ExtResource("18_mackerel_cero"), ExtResource("19_mackerel_chub"), ExtResource("20_jack_crevalle"), ExtResource("21_mackerel_king"), ExtResource("22_mackerel_spanish"), ExtResource("23_queenfish_talang"), ExtResource("24_sand_lance_american"), ExtResource("25_menhaden_atlantic"), ExtResource("26_pomfret_black"), ExtResource("27_pomfret_chinese"), ExtResource("28_anchovy_european"), ExtResource("29_sardine_european"), ExtResource("30_pomfret_golden"), ExtResource("31_anchovy_northern"), ExtResource("32_sardine_pacific"), ExtResource("33_pomfret_white"), ExtResource("34_shark_blacktip"), ExtResource("35_shark_great_hammerhead"), ExtResource("36_shark_great_white"), ExtResource("37_shark_tiger"), ExtResource("38_shark_whale"), ExtResource("39_wolffish_atlantic"), ExtResource("40_cusk"), ExtResource("41_wolffish_spotted"), ExtResource("42_herring_atlantic"), ExtResource("43_capelin"), ExtResource("44_sprat_european"), ExtResource("45_herring_pacific"), ExtResource("46_pollock_alaska"), ExtResource("47_cod_atlantic"), ExtResource("48_pollock_atlantic"), ExtResource("49_sole_dover"), ExtResource("50_haddock"), ExtResource("51_cod_pacific"), ExtResource("52_hake_pacific"), ExtResource("53_hake_silver"), ExtResource("54_nautilus_chambered"), ExtResource("55_cuttlefish_common"), ExtResource("56_cuttlefish_flamboyant"), ExtResource("57_tilefish_blueline"), ExtResource("58_tilefish_golden"), ExtResource("59_ocean_perch_pacific"), ExtResource("60_sea_bass_chilean"), ExtResource("61_sablefish"), ExtResource("62_wreckfish"), ExtResource("63_oarfish_giant"), ExtResource("64_coelacanth_west_indian"), ExtResource("65_anglerfish_black_seadevil"), ExtResource("66_fangtooth_common"), ExtResource("67_gulper_eel"), ExtResource("68_barreleye_pacific"), ExtResource("69_blobfish_smooth_head"), ExtResource("70_lanternfish_spotted"), ExtResource("71_sea_star_crown_of_thorns"), ExtResource("72_sea_cucumber_giant_california"), ExtResource("73_urchin_purple"), ExtResource("74_sand_dollar"), ExtResource("75_sea_star_sunflower"), ExtResource("76_jelly_crystal"), ExtResource("77_jelly_lions_mane"), ExtResource("78_jelly_moon"), ExtResource("79_jelly_pacific_sea_nettle"), ExtResource("80_jelly_sea_wasp"), ExtResource("81_pompano_african"), ExtResource("82_cobia"), ExtResource("83_trevally_giant"), ExtResource("84_amberjack_greater"), ExtResource("85_amberjack_lesser"), ExtResource("86_halibut_atlantic"), ExtResource("87_halibut_pacific"), ExtResource("88_turbot"), ExtResource("89_lobster_american"), ExtResource("90_krill_antarctic"), ExtResource("91_lobster_caribbean_spiny"), ExtResource("92_shrimp_peacock_mantis"), ExtResource("93_shrimp_skunk_cleaner"), ExtResource("94_crab_japanese_spider"), ExtResource("95_crab_red_king"), ExtResource("96_salmon_atlantic"), ExtResource("97_salmon_chum"), ExtResource("98_salmon_coho"), ExtResource("99_salmon_pink"), ExtResource("100_salmon_sockeye"), ExtResource("101_marlin_black"), ExtResource("102_marlin_blue"), ExtResource("103_sailfish"), ExtResource("104_swordfish"), ExtResource("105_marlin_white"), ExtResource("106_mahi_mahi"), ExtResource("107_opah"), ExtResource("108_wahoo"), ExtResource("109_tuna_albacore"), ExtResource("110_tuna_bigeye"), ExtResource("111_tuna_bluefin"), ExtResource("112_tuna_skipjack"), ExtResource("113_tuna_yellowfin"), ExtResource("114_octopus_common"), ExtResource("115_octopus_day"), ExtResource("116_octopus_giant_pacific"), ExtResource("117_octopus_greater_blue_ringed"), ExtResource("118_sunfish"), ExtResource("119_skate_barndoor"), ExtResource("120_manta_ray_giant"), ExtResource("121_sawfish_largetooth"), ExtResource("122_stingray_southern"), ExtResource("123_lionfish_red"), ExtResource("124_scorpionfish_red"), ExtResource("125_moray_green"), ExtResource("126_flounder_peacock"), ExtResource("127_surgeonfish_blue"), ExtResource("128_parrotfish_rainbow"), ExtResource("129_parrotfish_stoplight"), ExtResource("130_tang_yellow"), ExtResource("131_trumpetfish_atlantic"), ExtResource("132_triggerfish_gray"), ExtResource("133_pufferfish_guineafowl"), ExtResource("134_cowfish_longhorn"), ExtResource("135_triggerfish_queen"), ExtResource("136_cornetfish_red"), ExtResource("137_porcupinefish_spotted"), ExtResource("138_boxfish_yellow"), ExtResource("139_butterflyfish_copperband"), ExtResource("140_clownfish_ocellaris"), ExtResource("141_angelfish_queen"), ExtResource("142_grouper_atlantic_goliath"), ExtResource("143_trevally_bluefin"), ExtResource("144_grouper_giant"), ExtResource("145_barracuda_great"), ExtResource("146_grouper_gulf"), ExtResource("147_grouper_nassau"), ExtResource("148_grouper_red"), ExtResource("149_chromis_blue_green"), ExtResource("150_grunt_bluestriped"), ExtResource("151_grunt_french"), ExtResource("152_damselfish_sergeant_major"), ExtResource("153_snapper_lane"), ExtResource("154_snapper_mangrove"), ExtResource("155_snapper_mutton"), ExtResource("156_snapper_red"), ExtResource("157_wrasse_ballan"), ExtResource("158_wrasse_cleaner"), ExtResource("159_hogfish"), ExtResource("160_turtle_green"), ExtResource("161_turtle_hawksbill"), ExtResource("162_turtle_leatherback"), ExtResource("163_turtle_loggerhead"), ExtResource("164_seadragon_leafy"), ExtResource("165_seadragon_weedy"), ExtResource("166_oyster_black_lip_pearl"), ExtResource("167_clam_giant"), ExtResource("168_clam_geoduck"), ExtResource("169_conch_queen"), ExtResource("170_abalone_red"), ExtResource("171_squid_bigfin_reef"), ExtResource("172_squid_colossal"), ExtResource("173_squid_giant"), ExtResource("174_squid_humboldt"), ExtResource("175_halfbeak_ballyhoo"), ExtResource("176_needlefish_hound"), ExtResource("177_flyingfish_tropical"), ExtResource("178_bass"), ExtResource("179_croaker_atlantic"), ExtResource("180_black_drum"), ExtResource("181_red_drum"), ExtResource("182_mullet_striped"), ExtResource("183_weakfish"), ExtResource("184_croaker_yellowfin"), ExtResource("185_rockfish_black"), ExtResource("186_sea_bass_black"), ExtResource("187_rockfish_canary"), ExtResource("188_porgy_scup"), ExtResource("189_sheepshead"), ExtResource("190_tautog"), ExtResource("191_rockfish_yelloweye"), ExtResource("192_lingcod"), ExtResource("193_milkfish"), ExtResource("194_roosterfish"), ExtResource("195_tarpon_atlantic"), ExtResource("196_snook_common"), ExtResource("197_bonefish"), ExtResource("198_pompano_florida"), ExtResource("199_ladyfish"), ExtResource("200_permit"), ExtResource("201_whale_blue"), ExtResource("202_dolphin_bottlenose"), ExtResource("203_whale_humpback"), ExtResource("204_whale_killer"), ExtResource("205_whale_sperm")] diff --git a/fish/pools/starter_pond_pool.tres b/fish/pools/starter_pond_pool.tres index f7976fc..e9718d9 100644 --- a/fish/pools/starter_pond_pool.tres +++ b/fish/pools/starter_pond_pool.tres @@ -1,33 +1,113 @@ -[gd_resource type="Resource" load_steps=28 format=3] +[gd_resource type="Resource" load_steps=108 format=3] [ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"] -[ext_resource type="Resource" path="res://fish/species/bluegill/bluegill.tres" id="2_bluegill"] -[ext_resource type="Resource" path="res://fish/species/carp/carp.tres" id="3_carp"] -[ext_resource type="Resource" path="res://fish/species/catfish_blue/catfish_blue.tres" id="4_catfish_blue"] -[ext_resource type="Resource" path="res://fish/species/catfish_channel/catfish_channel.tres" id="5_catfish_channel"] -[ext_resource type="Resource" path="res://fish/species/catfish_flathead/catfish_flathead.tres" id="6_catfish_flathead"] -[ext_resource type="Resource" path="res://fish/species/catfish_white/catfish_white.tres" id="7_catfish_white"] -[ext_resource type="Resource" path="res://fish/species/goby_round/goby_round.tres" id="8_goby_round"] -[ext_resource type="Resource" path="res://fish/species/chub_european/chub_european.tres" id="9_chub_european"] -[ext_resource type="Resource" path="res://fish/species/chub_flame/chub_flame.tres" id="10_chub_flame"] -[ext_resource type="Resource" path="res://fish/species/chub_lake/chub_lake.tres" id="11_chub_lake"] -[ext_resource type="Resource" path="res://fish/species/goldfish/goldfish.tres" id="12_goldfish"] -[ext_resource type="Resource" path="res://fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres" id="13_goldfish_bubbleeye"] -[ext_resource type="Resource" path="res://fish/species/sauger/sauger.tres" id="14_sauger"] -[ext_resource type="Resource" path="res://fish/species/saugeye/saugeye.tres" id="15_saugeye"] -[ext_resource type="Resource" path="res://fish/species/trout_cutthroat/trout_cutthroat.tres" id="16_trout_cutthroat"] -[ext_resource type="Resource" path="res://fish/species/trout_golden/trout_golden.tres" id="17_trout_golden"] -[ext_resource type="Resource" path="res://fish/species/trout_rainbow/trout_rainbow.tres" id="18_trout_rainbow"] -[ext_resource type="Resource" path="res://fish/species/trout_steelhead/trout_steelhead.tres" id="19_trout_steelhead"] -[ext_resource type="Resource" path="res://fish/species/walleye/walleye.tres" id="20_walleye"] -[ext_resource type="Resource" path="res://fish/species/bowfin/bowfin.tres" id="21_bowfin"] -[ext_resource type="Resource" path="res://fish/species/sturgeon_lake/sturgeon_lake.tres" id="22_sturgeon_lake"] -[ext_resource type="Resource" path="res://fish/species/gar_longnose/gar_longnose.tres" id="23_gar_longnose"] -[ext_resource type="Resource" path="res://fish/species/paddlefish/paddlefish.tres" id="24_paddlefish"] -[ext_resource type="Resource" path="res://fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres" id="25_sturgeon_shovelnose"] -[ext_resource type="Resource" path="res://fish/species/gar_spotted/gar_spotted.tres" id="26_gar_spotted"] -[ext_resource type="Resource" path="res://fish/species/lungfish_west_african/lungfish_west_african.tres" id="27_lungfish_west_african"] +[ext_resource type="Resource" path="res://fish/species/bowfin/bowfin.tres" id="2_bowfin"] +[ext_resource type="Resource" path="res://fish/species/gar_spotted/gar_spotted.tres" id="3_gar_spotted"] +[ext_resource type="Resource" path="res://fish/species/lungfish_west_african/lungfish_west_african.tres" id="4_lungfish_west_african"] +[ext_resource type="Resource" path="res://fish/species/guppy/guppy.tres" id="5_guppy"] +[ext_resource type="Resource" path="res://fish/species/tetra_neon/tetra_neon.tres" id="6_tetra_neon"] +[ext_resource type="Resource" path="res://fish/species/danio_zebra/danio_zebra.tres" id="7_danio_zebra"] +[ext_resource type="Resource" path="res://fish/species/largemouth_bass/largemouth_bass.tres" id="8_largemouth_bass"] +[ext_resource type="Resource" path="res://fish/species/bullhead_black/bullhead_black.tres" id="9_bullhead_black"] +[ext_resource type="Resource" path="res://fish/species/bullhead_brown/bullhead_brown.tres" id="10_bullhead_brown"] +[ext_resource type="Resource" path="res://fish/species/catfish_channel/catfish_channel.tres" id="11_catfish_channel"] +[ext_resource type="Resource" path="res://fish/species/catfish_white/catfish_white.tres" id="12_catfish_white"] +[ext_resource type="Resource" path="res://fish/species/bullhead_yellow/bullhead_yellow.tres" id="13_bullhead_yellow"] +[ext_resource type="Resource" path="res://fish/species/carp/carp.tres" id="14_carp"] +[ext_resource type="Resource" path="res://fish/species/roach_common/roach_common.tres" id="15_roach_common"] +[ext_resource type="Resource" path="res://fish/species/rudd/rudd.tres" id="16_rudd"] +[ext_resource type="Resource" path="res://fish/species/tench/tench.tres" id="17_tench"] +[ext_resource type="Resource" path="res://fish/species/crayfish_red_swamp/crayfish_red_swamp.tres" id="18_crayfish_red_swamp"] +[ext_resource type="Resource" path="res://fish/species/minnow_fathead/minnow_fathead.tres" id="19_minnow_fathead"] +[ext_resource type="Resource" path="res://fish/species/shiner_golden/shiner_golden.tres" id="20_shiner_golden"] +[ext_resource type="Resource" path="res://fish/species/loach_weather/loach_weather.tres" id="21_loach_weather"] +[ext_resource type="Resource" path="res://fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres" id="22_goldfish_bubbleeye"] +[ext_resource type="Resource" path="res://fish/species/goldfish/goldfish.tres" id="23_goldfish"] +[ext_resource type="Resource" path="res://fish/species/koi/koi.tres" id="24_koi"] +[ext_resource type="Resource" path="res://fish/species/crappie_black/crappie_black.tres" id="25_crappie_black"] +[ext_resource type="Resource" path="res://fish/species/bluegill/bluegill.tres" id="26_bluegill"] +[ext_resource type="Resource" path="res://fish/species/green_sunfish/green_sunfish.tres" id="27_green_sunfish"] +[ext_resource type="Resource" path="res://fish/species/pumpkinseed/pumpkinseed.tres" id="28_pumpkinseed"] +[ext_resource type="Resource" path="res://fish/species/redear_sunfish/redear_sunfish.tres" id="29_redear_sunfish"] +[ext_resource type="Resource" path="res://fish/species/warmouth/warmouth.tres" id="30_warmouth"] +[ext_resource type="Resource" path="res://fish/species/pickerel_chain/pickerel_chain.tres" id="31_pickerel_chain"] +[ext_resource type="Resource" path="res://fish/species/pickerel_grass/pickerel_grass.tres" id="32_pickerel_grass"] +[ext_resource type="Resource" path="res://fish/species/betta_siamese/betta_siamese.tres" id="33_betta_siamese"] +[ext_resource type="Resource" path="res://fish/species/catfish_walking/catfish_walking.tres" id="34_catfish_walking"] +[ext_resource type="Resource" path="res://fish/species/sturgeon_lake/sturgeon_lake.tres" id="35_sturgeon_lake"] +[ext_resource type="Resource" path="res://fish/species/burbot/burbot.tres" id="36_burbot"] +[ext_resource type="Resource" path="res://fish/species/cisco/cisco.tres" id="37_cisco"] +[ext_resource type="Resource" path="res://fish/species/whitefish_lake/whitefish_lake.tres" id="38_whitefish_lake"] +[ext_resource type="Resource" path="res://fish/species/char_arctic/char_arctic.tres" id="39_char_arctic"] +[ext_resource type="Resource" path="res://fish/species/trout_golden/trout_golden.tres" id="40_trout_golden"] +[ext_resource type="Resource" path="res://fish/species/axolotl/axolotl.tres" id="41_axolotl"] +[ext_resource type="Resource" path="res://fish/species/bream_common/bream_common.tres" id="42_bream_common"] +[ext_resource type="Resource" path="res://fish/species/muskellunge/muskellunge.tres" id="43_muskellunge"] +[ext_resource type="Resource" path="res://fish/species/shiner_emerald/shiner_emerald.tres" id="44_shiner_emerald"] +[ext_resource type="Resource" path="res://fish/species/chub_lake/chub_lake.tres" id="45_chub_lake"] +[ext_resource type="Resource" path="res://fish/species/crappie_white/crappie_white.tres" id="46_crappie_white"] +[ext_resource type="Resource" path="res://fish/species/yellow_perch/yellow_perch.tres" id="47_yellow_perch"] +[ext_resource type="Resource" path="res://fish/species/pike_northern/pike_northern.tres" id="48_pike_northern"] +[ext_resource type="Resource" path="res://fish/species/saugeye/saugeye.tres" id="49_saugeye"] +[ext_resource type="Resource" path="res://fish/species/walleye/walleye.tres" id="50_walleye"] +[ext_resource type="Resource" path="res://fish/species/goby_round/goby_round.tres" id="51_goby_round"] +[ext_resource type="Resource" path="res://fish/species/smelt_rainbow/smelt_rainbow.tres" id="52_smelt_rainbow"] +[ext_resource type="Resource" path="res://fish/species/gourami_giant/gourami_giant.tres" id="53_gourami_giant"] +[ext_resource type="Resource" path="res://fish/species/tilapia_nile/tilapia_nile.tres" id="54_tilapia_nile"] +[ext_resource type="Resource" path="res://fish/species/gar_longnose/gar_longnose.tres" id="55_gar_longnose"] +[ext_resource type="Resource" path="res://fish/species/paddlefish/paddlefish.tres" id="56_paddlefish"] +[ext_resource type="Resource" path="res://fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres" id="57_sturgeon_shovelnose"] +[ext_resource type="Resource" path="res://fish/species/foureyes_largescale/foureyes_largescale.tres" id="58_foureyes_largescale"] +[ext_resource type="Resource" path="res://fish/species/grayling_arctic/grayling_arctic.tres" id="59_grayling_arctic"] +[ext_resource type="Resource" path="res://fish/species/trout_brown/trout_brown.tres" id="60_trout_brown"] +[ext_resource type="Resource" path="res://fish/species/trout_cutthroat/trout_cutthroat.tres" id="61_trout_cutthroat"] +[ext_resource type="Resource" path="res://fish/species/trout_rainbow/trout_rainbow.tres" id="62_trout_rainbow"] +[ext_resource type="Resource" path="res://fish/species/hellbender/hellbender.tres" id="63_hellbender"] +[ext_resource type="Resource" path="res://fish/species/smallmouth_bass/smallmouth_bass.tres" id="64_smallmouth_bass"] +[ext_resource type="Resource" path="res://fish/species/buffalo_bigmouth/buffalo_bigmouth.tres" id="65_buffalo_bigmouth"] +[ext_resource type="Resource" path="res://fish/species/redhorse_golden/redhorse_golden.tres" id="66_redhorse_golden"] +[ext_resource type="Resource" path="res://fish/species/quillback/quillback.tres" id="67_quillback"] +[ext_resource type="Resource" path="res://fish/species/buffalo_smallmouth/buffalo_smallmouth.tres" id="68_buffalo_smallmouth"] +[ext_resource type="Resource" path="res://fish/species/sucker_white/sucker_white.tres" id="69_sucker_white"] +[ext_resource type="Resource" path="res://fish/species/catfish_blue/catfish_blue.tres" id="70_catfish_blue"] +[ext_resource type="Resource" path="res://fish/species/catfish_flathead/catfish_flathead.tres" id="71_catfish_flathead"] +[ext_resource type="Resource" path="res://fish/species/madtom_tadpole/madtom_tadpole.tres" id="72_madtom_tadpole"] +[ext_resource type="Resource" path="res://fish/species/barbel_common/barbel_common.tres" id="73_barbel_common"] +[ext_resource type="Resource" path="res://fish/species/chub_european/chub_european.tres" id="74_chub_european"] +[ext_resource type="Resource" path="res://fish/species/fallfish/fallfish.tres" id="75_fallfish"] +[ext_resource type="Resource" path="res://fish/species/ide/ide.tres" id="76_ide"] +[ext_resource type="Resource" path="res://fish/species/gar_alligator/gar_alligator.tres" id="77_gar_alligator"] +[ext_resource type="Resource" path="res://fish/species/arapaima/arapaima.tres" id="78_arapaima"] +[ext_resource type="Resource" path="res://fish/species/tigerfish_goliath/tigerfish_goliath.tres" id="79_tigerfish_goliath"] +[ext_resource type="Resource" path="res://fish/species/shiner_common/shiner_common.tres" id="80_shiner_common"] +[ext_resource type="Resource" path="res://fish/species/chub_creek/chub_creek.tres" id="81_chub_creek"] +[ext_resource type="Resource" path="res://fish/species/chub_flame/chub_flame.tres" id="82_chub_flame"] +[ext_resource type="Resource" path="res://fish/species/electric_eel/electric_eel.tres" id="83_electric_eel"] +[ext_resource type="Resource" path="res://fish/species/freshwater_drum/freshwater_drum.tres" id="84_freshwater_drum"] +[ext_resource type="Resource" path="res://fish/species/goldeye/goldeye.tres" id="85_goldeye"] +[ext_resource type="Resource" path="res://fish/species/mooneye/mooneye.tres" id="86_mooneye"] +[ext_resource type="Resource" path="res://fish/species/sauger/sauger.tres" id="87_sauger"] +[ext_resource type="Resource" path="res://fish/species/eel_american/eel_american.tres" id="88_eel_american"] +[ext_resource type="Resource" path="res://fish/species/eel_european/eel_european.tres" id="89_eel_european"] +[ext_resource type="Resource" path="res://fish/species/smelt_eulachon/smelt_eulachon.tres" id="90_smelt_eulachon"] +[ext_resource type="Resource" path="res://fish/species/sturgeon_white/sturgeon_white.tres" id="91_sturgeon_white"] +[ext_resource type="Resource" path="res://fish/species/trout_steelhead/trout_steelhead.tres" id="92_trout_steelhead"] +[ext_resource type="Resource" path="res://fish/species/stingray_ocellate_river/stingray_ocellate_river.tres" id="93_stingray_ocellate_river"] +[ext_resource type="Resource" path="res://fish/species/white_perch/white_perch.tres" id="94_white_perch"] +[ext_resource type="Resource" path="res://fish/species/barramundi/barramundi.tres" id="95_barramundi"] +[ext_resource type="Resource" path="res://fish/species/knifefish_clown/knifefish_clown.tres" id="96_knifefish_clown"] +[ext_resource type="Resource" path="res://fish/species/loach_clown/loach_clown.tres" id="97_loach_clown"] +[ext_resource type="Resource" path="res://fish/species/discus/discus.tres" id="98_discus"] +[ext_resource type="Resource" path="res://fish/species/angelfish_freshwater/angelfish_freshwater.tres" id="99_angelfish_freshwater"] +[ext_resource type="Resource" path="res://fish/species/oscar/oscar.tres" id="100_oscar"] +[ext_resource type="Resource" path="res://fish/species/tambaqui/tambaqui.tres" id="101_tambaqui"] +[ext_resource type="Resource" path="res://fish/species/snakehead_giant/snakehead_giant.tres" id="102_snakehead_giant"] +[ext_resource type="Resource" path="res://fish/species/dorado_golden/dorado_golden.tres" id="103_dorado_golden"] +[ext_resource type="Resource" path="res://fish/species/mahseer_golden/mahseer_golden.tres" id="104_mahseer_golden"] +[ext_resource type="Resource" path="res://fish/species/peacock_bass/peacock_bass.tres" id="105_peacock_bass"] +[ext_resource type="Resource" path="res://fish/species/piranha_red_bellied/piranha_red_bellied.tres" id="106_piranha_red_bellied"] +[ext_resource type="Resource" path="res://fish/species/arowana_silver/arowana_silver.tres" id="107_arowana_silver"] [resource] script = ExtResource("1_pool") -candidates = [ExtResource("2_bluegill"), ExtResource("3_carp"), ExtResource("4_catfish_blue"), ExtResource("5_catfish_channel"), ExtResource("6_catfish_flathead"), ExtResource("7_catfish_white"), ExtResource("8_goby_round"), ExtResource("9_chub_european"), ExtResource("10_chub_flame"), ExtResource("11_chub_lake"), ExtResource("12_goldfish"), ExtResource("13_goldfish_bubbleeye"), ExtResource("14_sauger"), ExtResource("15_saugeye"), ExtResource("16_trout_cutthroat"), ExtResource("17_trout_golden"), ExtResource("18_trout_rainbow"), ExtResource("19_trout_steelhead"), ExtResource("20_walleye"), ExtResource("21_bowfin"), ExtResource("22_sturgeon_lake"), ExtResource("23_gar_longnose"), ExtResource("24_paddlefish"), ExtResource("25_sturgeon_shovelnose"), ExtResource("26_gar_spotted"), ExtResource("27_lungfish_west_african")] +candidates = [ExtResource("2_bowfin"), ExtResource("3_gar_spotted"), ExtResource("4_lungfish_west_african"), ExtResource("5_guppy"), ExtResource("6_tetra_neon"), ExtResource("7_danio_zebra"), ExtResource("8_largemouth_bass"), ExtResource("9_bullhead_black"), ExtResource("10_bullhead_brown"), ExtResource("11_catfish_channel"), ExtResource("12_catfish_white"), ExtResource("13_bullhead_yellow"), ExtResource("14_carp"), ExtResource("15_roach_common"), ExtResource("16_rudd"), ExtResource("17_tench"), ExtResource("18_crayfish_red_swamp"), ExtResource("19_minnow_fathead"), ExtResource("20_shiner_golden"), ExtResource("21_loach_weather"), ExtResource("22_goldfish_bubbleeye"), ExtResource("23_goldfish"), ExtResource("24_koi"), ExtResource("25_crappie_black"), ExtResource("26_bluegill"), ExtResource("27_green_sunfish"), ExtResource("28_pumpkinseed"), ExtResource("29_redear_sunfish"), ExtResource("30_warmouth"), ExtResource("31_pickerel_chain"), ExtResource("32_pickerel_grass"), ExtResource("33_betta_siamese"), ExtResource("34_catfish_walking"), ExtResource("35_sturgeon_lake"), ExtResource("36_burbot"), ExtResource("37_cisco"), ExtResource("38_whitefish_lake"), ExtResource("39_char_arctic"), ExtResource("40_trout_golden"), ExtResource("41_axolotl"), ExtResource("42_bream_common"), ExtResource("43_muskellunge"), ExtResource("44_shiner_emerald"), ExtResource("45_chub_lake"), ExtResource("46_crappie_white"), ExtResource("47_yellow_perch"), ExtResource("48_pike_northern"), ExtResource("49_saugeye"), ExtResource("50_walleye"), ExtResource("51_goby_round"), ExtResource("52_smelt_rainbow"), ExtResource("53_gourami_giant"), ExtResource("54_tilapia_nile"), ExtResource("55_gar_longnose"), ExtResource("56_paddlefish"), ExtResource("57_sturgeon_shovelnose"), ExtResource("58_foureyes_largescale"), ExtResource("59_grayling_arctic"), ExtResource("60_trout_brown"), ExtResource("61_trout_cutthroat"), ExtResource("62_trout_rainbow"), ExtResource("63_hellbender"), ExtResource("64_smallmouth_bass"), ExtResource("65_buffalo_bigmouth"), ExtResource("66_redhorse_golden"), ExtResource("67_quillback"), ExtResource("68_buffalo_smallmouth"), ExtResource("69_sucker_white"), ExtResource("70_catfish_blue"), ExtResource("71_catfish_flathead"), ExtResource("72_madtom_tadpole"), ExtResource("73_barbel_common"), ExtResource("74_chub_european"), ExtResource("75_fallfish"), ExtResource("76_ide"), ExtResource("77_gar_alligator"), ExtResource("78_arapaima"), ExtResource("79_tigerfish_goliath"), ExtResource("80_shiner_common"), ExtResource("81_chub_creek"), ExtResource("82_chub_flame"), ExtResource("83_electric_eel"), ExtResource("84_freshwater_drum"), ExtResource("85_goldeye"), ExtResource("86_mooneye"), ExtResource("87_sauger"), ExtResource("88_eel_american"), ExtResource("89_eel_european"), ExtResource("90_smelt_eulachon"), ExtResource("91_sturgeon_white"), ExtResource("92_trout_steelhead"), ExtResource("93_stingray_ocellate_river"), ExtResource("94_white_perch"), ExtResource("95_barramundi"), ExtResource("96_knifefish_clown"), ExtResource("97_loach_clown"), ExtResource("98_discus"), ExtResource("99_angelfish_freshwater"), ExtResource("100_oscar"), ExtResource("101_tambaqui"), ExtResource("102_snakehead_giant"), ExtResource("103_dorado_golden"), ExtResource("104_mahseer_golden"), ExtResource("105_peacock_bass"), ExtResource("106_piranha_red_bellied"), ExtResource("107_arowana_silver")] diff --git a/fish/species/abalone_red/abalone_red.tres b/fish/species/abalone_red/abalone_red.tres index f454905..6efe784 100644 --- a/fish/species/abalone_red/abalone_red.tres +++ b/fish/species/abalone_red/abalone_red.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"abalone_red" display_name = "red abalone" -active = false +active = true catalog_number = 6405 collection_group = &"Shellfish" logbook_fact = "red abalones cling to pacific rocks with broad muscular feet. rows of shell holes release water that has passed over the gills." @@ -28,3 +29,4 @@ weight_max_lb = 12.0 sell_value_min = 24 sell_value_max = 56 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/amberjack_greater/amberjack_greater.tres b/fish/species/amberjack_greater/amberjack_greater.tres index 2a7c794..b0e40b8 100644 --- a/fish/species/amberjack_greater/amberjack_greater.tres +++ b/fish/species/amberjack_greater/amberjack_greater.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"amberjack_greater" display_name = "greater amberjack" -active = false +active = true catalog_number = 3604 collection_group = &"Large coastal predators" logbook_fact = "greater amberjacks circle reefs, wrecks, and offshore platforms. a dark stripe crosses the eye of their sturdy torpedo-shaped bodies." @@ -26,3 +27,4 @@ weight_max_lb = 90.0 sell_value_min = 15 sell_value_max = 42 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/amberjack_lesser/amberjack_lesser.tres b/fish/species/amberjack_lesser/amberjack_lesser.tres index 0f82f2f..1d5983c 100644 --- a/fish/species/amberjack_lesser/amberjack_lesser.tres +++ b/fish/species/amberjack_lesser/amberjack_lesser.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"amberjack_lesser" display_name = "lesser amberjack" -active = false +active = true catalog_number = 3605 collection_group = &"Large coastal predators" logbook_fact = "lesser amberjacks school around deep reefs and floating objects. an enlarged eye suits their preference for dimmer water." @@ -26,3 +27,4 @@ weight_max_lb = 20.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/anchovy_european/anchovy_european.tres b/fish/species/anchovy_european/anchovy_european.tres index 4e442e7..0a7d122 100644 --- a/fish/species/anchovy_european/anchovy_european.tres +++ b/fish/species/anchovy_european/anchovy_european.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://debgohfsg4ec7" path="res://fish/species/anchovy_european/fish_anchovy_european.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/805.png" id="4_texture"] [sub_resource type="Resource" id="AnchovyEuropeanAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/anchovy_northern/anchovy_northern.tres b/fish/species/anchovy_northern/anchovy_northern.tres index 37c52f7..e2c7fa0 100644 --- a/fish/species/anchovy_northern/anchovy_northern.tres +++ b/fish/species/anchovy_northern/anchovy_northern.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://6sikqc8eivta" path="res://fish/species/anchovy_northern/fish_anchovy_northern.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/808.png" id="4_texture"] [sub_resource type="Resource" id="AnchovyNorthernAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/angelfish_freshwater/angelfish_freshwater.tres b/fish/species/angelfish_freshwater/angelfish_freshwater.tres index 63d818b..7a58450 100644 --- a/fish/species/angelfish_freshwater/angelfish_freshwater.tres +++ b/fish/species/angelfish_freshwater/angelfish_freshwater.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"angelfish_freshwater" display_name = "freshwater angelfish" -active = false +active = true catalog_number = 7504 collection_group = &"Tropical freshwater fish" logbook_fact = "freshwater angelfish slip between tall plants on narrow triangular bodies. long fins and vertical bars resemble stems and shadows." @@ -27,3 +28,4 @@ weight_max_lb = 0.5 sell_value_min = 10 sell_value_max = 22 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/angelfish_queen/angelfish_queen.tres b/fish/species/angelfish_queen/angelfish_queen.tres index 70706d8..5a15f5b 100644 --- a/fish/species/angelfish_queen/angelfish_queen.tres +++ b/fish/species/angelfish_queen/angelfish_queen.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"angelfish_queen" display_name = "queen angelfish" -active = false +active = true catalog_number = 5703 collection_group = &"Reef ornamentals" logbook_fact = "queen angelfish graze sponges from warm atlantic reefs. a blue-ringed spot on the forehead resembles a tiny crown." @@ -27,3 +28,4 @@ weight_max_lb = 2.0 sell_value_min = 11 sell_value_max = 25 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres b/fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres index 4ac947e..83b1fb3 100644 --- a/fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres +++ b/fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"anglerfish_black_seadevil" display_name = "black seadevil" -active = false +active = true catalog_number = 1801 collection_group = &"Deep-sea oddities" logbook_fact = "black seadevils lure prey with a glowing organ suspended above the mouth. tiny males permanently attach to much larger females." @@ -27,3 +28,4 @@ weight_max_lb = 2.0 sell_value_min = 48 sell_value_max = 105 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/arapaima/arapaima.tres b/fish/species/arapaima/arapaima.tres index 6561920..b43e3bd 100644 --- a/fish/species/arapaima/arapaima.tres +++ b/fish/species/arapaima/arapaima.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"arapaima" display_name = "arapaima" -active = false +active = true catalog_number = 2702 collection_group = &"Freshwater giants" logbook_fact = "arapaima must surface frequently to gulp air through a specialized swim bladder. large armored scales protect their long river-going bodies." @@ -27,3 +28,4 @@ weight_max_lb = 400.0 sell_value_min = 60 sell_value_max = 140 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/arowana_silver/arowana_silver.tres b/fish/species/arowana_silver/arowana_silver.tres index 054b94d..42baf33 100644 --- a/fish/species/arowana_silver/arowana_silver.tres +++ b/fish/species/arowana_silver/arowana_silver.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"arowana_silver" display_name = "silver arowana" -active = false +active = true catalog_number = 7606 collection_group = &"Tropical freshwater predators" logbook_fact = "silver arowanas patrol the surface with upturned mouths and long bodies. powerful jumps capture insects and small animals above the water." @@ -28,3 +29,4 @@ weight_max_lb = 15.0 sell_value_min = 25 sell_value_max = 56 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/axolotl/axolotl.tres b/fish/species/axolotl/axolotl.tres index f67de61..c201f9c 100644 --- a/fish/species/axolotl/axolotl.tres +++ b/fish/species/axolotl/axolotl.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"axolotl" display_name = "axolotl" -active = false +active = true catalog_number = 2001 collection_group = &"Freshwater amphibians" logbook_fact = "axolotls remain aquatic and keep feathery external gills throughout adulthood. lost limbs and parts of several organs can regenerate." @@ -28,3 +29,4 @@ weight_max_lb = 0.7 sell_value_min = 36 sell_value_max = 78 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/barbel_common/barbel_common.tres b/fish/species/barbel_common/barbel_common.tres index 4e1711b..9cbafff 100644 --- a/fish/species/barbel_common/barbel_common.tres +++ b/fish/species/barbel_common/barbel_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"barbel_common" display_name = "common barbel" -active = false +active = true catalog_number = 2501 collection_group = &"Freshwater coarse fish" logbook_fact = "common barbels hold close to fast river bottoms with streamlined bodies and broad fins. four mouth barbels locate food among stones." @@ -28,3 +29,4 @@ weight_max_lb = 25.0 sell_value_min = 13 sell_value_max = 31 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/barracuda_great/barracuda_great.tres b/fish/species/barracuda_great/barracuda_great.tres index 0039cef..f15092c 100644 --- a/fish/species/barracuda_great/barracuda_great.tres +++ b/fish/species/barracuda_great/barracuda_great.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"barracuda_great" display_name = "great barracuda" -active = false +active = true catalog_number = 5804 collection_group = &"Reef predators" logbook_fact = "great barracudas hover motionless before accelerating toward prey. long jaws carry two distinct rows of sharp teeth." @@ -28,3 +29,4 @@ weight_max_lb = 80.0 sell_value_min = 28 sell_value_max = 65 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/barramundi/barramundi.tres b/fish/species/barramundi/barramundi.tres index 0b98fe4..705001d 100644 --- a/fish/species/barramundi/barramundi.tres +++ b/fish/species/barramundi/barramundi.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"barramundi" display_name = "barramundi" -active = false +active = true catalog_number = 7302 collection_group = &"Tropical estuary" logbook_fact = "barramundi move between rivers and coasts and can breathe in low-oxygen water. many mature first as males and later become females." @@ -28,3 +29,4 @@ weight_max_lb = 45.0 sell_value_min = 15 sell_value_max = 38 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/barreleye_pacific/barreleye_pacific.tres b/fish/species/barreleye_pacific/barreleye_pacific.tres index d1d9fc8..c0705dd 100644 --- a/fish/species/barreleye_pacific/barreleye_pacific.tres +++ b/fish/species/barreleye_pacific/barreleye_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"barreleye_pacific" display_name = "Pacific barreleye" -active = false +active = true catalog_number = 1804 collection_group = &"Deep-sea oddities" logbook_fact = "pacific barreleyes peer upward through transparent shields covering the head. tubular eyes rotate forward when the fish turns to feed." @@ -28,3 +29,4 @@ weight_max_lb = 2.5 sell_value_min = 42 sell_value_max = 88 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bass/bass.tres b/fish/species/bass/bass.tres index eeb6df5..9d52609 100644 --- a/fish/species/bass/bass.tres +++ b/fish/species/bass/bass.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://dvh6s86asl4ix" path="res://fish/species/bass/fish_bass_striped.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="BassAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/betta_siamese/betta_siamese.tres b/fish/species/betta_siamese/betta_siamese.tres index 276ecfb..4c9ca3c 100644 --- a/fish/species/betta_siamese/betta_siamese.tres +++ b/fish/species/betta_siamese/betta_siamese.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/7508.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"betta_siamese" display_name = "Siamese fighting fish" -active = false +active = true catalog_number = 7508 collection_group = &"Tropical freshwater fish" logbook_fact = "siamese fighting fish breathe surface air with a labyrinth organ. males build bubble nests and guard the eggs beneath them." @@ -28,3 +29,4 @@ weight_max_lb = 0.15 sell_value_min = 5 sell_value_max = 10 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/black_drum/black_drum.tres b/fish/species/black_drum/black_drum.tres index 46d7db4..b542327 100644 --- a/fish/species/black_drum/black_drum.tres +++ b/fish/species/black_drum/black_drum.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"black_drum" display_name = "black drum" -active = false +active = true catalog_number = 6802 collection_group = &"Temperate estuary" logbook_fact = "black drum crush oysters and crabs with rounded throat teeth. large adults develop dark vertical bars that fade with age." @@ -27,3 +28,4 @@ weight_max_lb = 70.0 sell_value_min = 8 sell_value_max = 27 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/blobfish_smooth_head/blobfish_smooth_head.tres b/fish/species/blobfish_smooth_head/blobfish_smooth_head.tres index 41846aa..4245304 100644 --- a/fish/species/blobfish_smooth_head/blobfish_smooth_head.tres +++ b/fish/species/blobfish_smooth_head/blobfish_smooth_head.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"blobfish_smooth_head" display_name = "smooth-head blobfish" -active = false +active = true catalog_number = 1805 collection_group = &"Deep-sea oddities" logbook_fact = "smooth-head blobfish rest on deep slopes where pressure supports their soft bodies. they conserve energy by waiting for edible matter nearby." @@ -28,3 +29,4 @@ weight_max_lb = 5.0 sell_value_min = 42 sell_value_max = 90 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bluefish/bluefish.tres b/fish/species/bluefish/bluefish.tres index f36c898..d8888f7 100644 --- a/fish/species/bluefish/bluefish.tres +++ b/fish/species/bluefish/bluefish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"bluefish" display_name = "bluefish" -active = false +active = true catalog_number = 702 collection_group = &"Coastal pelagic fish" logbook_fact = "bluefish race in coordinated schools while pursuing smaller fish. sharp teeth and powerful jaws make their feeding bursts especially fierce." @@ -27,3 +28,4 @@ weight_max_lb = 25.0 sell_value_min = 7 sell_value_max = 19 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bluegill/bluegill.tres b/fish/species/bluegill/bluegill.tres index e32fdcb..181b969 100644 --- a/fish/species/bluegill/bluegill.tres +++ b/fish/species/bluegill/bluegill.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Resource" path="res://fish/day_availability.tres" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/bluegill/fish_bluegill.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3102.png" id="4_texture"] [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/bonefish/bonefish.tres b/fish/species/bonefish/bonefish.tres index fe4def7..b2949d2 100644 --- a/fish/species/bonefish/bonefish.tres +++ b/fish/species/bonefish/bonefish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"bonefish" display_name = "bonefish" -active = false +active = true catalog_number = 7401 collection_group = &"Tropical flats fish" logbook_fact = "bonefish sweep tropical flats in silvery schools and root for buried prey. their speed and pale bodies make them difficult to follow in shallow water." @@ -28,3 +29,4 @@ weight_max_lb = 15.0 sell_value_min = 13 sell_value_max = 31 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bowfin/bowfin.tres b/fish/species/bowfin/bowfin.tres index dc76fd9..7b2881f 100644 --- a/fish/species/bowfin/bowfin.tres +++ b/fish/species/bowfin/bowfin.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/bowfin/bowfin.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/101.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/boxfish_yellow/boxfish_yellow.tres b/fish/species/boxfish_yellow/boxfish_yellow.tres index 040e8fc..aeda5ad 100644 --- a/fish/species/boxfish_yellow/boxfish_yellow.tres +++ b/fish/species/boxfish_yellow/boxfish_yellow.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"boxfish_yellow" display_name = "yellow boxfish" -active = false +active = true catalog_number = 5608 collection_group = &"Reef oddities" logbook_fact = "yellow boxfish juveniles are bright cubes covered in black spots. rigid body armor leaves small fins to provide careful steering." @@ -27,3 +28,4 @@ weight_max_lb = 0.8 sell_value_min = 10 sell_value_max = 22 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bream_common/bream_common.tres b/fish/species/bream_common/bream_common.tres index 38d9015..cc44fef 100644 --- a/fish/species/bream_common/bream_common.tres +++ b/fish/species/bream_common/bream_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2502.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"bream_common" display_name = "common bream" -active = false +active = true catalog_number = 2502 collection_group = &"Freshwater coarse fish" logbook_fact = "common bream gather in slow rivers and lakes with silvery, deep-sided bodies. protruding mouths sift insect larvae from soft bottoms." @@ -26,3 +27,4 @@ weight_max_lb = 15.0 sell_value_min = 4 sell_value_max = 12 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/buffalo_bigmouth/buffalo_bigmouth.tres b/fish/species/buffalo_bigmouth/buffalo_bigmouth.tres index 6292951..bae0473 100644 --- a/fish/species/buffalo_bigmouth/buffalo_bigmouth.tres +++ b/fish/species/buffalo_bigmouth/buffalo_bigmouth.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"buffalo_bigmouth" display_name = "bigmouth buffalo" -active = false +active = true catalog_number = 2301 collection_group = &"Freshwater bottom fish" logbook_fact = "bigmouth buffalo filter plankton with fine gill rakers instead of rooting for prey. some individuals survive for more than a century." @@ -27,3 +28,4 @@ weight_max_lb = 80.0 sell_value_min = 28 sell_value_max = 63 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/buffalo_smallmouth/buffalo_smallmouth.tres b/fish/species/buffalo_smallmouth/buffalo_smallmouth.tres index d590ec6..2756035 100644 --- a/fish/species/buffalo_smallmouth/buffalo_smallmouth.tres +++ b/fish/species/buffalo_smallmouth/buffalo_smallmouth.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"buffalo_smallmouth" display_name = "smallmouth buffalo" -active = false +active = true catalog_number = 2304 collection_group = &"Freshwater bottom fish" logbook_fact = "smallmouth buffalo use thick lips to graze bottom-dwelling food in warm rivers. their deep, heavy bodies form a pronounced arch behind the head." @@ -26,3 +27,4 @@ weight_max_lb = 45.0 sell_value_min = 14 sell_value_max = 34 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bullhead_black/bullhead_black.tres b/fish/species/bullhead_black/bullhead_black.tres index f10fa87..1d904bd 100644 --- a/fish/species/bullhead_black/bullhead_black.tres +++ b/fish/species/bullhead_black/bullhead_black.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"bullhead_black" display_name = "black bullhead" -active = false +active = true catalog_number = 2401 collection_group = &"Freshwater catfish" logbook_fact = "black bullheads tolerate warm, cloudy water with little oxygen. stout spines protect the dorsal and pectoral fins from predators." @@ -27,3 +28,4 @@ weight_max_lb = 6.0 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bullhead_brown/bullhead_brown.tres b/fish/species/bullhead_brown/bullhead_brown.tres index a2c81f9..b3651b2 100644 --- a/fish/species/bullhead_brown/bullhead_brown.tres +++ b/fish/species/bullhead_brown/bullhead_brown.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"bullhead_brown" display_name = "brown bullhead" -active = false +active = true catalog_number = 2403 collection_group = &"Freshwater catfish" logbook_fact = "brown bullheads search muddy bottoms with eight sensitive barbels. males guard nests and herd newly hatched young in a dark moving ball." @@ -27,3 +28,4 @@ weight_max_lb = 4.0 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/bullhead_yellow/bullhead_yellow.tres b/fish/species/bullhead_yellow/bullhead_yellow.tres index b00df0d..4dce589 100644 --- a/fish/species/bullhead_yellow/bullhead_yellow.tres +++ b/fish/species/bullhead_yellow/bullhead_yellow.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"bullhead_yellow" display_name = "yellow bullhead" -active = false +active = true catalog_number = 2408 collection_group = &"Freshwater catfish" logbook_fact = "yellow bullheads use pale chin barbels to distinguish food in murky shallows. both parents may guard the nest and schooling young." @@ -28,3 +29,4 @@ weight_max_lb = 3.5 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/burbot/burbot.tres b/fish/species/burbot/burbot.tres index 189f076..e46006c 100644 --- a/fish/species/burbot/burbot.tres +++ b/fish/species/burbot/burbot.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"burbot" display_name = "burbot" -active = false +active = true catalog_number = 1001 collection_group = &"Cold freshwater fish" logbook_fact = "burbot are the only freshwater members of the cod family. they become most active in cold darkness and may spawn beneath winter ice." @@ -28,3 +29,4 @@ weight_max_lb = 18.0 sell_value_min = 12 sell_value_max = 28 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/butterflyfish_copperband/butterflyfish_copperband.tres b/fish/species/butterflyfish_copperband/butterflyfish_copperband.tres index 8ef5d2e..7a7c112 100644 --- a/fish/species/butterflyfish_copperband/butterflyfish_copperband.tres +++ b/fish/species/butterflyfish_copperband/butterflyfish_copperband.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"butterflyfish_copperband" display_name = "copperband butterflyfish" -active = false +active = true catalog_number = 5701 collection_group = &"Reef ornamentals" logbook_fact = "copperband butterflyfish probe reef cracks with long narrow snouts. bold orange bands and a false eyespot confuse predators." @@ -28,3 +29,4 @@ weight_max_lb = 0.4 sell_value_min = 9 sell_value_max = 21 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/capelin/capelin.tres b/fish/species/capelin/capelin.tres index 7f1b9ba..5759cb8 100644 --- a/fish/species/capelin/capelin.tres +++ b/fish/species/capelin/capelin.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"capelin" display_name = "capelin" -active = false +active = true catalog_number = 1302 collection_group = &"Cold schooling fish" logbook_fact = "capelin are small polar fish that feed whales, seabirds, and larger fish. many schools roll onto beaches or shallows to release their eggs." @@ -27,3 +28,4 @@ weight_max_lb = 0.2 sell_value_min = 4 sell_value_max = 8 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/carp/carp.tres b/fish/species/carp/carp.tres index 37cff52..24b50e7 100644 --- a/fish/species/carp/carp.tres +++ b/fish/species/carp/carp.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/carp_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://c6pa1gqwv1a5s" path="res://fish/species/carp/fish_carp_common.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="CarpAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/catfish_blue/catfish_blue.tres b/fish/species/catfish_blue/catfish_blue.tres index 595db08..8df5866 100644 --- a/fish/species/catfish_blue/catfish_blue.tres +++ b/fish/species/catfish_blue/catfish_blue.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://7f1dtcou8moe" path="res://fish/species/catfish_blue/fish_catfish_blue.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="BlueCatfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/catfish_channel/catfish_channel.tres b/fish/species/catfish_channel/catfish_channel.tres index 5d265ef..e72fdb0 100644 --- a/fish/species/catfish_channel/catfish_channel.tres +++ b/fish/species/catfish_channel/catfish_channel.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://dvxpk2ltt3blb" path="res://fish/species/catfish_channel/fish_catfish_channel.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="ChannelCatfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/catfish_flathead/catfish_flathead.tres b/fish/species/catfish_flathead/catfish_flathead.tres index b4df9d5..de0e5f6 100644 --- a/fish/species/catfish_flathead/catfish_flathead.tres +++ b/fish/species/catfish_flathead/catfish_flathead.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bacx63lp0yh7t" path="res://fish/species/catfish_flathead/fish_catfish_flathead.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="FlatheadCatfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/catfish_walking/catfish_walking.tres b/fish/species/catfish_walking/catfish_walking.tres index c0de099..fe36cee 100644 --- a/fish/species/catfish_walking/catfish_walking.tres +++ b/fish/species/catfish_walking/catfish_walking.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"catfish_walking" display_name = "walking catfish" -active = false +active = true catalog_number = 7510 collection_group = &"Tropical freshwater fish" logbook_fact = "walking catfish wriggle across wet ground using stiff pectoral spines for support. an air-breathing organ helps them survive the journey." @@ -28,3 +29,4 @@ weight_max_lb = 5.0 sell_value_min = 11 sell_value_max = 24 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/catfish_white/catfish_white.tres b/fish/species/catfish_white/catfish_white.tres index 4612c4f..86b799f 100644 --- a/fish/species/catfish_white/catfish_white.tres +++ b/fish/species/catfish_white/catfish_white.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bf6kiawwekv7g" path="res://fish/species/catfish_white/fish_catfish_white.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="WhiteCatfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/char_arctic/char_arctic.tres b/fish/species/char_arctic/char_arctic.tres index 85bcac1..17d08d1 100644 --- a/fish/species/char_arctic/char_arctic.tres +++ b/fish/species/char_arctic/char_arctic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"char_arctic" display_name = "arctic char" -active = false +active = true catalog_number = 1101 collection_group = &"Cold freshwater salmonids" logbook_fact = "arctic char thrive farther north than any other freshwater fish. some remain in lakes while others migrate between rivers and the sea." @@ -27,3 +28,4 @@ weight_max_lb = 25.0 sell_value_min = 14 sell_value_max = 32 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/chromis_blue_green/chromis_blue_green.tres b/fish/species/chromis_blue_green/chromis_blue_green.tres index cec319e..65f35b4 100644 --- a/fish/species/chromis_blue_green/chromis_blue_green.tres +++ b/fish/species/chromis_blue_green/chromis_blue_green.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/5901.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"chromis_blue_green" display_name = "blue-green chromis" -active = false +active = true catalog_number = 5901 collection_group = &"Reef schooling fish" logbook_fact = "blue-green chromis form loose clouds above branching coral. the school dives into narrow shelter whenever a predator approaches." @@ -27,3 +28,4 @@ weight_max_lb = 0.25 sell_value_min = 2 sell_value_max = 4 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/chub_creek/chub_creek.tres b/fish/species/chub_creek/chub_creek.tres index acd5351..778e9da 100644 --- a/fish/species/chub_creek/chub_creek.tres +++ b/fish/species/chub_creek/chub_creek.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2802.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"chub_creek" display_name = "creek chub" -active = false +active = true catalog_number = 2802 collection_group = &"Freshwater minnows" logbook_fact = "creek chubs gather around pools and undercut banks in small streams. males build gravel ridges where several fish may spawn." @@ -27,3 +28,4 @@ weight_max_lb = 0.8 sell_value_min = 2 sell_value_max = 4 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/chub_european/chub_european.tres b/fish/species/chub_european/chub_european.tres index aded2f7..16f43a1 100644 --- a/fish/species/chub_european/chub_european.tres +++ b/fish/species/chub_european/chub_european.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://c04wtbyslmpll" path="res://fish/species/chub_european/fish_chub_european.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2505.png" id="4_texture"] [sub_resource type="Resource" id="ChubEuropeanAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/chub_flame/chub_flame.tres b/fish/species/chub_flame/chub_flame.tres index 941c734..2bf815c 100644 --- a/fish/species/chub_flame/chub_flame.tres +++ b/fish/species/chub_flame/chub_flame.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bla6pc21imxsi" path="res://fish/species/chub_flame/fish_chub_flame.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="ChubFlameAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/chub_lake/chub_lake.tres b/fish/species/chub_lake/chub_lake.tres index 788df16..1dc2d9a 100644 --- a/fish/species/chub_lake/chub_lake.tres +++ b/fish/species/chub_lake/chub_lake.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://w8cjrpnv350h" path="res://fish/species/chub_lake/fish_chub_lake.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2807.png" id="4_texture"] [sub_resource type="Resource" id="ChubLakeAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/cisco/cisco.tres b/fish/species/cisco/cisco.tres index 2a91382..1bc53b0 100644 --- a/fish/species/cisco/cisco.tres +++ b/fish/species/cisco/cisco.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"cisco" display_name = "cisco" -active = false +active = true catalog_number = 1002 collection_group = &"Cold freshwater fish" logbook_fact = "cisco school in the cool open water of northern lakes. these slim relatives of salmon feed on plankton and become prey for larger fish." @@ -27,3 +28,4 @@ weight_max_lb = 3.0 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/clam_geoduck/clam_geoduck.tres b/fish/species/clam_geoduck/clam_geoduck.tres index 5add347..492113c 100644 --- a/fish/species/clam_geoduck/clam_geoduck.tres +++ b/fish/species/clam_geoduck/clam_geoduck.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"clam_geoduck" display_name = "Pacific geoduck" -active = false +active = true catalog_number = 6403 collection_group = &"Shellfish" logbook_fact = "pacific geoducks bury their shells deep while a long siphon reaches the seafloor. these clams can survive for well over a century." @@ -28,3 +29,4 @@ weight_max_lb = 15.0 sell_value_min = 14 sell_value_max = 34 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/clam_giant/clam_giant.tres b/fish/species/clam_giant/clam_giant.tres index cf31a65..2b4f59d 100644 --- a/fish/species/clam_giant/clam_giant.tres +++ b/fish/species/clam_giant/clam_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"clam_giant" display_name = "giant clam" -active = false +active = true catalog_number = 6402 collection_group = &"Shellfish" logbook_fact = "giant clams host photosynthetic algae inside brightly colored mantles. heavy shells remain anchored to one reef spot throughout adulthood." @@ -28,3 +29,4 @@ weight_max_lb = 500.0 sell_value_min = 28 sell_value_max = 72 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/clam_manila/clam_manila.tres b/fish/species/clam_manila/clam_manila.tres index 20e3f8a..2b3fe73 100644 --- a/fish/species/clam_manila/clam_manila.tres +++ b/fish/species/clam_manila/clam_manila.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] -[ext_resource type="Texture2D" path="res://fish/species/clam_manila/clam_manila.png" id="3_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6406.png" id="3_texture"] [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/clownfish_ocellaris/clownfish_ocellaris.tres b/fish/species/clownfish_ocellaris/clownfish_ocellaris.tres index ac9a95e..16566cb 100644 --- a/fish/species/clownfish_ocellaris/clownfish_ocellaris.tres +++ b/fish/species/clownfish_ocellaris/clownfish_ocellaris.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/5702.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"clownfish_ocellaris" display_name = "ocellaris clownfish" -active = false +active = true catalog_number = 5702 collection_group = &"Reef ornamentals" logbook_fact = "ocellaris clownfish shelter safely among stinging anemone tentacles. each group is led by a female that develops from the largest male." @@ -27,3 +28,4 @@ weight_max_lb = 0.15 sell_value_min = 5 sell_value_max = 10 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cobia/cobia.tres b/fish/species/cobia/cobia.tres index 1cde907..51dec82 100644 --- a/fish/species/cobia/cobia.tres +++ b/fish/species/cobia/cobia.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"cobia" display_name = "cobia" -active = false +active = true catalog_number = 3602 collection_group = &"Large coastal predators" logbook_fact = "cobia often follow sharks, rays, and floating structures in warm seas. a broad dark stripe runs along their long, powerful bodies." @@ -27,3 +28,4 @@ weight_max_lb = 80.0 sell_value_min = 15 sell_value_max = 40 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cod_atlantic/cod_atlantic.tres b/fish/species/cod_atlantic/cod_atlantic.tres index e799724..640ccaa 100644 --- a/fish/species/cod_atlantic/cod_atlantic.tres +++ b/fish/species/cod_atlantic/cod_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"cod_atlantic" display_name = "atlantic cod" -active = false +active = true catalog_number = 1402 collection_group = &"Cold shelf fish" logbook_fact = "atlantic cod carry a pale lateral line and one chin barbel. they search cold seafloors for crustaceans, mollusks, and smaller fish." @@ -26,3 +27,4 @@ weight_max_lb = 55.0 sell_value_min = 5 sell_value_max = 18 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cod_pacific/cod_pacific.tres b/fish/species/cod_pacific/cod_pacific.tres index 89eb39f..729acc1 100644 --- a/fish/species/cod_pacific/cod_pacific.tres +++ b/fish/species/cod_pacific/cod_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"cod_pacific" display_name = "pacific cod" -active = false +active = true catalog_number = 1406 collection_group = &"Cold shelf fish" logbook_fact = "pacific cod use a chin barbel to investigate cold shelf bottoms. seasonal schools follow prey between deeper water and coastal spawning grounds." @@ -26,3 +27,4 @@ weight_max_lb = 45.0 sell_value_min = 5 sell_value_max = 17 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/coelacanth_west_indian/coelacanth_west_indian.tres b/fish/species/coelacanth_west_indian/coelacanth_west_indian.tres index 3da9f04..8b7bf18 100644 --- a/fish/species/coelacanth_west_indian/coelacanth_west_indian.tres +++ b/fish/species/coelacanth_west_indian/coelacanth_west_indian.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"coelacanth_west_indian" display_name = "West Indian Ocean coelacanth" -active = false +active = true catalog_number = 1702 collection_group = &"Deep-sea legends" logbook_fact = "west indian ocean coelacanths shelter in deep volcanic caves by day. fleshy lobed fins move in an alternating, limb-like rhythm." @@ -28,3 +29,4 @@ weight_max_lb = 200.0 sell_value_min = 65 sell_value_max = 145 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/conch_queen/conch_queen.tres b/fish/species/conch_queen/conch_queen.tres index bac9eb6..045012b 100644 --- a/fish/species/conch_queen/conch_queen.tres +++ b/fish/species/conch_queen/conch_queen.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"conch_queen" display_name = "queen conch" -active = false +active = true catalog_number = 6404 collection_group = &"Shellfish" logbook_fact = "queen conchs graze algae with a long flexible snout. adults develop a broad flared shell lip and move by vaulting on one muscular foot." @@ -28,3 +29,4 @@ weight_max_lb = 5.0 sell_value_min = 15 sell_value_max = 36 sell_value_curve = 0.91 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cornetfish_red/cornetfish_red.tres b/fish/species/cornetfish_red/cornetfish_red.tres index 600d189..ea750bd 100644 --- a/fish/species/cornetfish_red/cornetfish_red.tres +++ b/fish/species/cornetfish_red/cornetfish_red.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"cornetfish_red" display_name = "red cornetfish" -active = false +active = true catalog_number = 5606 collection_group = &"Reef oddities" logbook_fact = "red cornetfish stalk reefs with extremely long bodies and tubular snouts. a trailing filament extends from the center of the tail." @@ -28,3 +29,4 @@ weight_max_lb = 4.0 sell_value_min = 24 sell_value_max = 55 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cowfish_longhorn/cowfish_longhorn.tres b/fish/species/cowfish_longhorn/cowfish_longhorn.tres index 8d3e4b2..2a848a7 100644 --- a/fish/species/cowfish_longhorn/cowfish_longhorn.tres +++ b/fish/species/cowfish_longhorn/cowfish_longhorn.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"cowfish_longhorn" display_name = "longhorn cowfish" -active = false +active = true catalog_number = 5604 collection_group = &"Reef oddities" logbook_fact = "longhorn cowfish wear a rigid box of fused scales with horns above the eyes. small fins steer the angular body with surprising precision." @@ -28,3 +29,4 @@ weight_max_lb = 2.0 sell_value_min = 23 sell_value_max = 52 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/crab_blue/crab_blue.tres b/fish/species/crab_blue/crab_blue.tres index 2ee3279..b715522 100644 --- a/fish/species/crab_blue/crab_blue.tres +++ b/fish/species/crab_blue/crab_blue.tres @@ -1,9 +1,11 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3902.png" id="99_creature_texture"] + [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") allow_night = false @@ -12,7 +14,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"crab_blue" display_name = "blue crab" -active = false +active = true catalog_number = 3902 collection_group = &"Marine crabs" logbook_fact = "blue crabs swim with flattened rear legs shaped like paddles. bright blue claws and an olive shell conceal a quick, defensive temperament." @@ -30,3 +32,5 @@ weight_max_lb = 1.1 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.95 + +display_texture = ExtResource("99_creature_texture") diff --git a/fish/species/crab_brown/crab_brown.tres b/fish/species/crab_brown/crab_brown.tres index 8f31b9c..7dec427 100644 --- a/fish/species/crab_brown/crab_brown.tres +++ b/fish/species/crab_brown/crab_brown.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] -[ext_resource type="Texture2D" path="res://fish/species/crab_brown/crab_brown.png" id="3_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3906.png" id="3_texture"] [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/crab_japanese_spider/crab_japanese_spider.tres b/fish/species/crab_japanese_spider/crab_japanese_spider.tres index d09f4cd..33ffbff 100644 --- a/fish/species/crab_japanese_spider/crab_japanese_spider.tres +++ b/fish/species/crab_japanese_spider/crab_japanese_spider.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"crab_japanese_spider" display_name = "Japanese spider crab" -active = false +active = true catalog_number = 3904 collection_group = &"Marine crabs" logbook_fact = "japanese spider crabs carry the longest leg span of any living arthropod. adults roam deep seafloors around japan." @@ -27,3 +28,4 @@ weight_max_lb = 44.0 sell_value_min = 38 sell_value_max = 88 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/crab_red_king/crab_red_king.tres b/fish/species/crab_red_king/crab_red_king.tres index 3a1a326..c82579a 100644 --- a/fish/species/crab_red_king/crab_red_king.tres +++ b/fish/species/crab_red_king/crab_red_king.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"crab_red_king" display_name = "red king crab" -active = false +active = true catalog_number = 3905 collection_group = &"Marine crabs" logbook_fact = "red king crabs stride over cold northern bottoms on long armored legs. despite the name, they are closer to hermit crabs than true crabs." @@ -28,3 +29,4 @@ weight_max_lb = 24.0 sell_value_min = 24 sell_value_max = 58 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/crappie_black/crappie_black.tres b/fish/species/crappie_black/crappie_black.tres index bfa949b..0359a2c 100644 --- a/fish/species/crappie_black/crappie_black.tres +++ b/fish/species/crappie_black/crappie_black.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"crappie_black" display_name = "black crappie" -active = false +active = true catalog_number = 3101 collection_group = &"Freshwater panfish" logbook_fact = "black crappie gather around submerged wood and vegetation in clear water. irregular dark speckles scatter across their deep silver bodies." @@ -27,3 +28,4 @@ weight_max_lb = 4.0 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/crappie_white/crappie_white.tres b/fish/species/crappie_white/crappie_white.tres index 021000b..6766f1e 100644 --- a/fish/species/crappie_white/crappie_white.tres +++ b/fish/species/crappie_white/crappie_white.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3107.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"crappie_white" display_name = "white crappie" -active = false +active = true catalog_number = 3107 collection_group = &"Freshwater panfish" logbook_fact = "white crappie favor warm, cloudy water and gather around structure. vertical bars cross their silver sides instead of scattered speckles." @@ -27,3 +28,4 @@ weight_max_lb = 4.5 sell_value_min = 4 sell_value_max = 9 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/crayfish_red_swamp/crayfish_red_swamp.tres b/fish/species/crayfish_red_swamp/crayfish_red_swamp.tres index c3bd2df..6c055d2 100644 --- a/fish/species/crayfish_red_swamp/crayfish_red_swamp.tres +++ b/fish/species/crayfish_red_swamp/crayfish_red_swamp.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2601.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"crayfish_red_swamp" display_name = "red swamp crayfish" -active = false +active = true catalog_number = 2601 collection_group = &"Freshwater crustaceans" logbook_fact = "red swamp crayfish burrow into wet ground when water recedes. adaptable populations feed on plants, carrion, and small aquatic animals." @@ -28,3 +29,4 @@ weight_max_lb = 0.25 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/croaker_atlantic/croaker_atlantic.tres b/fish/species/croaker_atlantic/croaker_atlantic.tres index b8ebf09..d0fb147 100644 --- a/fish/species/croaker_atlantic/croaker_atlantic.tres +++ b/fish/species/croaker_atlantic/croaker_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6801.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"croaker_atlantic" display_name = "atlantic croaker" -active = false +active = true catalog_number = 6801 collection_group = &"Temperate estuary" logbook_fact = "atlantic croakers vibrate muscles against the swim bladder to make a croaking sound. chin barbels locate worms in sandy bays." @@ -28,3 +29,4 @@ weight_max_lb = 5.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/croaker_yellowfin/croaker_yellowfin.tres b/fish/species/croaker_yellowfin/croaker_yellowfin.tres index e2a6105..1e282da 100644 --- a/fish/species/croaker_yellowfin/croaker_yellowfin.tres +++ b/fish/species/croaker_yellowfin/croaker_yellowfin.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6807.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"croaker_yellowfin" display_name = "yellowfin croaker" -active = false +active = true catalog_number = 6807 collection_group = &"Temperate estuary" logbook_fact = "yellowfin croakers search sandy surf zones with a small chin barbel. internal muscles produce croaks and drumming calls." @@ -26,3 +27,4 @@ weight_max_lb = 4.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cusk/cusk.tres b/fish/species/cusk/cusk.tres index 6e69dd6..b223ba1 100644 --- a/fish/species/cusk/cusk.tres +++ b/fish/species/cusk/cusk.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"cusk" display_name = "cusk" -active = false +active = true catalog_number = 1202 collection_group = &"Cold reef fish" logbook_fact = "cusk move slowly across cold rocky bottoms, sheltering in cracks and caves. a single long fin runs around much of the rear body." @@ -27,3 +28,4 @@ weight_max_lb = 30.0 sell_value_min = 7 sell_value_max = 19 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cuttlefish_common/cuttlefish_common.tres b/fish/species/cuttlefish_common/cuttlefish_common.tres index f6b678a..c1ef5ec 100644 --- a/fish/species/cuttlefish_common/cuttlefish_common.tres +++ b/fish/species/cuttlefish_common/cuttlefish_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"cuttlefish_common" display_name = "common cuttlefish" -active = false +active = true catalog_number = 1502 collection_group = &"Cuttlefish and nautiluses" logbook_fact = "common cuttlefish flash changing colors and patterns through specialized skin cells. an internal cuttlebone controls buoyancy." @@ -27,3 +28,4 @@ weight_max_lb = 12.0 sell_value_min = 7 sell_value_max = 17 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres b/fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres index 1af0669..496ade9 100644 --- a/fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres +++ b/fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"cuttlefish_flamboyant" display_name = "flamboyant cuttlefish" -active = false +active = true catalog_number = 1503 collection_group = &"Cuttlefish and nautiluses" logbook_fact = "flamboyant cuttlefish walk along the seafloor on their arms and fins. vivid displays warn predators of potent toxins." @@ -28,3 +29,4 @@ weight_max_lb = 0.4 sell_value_min = 26 sell_value_max = 58 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres b/fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres index 0e605c0..b758404 100644 --- a/fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres +++ b/fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/5904.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"damselfish_sergeant_major" display_name = "sergeant major" -active = false +active = true catalog_number = 5904 collection_group = &"Reef schooling fish" logbook_fact = "sergeant majors guard purple egg patches on hard reef surfaces. five dark bars cross their yellow and silver bodies." @@ -27,3 +28,4 @@ weight_max_lb = 0.5 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/danio_zebra/danio_zebra.tres b/fish/species/danio_zebra/danio_zebra.tres index 285687e..0f73935 100644 --- a/fish/species/danio_zebra/danio_zebra.tres +++ b/fish/species/danio_zebra/danio_zebra.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"danio_zebra" display_name = "zebrafish" -active = false +active = true catalog_number = 2103 collection_group = &"Freshwater aquarium fish" logbook_fact = "zebrafish carry horizontal blue stripes from gill to tail. hardy schools thrive in shallow streams, flooded fields, and quiet pools." @@ -27,3 +28,4 @@ weight_max_lb = 0.12 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/discus/discus.tres b/fish/species/discus/discus.tres index 4fcd169..9803f77 100644 --- a/fish/species/discus/discus.tres +++ b/fish/species/discus/discus.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"discus" display_name = "discus" -active = false +active = true catalog_number = 7503 collection_group = &"Tropical freshwater fish" logbook_fact = "discus move through quiet amazon backwaters with round, flattened bodies. parents feed newly hatched young with nutrient-rich skin mucus." @@ -28,3 +29,4 @@ weight_max_lb = 1.0 sell_value_min = 24 sell_value_max = 52 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/dolphin_bottlenose/dolphin_bottlenose.tres b/fish/species/dolphin_bottlenose/dolphin_bottlenose.tres index abbc37f..2b410ea 100644 --- a/fish/species/dolphin_bottlenose/dolphin_bottlenose.tres +++ b/fish/species/dolphin_bottlenose/dolphin_bottlenose.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"dolphin_bottlenose" display_name = "common bottlenose dolphin" -active = false +active = true catalog_number = 7702 collection_group = &"Whales and dolphins" logbook_fact = "common bottlenose dolphins coordinate with whistles, clicks, and body signals. echolocation reveals prey hidden in dark or cloudy water." @@ -28,3 +29,4 @@ weight_max_lb = 1400.0 sell_value_min = 75 sell_value_max = 180 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/dorado_golden/dorado_golden.tres b/fish/species/dorado_golden/dorado_golden.tres index 4110ebe..e22f7c9 100644 --- a/fish/species/dorado_golden/dorado_golden.tres +++ b/fish/species/dorado_golden/dorado_golden.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"dorado_golden" display_name = "golden dorado" -active = false +active = true catalog_number = 7602 collection_group = &"Tropical freshwater predators" logbook_fact = "golden dorado chase fish through powerful south american rivers. muscular tails, heavy jaws, and golden scales suit life in fast current." @@ -28,3 +29,4 @@ weight_max_lb = 55.0 sell_value_min = 29 sell_value_max = 66 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/dugong/dugong.tres b/fish/species/dugong/dugong.tres index 3225a52..0c81d2e 100644 --- a/fish/species/dugong/dugong.tres +++ b/fish/species/dugong/dugong.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"dugong" display_name = "dugong" -active = false +active = true catalog_number = 501 collection_group = &"Coastal marine mammals" logbook_fact = "dugongs graze seagrass meadows with a downturned, bristled snout. they are the only fully marine members of the sirenian family." @@ -28,3 +29,4 @@ weight_max_lb = 1100.0 sell_value_min = 72 sell_value_max = 165 sell_value_curve = 0.77 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/eel_american/eel_american.tres b/fish/species/eel_american/eel_american.tres index b1f4b8e..a433afa 100644 --- a/fish/species/eel_american/eel_american.tres +++ b/fish/species/eel_american/eel_american.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"eel_american" display_name = "american eel" -active = false +active = true catalog_number = 4001 collection_group = &"Migratory eels" logbook_fact = "american eels hatch far out in the sargasso sea before entering freshwater rivers. adults later reverse the journey to spawn once." @@ -28,3 +29,4 @@ weight_max_lb = 8.0 sell_value_min = 12 sell_value_max = 27 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/eel_european/eel_european.tres b/fish/species/eel_european/eel_european.tres index 4ef5246..7683d92 100644 --- a/fish/species/eel_european/eel_european.tres +++ b/fish/species/eel_european/eel_european.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"eel_european" display_name = "european eel" -active = false +active = true catalog_number = 4002 collection_group = &"Migratory eels" logbook_fact = "european eels cross the atlantic as transparent larvae before entering rivers and lakes. mature silver eels return to sea to reproduce." @@ -28,3 +29,4 @@ weight_max_lb = 10.0 sell_value_min = 13 sell_value_max = 30 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/electric_eel/electric_eel.tres b/fish/species/electric_eel/electric_eel.tres index 7792d81..ef5b6df 100644 --- a/fish/species/electric_eel/electric_eel.tres +++ b/fish/species/electric_eel/electric_eel.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"electric_eel" display_name = "electric eel" -active = false +active = true catalog_number = 2901 collection_group = &"Freshwater oddities" logbook_fact = "electric eels navigate and hunt with electrical pulses produced along most of the body. they must surface regularly to breathe air." @@ -28,3 +29,4 @@ weight_max_lb = 44.0 sell_value_min = 25 sell_value_max = 60 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/fallfish/fallfish.tres b/fish/species/fallfish/fallfish.tres index 02c6bbe..53ef7b6 100644 --- a/fish/species/fallfish/fallfish.tres +++ b/fish/species/fallfish/fallfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"fallfish" display_name = "fallfish" -active = false +active = true catalog_number = 2506 collection_group = &"Freshwater coarse fish" logbook_fact = "fallfish are large minnows that build broad stone nests in flowing water. other stream fish often reuse the gravel mounds for spawning." @@ -28,3 +29,4 @@ weight_max_lb = 3.5 sell_value_min = 5 sell_value_max = 10 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/fangtooth_common/fangtooth_common.tres b/fish/species/fangtooth_common/fangtooth_common.tres index c7312b0..1004279 100644 --- a/fish/species/fangtooth_common/fangtooth_common.tres +++ b/fish/species/fangtooth_common/fangtooth_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"fangtooth_common" display_name = "common fangtooth" -active = false +active = true catalog_number = 1802 collection_group = &"Deep-sea oddities" logbook_fact = "common fangtooths carry outsized teeth that fit into pockets in the roof of the mouth. they migrate upward from deep water after dark." @@ -27,3 +28,4 @@ weight_max_lb = 0.5 sell_value_min = 25 sell_value_max = 56 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/flounder_peacock/flounder_peacock.tres b/fish/species/flounder_peacock/flounder_peacock.tres index 50bd7dc..3d096df 100644 --- a/fish/species/flounder_peacock/flounder_peacock.tres +++ b/fish/species/flounder_peacock/flounder_peacock.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"flounder_peacock" display_name = "peacock flounder" -active = false +active = true catalog_number = 5401 collection_group = &"Reef flatfish" logbook_fact = "peacock flounders change their spots and colors to match tropical sand. both eyes scan above while the flat body remains concealed." @@ -27,3 +28,4 @@ weight_max_lb = 5.0 sell_value_min = 11 sell_value_max = 24 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/flounder_summer/flounder_summer.tres b/fish/species/flounder_summer/flounder_summer.tres index b5bb969..680738d 100644 --- a/fish/species/flounder_summer/flounder_summer.tres +++ b/fish/species/flounder_summer/flounder_summer.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"flounder_summer" display_name = "summer flounder" -active = false +active = true catalog_number = 402 collection_group = &"Coastal flatfish" logbook_fact = "summer flounder bury themselves in sand with only their eyes exposed. a sudden burst carries them upward to seize passing prey." @@ -27,3 +28,4 @@ weight_max_lb = 15.0 sell_value_min = 6 sell_value_max = 16 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/flounder_winter/flounder_winter.tres b/fish/species/flounder_winter/flounder_winter.tres index 1297bcb..c3ae09b 100644 --- a/fish/species/flounder_winter/flounder_winter.tres +++ b/fish/species/flounder_winter/flounder_winter.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/403.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"flounder_winter" display_name = "winter flounder" -active = false +active = true catalog_number = 403 collection_group = &"Coastal flatfish" logbook_fact = "winter flounder favor cool bays and estuaries where they rest on muddy bottoms. their eyes sit on the right side of the body." @@ -28,3 +29,4 @@ weight_max_lb = 8.0 sell_value_min = 4 sell_value_max = 9 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/flyingfish_tropical/flyingfish_tropical.tres b/fish/species/flyingfish_tropical/flyingfish_tropical.tres index 6376ead..12fd4bb 100644 --- a/fish/species/flyingfish_tropical/flyingfish_tropical.tres +++ b/fish/species/flyingfish_tropical/flyingfish_tropical.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"flyingfish_tropical" display_name = "tropical flyingfish" -active = false +active = true catalog_number = 6603 collection_group = &"Surface ocean fish" logbook_fact = "tropical flyingfish accelerate underwater before spreading enlarged fins above the surface. glides help them escape pursuing predators." @@ -28,3 +29,4 @@ weight_max_lb = 1.5 sell_value_min = 10 sell_value_max = 22 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/foureyes_largescale/foureyes_largescale.tres b/fish/species/foureyes_largescale/foureyes_largescale.tres index a2e5361..7ebba2f 100644 --- a/fish/species/foureyes_largescale/foureyes_largescale.tres +++ b/fish/species/foureyes_largescale/foureyes_largescale.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"foureyes_largescale" display_name = "largescale foureyes" -active = false +active = true catalog_number = 202 collection_group = &"Brackish oddities" logbook_fact = "largescale foureyes cruise with each eye divided across the waterline. one half watches above while the other scans below." @@ -27,3 +28,4 @@ weight_max_lb = 1.0 sell_value_min = 10 sell_value_max = 23 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/freshwater_drum/freshwater_drum.tres b/fish/species/freshwater_drum/freshwater_drum.tres index 5d710f3..f52f9fe 100644 --- a/fish/species/freshwater_drum/freshwater_drum.tres +++ b/fish/species/freshwater_drum/freshwater_drum.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"freshwater_drum" display_name = "freshwater drum" -active = false +active = true catalog_number = 2902 collection_group = &"Freshwater oddities" logbook_fact = "freshwater drum crush snails and mussels with powerful throat teeth. muscles vibrating against the swim bladder produce a low drumming sound." @@ -28,3 +29,4 @@ weight_max_lb = 35.0 sell_value_min = 7 sell_value_max = 20 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/gar_alligator/gar_alligator.tres b/fish/species/gar_alligator/gar_alligator.tres index 5a00da6..f5439a4 100644 --- a/fish/species/gar_alligator/gar_alligator.tres +++ b/fish/species/gar_alligator/gar_alligator.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"gar_alligator" display_name = "alligator gar" -active = false +active = true catalog_number = 2701 collection_group = &"Freshwater giants" logbook_fact = "alligator gar combine a broad tooth-filled snout with heavy armor-like scales. a vascular swim bladder lets them breathe air at the surface." @@ -27,3 +28,4 @@ weight_max_lb = 300.0 sell_value_min = 55 sell_value_max = 125 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/gar_longnose/gar_longnose.tres b/fish/species/gar_longnose/gar_longnose.tres index ff1d808..aaabbfe 100644 --- a/fish/species/gar_longnose/gar_longnose.tres +++ b/fish/species/gar_longnose/gar_longnose.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/gar_longnose/gar_longnose.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/103.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/gar_spotted/gar_spotted.tres b/fish/species/gar_spotted/gar_spotted.tres index 25f92cd..3405ee9 100644 --- a/fish/species/gar_spotted/gar_spotted.tres +++ b/fish/species/gar_spotted/gar_spotted.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/gar_spotted/gar_spotted.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/106.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/goby_round/goby_round.tres b/fish/species/goby_round/goby_round.tres index af135e0..3a8ffee 100644 --- a/fish/species/goby_round/goby_round.tres +++ b/fish/species/goby_round/goby_round.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bdhywe0r1xcio" path="res://fish/species/goby_round/fish_goby_round.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3401.png" id="4_texture"] [sub_resource type="Resource" id="RoundGobyAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/goldeye/goldeye.tres b/fish/species/goldeye/goldeye.tres index 69b28a1..1d09b7c 100644 --- a/fish/species/goldeye/goldeye.tres +++ b/fish/species/goldeye/goldeye.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"goldeye" display_name = "goldeye" -active = false +active = true catalog_number = 2903 collection_group = &"Freshwater oddities" logbook_fact = "goldeye patrol turbid rivers with large light-sensitive eyes and a toothed tongue. they rise toward the surface to hunt insects and small fish." @@ -28,3 +29,4 @@ weight_max_lb = 6.0 sell_value_min = 12 sell_value_max = 25 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/goldfish/goldfish.tres b/fish/species/goldfish/goldfish.tres index e27ede5..58c7934 100644 --- a/fish/species/goldfish/goldfish.tres +++ b/fish/species/goldfish/goldfish.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://c6uth7aob03kg" path="res://fish/species/goldfish/fish_goldfish.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3002.png" id="4_texture"] [sub_resource type="Resource" id="GoldfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres b/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres index beecd5b..d88719c 100644 --- a/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres +++ b/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://brjjnxr6n7olr" path="res://fish/species/goldfish_bubbleeye/fish_goldfish_bubbleeye.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="GoldfishBubbleeyeAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/gourami_giant/gourami_giant.tres b/fish/species/gourami_giant/gourami_giant.tres index 5cc9eee..b4f8f52 100644 --- a/fish/species/gourami_giant/gourami_giant.tres +++ b/fish/species/gourami_giant/gourami_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"gourami_giant" display_name = "giant gourami" -active = false +active = true catalog_number = 7505 collection_group = &"Tropical freshwater fish" logbook_fact = "giant gouramis breathe surface air through a specialized labyrinth organ. adults graze plants but also investigate insects and small animals." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 13 sell_value_max = 31 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/grayling_arctic/grayling_arctic.tres b/fish/species/grayling_arctic/grayling_arctic.tres index ee7902a..ae6321a 100644 --- a/fish/species/grayling_arctic/grayling_arctic.tres +++ b/fish/species/grayling_arctic/grayling_arctic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"grayling_arctic" display_name = "arctic grayling" -active = false +active = true catalog_number = 1102 collection_group = &"Cold freshwater salmonids" logbook_fact = "arctic grayling carry a tall, colorful dorsal fin like a sail. they feed on drifting insects in cold, clear rivers and lakes." @@ -28,3 +29,4 @@ weight_max_lb = 6.0 sell_value_min = 6 sell_value_max = 14 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/green_sunfish/green_sunfish.tres b/fish/species/green_sunfish/green_sunfish.tres index 37db5fc..1733035 100644 --- a/fish/species/green_sunfish/green_sunfish.tres +++ b/fish/species/green_sunfish/green_sunfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3103.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"green_sunfish" display_name = "green sunfish" -active = false +active = true catalog_number = 3103 collection_group = &"Freshwater panfish" logbook_fact = "green sunfish tolerate small, warm, cloudy pools better than many relatives. a large mouth lets them tackle insects, crayfish, and fish." @@ -27,3 +28,4 @@ weight_max_lb = 1.5 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres b/fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres index 7bb6179..eb2d2bf 100644 --- a/fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres +++ b/fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"grouper_atlantic_goliath" display_name = "Atlantic goliath grouper" -active = false +active = true catalog_number = 5801 collection_group = &"Reef predators" logbook_fact = "atlantic goliath groupers occupy reefs, wrecks, and mangrove roots. enormous mouths pull prey inward with a sudden pressure drop." @@ -27,3 +28,4 @@ weight_max_lb = 800.0 sell_value_min = 50 sell_value_max = 125 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/grouper_giant/grouper_giant.tres b/fish/species/grouper_giant/grouper_giant.tres index 7ca4c07..9051115 100644 --- a/fish/species/grouper_giant/grouper_giant.tres +++ b/fish/species/grouper_giant/grouper_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"grouper_giant" display_name = "giant grouper" -active = false +active = true catalog_number = 5803 collection_group = &"Reef predators" logbook_fact = "giant groupers become massive ambush predators around indo-pacific reefs. juveniles carry bold black-and-yellow markings." @@ -27,3 +28,4 @@ weight_max_lb = 880.0 sell_value_min = 52 sell_value_max = 128 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/grouper_gulf/grouper_gulf.tres b/fish/species/grouper_gulf/grouper_gulf.tres index f8aaca6..ec4b583 100644 --- a/fish/species/grouper_gulf/grouper_gulf.tres +++ b/fish/species/grouper_gulf/grouper_gulf.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://ctu8xd5or7v3h" path="res://fish/species/grouper_gulf/fish_grouper_gulf.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="GrouperGulfAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/grouper_nassau/grouper_nassau.tres b/fish/species/grouper_nassau/grouper_nassau.tres index fe6ad35..de4b0fd 100644 --- a/fish/species/grouper_nassau/grouper_nassau.tres +++ b/fish/species/grouper_nassau/grouper_nassau.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"grouper_nassau" display_name = "Nassau grouper" -active = false +active = true catalog_number = 5806 collection_group = &"Reef predators" logbook_fact = "nassau groupers shift their bars and colors with mood and surroundings. adults gather at traditional reef sites to spawn." @@ -27,3 +28,4 @@ weight_max_lb = 55.0 sell_value_min = 25 sell_value_max = 62 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/grouper_red/grouper_red.tres b/fish/species/grouper_red/grouper_red.tres index 55f8379..d746cc2 100644 --- a/fish/species/grouper_red/grouper_red.tres +++ b/fish/species/grouper_red/grouper_red.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://jjcc78tffxhb" path="res://fish/species/grouper_red/fish_grouper_red.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="GrouperRedAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/grunt_bluestriped/grunt_bluestriped.tres b/fish/species/grunt_bluestriped/grunt_bluestriped.tres index 91771a6..5f247a8 100644 --- a/fish/species/grunt_bluestriped/grunt_bluestriped.tres +++ b/fish/species/grunt_bluestriped/grunt_bluestriped.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/5902.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"grunt_bluestriped" display_name = "bluestriped grunt" -active = false +active = true catalog_number = 5902 collection_group = &"Reef schooling fish" logbook_fact = "bluestriped grunts shelter on reefs by day and spread over seagrass to feed at night. grinding throat teeth produce audible grunts." @@ -27,3 +28,4 @@ weight_max_lb = 3.0 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/grunt_french/grunt_french.tres b/fish/species/grunt_french/grunt_french.tres index 20b1a62..8e8161e 100644 --- a/fish/species/grunt_french/grunt_french.tres +++ b/fish/species/grunt_french/grunt_french.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/5903.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"grunt_french" display_name = "French grunt" -active = false +active = true catalog_number = 5903 collection_group = &"Reef schooling fish" logbook_fact = "french grunts gather in yellow-striped schools around reefs and wrecks. they travel into nearby sand and grass beds after dark." @@ -27,3 +28,4 @@ weight_max_lb = 3.5 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/gulper_eel/gulper_eel.tres b/fish/species/gulper_eel/gulper_eel.tres index d24bcb8..11245c9 100644 --- a/fish/species/gulper_eel/gulper_eel.tres +++ b/fish/species/gulper_eel/gulper_eel.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"gulper_eel" display_name = "gulper eel" -active = false +active = true catalog_number = 1803 collection_group = &"Deep-sea oddities" logbook_fact = "gulper eels unfold enormous mouths to engulf prey in the deep sea. a whip-like tail ends in a small light-producing organ." @@ -28,3 +29,4 @@ weight_max_lb = 18.0 sell_value_min = 44 sell_value_max = 92 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/guppy/guppy.tres b/fish/species/guppy/guppy.tres index fe4877c..9771dfb 100644 --- a/fish/species/guppy/guppy.tres +++ b/fish/species/guppy/guppy.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"guppy" display_name = "guppy" -active = false +active = true catalog_number = 2101 collection_group = &"Freshwater aquarium fish" logbook_fact = "guppies are livebearers whose young arrive ready to swim. males display bright colors while females often favor larger, less flashy bodies." @@ -27,3 +28,4 @@ weight_max_lb = 0.15 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/haddock/haddock.tres b/fish/species/haddock/haddock.tres index 19c674b..ec5db7d 100644 --- a/fish/species/haddock/haddock.tres +++ b/fish/species/haddock/haddock.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"haddock" display_name = "haddock" -active = false +active = true catalog_number = 1405 collection_group = &"Cold shelf fish" logbook_fact = "haddock are recognized by a dark shoulder mark and black lateral line. schools forage over cold seafloors for small bottom animals." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 4 sell_value_max = 11 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/hake_pacific/hake_pacific.tres b/fish/species/hake_pacific/hake_pacific.tres index 24ddb93..2a7293b 100644 --- a/fish/species/hake_pacific/hake_pacific.tres +++ b/fish/species/hake_pacific/hake_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"hake_pacific" display_name = "pacific hake" -active = false +active = true catalog_number = 1407 collection_group = &"Cold shelf fish" logbook_fact = "pacific hake rise from deep water at night to feed on krill and fish. large schools migrate along the west coast with changing seasons." @@ -27,3 +28,4 @@ weight_max_lb = 8.0 sell_value_min = 3 sell_value_max = 9 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/hake_silver/hake_silver.tres b/fish/species/hake_silver/hake_silver.tres index cbce843..ffb42ff 100644 --- a/fish/species/hake_silver/hake_silver.tres +++ b/fish/species/hake_silver/hake_silver.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"hake_silver" display_name = "silver hake" -active = false +active = true catalog_number = 1408 collection_group = &"Cold shelf fish" logbook_fact = "silver hake hunt fish and crustaceans over sandy atlantic shelves. they move upward after dark and return toward the bottom by day." @@ -27,3 +28,4 @@ weight_max_lb = 5.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres b/fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres index 88df91f..6d7fe32 100644 --- a/fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres +++ b/fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6601.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"halfbeak_ballyhoo" display_name = "ballyhoo" -active = false +active = true catalog_number = 6601 collection_group = &"Surface ocean fish" logbook_fact = "ballyhoo skim warm ocean surfaces with an extended lower jaw. tight schools scatter into quick leaps when predators strike." @@ -27,3 +28,4 @@ weight_max_lb = 1.0 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/halibut_atlantic/halibut_atlantic.tres b/fish/species/halibut_atlantic/halibut_atlantic.tres index 332c9ef..ead724a 100644 --- a/fish/species/halibut_atlantic/halibut_atlantic.tres +++ b/fish/species/halibut_atlantic/halibut_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"halibut_atlantic" display_name = "atlantic halibut" -active = false +active = true catalog_number = 3701 collection_group = &"Large flatfish" logbook_fact = "atlantic halibut are immense right-eyed flatfish of cold northern seas. adults ambush fish and squid from deep rocky or sandy bottoms." @@ -26,3 +27,4 @@ weight_max_lb = 300.0 sell_value_min = 32 sell_value_max = 82 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/halibut_pacific/halibut_pacific.tres b/fish/species/halibut_pacific/halibut_pacific.tres index 5bdb5cb..3856b5a 100644 --- a/fish/species/halibut_pacific/halibut_pacific.tres +++ b/fish/species/halibut_pacific/halibut_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"halibut_pacific" display_name = "pacific halibut" -active = false +active = true catalog_number = 3702 collection_group = &"Large flatfish" logbook_fact = "pacific halibut lie camouflaged on cold continental shelves. powerful flat bodies can travel long distances between feeding and spawning grounds." @@ -26,3 +27,4 @@ weight_max_lb = 350.0 sell_value_min = 34 sell_value_max = 86 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/hellbender/hellbender.tres b/fish/species/hellbender/hellbender.tres index 44c050a..2c55863 100644 --- a/fish/species/hellbender/hellbender.tres +++ b/fish/species/hellbender/hellbender.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"hellbender" display_name = "hellbender" -active = false +active = true catalog_number = 2002 collection_group = &"Freshwater amphibians" logbook_fact = "hellbenders hide beneath large rocks in cool, clean rivers. folds of loose skin absorb oxygen while the flattened body grips the current." @@ -28,3 +29,4 @@ weight_max_lb = 5.5 sell_value_min = 24 sell_value_max = 54 sell_value_curve = 0.91 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/herring_atlantic/herring_atlantic.tres b/fish/species/herring_atlantic/herring_atlantic.tres index 6cea5a6..e193dcc 100644 --- a/fish/species/herring_atlantic/herring_atlantic.tres +++ b/fish/species/herring_atlantic/herring_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"herring_atlantic" display_name = "atlantic herring" -active = false +active = true catalog_number = 1301 collection_group = &"Cold schooling fish" logbook_fact = "atlantic herring gather in immense schools that move between feeding and spawning grounds. they filter plankton with fine gill rakers." @@ -26,3 +27,4 @@ weight_max_lb = 1.5 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/herring_pacific/herring_pacific.tres b/fish/species/herring_pacific/herring_pacific.tres index 4b20d90..7d8e754 100644 --- a/fish/species/herring_pacific/herring_pacific.tres +++ b/fish/species/herring_pacific/herring_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"herring_pacific" display_name = "pacific herring" -active = false +active = true catalog_number = 1304 collection_group = &"Cold schooling fish" logbook_fact = "pacific herring return to coastal shallows to coat plants and rocks with eggs. their oily schools support entire marine food webs." @@ -27,3 +28,4 @@ weight_max_lb = 1.5 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/hogfish/hogfish.tres b/fish/species/hogfish/hogfish.tres index 0bbd835..0e94a20 100644 --- a/fish/species/hogfish/hogfish.tres +++ b/fish/species/hogfish/hogfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6103.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"hogfish" display_name = "hogfish" -active = false +active = true catalog_number = 6103 collection_group = &"Reef wrasses" logbook_fact = "hogfish root through sand with long pig-like snouts in search of shellfish. adults can change from female to male as social groups shift." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 12 sell_value_max = 30 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/ide/ide.tres b/fish/species/ide/ide.tres index 63be3b3..aea8907 100644 --- a/fish/species/ide/ide.tres +++ b/fish/species/ide/ide.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"ide" display_name = "ide" -active = false +active = true catalog_number = 2507 collection_group = &"Freshwater coarse fish" logbook_fact = "ide move between rivers, lakes, and brackish coastal water in loose schools. adults eat insects, crustaceans, plants, and small fish." @@ -27,3 +28,4 @@ weight_max_lb = 9.0 sell_value_min = 6 sell_value_max = 14 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/jack_crevalle/jack_crevalle.tres b/fish/species/jack_crevalle/jack_crevalle.tres index e2e3dc8..4110dcc 100644 --- a/fish/species/jack_crevalle/jack_crevalle.tres +++ b/fish/species/jack_crevalle/jack_crevalle.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"jack_crevalle" display_name = "crevalle jack" -active = false +active = true catalog_number = 705 collection_group = &"Coastal pelagic fish" logbook_fact = "crevalle jacks patrol warm coasts in fast-moving schools. their deep bodies and forked tails deliver long, powerful runs." @@ -28,3 +29,4 @@ weight_max_lb = 35.0 sell_value_min = 7 sell_value_max = 20 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/jelly_crystal/jelly_crystal.tres b/fish/species/jelly_crystal/jelly_crystal.tres index 9abd34d..f8746fa 100644 --- a/fish/species/jelly_crystal/jelly_crystal.tres +++ b/fish/species/jelly_crystal/jelly_crystal.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"jelly_crystal" display_name = "crystal jelly" -active = false +active = true catalog_number = 3501 collection_group = &"Jellies" logbook_fact = "crystal jellies are nearly transparent except for glowing points around the bell. their green fluorescent protein transformed biological research." @@ -28,3 +29,4 @@ weight_max_lb = 4.0 sell_value_min = 15 sell_value_max = 34 sell_value_curve = 0.93 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/jelly_lions_mane/jelly_lions_mane.tres b/fish/species/jelly_lions_mane/jelly_lions_mane.tres index 4bfa8b3..c7c6fbb 100644 --- a/fish/species/jelly_lions_mane/jelly_lions_mane.tres +++ b/fish/species/jelly_lions_mane/jelly_lions_mane.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"jelly_lions_mane" display_name = "lion's mane jelly" -active = false +active = true catalog_number = 3502 collection_group = &"Jellies" logbook_fact = "lion's mane jellies trail dense curtains of tentacles through cold seas. the bell darkens from yellow to deep red as the animal grows." @@ -28,3 +29,4 @@ weight_max_lb = 200.0 sell_value_min = 24 sell_value_max = 58 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/jelly_moon/jelly_moon.tres b/fish/species/jelly_moon/jelly_moon.tres index 2c72f03..378c11d 100644 --- a/fish/species/jelly_moon/jelly_moon.tres +++ b/fish/species/jelly_moon/jelly_moon.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"jelly_moon" display_name = "moon jelly" -active = false +active = true catalog_number = 3503 collection_group = &"Jellies" logbook_fact = "moon jellies pulse gently with four horseshoe-shaped organs visible through the bell. short tentacles sweep plankton toward the mouth." @@ -27,3 +28,4 @@ weight_max_lb = 5.0 sell_value_min = 6 sell_value_max = 14 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/jelly_pacific_sea_nettle/jelly_pacific_sea_nettle.tres b/fish/species/jelly_pacific_sea_nettle/jelly_pacific_sea_nettle.tres index 9e559ec..b31f4b3 100644 --- a/fish/species/jelly_pacific_sea_nettle/jelly_pacific_sea_nettle.tres +++ b/fish/species/jelly_pacific_sea_nettle/jelly_pacific_sea_nettle.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"jelly_pacific_sea_nettle" display_name = "Pacific sea nettle" -active = false +active = true catalog_number = 3504 collection_group = &"Jellies" logbook_fact = "pacific sea nettles carry rust-colored stripes across pale bells. long tentacles and frilled mouth arms capture plankton and small fish." @@ -28,3 +29,4 @@ weight_max_lb = 12.0 sell_value_min = 14 sell_value_max = 32 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/jelly_sea_wasp/jelly_sea_wasp.tres b/fish/species/jelly_sea_wasp/jelly_sea_wasp.tres index a68cb4a..29bed0a 100644 --- a/fish/species/jelly_sea_wasp/jelly_sea_wasp.tres +++ b/fish/species/jelly_sea_wasp/jelly_sea_wasp.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"jelly_sea_wasp" display_name = "sea wasp" -active = false +active = true catalog_number = 3505 collection_group = &"Jellies" logbook_fact = "sea wasps have box-shaped bells and clusters of eyes along the lower edge. their long tentacles deliver exceptionally potent venom." @@ -28,3 +29,4 @@ weight_max_lb = 6.0 sell_value_min = 42 sell_value_max = 90 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/knifefish_clown/knifefish_clown.tres b/fish/species/knifefish_clown/knifefish_clown.tres index 3ba5b63..c83b877 100644 --- a/fish/species/knifefish_clown/knifefish_clown.tres +++ b/fish/species/knifefish_clown/knifefish_clown.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"knifefish_clown" display_name = "clown knifefish" -active = false +active = true catalog_number = 7501 collection_group = &"Tropical freshwater fish" logbook_fact = "clown knifefish undulate one long belly fin to glide forward or backward. dark eye-like spots line their silver nocturnal bodies." @@ -28,3 +29,4 @@ weight_max_lb = 25.0 sell_value_min = 16 sell_value_max = 38 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/koi/koi.tres b/fish/species/koi/koi.tres index 91b465c..58c7c29 100644 --- a/fish/species/koi/koi.tres +++ b/fish/species/koi/koi.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"koi" display_name = "koi" -active = false +active = true catalog_number = 3003 collection_group = &"Freshwater ornamental" logbook_fact = "koi are colorful domesticated forms of common carp selected over many generations. each fish carries a distinctive arrangement of patches and scales." @@ -28,3 +29,4 @@ weight_max_lb = 35.0 sell_value_min = 14 sell_value_max = 34 sell_value_curve = 0.87 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/krill_antarctic/krill_antarctic.tres b/fish/species/krill_antarctic/krill_antarctic.tres index 3651f23..8cdf8e6 100644 --- a/fish/species/krill_antarctic/krill_antarctic.tres +++ b/fish/species/krill_antarctic/krill_antarctic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"krill_antarctic" display_name = "Antarctic krill" -active = false +active = true catalog_number = 3802 collection_group = &"Lobsters and shrimp" logbook_fact = "antarctic krill form enormous swarms beneath southern seas and ice. these small crustaceans feed whales, seals, penguins, and fish." @@ -27,3 +28,4 @@ weight_max_lb = 0.01 sell_value_min = 10 sell_value_max = 22 sell_value_curve = 0.99 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/ladyfish/ladyfish.tres b/fish/species/ladyfish/ladyfish.tres index 57029f5..57c277c 100644 --- a/fish/species/ladyfish/ladyfish.tres +++ b/fish/species/ladyfish/ladyfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/7403.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"ladyfish" display_name = "ladyfish" -active = false +active = true catalog_number = 7403 collection_group = &"Tropical flats fish" logbook_fact = "ladyfish race through warm shallows after schooling prey and often leap when pursued. a deeply forked tail powers their slender bodies." @@ -28,3 +29,4 @@ weight_max_lb = 8.0 sell_value_min = 4 sell_value_max = 10 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/lanternfish_spotted/lanternfish_spotted.tres b/fish/species/lanternfish_spotted/lanternfish_spotted.tres index c0725d1..28446b7 100644 --- a/fish/species/lanternfish_spotted/lanternfish_spotted.tres +++ b/fish/species/lanternfish_spotted/lanternfish_spotted.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"lanternfish_spotted" display_name = "spotted lanternfish" -active = false +active = true catalog_number = 1806 collection_group = &"Deep-sea oddities" logbook_fact = "spotted lanternfish carry rows of light-producing organs along their bodies. immense schools rise toward the surface each night." @@ -27,3 +28,4 @@ weight_max_lb = 0.5 sell_value_min = 14 sell_value_max = 30 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/largemouth_bass/largemouth_bass.tres b/fish/species/largemouth_bass/largemouth_bass.tres index 04d157a..aa89d04 100644 --- a/fish/species/largemouth_bass/largemouth_bass.tres +++ b/fish/species/largemouth_bass/largemouth_bass.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"largemouth_bass" display_name = "largemouth bass" -active = false +active = true catalog_number = 2201 collection_group = &"Freshwater bass" logbook_fact = "largemouth bass wait among weeds and timber before lunging at prey. the upper jaw extends beyond the eye when the mouth is closed." @@ -26,3 +27,4 @@ weight_max_lb = 18.0 sell_value_min = 4 sell_value_max = 12 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/lingcod/lingcod.tres b/fish/species/lingcod/lingcod.tres index 92d4a81..807dc8b 100644 --- a/fish/species/lingcod/lingcod.tres +++ b/fish/species/lingcod/lingcod.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"lingcod" display_name = "lingcod" -active = false +active = true catalog_number = 7001 collection_group = &"Temperate reef predators" logbook_fact = "lingcod guard rocky dens and ambush fish with a huge tooth-lined mouth. despite the name, they are greenling relatives rather than cod." @@ -26,3 +27,4 @@ weight_max_lb = 60.0 sell_value_min = 14 sell_value_max = 38 sell_value_curve = 0.83 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/lionfish_red/lionfish_red.tres b/fish/species/lionfish_red/lionfish_red.tres index 564e243..f3c3b3b 100644 --- a/fish/species/lionfish_red/lionfish_red.tres +++ b/fish/species/lionfish_red/lionfish_red.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"lionfish_red" display_name = "red lionfish" -active = false +active = true catalog_number = 5201 collection_group = &"Reef ambush fish" logbook_fact = "red lionfish spread ornate venomous spines when threatened. broad fins herd smaller fish into corners before a rapid gulp." @@ -27,3 +28,4 @@ weight_max_lb = 3.0 sell_value_min = 11 sell_value_max = 25 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/loach_clown/loach_clown.tres b/fish/species/loach_clown/loach_clown.tres index ba24335..f99a1be 100644 --- a/fish/species/loach_clown/loach_clown.tres +++ b/fish/species/loach_clown/loach_clown.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"loach_clown" display_name = "clown loach" -active = false +active = true catalog_number = 7502 collection_group = &"Tropical freshwater fish" logbook_fact = "clown loaches rest in groups and make clicking sounds while feeding. orange bodies carry three broad black bands and small eye spines." @@ -28,3 +29,4 @@ weight_max_lb = 2.0 sell_value_min = 10 sell_value_max = 22 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/loach_weather/loach_weather.tres b/fish/species/loach_weather/loach_weather.tres index fa2ae34..cc7afef 100644 --- a/fish/species/loach_weather/loach_weather.tres +++ b/fish/species/loach_weather/loach_weather.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"loach_weather" display_name = "weather loach" -active = false +active = true catalog_number = 2905 collection_group = &"Freshwater oddities" logbook_fact = "weather loaches gulp air and pass it through the intestine when oxygen runs low. restless activity often increases as air pressure falls." @@ -27,3 +28,4 @@ weight_max_lb = 0.7 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/lobster_american/lobster_american.tres b/fish/species/lobster_american/lobster_american.tres index b89e992..b70b809 100644 --- a/fish/species/lobster_american/lobster_american.tres +++ b/fish/species/lobster_american/lobster_american.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"lobster_american" display_name = "American lobster" -active = false +active = true catalog_number = 3801 collection_group = &"Lobsters and shrimp" logbook_fact = "american lobsters shelter in rocky crevices and emerge to forage along the bottom. one claw crushes while the other cuts and grips." @@ -28,3 +29,4 @@ weight_max_lb = 44.0 sell_value_min = 16 sell_value_max = 42 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres b/fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres index eb9fdde..cdd828c 100644 --- a/fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres +++ b/fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"lobster_caribbean_spiny" display_name = "Caribbean spiny lobster" -active = false +active = true catalog_number = 3803 collection_group = &"Lobsters and shrimp" logbook_fact = "caribbean spiny lobsters rely on long antennae and a thorny shell instead of large claws. groups march together across the seafloor." @@ -28,3 +29,4 @@ weight_max_lb = 26.0 sell_value_min = 15 sell_value_max = 38 sell_value_curve = 0.87 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/lungfish_west_african/lungfish_west_african.tres b/fish/species/lungfish_west_african/lungfish_west_african.tres index 6ae8db6..f049cff 100644 --- a/fish/species/lungfish_west_african/lungfish_west_african.tres +++ b/fish/species/lungfish_west_african/lungfish_west_african.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/lungfish_west_african/lungfish_west_african.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/107.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/mackerel_atlantic/mackerel_atlantic.tres b/fish/species/mackerel_atlantic/mackerel_atlantic.tres index f90a01b..ba6e0d8 100644 --- a/fish/species/mackerel_atlantic/mackerel_atlantic.tres +++ b/fish/species/mackerel_atlantic/mackerel_atlantic.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://breyc8fqq8lq3" path="res://fish/species/mackerel_atlantic/fish_mackerel_atlantic.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/701.png" id="4_texture"] [sub_resource type="Resource" id="MackerelAtlanticAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/mackerel_cero/mackerel_cero.tres b/fish/species/mackerel_cero/mackerel_cero.tres index 598f01b..25cd4c5 100644 --- a/fish/species/mackerel_cero/mackerel_cero.tres +++ b/fish/species/mackerel_cero/mackerel_cero.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://g8qanq47g1b8" path="res://fish/species/mackerel_cero/fish_mackerel_cero.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="MackerelCeroAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/mackerel_chub/mackerel_chub.tres b/fish/species/mackerel_chub/mackerel_chub.tres index 7eeefb2..891abe4 100644 --- a/fish/species/mackerel_chub/mackerel_chub.tres +++ b/fish/species/mackerel_chub/mackerel_chub.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://b7q2t02oo2bcp" path="res://fish/species/mackerel_chub/fish_mackerel_chub.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/704.png" id="4_texture"] [sub_resource type="Resource" id="MackerelChubAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/mackerel_king/mackerel_king.tres b/fish/species/mackerel_king/mackerel_king.tres index a167660..9c00470 100644 --- a/fish/species/mackerel_king/mackerel_king.tres +++ b/fish/species/mackerel_king/mackerel_king.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://b2fag3xemyx5s" path="res://fish/species/mackerel_king/fish_mackerel_king.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="MackerelKingAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/mackerel_spanish/mackerel_spanish.tres b/fish/species/mackerel_spanish/mackerel_spanish.tres index 3dbc07c..1f0bcf4 100644 --- a/fish/species/mackerel_spanish/mackerel_spanish.tres +++ b/fish/species/mackerel_spanish/mackerel_spanish.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://cy2hmpenpkee2" path="res://fish/species/mackerel_spanish/fish_mackerel_spanish.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="MackerelSpanishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/madtom_tadpole/madtom_tadpole.tres b/fish/species/madtom_tadpole/madtom_tadpole.tres index 3c50b22..d0a5545 100644 --- a/fish/species/madtom_tadpole/madtom_tadpole.tres +++ b/fish/species/madtom_tadpole/madtom_tadpole.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"madtom_tadpole" display_name = "tadpole madtom" -active = false +active = true catalog_number = 2406 collection_group = &"Freshwater catfish" logbook_fact = "tadpole madtoms are tiny nocturnal catfish that shelter beneath vegetation and debris. venomous fin spines discourage larger predators." @@ -27,3 +28,4 @@ weight_max_lb = 0.15 sell_value_min = 8 sell_value_max = 16 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/mahi_mahi/mahi_mahi.tres b/fish/species/mahi_mahi/mahi_mahi.tres index 1d688a3..691a52a 100644 --- a/fish/species/mahi_mahi/mahi_mahi.tres +++ b/fish/species/mahi_mahi/mahi_mahi.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/4701.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"mahi_mahi" display_name = "mahi-mahi" -active = false +active = true catalog_number = 4701 collection_group = &"Oceanic pelagic fish" logbook_fact = "mahi-mahi flash brilliant blue, green, and gold while chasing prey near the surface. they grow quickly and gather around floating objects." @@ -28,3 +29,4 @@ weight_max_lb = 50.0 sell_value_min = 15 sell_value_max = 38 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/mahseer_golden/mahseer_golden.tres b/fish/species/mahseer_golden/mahseer_golden.tres index dd2bd95..1459de1 100644 --- a/fish/species/mahseer_golden/mahseer_golden.tres +++ b/fish/species/mahseer_golden/mahseer_golden.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"mahseer_golden" display_name = "golden mahseer" -active = false +active = true catalog_number = 7603 collection_group = &"Tropical freshwater predators" logbook_fact = "golden mahseer migrate through swift mountain rivers to reach spawning grounds. large scales shine bronze beneath reddish fins." @@ -28,3 +29,4 @@ weight_max_lb = 90.0 sell_value_min = 32 sell_value_max = 72 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/manatee_west_indian/manatee_west_indian.tres b/fish/species/manatee_west_indian/manatee_west_indian.tres index 8c47efe..7154157 100644 --- a/fish/species/manatee_west_indian/manatee_west_indian.tres +++ b/fish/species/manatee_west_indian/manatee_west_indian.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"manatee_west_indian" display_name = "West Indian manatee" -active = false +active = true catalog_number = 505 collection_group = &"Coastal marine mammals" logbook_fact = "west indian manatees graze aquatic plants in warm coastal water and rivers. they surface regularly to breathe through nostrils atop the snout." @@ -28,3 +29,4 @@ weight_max_lb = 1300.0 sell_value_min = 70 sell_value_max = 160 sell_value_curve = 0.77 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/manta_ray_giant/manta_ray_giant.tres b/fish/species/manta_ray_giant/manta_ray_giant.tres index ad96bd2..13eef47 100644 --- a/fish/species/manta_ray_giant/manta_ray_giant.tres +++ b/fish/species/manta_ray_giant/manta_ray_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"manta_ray_giant" display_name = "giant manta ray" -active = false +active = true catalog_number = 5102 collection_group = &"Rays and skates" logbook_fact = "giant manta rays funnel plankton into wide mouths with two flexible head fins. each belly carries a unique pattern of dark spots." @@ -28,3 +29,4 @@ weight_max_lb = 1000.0 sell_value_min = 65 sell_value_max = 150 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/marlin_black/marlin_black.tres b/fish/species/marlin_black/marlin_black.tres index 3c2f6f4..26f506a 100644 --- a/fish/species/marlin_black/marlin_black.tres +++ b/fish/species/marlin_black/marlin_black.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://dkdctr2o52vrb" path="res://fish/species/marlin_black/fish_marlin_black.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="MarlinBlackAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/marlin_blue/marlin_blue.tres b/fish/species/marlin_blue/marlin_blue.tres index 92d76d7..c8ee35d 100644 --- a/fish/species/marlin_blue/marlin_blue.tres +++ b/fish/species/marlin_blue/marlin_blue.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://de35fjoytbomu" path="res://fish/species/marlin_blue/fish_marlin_blue.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="MarlinBlueAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/marlin_white/marlin_white.tres b/fish/species/marlin_white/marlin_white.tres index 1039aa7..a69d01d 100644 --- a/fish/species/marlin_white/marlin_white.tres +++ b/fish/species/marlin_white/marlin_white.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bdvy4ujx2htcy" path="res://fish/species/marlin_white/fish_marlin_white.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="MarlinWhiteAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/menhaden_atlantic/menhaden_atlantic.tres b/fish/species/menhaden_atlantic/menhaden_atlantic.tres index e19f95b..53b4d6e 100644 --- a/fish/species/menhaden_atlantic/menhaden_atlantic.tres +++ b/fish/species/menhaden_atlantic/menhaden_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/802.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"menhaden_atlantic" display_name = "atlantic menhaden" -active = false +active = true catalog_number = 802 collection_group = &"Coastal schooling fish" logbook_fact = "atlantic menhaden strain plankton from coastal water with fine gill rakers. dense schools feed whales, seabirds, and predatory fish." @@ -27,3 +28,4 @@ weight_max_lb = 1.5 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/milkfish/milkfish.tres b/fish/species/milkfish/milkfish.tres index b7cbf82..9c8362a 100644 --- a/fish/species/milkfish/milkfish.tres +++ b/fish/species/milkfish/milkfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/7101.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"milkfish" display_name = "milkfish" -active = false +active = true catalog_number = 7101 collection_group = &"Tropical coastal fish" logbook_fact = "milkfish graze algae and tiny organisms in warm coastal shallows. deeply forked tails drive large schools through lagoons and estuaries." @@ -27,3 +28,4 @@ weight_max_lb = 25.0 sell_value_min = 4 sell_value_max = 12 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/minnow_fathead/minnow_fathead.tres b/fish/species/minnow_fathead/minnow_fathead.tres index 630b8c5..c4a3aff 100644 --- a/fish/species/minnow_fathead/minnow_fathead.tres +++ b/fish/species/minnow_fathead/minnow_fathead.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2804.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"minnow_fathead" display_name = "fathead minnow" -active = false +active = true catalog_number = 2804 collection_group = &"Freshwater minnows" logbook_fact = "fathead minnows tolerate warm, muddy ponds where many fish struggle. males guard eggs laid beneath rocks, logs, and other cover." @@ -27,3 +28,4 @@ weight_max_lb = 0.2 sell_value_min = 1 sell_value_max = 2 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/monkfish/monkfish.tres b/fish/species/monkfish/monkfish.tres index 82319f8..d485570 100644 --- a/fish/species/monkfish/monkfish.tres +++ b/fish/species/monkfish/monkfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"monkfish" display_name = "monkfish" -active = false +active = true catalog_number = 603 collection_group = &"Coastal oddities" logbook_fact = "monkfish hide against the bottom and wave a fleshy lure above a cavernous mouth. a sudden gulp draws fish and crustaceans inward." @@ -28,3 +29,4 @@ weight_max_lb = 55.0 sell_value_min = 14 sell_value_max = 35 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/mooneye/mooneye.tres b/fish/species/mooneye/mooneye.tres index c04be25..3dff8a1 100644 --- a/fish/species/mooneye/mooneye.tres +++ b/fish/species/mooneye/mooneye.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"mooneye" display_name = "mooneye" -active = false +active = true catalog_number = 2904 collection_group = &"Freshwater oddities" logbook_fact = "mooneyes flash silver in clear rivers and lakes while feeding near the surface. their large eyes suit evening hunts for insects and small fish." @@ -27,3 +28,4 @@ weight_max_lb = 4.0 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/moray_green/moray_green.tres b/fish/species/moray_green/moray_green.tres index 48258b5..e0d49ae 100644 --- a/fish/species/moray_green/moray_green.tres +++ b/fish/species/moray_green/moray_green.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"moray_green" display_name = "green moray" -active = false +active = true catalog_number = 5301 collection_group = &"Reef eels" logbook_fact = "green morays appear green because yellow mucus coats blue-gray skin. a second set of jaws pulls captured prey deeper into the throat." @@ -27,3 +28,4 @@ weight_max_lb = 30.0 sell_value_min = 13 sell_value_max = 32 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/mudskipper_atlantic/mudskipper_atlantic.tres b/fish/species/mudskipper_atlantic/mudskipper_atlantic.tres index 477183a..7df958a 100644 --- a/fish/species/mudskipper_atlantic/mudskipper_atlantic.tres +++ b/fish/species/mudskipper_atlantic/mudskipper_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/201.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"mudskipper_atlantic" display_name = "atlantic mudskipper" -active = false +active = true catalog_number = 201 collection_group = &"Brackish oddities" logbook_fact = "atlantic mudskippers use sturdy fins to hop and crawl across exposed mud. moist skin and mouth linings let them breathe out of water." @@ -28,3 +29,4 @@ weight_max_lb = 0.5 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/mullet_red/mullet_red.tres b/fish/species/mullet_red/mullet_red.tres index ed17234..67a35fa 100644 --- a/fish/species/mullet_red/mullet_red.tres +++ b/fish/species/mullet_red/mullet_red.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"mullet_red" display_name = "red mullet" -active = false +active = true catalog_number = 301 collection_group = &"Coastal bottom fish" logbook_fact = "red mullet comb sandy bottoms with two chin barbels that taste hidden prey. their foraging leaves winding trails in the sediment." @@ -27,3 +28,4 @@ weight_max_lb = 3.0 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/mullet_striped/mullet_striped.tres b/fish/species/mullet_striped/mullet_striped.tres index 2affb1b..a285ee7 100644 --- a/fish/species/mullet_striped/mullet_striped.tres +++ b/fish/species/mullet_striped/mullet_striped.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6804.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"mullet_striped" display_name = "striped mullet" -active = false +active = true catalog_number = 6804 collection_group = &"Temperate estuary" logbook_fact = "striped mullet leap clear of the water and travel in coastal schools. they graze algae and detritus with specialized digestive systems." @@ -27,3 +28,4 @@ weight_max_lb = 8.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/muskellunge/muskellunge.tres b/fish/species/muskellunge/muskellunge.tres index 6bb8997..e747d07 100644 --- a/fish/species/muskellunge/muskellunge.tres +++ b/fish/species/muskellunge/muskellunge.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"muskellunge" display_name = "muskellunge" -active = false +active = true catalog_number = 2704 collection_group = &"Freshwater giants" logbook_fact = "muskellunge wait motionless among weeds before exploding toward prey. pale bodies carry bars or spots that fade into broken underwater light." @@ -28,3 +29,4 @@ weight_max_lb = 60.0 sell_value_min = 32 sell_value_max = 72 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/nautilus_chambered/nautilus_chambered.tres b/fish/species/nautilus_chambered/nautilus_chambered.tres index b38815d..562f16b 100644 --- a/fish/species/nautilus_chambered/nautilus_chambered.tres +++ b/fish/species/nautilus_chambered/nautilus_chambered.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"nautilus_chambered" display_name = "chambered nautilus" -active = false +active = true catalog_number = 1501 collection_group = &"Cuttlefish and nautiluses" logbook_fact = "chambered nautiluses regulate buoyancy with gas-filled shell chambers. dozens of small tentacles feel for food in dark reef slopes." @@ -28,3 +29,4 @@ weight_max_lb = 3.0 sell_value_min = 34 sell_value_max = 76 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/needlefish_hound/needlefish_hound.tres b/fish/species/needlefish_hound/needlefish_hound.tres index 4eda89e..5d97670 100644 --- a/fish/species/needlefish_hound/needlefish_hound.tres +++ b/fish/species/needlefish_hound/needlefish_hound.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"needlefish_hound" display_name = "houndfish" -active = false +active = true catalog_number = 6602 collection_group = &"Surface ocean fish" logbook_fact = "houndfish hunt near the surface with long jaws filled with fine teeth. powerful leaps can carry their narrow bodies far above the water." @@ -27,3 +28,4 @@ weight_max_lb = 10.0 sell_value_min = 11 sell_value_max = 25 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/oarfish_giant/oarfish_giant.tres b/fish/species/oarfish_giant/oarfish_giant.tres index 3687f0f..2bcd4ab 100644 --- a/fish/species/oarfish_giant/oarfish_giant.tres +++ b/fish/species/oarfish_giant/oarfish_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"oarfish_giant" display_name = "giant oarfish" -active = false +active = true catalog_number = 1701 collection_group = &"Deep-sea legends" logbook_fact = "giant oarfish drift vertically through deep open water, rowing with a crimson dorsal fin. their ribbon-like bodies can reach remarkable lengths." @@ -28,3 +29,4 @@ weight_max_lb = 600.0 sell_value_min = 60 sell_value_max = 140 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/ocean_perch_pacific/ocean_perch_pacific.tres b/fish/species/ocean_perch_pacific/ocean_perch_pacific.tres index e02db9a..6b0cdcc 100644 --- a/fish/species/ocean_perch_pacific/ocean_perch_pacific.tres +++ b/fish/species/ocean_perch_pacific/ocean_perch_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"ocean_perch_pacific" display_name = "Pacific ocean perch" -active = false +active = true catalog_number = 1603 collection_group = &"Deep shelf fish" logbook_fact = "pacific ocean perch hover around deep rocky reefs in the north pacific. these slow-growing fish give birth to live young." @@ -26,3 +27,4 @@ weight_max_lb = 12.0 sell_value_min = 7 sell_value_max = 17 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/octopus_common/octopus_common.tres b/fish/species/octopus_common/octopus_common.tres index 66278ee..e379010 100644 --- a/fish/species/octopus_common/octopus_common.tres +++ b/fish/species/octopus_common/octopus_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"octopus_common" display_name = "common octopus" -active = false +active = true catalog_number = 4901 collection_group = &"Octopuses" logbook_fact = "common octopuses squeeze through narrow cracks and solve problems while hunting reefs. skin cells rapidly change color and texture." @@ -27,3 +28,4 @@ weight_max_lb = 22.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.87 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/octopus_day/octopus_day.tres b/fish/species/octopus_day/octopus_day.tres index 6251fe8..4384f38 100644 --- a/fish/species/octopus_day/octopus_day.tres +++ b/fish/species/octopus_day/octopus_day.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"octopus_day" display_name = "day octopus" -active = false +active = true catalog_number = 4902 collection_group = &"Octopuses" logbook_fact = "day octopuses forage across tropical reefs while the sun is high. shifting bars and spots communicate alarm, camouflage, and threat." @@ -28,3 +29,4 @@ weight_max_lb = 15.0 sell_value_min = 15 sell_value_max = 36 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/octopus_giant_pacific/octopus_giant_pacific.tres b/fish/species/octopus_giant_pacific/octopus_giant_pacific.tres index 438eb60..1091088 100644 --- a/fish/species/octopus_giant_pacific/octopus_giant_pacific.tres +++ b/fish/species/octopus_giant_pacific/octopus_giant_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"octopus_giant_pacific" display_name = "giant Pacific octopus" -active = false +active = true catalog_number = 4903 collection_group = &"Octopuses" logbook_fact = "giant pacific octopuses explore cold rocky dens with thousands of arm suckers. females guard their eggs without feeding until they hatch." @@ -28,3 +29,4 @@ weight_max_lb = 200.0 sell_value_min = 28 sell_value_max = 70 sell_value_curve = 0.81 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/octopus_greater_blue_ringed/octopus_greater_blue_ringed.tres b/fish/species/octopus_greater_blue_ringed/octopus_greater_blue_ringed.tres index 9b538f2..f2a21d9 100644 --- a/fish/species/octopus_greater_blue_ringed/octopus_greater_blue_ringed.tres +++ b/fish/species/octopus_greater_blue_ringed/octopus_greater_blue_ringed.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"octopus_greater_blue_ringed" display_name = "greater blue-ringed octopus" -active = false +active = true catalog_number = 4904 collection_group = &"Octopuses" logbook_fact = "greater blue-ringed octopuses reveal vivid rings when threatened. a tiny beak can deliver venom strong enough to stop breathing." @@ -28,3 +29,4 @@ weight_max_lb = 0.3 sell_value_min = 38 sell_value_max = 82 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/opah/opah.tres b/fish/species/opah/opah.tres index a7d3fd1..f9b202a 100644 --- a/fish/species/opah/opah.tres +++ b/fish/species/opah/opah.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"opah" display_name = "opah" -active = false +active = true catalog_number = 4702 collection_group = &"Oceanic pelagic fish" logbook_fact = "opah circulate warm blood through much of the body, an unusual trait among fish. round silver flanks glow with red fins and pale spots." @@ -28,3 +29,4 @@ weight_max_lb = 600.0 sell_value_min = 36 sell_value_max = 88 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/oscar/oscar.tres b/fish/species/oscar/oscar.tres index bf44caa..8e780cb 100644 --- a/fish/species/oscar/oscar.tres +++ b/fish/species/oscar/oscar.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"oscar" display_name = "oscar" -active = false +active = true catalog_number = 7507 collection_group = &"Tropical freshwater fish" logbook_fact = "oscars are large south american cichlids that recognize routines and defend territories. a tail eyespot may redirect attacks away from the head." @@ -27,3 +28,4 @@ weight_max_lb = 4.0 sell_value_min = 6 sell_value_max = 14 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/oyster_black_lip_pearl/oyster_black_lip_pearl.tres b/fish/species/oyster_black_lip_pearl/oyster_black_lip_pearl.tres index 74a99d7..776218d 100644 --- a/fish/species/oyster_black_lip_pearl/oyster_black_lip_pearl.tres +++ b/fish/species/oyster_black_lip_pearl/oyster_black_lip_pearl.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"oyster_black_lip_pearl" display_name = "black-lip pearl oyster" -active = false +active = true catalog_number = 6401 collection_group = &"Shellfish" logbook_fact = "black-lip pearl oysters line their shells with dark-edged nacre. a trapped irritant can become coated in the same pearly material." @@ -27,3 +28,4 @@ weight_max_lb = 5.0 sell_value_min = 14 sell_value_max = 40 sell_value_curve = 0.91 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/paddlefish/paddlefish.tres b/fish/species/paddlefish/paddlefish.tres index 27d1696..498730b 100644 --- a/fish/species/paddlefish/paddlefish.tres +++ b/fish/species/paddlefish/paddlefish.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/paddlefish/paddlefish.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/104.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/parrotfish_rainbow/parrotfish_rainbow.tres b/fish/species/parrotfish_rainbow/parrotfish_rainbow.tres index 06df938..c0b0dc2 100644 --- a/fish/species/parrotfish_rainbow/parrotfish_rainbow.tres +++ b/fish/species/parrotfish_rainbow/parrotfish_rainbow.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"parrotfish_rainbow" display_name = "rainbow parrotfish" -active = false +active = true catalog_number = 5502 collection_group = &"Reef grazers" logbook_fact = "rainbow parrotfish scrape algae from reefs with fused beak-like teeth. crushed coral passes through them and returns to the reef as sand." @@ -27,3 +28,4 @@ weight_max_lb = 40.0 sell_value_min = 25 sell_value_max = 58 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/parrotfish_stoplight/parrotfish_stoplight.tres b/fish/species/parrotfish_stoplight/parrotfish_stoplight.tres index 3cc5389..50962f4 100644 --- a/fish/species/parrotfish_stoplight/parrotfish_stoplight.tres +++ b/fish/species/parrotfish_stoplight/parrotfish_stoplight.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"parrotfish_stoplight" display_name = "stoplight parrotfish" -active = false +active = true catalog_number = 5503 collection_group = &"Reef grazers" logbook_fact = "stoplight parrotfish change color dramatically as they mature. powerful dental plates bite algae from hard reef surfaces." @@ -27,3 +28,4 @@ weight_max_lb = 15.0 sell_value_min = 12 sell_value_max = 29 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/peacock_bass/peacock_bass.tres b/fish/species/peacock_bass/peacock_bass.tres index eaae159..7cfbb5d 100644 --- a/fish/species/peacock_bass/peacock_bass.tres +++ b/fish/species/peacock_bass/peacock_bass.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"peacock_bass" display_name = "peacock bass" -active = false +active = true catalog_number = 7604 collection_group = &"Tropical freshwater predators" logbook_fact = "peacock bass are aggressive south american cichlids rather than true bass. adults guard nests and hunt fish in warm clear water." @@ -27,3 +28,4 @@ weight_max_lb = 25.0 sell_value_min = 15 sell_value_max = 36 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/permit/permit.tres b/fish/species/permit/permit.tres index f9c0d95..f58283c 100644 --- a/fish/species/permit/permit.tres +++ b/fish/species/permit/permit.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"permit" display_name = "permit" -active = false +active = true catalog_number = 7404 collection_group = &"Tropical flats fish" logbook_fact = "permit browse tropical flats for crabs and shellfish with rubbery mouths. tall silver bodies carry long sickle-shaped dorsal and anal fins." @@ -28,3 +29,4 @@ weight_max_lb = 50.0 sell_value_min = 27 sell_value_max = 62 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pickerel_chain/pickerel_chain.tres b/fish/species/pickerel_chain/pickerel_chain.tres index eec103a..db02b7f 100644 --- a/fish/species/pickerel_chain/pickerel_chain.tres +++ b/fish/species/pickerel_chain/pickerel_chain.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"pickerel_chain" display_name = "chain pickerel" -active = false +active = true catalog_number = 3301 collection_group = &"Freshwater predators" logbook_fact = "chain pickerel hover among vegetation before darting at fish and frogs. a chain-like pattern breaks up their green flanks." @@ -28,3 +29,4 @@ weight_max_lb = 9.0 sell_value_min = 6 sell_value_max = 15 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pickerel_grass/pickerel_grass.tres b/fish/species/pickerel_grass/pickerel_grass.tres index 1a25625..9ef8952 100644 --- a/fish/species/pickerel_grass/pickerel_grass.tres +++ b/fish/species/pickerel_grass/pickerel_grass.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pickerel_grass" display_name = "grass pickerel" -active = false +active = true catalog_number = 3302 collection_group = &"Freshwater predators" logbook_fact = "grass pickerel remain small enough to hunt in narrow, weedy creeks and marshes. dark bars camouflage their slim bodies among stems." @@ -27,3 +28,4 @@ weight_max_lb = 1.5 sell_value_min = 2 sell_value_max = 6 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pike_northern/pike_northern.tres b/fish/species/pike_northern/pike_northern.tres index b7594d1..05f1ed7 100644 --- a/fish/species/pike_northern/pike_northern.tres +++ b/fish/species/pike_northern/pike_northern.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pike_northern" display_name = "northern pike" -active = false +active = true catalog_number = 3303 collection_group = &"Freshwater predators" logbook_fact = "northern pike are solitary ambush hunters built for sudden acceleration. pale bean-shaped spots cover their long green bodies." @@ -27,3 +28,4 @@ weight_max_lb = 30.0 sell_value_min = 8 sell_value_max = 24 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pipefish_bay/pipefish_bay.tres b/fish/species/pipefish_bay/pipefish_bay.tres index 3bc3407..0436a8a 100644 --- a/fish/species/pipefish_bay/pipefish_bay.tres +++ b/fish/species/pipefish_bay/pipefish_bay.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pipefish_bay" display_name = "bay pipefish" -active = false +active = true catalog_number = 601 collection_group = &"Coastal oddities" logbook_fact = "bay pipefish hide upright among seagrass, matching the blades with their slender bodies. males carry developing eggs in a brood pouch." @@ -27,3 +28,4 @@ weight_max_lb = 0.04 sell_value_min = 4 sell_value_max = 9 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/piranha_red_bellied/piranha_red_bellied.tres b/fish/species/piranha_red_bellied/piranha_red_bellied.tres index ea52350..ebc9fab 100644 --- a/fish/species/piranha_red_bellied/piranha_red_bellied.tres +++ b/fish/species/piranha_red_bellied/piranha_red_bellied.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"piranha_red_bellied" display_name = "red-bellied piranha" -active = false +active = true catalog_number = 7605 collection_group = &"Tropical freshwater predators" logbook_fact = "red-bellied piranhas communicate with barks and drum-like sounds. schools provide protection as they search for fish, insects, and carrion." @@ -27,3 +28,4 @@ weight_max_lb = 4.0 sell_value_min = 12 sell_value_max = 27 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/plaice_european/plaice_european.tres b/fish/species/plaice_european/plaice_european.tres index 17ea57f..e66f162 100644 --- a/fish/species/plaice_european/plaice_european.tres +++ b/fish/species/plaice_european/plaice_european.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"plaice_european" display_name = "European plaice" -active = false +active = true catalog_number = 401 collection_group = &"Coastal flatfish" logbook_fact = "european plaice lie flat on the seafloor with both eyes on the same side. orange spots help distinguish them from neighboring flatfish." @@ -27,3 +28,4 @@ weight_max_lb = 10.0 sell_value_min = 4 sell_value_max = 10 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pollock_alaska/pollock_alaska.tres b/fish/species/pollock_alaska/pollock_alaska.tres index aebdcf4..e9add13 100644 --- a/fish/species/pollock_alaska/pollock_alaska.tres +++ b/fish/species/pollock_alaska/pollock_alaska.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"pollock_alaska" display_name = "Alaska pollock" -active = false +active = true catalog_number = 1401 collection_group = &"Cold shelf fish" logbook_fact = "alaska pollock form vast schools over cold northern shelves. they feed on plankton and fish while supporting many larger predators." @@ -26,3 +27,4 @@ weight_max_lb = 8.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pollock_atlantic/pollock_atlantic.tres b/fish/species/pollock_atlantic/pollock_atlantic.tres index 9e3c322..494dd23 100644 --- a/fish/species/pollock_atlantic/pollock_atlantic.tres +++ b/fish/species/pollock_atlantic/pollock_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"pollock_atlantic" display_name = "Atlantic pollock" -active = false +active = true catalog_number = 1403 collection_group = &"Cold shelf fish" logbook_fact = "atlantic pollock are swift relatives of cod with dark backs and pale lateral lines. adults gather around rocky banks and wrecks." @@ -28,3 +29,4 @@ weight_max_lb = 35.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pomfret_black/pomfret_black.tres b/fish/species/pomfret_black/pomfret_black.tres index 517e5d5..a3c9e54 100644 --- a/fish/species/pomfret_black/pomfret_black.tres +++ b/fish/species/pomfret_black/pomfret_black.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://ch3y6xdo22j1o" path="res://fish/species/pomfret_black/fish_pomfret_black.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="PomfretBlackAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/pomfret_chinese/pomfret_chinese.tres b/fish/species/pomfret_chinese/pomfret_chinese.tres index 313c0bf..e3f236c 100644 --- a/fish/species/pomfret_chinese/pomfret_chinese.tres +++ b/fish/species/pomfret_chinese/pomfret_chinese.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://cijr0gseldncc" path="res://fish/species/pomfret_chinese/fish_pomfret_chinese.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="PomfretChineseAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/pomfret_golden/pomfret_golden.tres b/fish/species/pomfret_golden/pomfret_golden.tres index bcd2469..162a2e7 100644 --- a/fish/species/pomfret_golden/pomfret_golden.tres +++ b/fish/species/pomfret_golden/pomfret_golden.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://7rjv7k60bv7q" path="res://fish/species/pomfret_golden/fish_pomfret_golden.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="PomfretGoldenAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/pomfret_white/pomfret_white.tres b/fish/species/pomfret_white/pomfret_white.tres index c4114db..8652e63 100644 --- a/fish/species/pomfret_white/pomfret_white.tres +++ b/fish/species/pomfret_white/pomfret_white.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://c3fr0x4e1nfe0" path="res://fish/species/pomfret_white/fish_pomfret_white.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="PomfretWhiteAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/pompano_african/pompano_african.tres b/fish/species/pompano_african/pompano_african.tres index d0f6559..598da61 100644 --- a/fish/species/pompano_african/pompano_african.tres +++ b/fish/species/pompano_african/pompano_african.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"pompano_african" display_name = "African pompano" -active = false +active = true catalog_number = 3601 collection_group = &"Large coastal predators" logbook_fact = "african pompano develop long streaming fin rays while young. adults become deep-bodied silver hunters around reefs and offshore structure." @@ -26,3 +27,4 @@ weight_max_lb = 50.0 sell_value_min = 14 sell_value_max = 35 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pompano_florida/pompano_florida.tres b/fish/species/pompano_florida/pompano_florida.tres index 7ef5dd2..b21035c 100644 --- a/fish/species/pompano_florida/pompano_florida.tres +++ b/fish/species/pompano_florida/pompano_florida.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"pompano_florida" display_name = "Florida pompano" -active = false +active = true catalog_number = 7402 collection_group = &"Tropical flats fish" logbook_fact = "florida pompano search warm surf for crabs, clams, and sand fleas. short blunt snouts lead into deep, silvery bodies." @@ -28,3 +29,4 @@ weight_max_lb = 9.0 sell_value_min = 7 sell_value_max = 16 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/porcupinefish_spotted/porcupinefish_spotted.tres b/fish/species/porcupinefish_spotted/porcupinefish_spotted.tres index 1e03d89..93d5dca 100644 --- a/fish/species/porcupinefish_spotted/porcupinefish_spotted.tres +++ b/fish/species/porcupinefish_spotted/porcupinefish_spotted.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"porcupinefish_spotted" display_name = "spotted porcupinefish" -active = false +active = true catalog_number = 5607 collection_group = &"Reef oddities" logbook_fact = "spotted porcupinefish inflate until long spines stand outward. fused teeth form a strong beak for crushing shelled prey." @@ -28,3 +29,4 @@ weight_max_lb = 7.0 sell_value_min = 24 sell_value_max = 54 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/porgy_scup/porgy_scup.tres b/fish/species/porgy_scup/porgy_scup.tres index ebf9b50..ad96831 100644 --- a/fish/species/porgy_scup/porgy_scup.tres +++ b/fish/species/porgy_scup/porgy_scup.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6904.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"porgy_scup" display_name = "scup" -active = false +active = true catalog_number = 6904 collection_group = &"Temperate reef fish" logbook_fact = "scup use small strong teeth to crush shellfish and other bottom prey. deep silver bodies gather around piers, reefs, and eelgrass." @@ -27,3 +28,4 @@ weight_max_lb = 5.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.92 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres b/fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres index e75ee2d..754cf4d 100644 --- a/fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres +++ b/fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pufferfish_guineafowl" display_name = "guineafowl puffer" -active = false +active = true catalog_number = 5603 collection_group = &"Reef oddities" logbook_fact = "guineafowl puffers swallow water to inflate when threatened. adults may shift from a spotted dark pattern to a vivid yellow form." @@ -27,3 +28,4 @@ weight_max_lb = 5.0 sell_value_min = 11 sell_value_max = 26 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/pumpkinseed/pumpkinseed.tres b/fish/species/pumpkinseed/pumpkinseed.tres index d0ddcd3..7a4f090 100644 --- a/fish/species/pumpkinseed/pumpkinseed.tres +++ b/fish/species/pumpkinseed/pumpkinseed.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3104.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pumpkinseed" display_name = "pumpkinseed" -active = false +active = true catalog_number = 3104 collection_group = &"Freshwater panfish" logbook_fact = "pumpkinseeds use compact teeth to crush snails and other hard prey. blue facial lines and an orange gill spot brighten their round bodies." @@ -27,3 +28,4 @@ weight_max_lb = 1.3 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/queenfish_talang/queenfish_talang.tres b/fish/species/queenfish_talang/queenfish_talang.tres index 145d0de..d6ee3be 100644 --- a/fish/species/queenfish_talang/queenfish_talang.tres +++ b/fish/species/queenfish_talang/queenfish_talang.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"queenfish_talang" display_name = "talang queenfish" -active = false +active = true catalog_number = 708 collection_group = &"Coastal pelagic fish" logbook_fact = "talang queenfish chase schooling prey near warm coasts and estuaries. hooked teeth and a deeply forked tail suit their rapid attacks." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/quillback/quillback.tres b/fish/species/quillback/quillback.tres index 6f59e17..2ca6399 100644 --- a/fish/species/quillback/quillback.tres +++ b/fish/species/quillback/quillback.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"quillback" display_name = "quillback" -active = false +active = true catalog_number = 2303 collection_group = &"Freshwater bottom fish" logbook_fact = "quillbacks carry a long first dorsal ray that rises like a quill. small mouths gather insect larvae and other food from river and lake bottoms." @@ -27,3 +28,4 @@ weight_max_lb = 15.0 sell_value_min = 6 sell_value_max = 16 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/red_drum/red_drum.tres b/fish/species/red_drum/red_drum.tres index 7cbaecc..393a002 100644 --- a/fish/species/red_drum/red_drum.tres +++ b/fish/species/red_drum/red_drum.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"red_drum" display_name = "red drum" -active = false +active = true catalog_number = 6803 collection_group = &"Temperate estuary" logbook_fact = "red drum use powerful tails to patrol surf and estuaries. one or more black spots near the tail may confuse predators about which end is the head." @@ -27,3 +28,4 @@ weight_max_lb = 45.0 sell_value_min = 8 sell_value_max = 23 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/redear_sunfish/redear_sunfish.tres b/fish/species/redear_sunfish/redear_sunfish.tres index 44a3729..6078d20 100644 --- a/fish/species/redear_sunfish/redear_sunfish.tres +++ b/fish/species/redear_sunfish/redear_sunfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"redear_sunfish" display_name = "redear sunfish" -active = false +active = true catalog_number = 3105 collection_group = &"Freshwater panfish" logbook_fact = "redear sunfish specialize in snails, crushing shells with strong throat teeth. a red or orange margin marks the dark flap behind the gill." @@ -27,3 +28,4 @@ weight_max_lb = 3.0 sell_value_min = 4 sell_value_max = 9 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/redhorse_golden/redhorse_golden.tres b/fish/species/redhorse_golden/redhorse_golden.tres index 44ae38f..5ba103b 100644 --- a/fish/species/redhorse_golden/redhorse_golden.tres +++ b/fish/species/redhorse_golden/redhorse_golden.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"redhorse_golden" display_name = "golden redhorse" -active = false +active = true catalog_number = 2302 collection_group = &"Freshwater bottom fish" logbook_fact = "golden redhorses probe flowing river bottoms with fleshy, downward-facing mouths. coppery scales and reddish fins give them a warm glow." @@ -27,3 +28,4 @@ weight_max_lb = 8.0 sell_value_min = 6 sell_value_max = 14 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/roach_common/roach_common.tres b/fish/species/roach_common/roach_common.tres index ce38873..c12d380 100644 --- a/fish/species/roach_common/roach_common.tres +++ b/fish/species/roach_common/roach_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2504.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"roach_common" display_name = "common roach" -active = false +active = true catalog_number = 2504 collection_group = &"Freshwater coarse fish" logbook_fact = "common roach thrive in many lakes and rivers, often schooling near vegetation. red fins and a red-orange eye brighten their silver bodies." @@ -26,3 +27,4 @@ weight_max_lb = 4.0 sell_value_min = 2 sell_value_max = 6 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/rockfish_black/rockfish_black.tres b/fish/species/rockfish_black/rockfish_black.tres index 21cd186..c37b427 100644 --- a/fish/species/rockfish_black/rockfish_black.tres +++ b/fish/species/rockfish_black/rockfish_black.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6901.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"rockfish_black" display_name = "black rockfish" -active = false +active = true catalog_number = 6901 collection_group = &"Temperate reef fish" logbook_fact = "black rockfish gather above reefs and kelp along the north pacific coast. like other rockfish, they give birth to live young." @@ -26,3 +27,4 @@ weight_max_lb = 10.0 sell_value_min = 4 sell_value_max = 11 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/rockfish_canary/rockfish_canary.tres b/fish/species/rockfish_canary/rockfish_canary.tres index e20e655..1e65d72 100644 --- a/fish/species/rockfish_canary/rockfish_canary.tres +++ b/fish/species/rockfish_canary/rockfish_canary.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"rockfish_canary" display_name = "canary rockfish" -active = false +active = true catalog_number = 6903 collection_group = &"Temperate reef fish" logbook_fact = "canary rockfish glow orange-yellow over deep pacific reefs. these long-lived fish mature slowly and give birth to live young." @@ -27,3 +28,4 @@ weight_max_lb = 12.0 sell_value_min = 7 sell_value_max = 17 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/rockfish_yelloweye/rockfish_yelloweye.tres b/fish/species/rockfish_yelloweye/rockfish_yelloweye.tres index 79e8d75..89aab8e 100644 --- a/fish/species/rockfish_yelloweye/rockfish_yelloweye.tres +++ b/fish/species/rockfish_yelloweye/rockfish_yelloweye.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"rockfish_yelloweye" display_name = "yelloweye rockfish" -active = false +active = true catalog_number = 6907 collection_group = &"Temperate reef fish" logbook_fact = "yelloweye rockfish can live for more than a century on deep pacific reefs. bright golden eyes stand out against orange-red bodies." @@ -27,3 +28,4 @@ weight_max_lb = 35.0 sell_value_min = 28 sell_value_max = 64 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/roosterfish/roosterfish.tres b/fish/species/roosterfish/roosterfish.tres index 19c009c..388dd70 100644 --- a/fish/species/roosterfish/roosterfish.tres +++ b/fish/species/roosterfish/roosterfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"roosterfish" display_name = "roosterfish" -active = false +active = true catalog_number = 7201 collection_group = &"Tropical coastal predators" logbook_fact = "roosterfish raise seven long dorsal spines while chasing prey through tropical surf. dark bands cross their sleek silver bodies." @@ -27,3 +28,4 @@ weight_max_lb = 100.0 sell_value_min = 30 sell_value_max = 70 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/rudd/rudd.tres b/fish/species/rudd/rudd.tres index 6ef01aa..5de8d57 100644 --- a/fish/species/rudd/rudd.tres +++ b/fish/species/rudd/rudd.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2508.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"rudd" display_name = "rudd" -active = false +active = true catalog_number = 2508 collection_group = &"Freshwater coarse fish" logbook_fact = "rudd feed near the surface with an upturned mouth and red fins. golden-green bodies disappear easily among warm, weedy shallows." @@ -27,3 +28,4 @@ weight_max_lb = 4.5 sell_value_min = 3 sell_value_max = 7 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sablefish/sablefish.tres b/fish/species/sablefish/sablefish.tres index 28daaf3..e481e52 100644 --- a/fish/species/sablefish/sablefish.tres +++ b/fish/species/sablefish/sablefish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sablefish" display_name = "sablefish" -active = false +active = true catalog_number = 1605 collection_group = &"Deep shelf fish" logbook_fact = "sablefish roam deep north pacific slopes and can live for many decades. soft dark bodies conceal rich, oil-filled flesh." @@ -27,3 +28,4 @@ weight_max_lb = 40.0 sell_value_min = 15 sell_value_max = 36 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sailfish/sailfish.tres b/fish/species/sailfish/sailfish.tres index 7826b0b..98e958d 100644 --- a/fish/species/sailfish/sailfish.tres +++ b/fish/species/sailfish/sailfish.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://8rlcnfqx8or0" path="res://fish/species/sailfish/fish_sailfish.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SailfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/salmon_atlantic/salmon_atlantic.tres b/fish/species/salmon_atlantic/salmon_atlantic.tres index 802c177..1c77325 100644 --- a/fish/species/salmon_atlantic/salmon_atlantic.tres +++ b/fish/species/salmon_atlantic/salmon_atlantic.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://ddbclfu5wtd5r" path="res://fish/species/salmon_atlantic/fish_salmon_atlantic.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/4401.png" id="4_texture"] [sub_resource type="Resource" id="AtlanticSalmonAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/salmon_chum/salmon_chum.tres b/fish/species/salmon_chum/salmon_chum.tres index a41a410..8fcabd0 100644 --- a/fish/species/salmon_chum/salmon_chum.tres +++ b/fish/species/salmon_chum/salmon_chum.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://dqjkmd6l1a2i4" path="res://fish/species/salmon_chum/fish_salmon_chum.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="ChumSalmonAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/salmon_coho/salmon_coho.tres b/fish/species/salmon_coho/salmon_coho.tres index 89d1ea5..b1160b1 100644 --- a/fish/species/salmon_coho/salmon_coho.tres +++ b/fish/species/salmon_coho/salmon_coho.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://c4c4e43lbr88c" path="res://fish/species/salmon_coho/fish_salmon_coho.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="CohoSalmonAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/salmon_pink/salmon_pink.tres b/fish/species/salmon_pink/salmon_pink.tres index 94e2f32..bdfa32e 100644 --- a/fish/species/salmon_pink/salmon_pink.tres +++ b/fish/species/salmon_pink/salmon_pink.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bk27bsdrtlqap" path="res://fish/species/salmon_pink/fish_salmon_pink.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="PinkSalmonAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/salmon_sockeye/salmon_sockeye.tres b/fish/species/salmon_sockeye/salmon_sockeye.tres index dd440e1..7bd4b1a 100644 --- a/fish/species/salmon_sockeye/salmon_sockeye.tres +++ b/fish/species/salmon_sockeye/salmon_sockeye.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://cmokm3sra4ai8" path="res://fish/species/salmon_sockeye/fish_salmon_sockeye.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SockeyeSalmonAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/sand_dollar/sand_dollar.tres b/fish/species/sand_dollar/sand_dollar.tres index 3d1b523..f780203 100644 --- a/fish/species/sand_dollar/sand_dollar.tres +++ b/fish/species/sand_dollar/sand_dollar.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"sand_dollar" display_name = "sand dollar" -active = false +active = true catalog_number = 1904 collection_group = &"Echinoderms" logbook_fact = "sand dollars burrow just beneath sandy seafloors and filter tiny food particles. the familiar star pattern marks their five-part body plan." @@ -28,3 +29,4 @@ weight_max_lb = 0.2 sell_value_min = 4 sell_value_max = 10 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sand_lance_american/sand_lance_american.tres b/fish/species/sand_lance_american/sand_lance_american.tres index 7080235..18f16be 100644 --- a/fish/species/sand_lance_american/sand_lance_american.tres +++ b/fish/species/sand_lance_american/sand_lance_american.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/801.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sand_lance_american" display_name = "American sand lance" -active = false +active = true catalog_number = 801 collection_group = &"Coastal schooling fish" logbook_fact = "american sand lance dive headfirst into loose sand when danger approaches. immense schools carry energy from plankton to larger predators." @@ -27,3 +28,4 @@ weight_max_lb = 0.4 sell_value_min = 1 sell_value_max = 3 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sardine_european/sardine_european.tres b/fish/species/sardine_european/sardine_european.tres index 87a64c2..54008f8 100644 --- a/fish/species/sardine_european/sardine_european.tres +++ b/fish/species/sardine_european/sardine_european.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/806.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sardine_european" display_name = "European pilchard" -active = false +active = true catalog_number = 806 collection_group = &"Coastal schooling fish" logbook_fact = "european pilchards form shimmering schools along atlantic and mediterranean coasts. they feed mainly on plankton near the surface." @@ -26,3 +27,4 @@ weight_max_lb = 0.6 sell_value_min = 2 sell_value_max = 4 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sardine_pacific/sardine_pacific.tres b/fish/species/sardine_pacific/sardine_pacific.tres index 41c98a0..bea772d 100644 --- a/fish/species/sardine_pacific/sardine_pacific.tres +++ b/fish/species/sardine_pacific/sardine_pacific.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sardine_pacific" display_name = "Pacific sardine" -active = false +active = true catalog_number = 809 collection_group = &"Coastal schooling fish" logbook_fact = "pacific sardines follow cool, productive water in enormous schools. their movements shift as currents and plankton supplies change." @@ -26,3 +27,4 @@ weight_max_lb = 0.5 sell_value_min = 2 sell_value_max = 4 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sauger/sauger.tres b/fish/species/sauger/sauger.tres index 3ed1fc2..3248bcb 100644 --- a/fish/species/sauger/sauger.tres +++ b/fish/species/sauger/sauger.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://8k7qkk4juciy" path="res://fish/species/sauger/fish_sauger.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SaugerAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/saugeye/saugeye.tres b/fish/species/saugeye/saugeye.tres index 63ea616..d6f09cf 100644 --- a/fish/species/saugeye/saugeye.tres +++ b/fish/species/saugeye/saugeye.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://lom25y0eqcw3" path="res://fish/species/saugeye/fish_saugeye.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SaugeyeAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/sawfish_largetooth/sawfish_largetooth.tres b/fish/species/sawfish_largetooth/sawfish_largetooth.tres index ce5602d..ac4680b 100644 --- a/fish/species/sawfish_largetooth/sawfish_largetooth.tres +++ b/fish/species/sawfish_largetooth/sawfish_largetooth.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"sawfish_largetooth" display_name = "largetooth sawfish" -active = false +active = true catalog_number = 5103 collection_group = &"Rays and skates" logbook_fact = "largetooth sawfish detect hidden prey with a long sensory rostrum. a swift sideways sweep stuns fish and exposes animals buried in mud." @@ -28,3 +29,4 @@ weight_max_lb = 1300.0 sell_value_min = 58 sell_value_max = 135 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/scorpionfish_red/scorpionfish_red.tres b/fish/species/scorpionfish_red/scorpionfish_red.tres index 4848d54..baf9046 100644 --- a/fish/species/scorpionfish_red/scorpionfish_red.tres +++ b/fish/species/scorpionfish_red/scorpionfish_red.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"scorpionfish_red" display_name = "red scorpionfish" -active = false +active = true catalog_number = 5202 collection_group = &"Reef ambush fish" logbook_fact = "red scorpionfish vanish against rocky reefs through mottled color and skin flaps. venomous dorsal spines punish careless predators." @@ -27,3 +28,4 @@ weight_max_lb = 7.0 sell_value_min = 11 sell_value_max = 25 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sea_bass_black/sea_bass_black.tres b/fish/species/sea_bass_black/sea_bass_black.tres index 54581d8..7a5b567 100644 --- a/fish/species/sea_bass_black/sea_bass_black.tres +++ b/fish/species/sea_bass_black/sea_bass_black.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6902.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sea_bass_black" display_name = "black sea bass" -active = false +active = true catalog_number = 6902 collection_group = &"Temperate reef fish" logbook_fact = "black sea bass shelter around reefs, piers, and wrecks. many begin life as female and later become male." @@ -27,3 +28,4 @@ weight_max_lb = 8.0 sell_value_min = 4 sell_value_max = 10 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sea_bass_chilean/sea_bass_chilean.tres b/fish/species/sea_bass_chilean/sea_bass_chilean.tres index 15cf997..dd9afac 100644 --- a/fish/species/sea_bass_chilean/sea_bass_chilean.tres +++ b/fish/species/sea_bass_chilean/sea_bass_chilean.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sea_bass_chilean" display_name = "Patagonian toothfish" -active = false +active = true catalog_number = 1604 collection_group = &"Deep shelf fish" logbook_fact = "patagonian toothfish patrol cold, deep southern water with large canine teeth. natural antifreeze proteins protect their blood from freezing." @@ -27,3 +28,4 @@ weight_max_lb = 220.0 sell_value_min = 32 sell_value_max = 78 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sea_cucumber_giant_california/sea_cucumber_giant_california.tres b/fish/species/sea_cucumber_giant_california/sea_cucumber_giant_california.tres index 7118382..bc1ca41 100644 --- a/fish/species/sea_cucumber_giant_california/sea_cucumber_giant_california.tres +++ b/fish/species/sea_cucumber_giant_california/sea_cucumber_giant_california.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"sea_cucumber_giant_california" display_name = "giant California sea cucumber" -active = false +active = true catalog_number = 1902 collection_group = &"Echinoderms" logbook_fact = "giant california sea cucumbers sweep organic particles from the seafloor with branching tentacles. soft tube feet anchor their long bodies." @@ -28,3 +29,4 @@ weight_max_lb = 5.0 sell_value_min = 13 sell_value_max = 29 sell_value_curve = 0.93 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sea_otter/sea_otter.tres b/fish/species/sea_otter/sea_otter.tres index 7cf9ebe..c5f4bfc 100644 --- a/fish/species/sea_otter/sea_otter.tres +++ b/fish/species/sea_otter/sea_otter.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sea_otter" display_name = "sea otter" -active = false +active = true catalog_number = 503 collection_group = &"Coastal marine mammals" logbook_fact = "sea otters float on their backs while opening shellfish with stones. dense fur traps insulating air because they lack a thick blubber layer." @@ -27,3 +28,4 @@ weight_max_lb = 100.0 sell_value_min = 55 sell_value_max = 125 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sea_star_crown_of_thorns/sea_star_crown_of_thorns.tres b/fish/species/sea_star_crown_of_thorns/sea_star_crown_of_thorns.tres index 37ecb8d..5e73beb 100644 --- a/fish/species/sea_star_crown_of_thorns/sea_star_crown_of_thorns.tres +++ b/fish/species/sea_star_crown_of_thorns/sea_star_crown_of_thorns.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"sea_star_crown_of_thorns" display_name = "crown-of-thorns sea star" -active = false +active = true catalog_number = 1901 collection_group = &"Echinoderms" logbook_fact = "crown-of-thorns sea stars crawl over reefs and digest coral tissue outside the body. venomous spines discourage many predators." @@ -28,3 +29,4 @@ weight_max_lb = 7.0 sell_value_min = 23 sell_value_max = 52 sell_value_curve = 0.91 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sea_star_sunflower/sea_star_sunflower.tres b/fish/species/sea_star_sunflower/sea_star_sunflower.tres index c1f60eb..6bf1dc2 100644 --- a/fish/species/sea_star_sunflower/sea_star_sunflower.tres +++ b/fish/species/sea_star_sunflower/sea_star_sunflower.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"sea_star_sunflower" display_name = "sunflower sea star" -active = false +active = true catalog_number = 1905 collection_group = &"Echinoderms" logbook_fact = "sunflower sea stars move quickly on thousands of tube feet and may carry many arms. they hunt urchins, clams, and other bottom animals." @@ -28,3 +29,4 @@ weight_max_lb = 13.0 sell_value_min = 14 sell_value_max = 32 sell_value_curve = 0.89 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/seadragon_leafy/seadragon_leafy.tres b/fish/species/seadragon_leafy/seadragon_leafy.tres index 0033d9c..1481d73 100644 --- a/fish/species/seadragon_leafy/seadragon_leafy.tres +++ b/fish/species/seadragon_leafy/seadragon_leafy.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"seadragon_leafy" display_name = "leafy seadragon" -active = false +active = true catalog_number = 6301 collection_group = &"Seahorses and seadragons" logbook_fact = "leafy seadragons drift among seaweed with elaborate skin lobes that resemble leaves. males carry eggs beneath the tail." @@ -28,3 +29,4 @@ weight_max_lb = 0.5 sell_value_min = 24 sell_value_max = 55 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/seadragon_weedy/seadragon_weedy.tres b/fish/species/seadragon_weedy/seadragon_weedy.tres index 1b99790..bc1768b 100644 --- a/fish/species/seadragon_weedy/seadragon_weedy.tres +++ b/fish/species/seadragon_weedy/seadragon_weedy.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"seadragon_weedy" display_name = "weedy seadragon" -active = false +active = true catalog_number = 6302 collection_group = &"Seahorses and seadragons" logbook_fact = "weedy seadragons rely on slender bodies and small leaf-like lobes for camouflage. males brood rows of eggs on the underside of the tail." @@ -28,3 +29,4 @@ weight_max_lb = 0.6 sell_value_min = 16 sell_value_max = 38 sell_value_curve = 0.93 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/seahorse_lined/seahorse_lined.tres b/fish/species/seahorse_lined/seahorse_lined.tres index 1f533a0..0121fab 100644 --- a/fish/species/seahorse_lined/seahorse_lined.tres +++ b/fish/species/seahorse_lined/seahorse_lined.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"seahorse_lined" display_name = "lined seahorse" -active = false +active = true catalog_number = 602 collection_group = &"Coastal oddities" logbook_fact = "lined seahorses anchor to grass and coral with curling tails. the male broods eggs in a pouch and releases fully formed young." @@ -28,3 +29,4 @@ weight_max_lb = 0.05 sell_value_min = 9 sell_value_max = 20 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/seal_harbor/seal_harbor.tres b/fish/species/seal_harbor/seal_harbor.tres index bdc0e46..5689a14 100644 --- a/fish/species/seal_harbor/seal_harbor.tres +++ b/fish/species/seal_harbor/seal_harbor.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"seal_harbor" display_name = "harbor seal" -active = false +active = true catalog_number = 502 collection_group = &"Coastal marine mammals" logbook_fact = "harbor seals rest on rocky shores and sandbars between hunting trips. sensitive whiskers can trace the water trails left by moving fish." @@ -28,3 +29,4 @@ weight_max_lb = 370.0 sell_value_min = 60 sell_value_max = 140 sell_value_curve = 0.79 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shark_blacktip/shark_blacktip.tres b/fish/species/shark_blacktip/shark_blacktip.tres index b5d4ca9..e7fc4e6 100644 --- a/fish/species/shark_blacktip/shark_blacktip.tres +++ b/fish/species/shark_blacktip/shark_blacktip.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"shark_blacktip" display_name = "blacktip shark" -active = false +active = true catalog_number = 901 collection_group = &"Coastal sharks" logbook_fact = "blacktip sharks are named for the dark markings on their fins. they hunt schooling fish in warm shallows and sometimes leap clear of the water." @@ -28,3 +29,4 @@ weight_max_lb = 150.0 sell_value_min = 32 sell_value_max = 75 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shark_great_hammerhead/shark_great_hammerhead.tres b/fish/species/shark_great_hammerhead/shark_great_hammerhead.tres index a2edcf0..a9b612e 100644 --- a/fish/species/shark_great_hammerhead/shark_great_hammerhead.tres +++ b/fish/species/shark_great_hammerhead/shark_great_hammerhead.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"shark_great_hammerhead" display_name = "great hammerhead shark" -active = false +active = true catalog_number = 902 collection_group = &"Coastal sharks" logbook_fact = "great hammerheads sweep their wide heads over the bottom while searching for rays. widely spaced senses help pinpoint hidden prey." @@ -28,3 +29,4 @@ weight_max_lb = 1000.0 sell_value_min = 62 sell_value_max = 145 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shark_great_white/shark_great_white.tres b/fish/species/shark_great_white/shark_great_white.tres index 80688cd..afd1cd0 100644 --- a/fish/species/shark_great_white/shark_great_white.tres +++ b/fish/species/shark_great_white/shark_great_white.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"shark_great_white" display_name = "great white shark" -active = false +active = true catalog_number = 903 collection_group = &"Coastal sharks" logbook_fact = "great white sharks conserve heat in their swimming muscles while crossing cool seas. rows of serrated teeth are replaced throughout life." @@ -27,3 +28,4 @@ weight_max_lb = 1000.0 sell_value_min = 70 sell_value_max = 150 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shark_tiger/shark_tiger.tres b/fish/species/shark_tiger/shark_tiger.tres index a7a9bcf..72e2577 100644 --- a/fish/species/shark_tiger/shark_tiger.tres +++ b/fish/species/shark_tiger/shark_tiger.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"shark_tiger" display_name = "tiger shark" -active = false +active = true catalog_number = 904 collection_group = &"Coastal sharks" logbook_fact = "tiger sharks carry dark vertical bars that fade as they mature. broad jaws let them investigate an unusually varied range of prey." @@ -28,3 +29,4 @@ weight_max_lb = 1000.0 sell_value_min = 50 sell_value_max = 120 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shark_whale/shark_whale.tres b/fish/species/shark_whale/shark_whale.tres index 7c78314..81739db 100644 --- a/fish/species/shark_whale/shark_whale.tres +++ b/fish/species/shark_whale/shark_whale.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"shark_whale" display_name = "whale shark" -active = false +active = true catalog_number = 905 collection_group = &"Coastal sharks" logbook_fact = "whale sharks are enormous filter feeders covered in unique spot patterns. they cruise with open mouths to collect plankton and tiny fish." @@ -28,3 +29,4 @@ weight_max_lb = 45000.0 sell_value_min = 70 sell_value_max = 160 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sheepshead/sheepshead.tres b/fish/species/sheepshead/sheepshead.tres index d323533..d4b8cfa 100644 --- a/fish/species/sheepshead/sheepshead.tres +++ b/fish/species/sheepshead/sheepshead.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6905.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sheepshead" display_name = "sheepshead" -active = false +active = true catalog_number = 6905 collection_group = &"Temperate reef fish" logbook_fact = "sheepshead carry flat human-like front teeth for biting barnacles and crabs. dark bars cross their high silver bodies." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shiner_common/shiner_common.tres b/fish/species/shiner_common/shiner_common.tres index 303a4b3..5a8a2f3 100644 --- a/fish/species/shiner_common/shiner_common.tres +++ b/fish/species/shiner_common/shiner_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2801.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"shiner_common" display_name = "common shiner" -active = false +active = true catalog_number = 2801 collection_group = &"Freshwater minnows" logbook_fact = "common shiners flash silver in clear streams and small rivers. breeding males develop rosy fins and a blue-violet sheen." @@ -27,3 +28,4 @@ weight_max_lb = 0.3 sell_value_min = 1 sell_value_max = 3 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shiner_emerald/shiner_emerald.tres b/fish/species/shiner_emerald/shiner_emerald.tres index 5d654a4..8a39e5c 100644 --- a/fish/species/shiner_emerald/shiner_emerald.tres +++ b/fish/species/shiner_emerald/shiner_emerald.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2803.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"shiner_emerald" display_name = "emerald shiner" -active = false +active = true catalog_number = 2803 collection_group = &"Freshwater minnows" logbook_fact = "emerald shiners form bright surface schools in large lakes and rivers. slender bodies feed on plankton and drifting insects." @@ -26,3 +27,4 @@ weight_max_lb = 0.25 sell_value_min = 1 sell_value_max = 3 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shiner_golden/shiner_golden.tres b/fish/species/shiner_golden/shiner_golden.tres index 8eb64bb..af57441 100644 --- a/fish/species/shiner_golden/shiner_golden.tres +++ b/fish/species/shiner_golden/shiner_golden.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/2806.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"shiner_golden" display_name = "golden shiner" -active = false +active = true catalog_number = 2806 collection_group = &"Freshwater minnows" logbook_fact = "golden shiners school around dense vegetation in warm water. an upturned mouth takes insects and plankton from near the surface." @@ -27,3 +28,4 @@ weight_max_lb = 1.0 sell_value_min = 2 sell_value_max = 4 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres b/fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres index d7be4a6..daf7662 100644 --- a/fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres +++ b/fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"shrimp_peacock_mantis" display_name = "peacock mantis shrimp" -active = false +active = true catalog_number = 3804 collection_group = &"Lobsters and shrimp" logbook_fact = "peacock mantis shrimp strike hard-shelled prey with club-like limbs. complex eyes move independently and detect colors beyond human vision." @@ -28,3 +29,4 @@ weight_max_lb = 0.4 sell_value_min = 22 sell_value_max = 50 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres b/fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres index fe9de65..fdd6730 100644 --- a/fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres +++ b/fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"shrimp_skunk_cleaner" display_name = "skunk cleaner shrimp" -active = false +active = true catalog_number = 3805 collection_group = &"Lobsters and shrimp" logbook_fact = "skunk cleaner shrimp advertise at reef cleaning stations with bright white antennae. visiting fish pause while parasites are picked away." @@ -28,3 +29,4 @@ weight_max_lb = 0.15 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/skate_barndoor/skate_barndoor.tres b/fish/species/skate_barndoor/skate_barndoor.tres index b9c8a5d..5ccb967 100644 --- a/fish/species/skate_barndoor/skate_barndoor.tres +++ b/fish/species/skate_barndoor/skate_barndoor.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"skate_barndoor" display_name = "barndoor skate" -active = false +active = true catalog_number = 5101 collection_group = &"Rays and skates" logbook_fact = "barndoor skates glide over cold atlantic bottoms with broad wing-like fins. rows of thorny spines protect the back and tail." @@ -27,3 +28,4 @@ weight_max_lb = 150.0 sell_value_min = 28 sell_value_max = 68 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/smallmouth_bass/smallmouth_bass.tres b/fish/species/smallmouth_bass/smallmouth_bass.tres index e198b2a..d840f32 100644 --- a/fish/species/smallmouth_bass/smallmouth_bass.tres +++ b/fish/species/smallmouth_bass/smallmouth_bass.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"smallmouth_bass" display_name = "smallmouth bass" -active = false +active = true catalog_number = 2202 collection_group = &"Freshwater bass" logbook_fact = "smallmouth bass favor clear water with rock and moving current. bronze flanks and dark vertical bars distinguish them from largemouth bass." @@ -27,3 +28,4 @@ weight_max_lb = 12.0 sell_value_min = 6 sell_value_max = 15 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/smelt_eulachon/smelt_eulachon.tres b/fish/species/smelt_eulachon/smelt_eulachon.tres index 923d467..f3be455 100644 --- a/fish/species/smelt_eulachon/smelt_eulachon.tres +++ b/fish/species/smelt_eulachon/smelt_eulachon.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"smelt_eulachon" display_name = "eulachon" -active = false +active = true catalog_number = 4201 collection_group = &"Ocean-run forage fish" logbook_fact = "eulachon return from the pacific to spawn in coastal rivers. their oil-rich bodies once served as candles when dried and fitted with wicks." @@ -28,3 +29,4 @@ weight_max_lb = 0.5 sell_value_min = 4 sell_value_max = 9 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/smelt_rainbow/smelt_rainbow.tres b/fish/species/smelt_rainbow/smelt_rainbow.tres index 6275187..34691f9 100644 --- a/fish/species/smelt_rainbow/smelt_rainbow.tres +++ b/fish/species/smelt_rainbow/smelt_rainbow.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/4101.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"smelt_rainbow" display_name = "rainbow smelt" -active = false +active = true catalog_number = 4101 collection_group = &"Migratory forage fish" logbook_fact = "rainbow smelt move between coastal water and rivers, though some remain landlocked. cucumber-like aromas cling to freshly caught fish." @@ -27,3 +28,4 @@ weight_max_lb = 0.8 sell_value_min = 2 sell_value_max = 5 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/snakehead_giant/snakehead_giant.tres b/fish/species/snakehead_giant/snakehead_giant.tres index 8efb4d3..069d723 100644 --- a/fish/species/snakehead_giant/snakehead_giant.tres +++ b/fish/species/snakehead_giant/snakehead_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"snakehead_giant" display_name = "giant snakehead" -active = false +active = true catalog_number = 7601 collection_group = &"Tropical freshwater predators" logbook_fact = "giant snakeheads breathe air and guard schools of young near the surface. long bodies launch sudden attacks from flooded vegetation." @@ -28,3 +29,4 @@ weight_max_lb = 45.0 sell_value_min = 28 sell_value_max = 64 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/snapper_lane/snapper_lane.tres b/fish/species/snapper_lane/snapper_lane.tres index 441107c..d91444f 100644 --- a/fish/species/snapper_lane/snapper_lane.tres +++ b/fish/species/snapper_lane/snapper_lane.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://d3d8s30bxq4tp" path="res://fish/species/snapper_lane/fish_snapper_lane.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/6001.png" id="4_texture"] [sub_resource type="Resource" id="SnapperLaneAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/snapper_mangrove/snapper_mangrove.tres b/fish/species/snapper_mangrove/snapper_mangrove.tres index 8767a3f..9a0ede5 100644 --- a/fish/species/snapper_mangrove/snapper_mangrove.tres +++ b/fish/species/snapper_mangrove/snapper_mangrove.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://v34sdv1v7c2x" path="res://fish/species/snapper_mangrove/fish_snapper_mangrove.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SnapperMangroveAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/snapper_mutton/snapper_mutton.tres b/fish/species/snapper_mutton/snapper_mutton.tres index 4f343c3..7c5aee9 100644 --- a/fish/species/snapper_mutton/snapper_mutton.tres +++ b/fish/species/snapper_mutton/snapper_mutton.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://cawvpo8aysw5i" path="res://fish/species/snapper_mutton/fish_snapper_mutton.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SnapperMuttonAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/snapper_red/snapper_red.tres b/fish/species/snapper_red/snapper_red.tres index 7c26926..247edc0 100644 --- a/fish/species/snapper_red/snapper_red.tres +++ b/fish/species/snapper_red/snapper_red.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://ei5scljuqklk" path="res://fish/species/snapper_red/fish_snapper_red.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SnapperRedAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/snook_common/snook_common.tres b/fish/species/snook_common/snook_common.tres index 676e3f4..5b84e99 100644 --- a/fish/species/snook_common/snook_common.tres +++ b/fish/species/snook_common/snook_common.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"snook_common" display_name = "common snook" -active = false +active = true catalog_number = 7303 collection_group = &"Tropical estuary" logbook_fact = "common snook wait around mangrove roots and current seams to ambush prey. a bold black lateral line divides their silver flanks." @@ -28,3 +29,4 @@ weight_max_lb = 30.0 sell_value_min = 13 sell_value_max = 32 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sole_dover/sole_dover.tres b/fish/species/sole_dover/sole_dover.tres index 6083d96..2b522a0 100644 --- a/fish/species/sole_dover/sole_dover.tres +++ b/fish/species/sole_dover/sole_dover.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sole_dover" display_name = "Dover sole" -active = false +active = true catalog_number = 1404 collection_group = &"Cold shelf fish" logbook_fact = "dover sole glide over deep muddy bottoms of the eastern pacific. both eyes migrate to the right side as the young fish becomes flat." @@ -27,3 +28,4 @@ weight_max_lb = 8.0 sell_value_min = 6 sell_value_max = 14 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sprat_european/sprat_european.tres b/fish/species/sprat_european/sprat_european.tres index 61daa00..82f4876 100644 --- a/fish/species/sprat_european/sprat_european.tres +++ b/fish/species/sprat_european/sprat_european.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sprat_european" display_name = "European sprat" -active = false +active = true catalog_number = 1303 collection_group = &"Cold schooling fish" logbook_fact = "european sprat form compact schools in northern coastal seas. these tiny herring relatives feed on plankton near the surface." @@ -26,3 +27,4 @@ weight_max_lb = 0.3 sell_value_min = 1 sell_value_max = 3 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/squid_bigfin_reef/squid_bigfin_reef.tres b/fish/species/squid_bigfin_reef/squid_bigfin_reef.tres index d6b1201..68f8993 100644 --- a/fish/species/squid_bigfin_reef/squid_bigfin_reef.tres +++ b/fish/species/squid_bigfin_reef/squid_bigfin_reef.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"squid_bigfin_reef" display_name = "bigfin reef squid" -active = false +active = true catalog_number = 6501 collection_group = &"Squid" logbook_fact = "bigfin reef squid hover in coordinated groups around warm reefs. shifting colors and body patterns signal to nearby squid." @@ -28,3 +29,4 @@ weight_max_lb = 5.0 sell_value_min = 13 sell_value_max = 30 sell_value_curve = 0.91 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/squid_colossal/squid_colossal.tres b/fish/species/squid_colossal/squid_colossal.tres index 115ab10..4e38896 100644 --- a/fish/species/squid_colossal/squid_colossal.tres +++ b/fish/species/squid_colossal/squid_colossal.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"squid_colossal" display_name = "colossal squid" -active = false +active = true catalog_number = 6502 collection_group = &"Squid" logbook_fact = "colossal squid carry swiveling hooks on their arms and tentacles. enormous eyes gather faint light in the deep southern ocean." @@ -28,3 +29,4 @@ weight_max_lb = 1100.0 sell_value_min = 82 sell_value_max = 190 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/squid_giant/squid_giant.tres b/fish/species/squid_giant/squid_giant.tres index b95efe9..4f76512 100644 --- a/fish/species/squid_giant/squid_giant.tres +++ b/fish/species/squid_giant/squid_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"squid_giant" display_name = "giant squid" -active = false +active = true catalog_number = 6503 collection_group = &"Squid" logbook_fact = "giant squid hunt deep ocean prey with two long feeding tentacles. the largest eyes in the animal world watch for movement in darkness." @@ -28,3 +29,4 @@ weight_max_lb = 600.0 sell_value_min = 70 sell_value_max = 165 sell_value_curve = 0.77 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/squid_humboldt/squid_humboldt.tres b/fish/species/squid_humboldt/squid_humboldt.tres index e9a7d2f..14abcfb 100644 --- a/fish/species/squid_humboldt/squid_humboldt.tres +++ b/fish/species/squid_humboldt/squid_humboldt.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"squid_humboldt" display_name = "Humboldt squid" -active = false +active = true catalog_number = 6504 collection_group = &"Squid" logbook_fact = "humboldt squid flash red and white while hunting in large groups. powerful beaks and grasping suckers handle fish and other squid." @@ -27,3 +28,4 @@ weight_max_lb = 110.0 sell_value_min = 26 sell_value_max = 64 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/stingray_ocellate_river/stingray_ocellate_river.tres b/fish/species/stingray_ocellate_river/stingray_ocellate_river.tres index fce4905..10bf3dc 100644 --- a/fish/species/stingray_ocellate_river/stingray_ocellate_river.tres +++ b/fish/species/stingray_ocellate_river/stingray_ocellate_river.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"stingray_ocellate_river" display_name = "ocellate river stingray" -active = false +active = true catalog_number = 5104 collection_group = &"Rays and skates" logbook_fact = "ocellate river stingrays carry bright eye-like spots across a round disc. they hide beneath sand in south american rivers." @@ -28,3 +29,4 @@ weight_max_lb = 35.0 sell_value_min = 28 sell_value_max = 65 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/stingray_southern/stingray_southern.tres b/fish/species/stingray_southern/stingray_southern.tres index 947cf4d..c0b03f0 100644 --- a/fish/species/stingray_southern/stingray_southern.tres +++ b/fish/species/stingray_southern/stingray_southern.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"stingray_southern" display_name = "southern stingray" -active = false +active = true catalog_number = 5105 collection_group = &"Rays and skates" logbook_fact = "southern stingrays bury in warm sand with only their eyes and spiracles visible. crushing plates break open clams and crustaceans." @@ -27,3 +28,4 @@ weight_max_lb = 80.0 sell_value_min = 15 sell_value_max = 40 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sturgeon_lake/sturgeon_lake.tres b/fish/species/sturgeon_lake/sturgeon_lake.tres index e4e69a6..eef7789 100644 --- a/fish/species/sturgeon_lake/sturgeon_lake.tres +++ b/fish/species/sturgeon_lake/sturgeon_lake.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/sturgeon_lake/sturgeon_lake.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/102.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres b/fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres index 4e078d0..9f02593 100644 --- a/fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres +++ b/fish/species/sturgeon_shovelnose/sturgeon_shovelnose.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/sturgeon_shovelnose/sturgeon_shovelnose.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/105.png" id="4_texture"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") diff --git a/fish/species/sturgeon_white/sturgeon_white.tres b/fish/species/sturgeon_white/sturgeon_white.tres index 91cab98..961411d 100644 --- a/fish/species/sturgeon_white/sturgeon_white.tres +++ b/fish/species/sturgeon_white/sturgeon_white.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sturgeon_white" display_name = "white sturgeon" -active = false +active = true catalog_number = 4301 collection_group = &"Ocean-run giants" logbook_fact = "white sturgeon are the largest freshwater fish in north america. armored plates line bodies built for long lives in rivers and estuaries." @@ -27,3 +28,4 @@ weight_max_lb = 500.0 sell_value_min = 58 sell_value_max = 135 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sucker_white/sucker_white.tres b/fish/species/sucker_white/sucker_white.tres index 25e09c2..ff48770 100644 --- a/fish/species/sucker_white/sucker_white.tres +++ b/fish/species/sucker_white/sucker_white.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sucker_white" display_name = "white sucker" -active = false +active = true catalog_number = 2305 collection_group = &"Freshwater bottom fish" logbook_fact = "white suckers vacuum insects and organic matter from cool freshwater bottoms. spring runs carry large groups into shallow streams." @@ -26,3 +27,4 @@ weight_max_lb = 8.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/sunfish/sunfish.tres b/fish/species/sunfish/sunfish.tres index f0ced78..5efd181 100644 --- a/fish/species/sunfish/sunfish.tres +++ b/fish/species/sunfish/sunfish.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Resource" path="res://fish/day_availability.tres" id="3_availability"] -[ext_resource type="Texture2D" path="res://fish/species/sunfish/fish_sunfish.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/5001.png" id="4_texture"] [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/surgeonfish_blue/surgeonfish_blue.tres b/fish/species/surgeonfish_blue/surgeonfish_blue.tres index 3708547..d0a903e 100644 --- a/fish/species/surgeonfish_blue/surgeonfish_blue.tres +++ b/fish/species/surgeonfish_blue/surgeonfish_blue.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"surgeonfish_blue" display_name = "blue tang" -active = false +active = true catalog_number = 5501 collection_group = &"Reef grazers" logbook_fact = "blue tangs graze algae from coral reefs with small close-set teeth. sharp folding spines near the tail give surgeonfish their name." @@ -27,3 +28,4 @@ weight_max_lb = 1.5 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/swordfish/swordfish.tres b/fish/species/swordfish/swordfish.tres index ea765a3..24319f1 100644 --- a/fish/species/swordfish/swordfish.tres +++ b/fish/species/swordfish/swordfish.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://cs1qmm4galac4" path="res://fish/species/swordfish/fish_swordfish.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SwordfishAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/tambaqui/tambaqui.tres b/fish/species/tambaqui/tambaqui.tres index fd8d92f..4bfd4a1 100644 --- a/fish/species/tambaqui/tambaqui.tres +++ b/fish/species/tambaqui/tambaqui.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"tambaqui" display_name = "tambaqui" -active = false +active = true catalog_number = 7509 collection_group = &"Tropical freshwater fish" logbook_fact = "tambaqui follow seasonal floods into forests to feed on fruit and seeds. strong square teeth crack tough plant material." @@ -28,3 +29,4 @@ weight_max_lb = 80.0 sell_value_min = 30 sell_value_max = 68 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tang_yellow/tang_yellow.tres b/fish/species/tang_yellow/tang_yellow.tres index 92ee455..501f2a3 100644 --- a/fish/species/tang_yellow/tang_yellow.tres +++ b/fish/species/tang_yellow/tang_yellow.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"tang_yellow" display_name = "yellow tang" -active = false +active = true catalog_number = 5504 collection_group = &"Reef grazers" logbook_fact = "yellow tangs browse algae across hawaiian reefs during daylight. at night their bright bodies darken and show a pale horizontal stripe." @@ -28,3 +29,4 @@ weight_max_lb = 0.8 sell_value_min = 9 sell_value_max = 20 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tarpon_atlantic/tarpon_atlantic.tres b/fish/species/tarpon_atlantic/tarpon_atlantic.tres index 1aeda05..0b8c6aa 100644 --- a/fish/species/tarpon_atlantic/tarpon_atlantic.tres +++ b/fish/species/tarpon_atlantic/tarpon_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"tarpon_atlantic" display_name = "atlantic tarpon" -active = false +active = true catalog_number = 7301 collection_group = &"Tropical estuary" logbook_fact = "atlantic tarpon gulp air with a lung-like swim bladder when coastal water runs low on oxygen. giant silver scales flash during leaps." @@ -27,3 +28,4 @@ weight_max_lb = 180.0 sell_value_min = 34 sell_value_max = 82 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tautog/tautog.tres b/fish/species/tautog/tautog.tres index 57bbe3c..7028401 100644 --- a/fish/species/tautog/tautog.tres +++ b/fish/species/tautog/tautog.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tautog" display_name = "tautog" -active = false +active = true catalog_number = 6906 collection_group = &"Temperate reef fish" logbook_fact = "tautog pry mussels and crabs from rocky structure with thick lips and strong teeth. adults return to familiar shelters year after year." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tench/tench.tres b/fish/species/tench/tench.tres index 377db0f..7ffe273 100644 --- a/fish/species/tench/tench.tres +++ b/fish/species/tench/tench.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"tench" display_name = "tench" -active = false +active = true catalog_number = 2509 collection_group = &"Freshwater coarse fish" logbook_fact = "tench browse quiet, muddy bottoms with two small mouth barbels. a thick coat of slime protects their olive-green scales." @@ -28,3 +29,4 @@ weight_max_lb = 12.0 sell_value_min = 7 sell_value_max = 17 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tetra_neon/tetra_neon.tres b/fish/species/tetra_neon/tetra_neon.tres index 265cb39..da42e36 100644 --- a/fish/species/tetra_neon/tetra_neon.tres +++ b/fish/species/tetra_neon/tetra_neon.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"tetra_neon" display_name = "neon tetra" -active = false +active = true catalog_number = 2102 collection_group = &"Freshwater aquarium fish" logbook_fact = "neon tetras school through shaded forest streams. an iridescent blue stripe remains visible in the dim, tannin-stained water." @@ -27,3 +28,4 @@ weight_max_lb = 0.08 sell_value_min = 4 sell_value_max = 8 sell_value_curve = 0.98 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tigerfish_goliath/tigerfish_goliath.tres b/fish/species/tigerfish_goliath/tigerfish_goliath.tres index 89e2525..f34d449 100644 --- a/fish/species/tigerfish_goliath/tigerfish_goliath.tres +++ b/fish/species/tigerfish_goliath/tigerfish_goliath.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tigerfish_goliath" display_name = "goliath tigerfish" -active = false +active = true catalog_number = 2703 collection_group = &"Freshwater giants" logbook_fact = "goliath tigerfish patrol powerful african rivers with interlocking dagger-like teeth. a muscular forked tail drives sudden attacks." @@ -27,3 +28,4 @@ weight_max_lb = 150.0 sell_value_min = 58 sell_value_max = 132 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tilapia_nile/tilapia_nile.tres b/fish/species/tilapia_nile/tilapia_nile.tres index 5d4ccac..d7a2eed 100644 --- a/fish/species/tilapia_nile/tilapia_nile.tres +++ b/fish/species/tilapia_nile/tilapia_nile.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/7506.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tilapia_nile" display_name = "Nile tilapia" -active = false +active = true catalog_number = 7506 collection_group = &"Tropical freshwater fish" logbook_fact = "nile tilapia thrive in warm lakes and rivers on a varied diet. females protect eggs and young inside their mouths." @@ -27,3 +28,4 @@ weight_max_lb = 8.0 sell_value_min = 3 sell_value_max = 9 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tilefish_blueline/tilefish_blueline.tres b/fish/species/tilefish_blueline/tilefish_blueline.tres index 13ea387..aff98b6 100644 --- a/fish/species/tilefish_blueline/tilefish_blueline.tres +++ b/fish/species/tilefish_blueline/tilefish_blueline.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tilefish_blueline" display_name = "blueline tilefish" -active = false +active = true catalog_number = 1601 collection_group = &"Deep shelf fish" logbook_fact = "blueline tilefish shelter in burrows and rocky openings along deep shelves. a narrow blue stripe traces the edge of the dorsal fin." @@ -27,3 +28,4 @@ weight_max_lb = 20.0 sell_value_min = 7 sell_value_max = 18 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tilefish_golden/tilefish_golden.tres b/fish/species/tilefish_golden/tilefish_golden.tres index 1875b08..ed203c8 100644 --- a/fish/species/tilefish_golden/tilefish_golden.tres +++ b/fish/species/tilefish_golden/tilefish_golden.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tilefish_golden" display_name = "golden tilefish" -active = false +active = true catalog_number = 1602 collection_group = &"Deep shelf fish" logbook_fact = "golden tilefish excavate burrows in soft clay along deep ocean slopes. their bright yellow spots contrast with blue-green backs." @@ -27,3 +28,4 @@ weight_max_lb = 50.0 sell_value_min = 15 sell_value_max = 37 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/trevally_bluefin/trevally_bluefin.tres b/fish/species/trevally_bluefin/trevally_bluefin.tres index 46971e6..3cf8dee 100644 --- a/fish/species/trevally_bluefin/trevally_bluefin.tres +++ b/fish/species/trevally_bluefin/trevally_bluefin.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"trevally_bluefin" display_name = "bluefin trevally" -active = false +active = true catalog_number = 5802 collection_group = &"Reef predators" logbook_fact = "bluefin trevally hunt reef fish in coordinated groups. electric blue fins and scattered blue spots contrast with a golden body." @@ -28,3 +29,4 @@ weight_max_lb = 25.0 sell_value_min = 14 sell_value_max = 32 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/trevally_giant/trevally_giant.tres b/fish/species/trevally_giant/trevally_giant.tres index 43453d5..62ee42b 100644 --- a/fish/species/trevally_giant/trevally_giant.tres +++ b/fish/species/trevally_giant/trevally_giant.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"trevally_giant" display_name = "giant trevally" -active = false +active = true catalog_number = 3603 collection_group = &"Large coastal predators" logbook_fact = "giant trevally hunt reef edges with bursts of speed and force. large individuals sometimes charge prey from surf and shallow lagoons." @@ -27,3 +28,4 @@ weight_max_lb = 150.0 sell_value_min = 32 sell_value_max = 78 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/triggerfish_gray/triggerfish_gray.tres b/fish/species/triggerfish_gray/triggerfish_gray.tres index 90f96b8..0b205a2 100644 --- a/fish/species/triggerfish_gray/triggerfish_gray.tres +++ b/fish/species/triggerfish_gray/triggerfish_gray.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"triggerfish_gray" display_name = "gray triggerfish" -active = false +active = true catalog_number = 5602 collection_group = &"Reef oddities" logbook_fact = "gray triggerfish lock a stout dorsal spine upright when wedged into shelter. strong teeth crack barnacles, crabs, and shellfish." @@ -27,3 +28,4 @@ weight_max_lb = 12.0 sell_value_min = 7 sell_value_max = 17 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/triggerfish_queen/triggerfish_queen.tres b/fish/species/triggerfish_queen/triggerfish_queen.tres index d57ede3..e747f25 100644 --- a/fish/species/triggerfish_queen/triggerfish_queen.tres +++ b/fish/species/triggerfish_queen/triggerfish_queen.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"triggerfish_queen" display_name = "queen triggerfish" -active = false +active = true catalog_number = 5605 collection_group = &"Reef oddities" logbook_fact = "queen triggerfish blow jets of water to uncover buried prey and flip sea urchins. vivid blue lines radiate across the face." @@ -28,3 +29,4 @@ weight_max_lb = 15.0 sell_value_min = 14 sell_value_max = 32 sell_value_curve = 0.88 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tripletail/tripletail.tres b/fish/species/tripletail/tripletail.tres index 552e15b..7bb151b 100644 --- a/fish/species/tripletail/tripletail.tres +++ b/fish/species/tripletail/tripletail.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"tripletail" display_name = "tripletail" -active = false +active = true catalog_number = 604 collection_group = &"Coastal oddities" logbook_fact = "tripletail often drift sideways near floating debris, resembling a loose leaf. rounded rear fins create the three-tailed silhouette." @@ -28,3 +29,4 @@ weight_max_lb = 30.0 sell_value_min = 13 sell_value_max = 31 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/trout_brown/trout_brown.tres b/fish/species/trout_brown/trout_brown.tres index 01a28d5..6beb1ba 100644 --- a/fish/species/trout_brown/trout_brown.tres +++ b/fish/species/trout_brown/trout_brown.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"trout_brown" display_name = "brown trout" -active = false +active = true catalog_number = 1103 collection_group = &"Cold freshwater salmonids" logbook_fact = "brown trout often shelter by day and hunt more freely after dark. adaptable populations occupy streams, lakes, and even coastal water." @@ -27,3 +28,4 @@ weight_max_lb = 25.0 sell_value_min = 7 sell_value_max = 20 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/trout_cutthroat/trout_cutthroat.tres b/fish/species/trout_cutthroat/trout_cutthroat.tres index 38c90a7..6ea9bff 100644 --- a/fish/species/trout_cutthroat/trout_cutthroat.tres +++ b/fish/species/trout_cutthroat/trout_cutthroat.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://nowggrl8wmr" path="res://fish/species/trout_cutthroat/fish_trout_cutthroat.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="TroutCutthroatAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/trout_golden/trout_golden.tres b/fish/species/trout_golden/trout_golden.tres index d455e21..bb6732b 100644 --- a/fish/species/trout_golden/trout_golden.tres +++ b/fish/species/trout_golden/trout_golden.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://b64w3kwf3wins" path="res://fish/species/trout_golden/fish_trout_golden.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="TroutGoldenAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/trout_rainbow/trout_rainbow.tres b/fish/species/trout_rainbow/trout_rainbow.tres index 3b9e9aa..69d40bd 100644 --- a/fish/species/trout_rainbow/trout_rainbow.tres +++ b/fish/species/trout_rainbow/trout_rainbow.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://mfxehkoxea21" path="res://fish/species/trout_rainbow/fish_trout_rainbow.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="TroutRainbowAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/trout_steelhead/trout_steelhead.tres b/fish/species/trout_steelhead/trout_steelhead.tres index 3bc9698..ed052d9 100644 --- a/fish/species/trout_steelhead/trout_steelhead.tres +++ b/fish/species/trout_steelhead/trout_steelhead.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://cabbpc55sf2gw" path="res://fish/species/trout_steelhead/fish_trout_steelhead.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="TroutSteelheadAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres b/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres index eb58032..3ff3cc3 100644 --- a/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres +++ b/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"trumpetfish_atlantic" display_name = "atlantic trumpetfish" -active = false +active = true catalog_number = 5601 collection_group = &"Reef oddities" logbook_fact = "atlantic trumpetfish hover head-down among corals and sea fans. long tubular snouts expand suddenly to draw in small fish." @@ -27,3 +28,4 @@ weight_max_lb = 2.0 sell_value_min = 10 sell_value_max = 24 sell_value_curve = 0.94 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/tuna_albacore/tuna_albacore.tres b/fish/species/tuna_albacore/tuna_albacore.tres index 69ad32d..c8cdfdf 100644 --- a/fish/species/tuna_albacore/tuna_albacore.tres +++ b/fish/species/tuna_albacore/tuna_albacore.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bxebn81i552fg" path="res://fish/species/tuna_albacore/fish_tuna_albacore.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="AlbacoreAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/tuna_bigeye/tuna_bigeye.tres b/fish/species/tuna_bigeye/tuna_bigeye.tres index 6794a75..1c31d1a 100644 --- a/fish/species/tuna_bigeye/tuna_bigeye.tres +++ b/fish/species/tuna_bigeye/tuna_bigeye.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bypnhqmkhnm2c" path="res://fish/species/tuna_bigeye/fish_tuna_bigeye.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="BigeyeAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/tuna_bluefin/tuna_bluefin.tres b/fish/species/tuna_bluefin/tuna_bluefin.tres index 7d6f810..4bf5033 100644 --- a/fish/species/tuna_bluefin/tuna_bluefin.tres +++ b/fish/species/tuna_bluefin/tuna_bluefin.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://dg7nafydp4flx" path="res://fish/species/tuna_bluefin/fish_tuna_bluefin.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="BluefinAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/tuna_skipjack/tuna_skipjack.tres b/fish/species/tuna_skipjack/tuna_skipjack.tres index cb16b70..cc1988e 100644 --- a/fish/species/tuna_skipjack/tuna_skipjack.tres +++ b/fish/species/tuna_skipjack/tuna_skipjack.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://vvtr81d2aojs" path="res://fish/species/tuna_skipjack/fish_tuna_skipjack.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="SkipjackAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/tuna_yellowfin/tuna_yellowfin.tres b/fish/species/tuna_yellowfin/tuna_yellowfin.tres index 90f9017..665228e 100644 --- a/fish/species/tuna_yellowfin/tuna_yellowfin.tres +++ b/fish/species/tuna_yellowfin/tuna_yellowfin.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://bwpdgagaysdsf" path="res://fish/species/tuna_yellowfin/fish_tuna_yellowfin.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="YellowfinAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/turbot/turbot.tres b/fish/species/turbot/turbot.tres index 9e3e6f3..c3ab7bd 100644 --- a/fish/species/turbot/turbot.tres +++ b/fish/species/turbot/turbot.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"turbot" display_name = "turbot" -active = false +active = true catalog_number = 3703 collection_group = &"Large flatfish" logbook_fact = "turbot have broad, nearly circular bodies covered with bony bumps instead of scales. they bury into sand before ambushing fish and crustaceans." @@ -27,3 +28,4 @@ weight_max_lb = 35.0 sell_value_min = 14 sell_value_max = 34 sell_value_curve = 0.85 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/turtle_green/turtle_green.tres b/fish/species/turtle_green/turtle_green.tres index b473dad..b1e8e71 100644 --- a/fish/species/turtle_green/turtle_green.tres +++ b/fish/species/turtle_green/turtle_green.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"turtle_green" display_name = "green sea turtle" -active = false +active = true catalog_number = 6201 collection_group = &"Sea turtles" logbook_fact = "green sea turtles graze seagrass meadows with finely serrated jaws. adults migrate long distances between feeding and nesting grounds." @@ -28,3 +29,4 @@ weight_max_lb = 500.0 sell_value_min = 62 sell_value_max = 145 sell_value_curve = 0.78 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/turtle_hawksbill/turtle_hawksbill.tres b/fish/species/turtle_hawksbill/turtle_hawksbill.tres index a13910f..5b5a5c8 100644 --- a/fish/species/turtle_hawksbill/turtle_hawksbill.tres +++ b/fish/species/turtle_hawksbill/turtle_hawksbill.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"turtle_hawksbill" display_name = "hawksbill sea turtle" -active = false +active = true catalog_number = 6202 collection_group = &"Sea turtles" logbook_fact = "hawksbill sea turtles reach into reef crevices with narrow hooked beaks. a diet rich in sponges helps shape coral communities." @@ -28,3 +29,4 @@ weight_max_lb = 250.0 sell_value_min = 66 sell_value_max = 150 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/turtle_leatherback/turtle_leatherback.tres b/fish/species/turtle_leatherback/turtle_leatherback.tres index a19b310..3a8acf3 100644 --- a/fish/species/turtle_leatherback/turtle_leatherback.tres +++ b/fish/species/turtle_leatherback/turtle_leatherback.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"turtle_leatherback" display_name = "leatherback sea turtle" -active = false +active = true catalog_number = 6203 collection_group = &"Sea turtles" logbook_fact = "leatherback sea turtles cross entire oceans while hunting jellies. a flexible ridged shell and internal heat help them enter cold water." @@ -28,3 +29,4 @@ weight_max_lb = 2000.0 sell_value_min = 75 sell_value_max = 175 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/turtle_loggerhead/turtle_loggerhead.tres b/fish/species/turtle_loggerhead/turtle_loggerhead.tres index 0317591..e4bd898 100644 --- a/fish/species/turtle_loggerhead/turtle_loggerhead.tres +++ b/fish/species/turtle_loggerhead/turtle_loggerhead.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"turtle_loggerhead" display_name = "loggerhead sea turtle" -active = false +active = true catalog_number = 6204 collection_group = &"Sea turtles" logbook_fact = "loggerhead sea turtles crush crabs and mollusks with massive jaws. females often return near their birth beaches to nest." @@ -27,3 +28,4 @@ weight_max_lb = 1200.0 sell_value_min = 68 sell_value_max = 155 sell_value_curve = 0.77 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/urchin_purple/urchin_purple.tres b/fish/species/urchin_purple/urchin_purple.tres index 884055b..6546627 100644 --- a/fish/species/urchin_purple/urchin_purple.tres +++ b/fish/species/urchin_purple/urchin_purple.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"urchin_purple" display_name = "purple sea urchin" -active = false +active = true catalog_number = 1903 collection_group = &"Echinoderms" logbook_fact = "purple sea urchins scrape algae from rocks with a five-toothed feeding structure. dense groups can clear kelp from entire reefs." @@ -27,3 +28,4 @@ weight_max_lb = 1.0 sell_value_min = 5 sell_value_max = 12 sell_value_curve = 0.96 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/wahoo/wahoo.tres b/fish/species/wahoo/wahoo.tres index cc8488d..9e045de 100644 --- a/fish/species/wahoo/wahoo.tres +++ b/fish/species/wahoo/wahoo.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"wahoo" display_name = "wahoo" -active = false +active = true catalog_number = 4703 collection_group = &"Oceanic pelagic fish" logbook_fact = "wahoo are streamlined open-ocean hunters with rows of sharp teeth. blue vertical bars flicker across their sides during fast pursuits." @@ -27,3 +28,4 @@ weight_max_lb = 100.0 sell_value_min = 30 sell_value_max = 70 sell_value_curve = 0.82 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/walleye/walleye.tres b/fish/species/walleye/walleye.tres index a08adac..277b3d8 100644 --- a/fish/species/walleye/walleye.tres +++ b/fish/species/walleye/walleye.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://h7hg45b7wmst" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" uid="uid://bs7cqi88csolc" path="res://fish/fish_availability.gd" id="3_availability_script"] -[ext_resource type="Texture2D" uid="uid://c10j6jv6fv32r" path="res://fish/species/walleye/fish_walleye.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] [sub_resource type="Resource" id="WalleyeAvailability"] script = ExtResource("3_availability_script") diff --git a/fish/species/walrus/walrus.tres b/fish/species/walrus/walrus.tres index 180fe27..ff74bf6 100644 --- a/fish/species/walrus/walrus.tres +++ b/fish/species/walrus/walrus.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"walrus" display_name = "walrus" -active = false +active = true catalog_number = 504 collection_group = &"Coastal marine mammals" logbook_fact = "walruses sweep the seafloor for clams and other soft-bodied prey. long tusks help them haul onto ice and settle disputes." @@ -28,3 +29,4 @@ weight_max_lb = 3700.0 sell_value_min = 74 sell_value_max = 170 sell_value_curve = 0.76 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/warmouth/warmouth.tres b/fish/species/warmouth/warmouth.tres index d93c506..c58e8c5 100644 --- a/fish/species/warmouth/warmouth.tres +++ b/fish/species/warmouth/warmouth.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"warmouth" display_name = "warmouth" -active = false +active = true catalog_number = 3106 collection_group = &"Freshwater panfish" logbook_fact = "warmouth hide in weeds, roots, and murky backwaters before ambushing prey. red eyes and dark cheek stripes frame a notably large mouth." @@ -28,3 +29,4 @@ weight_max_lb = 2.0 sell_value_min = 5 sell_value_max = 10 sell_value_curve = 0.95 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/weakfish/weakfish.tres b/fish/species/weakfish/weakfish.tres index 6f94da3..83a5f11 100644 --- a/fish/species/weakfish/weakfish.tres +++ b/fish/species/weakfish/weakfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"weakfish" display_name = "weakfish" -active = false +active = true catalog_number = 6805 collection_group = &"Temperate estuary" logbook_fact = "weakfish are named for delicate mouth tissue that tears easily around a hook. iridescent spots scatter across their bronze backs." @@ -28,3 +29,4 @@ weight_max_lb = 18.0 sell_value_min = 12 sell_value_max = 29 sell_value_curve = 0.86 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/whale_blue/whale_blue.tres b/fish/species/whale_blue/whale_blue.tres index 50f2c53..415008e 100644 --- a/fish/species/whale_blue/whale_blue.tres +++ b/fish/species/whale_blue/whale_blue.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"whale_blue" display_name = "blue whale" -active = false +active = true catalog_number = 7701 collection_group = &"Whales and dolphins" logbook_fact = "blue whales are the largest animals known to have lived. pleated throats expand around vast mouthfuls of water that baleen filters for krill." @@ -28,3 +29,4 @@ weight_max_lb = 330000.0 sell_value_min = 120 sell_value_max = 300 sell_value_curve = 0.72 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/whale_humpback/whale_humpback.tres b/fish/species/whale_humpback/whale_humpback.tres index 7c99516..7ad7161 100644 --- a/fish/species/whale_humpback/whale_humpback.tres +++ b/fish/species/whale_humpback/whale_humpback.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"whale_humpback" display_name = "humpback whale" -active = false +active = true catalog_number = 7703 collection_group = &"Whales and dolphins" logbook_fact = "humpback whales use long pectoral fins while turning and feeding. males produce layered songs that change across breeding seasons." @@ -28,3 +29,4 @@ weight_max_lb = 90000.0 sell_value_min = 105 sell_value_max = 260 sell_value_curve = 0.73 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/whale_killer/whale_killer.tres b/fish/species/whale_killer/whale_killer.tres index a1197cd..7952089 100644 --- a/fish/species/whale_killer/whale_killer.tres +++ b/fish/species/whale_killer/whale_killer.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"whale_killer" display_name = "killer whale" -active = false +active = true catalog_number = 7704 collection_group = &"Whales and dolphins" logbook_fact = "killer whales live in close family groups with distinct calls and hunting traditions. different populations specialize in different prey." @@ -28,3 +29,4 @@ weight_max_lb = 12000.0 sell_value_min = 95 sell_value_max = 230 sell_value_curve = 0.74 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/whale_sperm/whale_sperm.tres b/fish/species/whale_sperm/whale_sperm.tres index 019088b..eef3aed 100644 --- a/fish/species/whale_sperm/whale_sperm.tres +++ b/fish/species/whale_sperm/whale_sperm.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"whale_sperm" display_name = "sperm whale" -active = false +active = true catalog_number = 7705 collection_group = &"Whales and dolphins" logbook_fact = "sperm whales make deep dives to hunt squid with powerful echolocation clicks. their enormous square heads contain a waxy spermaceti organ." @@ -28,3 +29,4 @@ weight_max_lb = 125000.0 sell_value_min = 115 sell_value_max = 280 sell_value_curve = 0.72 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/white_perch/white_perch.tres b/fish/species/white_perch/white_perch.tres index 2b45610..5543307 100644 --- a/fish/species/white_perch/white_perch.tres +++ b/fish/species/white_perch/white_perch.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"white_perch" display_name = "white perch" -active = false +active = true catalog_number = 6806 collection_group = &"Temperate estuary" logbook_fact = "white perch tolerate fresh and brackish water along the atlantic coast. deep silver bodies gather in schools around river mouths." @@ -26,3 +27,4 @@ weight_max_lb = 3.5 sell_value_min = 5 sell_value_max = 11 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/whitefish_lake/whitefish_lake.tres b/fish/species/whitefish_lake/whitefish_lake.tres index f50e27b..51246f5 100644 --- a/fish/species/whitefish_lake/whitefish_lake.tres +++ b/fish/species/whitefish_lake/whitefish_lake.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -11,7 +12,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"whitefish_lake" display_name = "lake whitefish" -active = false +active = true catalog_number = 1003 collection_group = &"Cold freshwater fish" logbook_fact = "lake whitefish browse deep, cold bottoms with small downward-pointing mouths. large schools move toward shallows to spawn in autumn." @@ -26,3 +27,4 @@ weight_max_lb = 12.0 sell_value_min = 4 sell_value_max = 11 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/wolffish_atlantic/wolffish_atlantic.tres b/fish/species/wolffish_atlantic/wolffish_atlantic.tres index a4c29c1..ca67a92 100644 --- a/fish/species/wolffish_atlantic/wolffish_atlantic.tres +++ b/fish/species/wolffish_atlantic/wolffish_atlantic.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"wolffish_atlantic" display_name = "atlantic wolffish" -active = false +active = true catalog_number = 1201 collection_group = &"Cold reef fish" logbook_fact = "atlantic wolffish use heavy jaws and blunt teeth to crush shellfish and urchins. natural antifreeze proteins help them endure icy water." @@ -27,3 +28,4 @@ weight_max_lb = 40.0 sell_value_min = 14 sell_value_max = 34 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/wolffish_spotted/wolffish_spotted.tres b/fish/species/wolffish_spotted/wolffish_spotted.tres index aa498e6..36b4575 100644 --- a/fish/species/wolffish_spotted/wolffish_spotted.tres +++ b/fish/species/wolffish_spotted/wolffish_spotted.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"wolffish_spotted" display_name = "spotted wolffish" -active = false +active = true catalog_number = 1203 collection_group = &"Cold reef fish" logbook_fact = "spotted wolffish crush hard-shelled prey with broad molar-like teeth. their pale spots stand out against a dark cold-water body." @@ -27,3 +28,4 @@ weight_max_lb = 50.0 sell_value_min = 26 sell_value_max = 60 sell_value_curve = 0.84 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/wrasse_ballan/wrasse_ballan.tres b/fish/species/wrasse_ballan/wrasse_ballan.tres index b25f40d..a1beebc 100644 --- a/fish/species/wrasse_ballan/wrasse_ballan.tres +++ b/fish/species/wrasse_ballan/wrasse_ballan.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"wrasse_ballan" display_name = "ballan wrasse" -active = false +active = true catalog_number = 6101 collection_group = &"Reef wrasses" logbook_fact = "ballan wrasse crush shellfish and sea urchins with strong throat teeth. thick lips and mottled colors suit rocky european reefs." @@ -27,3 +28,4 @@ weight_max_lb = 10.0 sell_value_min = 6 sell_value_max = 15 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/wrasse_cleaner/wrasse_cleaner.tres b/fish/species/wrasse_cleaner/wrasse_cleaner.tres index 3f21ff7..85db0fc 100644 --- a/fish/species/wrasse_cleaner/wrasse_cleaner.tres +++ b/fish/species/wrasse_cleaner/wrasse_cleaner.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -13,7 +14,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"wrasse_cleaner" display_name = "cleaner wrasse" -active = false +active = true catalog_number = 6102 collection_group = &"Reef wrasses" logbook_fact = "cleaner wrasses advertise with a bright stripe and dance at reef stations. larger fish wait while parasites are picked from skin and gills." @@ -28,3 +29,4 @@ weight_max_lb = 0.2 sell_value_min = 9 sell_value_max = 20 sell_value_curve = 1.0 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/wreckfish/wreckfish.tres b/fish/species/wreckfish/wreckfish.tres index 0c258a9..345d274 100644 --- a/fish/species/wreckfish/wreckfish.tres +++ b/fish/species/wreckfish/wreckfish.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/fish_placeholder.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"wreckfish" display_name = "wreckfish" -active = false +active = true catalog_number = 1606 collection_group = &"Deep shelf fish" logbook_fact = "wreckfish gather around caves, ledges, and shipwrecks in deep water. powerful jaws let them ambush fish and large crustaceans." @@ -27,3 +28,4 @@ weight_max_lb = 180.0 sell_value_min = 31 sell_value_max = 76 sell_value_curve = 0.8 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fish/species/yellow_perch/yellow_perch.tres b/fish/species/yellow_perch/yellow_perch.tres index 311280e..3e0501f 100644 --- a/fish/species/yellow_perch/yellow_perch.tres +++ b/fish/species/yellow_perch/yellow_perch.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=4 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] [ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"] [ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"] [ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability"] +[ext_resource type="Texture2D" path="res://art/exported/creatures/3201.png" id="99_fish_placeholder"] [sub_resource type="Resource" id="Availability"] script = ExtResource("3_availability") @@ -12,7 +13,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"yellow_perch" display_name = "yellow perch" -active = false +active = true catalog_number = 3201 collection_group = &"Freshwater perch" logbook_fact = "yellow perch travel in schools through cool lakes and slow rivers. dark vertical bars and orange lower fins make them easy to recognize." @@ -27,3 +28,4 @@ weight_max_lb = 4.0 sell_value_min = 3 sell_value_max = 8 sell_value_curve = 0.9 +display_texture = ExtResource("99_fish_placeholder") diff --git a/fishing/catch_controller.gd b/fishing/catch_controller.gd index 7e75370..12cc431 100644 --- a/fishing/catch_controller.gd +++ b/fishing/catch_controller.gd @@ -46,7 +46,7 @@ class Barrier: # Fight movement uses one shared baseline. Species and quality difficulty comes # from barrier placement and health, while reel upgrades affect only the # player's progress speed. -const CHASE_START_DELAY: float = 1.0 +const CHASE_START_DELAY: float = 1.5 const CHASE_START_OFFSET: float = 0.04 const CHASE_SPEED: float = 0.07 diff --git a/fishing/fishing_spot.gd b/fishing/fishing_spot.gd index a1c8ddf..fdfad53 100644 --- a/fishing/fishing_spot.gd +++ b/fishing/fishing_spot.gd @@ -41,8 +41,6 @@ const FishingSurfaceSampleType = preload( const FishingSurfaceResolverType = preload( "res://fishing/fishing_surface_resolver.gd" ) -const ArtShopStockType = preload("res://economy/art_shop_stock.gd") -const FishingShopStockType = preload("res://economy/fishing_shop_stock.gd") const WorldTimeServiceType = preload("res://world/world_time_service.gd") const WorldWeatherServiceType = preload( "res://world/world_weather_service.gd" @@ -68,6 +66,7 @@ signal showcase_changed( ) signal bite_activated signal bite_prompt_changed(is_visible: bool) +signal fishing_input_priority_changed(active: bool) signal ready_for_equipment_refresh enum FishingState { @@ -133,6 +132,7 @@ const ALTERNATE_REEL_ACTION: StringName = &"reel_alternate" var state: FishingState = FishingState.READY var _external_input_blocked: bool = false var _gameplay_input_enabled: bool = false +var _fishing_environment_enabled: bool = true var _local_menu_input_owners: Dictionary[StringName, bool] = {} var _local_player: PlayerType var _local_inventory: FishInventoryType @@ -149,6 +149,7 @@ var _network_session: NetworkSessionType var _network_fishing: NetworkFishingServiceType var _world_time: WorldTimeServiceType var _world_weather: WorldWeatherServiceType +var _fishable_water_regions_resolver := Callable() var _active_player: PlayerType var _state_time_remaining: float = 0.0 var _cast_charge: float = 0.0 @@ -182,6 +183,7 @@ var _network_active_barrier_index: int = -1 var _bite_rng: RandomNumberGenerator = RandomNumberGenerator.new() var _pending_cleanup_message: String = "" var _bite_confirmation_pending: bool = false +var _fishing_input_priority_active: bool = false var _bite_confirmation_requested: bool = false @@ -220,6 +222,7 @@ func setup( network_fishing: NetworkFishingServiceType = null, world_time: WorldTimeServiceType = null, world_weather: WorldWeatherServiceType = null, + fishable_water_regions_resolver: Callable = Callable(), ) -> void: _local_player = local_player _local_inventory = local_inventory @@ -240,6 +243,7 @@ func setup( _network_fishing = network_fishing _world_time = world_time _world_weather = world_weather + _fishable_water_regions_resolver = fishable_water_regions_resolver if ( _network_session != null and not _network_session.state_changed.is_connected( @@ -394,6 +398,22 @@ func set_gameplay_input_enabled(enabled: bool) -> void: reset_transient_state() +func set_fishing_environment_enabled(enabled: bool) -> void: + if _fishing_environment_enabled == enabled: + return + _fishing_environment_enabled = enabled + if enabled: + _new_cast_press_armed = not Input.is_action_pressed("fish_primary") + return + if _network_fishing != null and _network_fishing.has_local_attempt(): + _network_fishing.cancel_local_attempt("") + reset_transient_state() + + +func is_fishing_environment_enabled() -> bool: + return _fishing_environment_enabled + + func reset_transient_state(restore_movement: bool = true) -> void: var local_state_was_active: bool = ( state != FishingState.READY or _active_player != null @@ -458,6 +478,7 @@ func _secure_showcase_catch_for_recovery() -> void: func _exit_tree() -> void: _stop_fight_audio() _stop_reeling_audio() + _set_fishing_input_priority(false) _showcase_restore_generation += 1 if ( state == FishingState.SHOWING_CATCH @@ -527,6 +548,7 @@ func _process(delta: float) -> void: func _unhandled_input(event: InputEvent) -> void: if ( not _gameplay_input_enabled + or not _fishing_environment_enabled or _external_input_blocked or not _local_menu_input_owners.is_empty() ): @@ -539,51 +561,23 @@ func _unhandled_input(event: InputEvent) -> void: alternate_reel and state == FishingState.FIGHTING ): return + # Fishing owns the primary action only after a rod starts a cast, or while + # completing an already-active fishing sequence. An empty hand, decor, + # gathering tools, and other items must remain available to their own world + # interaction controllers. + if state == FishingState.READY and not has_active_fishing_rod(): + return # A held keyboard key emits echo events. Treat the alternate reel exactly # like a mouse button: one barrier hit per physical press, while the normal # held-input path continues driving free reeling between barriers. if event is InputEventKey and event.echo: get_viewport().set_input_as_handled() return - var selected_item: ItemDataType = _get_active_item() - if ( - state == FishingState.READY - and selected_item != null - and FishingShopStockType.is_gathering_tool(selected_item.item_id) - ): - return if event.is_pressed(): match state: FishingState.READY: if not _new_cast_press_armed: return - var active_item: ItemDataType = _get_active_item() - if ( - active_item != null - and ( - active_item.category == ItemDataType.Category.CONSUMABLE - or ( - active_item.item_id == PlayerItemEffectsType.FISH_FINDER_ID - ) - ) - ): - if _network_item_use != null: - _network_item_use.request_use(active_item.item_id) - elif _item_effects.use_item(active_item, _local_bag): - status_changed.emit(_item_effects.get_feedback( - active_item.item_id - )) - elif ( - active_item.item_id == PlayerItemEffectsType.FISH_FINDER_ID - ): - local_speech_requested.emit( - PlayerItemEffectsType.FISH_FINDER_DEAD_MESSAGE - ) - get_viewport().set_input_as_handled() - return - if not has_active_fishing_rod(): - get_viewport().set_input_as_handled() - return if ( _is_inventory_full() ): @@ -655,6 +649,34 @@ func _unhandled_input(event: InputEvent) -> void: get_viewport().set_input_as_handled() +func try_use_active_non_fishing_item() -> bool: + if ( + not _gameplay_input_enabled + or _external_input_blocked + or not _local_menu_input_owners.is_empty() + or state != FishingState.READY + ): + return false + var active_item: ItemDataType = _get_active_item() + if ( + active_item == null + or ( + active_item.category != ItemDataType.Category.CONSUMABLE + and active_item.item_id != PlayerItemEffectsType.FISH_FINDER_ID + ) + ): + return false + if _network_item_use != null: + _network_item_use.request_use(active_item.item_id) + elif _item_effects.use_item(active_item, _local_bag): + status_changed.emit(_item_effects.get_feedback(active_item.item_id)) + elif active_item.item_id == PlayerItemEffectsType.FISH_FINDER_ID: + local_speech_requested.emit( + PlayerItemEffectsType.FISH_FINDER_DEAD_MESSAGE + ) + return true + + func _is_reel_input_pressed() -> bool: return ( Input.is_action_pressed("fish_primary") @@ -662,6 +684,10 @@ func _is_reel_input_pressed() -> bool: ) +func is_reel_input_active() -> bool: + return state == FishingState.FIGHTING and _is_reel_input_pressed() + + func _begin_aiming(player: PlayerType) -> void: if state != FishingState.READY or _active_player != null: return @@ -777,6 +803,11 @@ func confirm_pending_bite() -> void: func _set_bite_confirmation_pending(is_pending: bool) -> void: + if is_pending: + # The Standby deliberately pauses before the fight begins. Keep chat and + # menus available during that pause; fishing only owns input once the + # player confirms the bite and enters the actual minigame. + _set_fishing_input_priority(false) if _bite_confirmation_pending == is_pending: if not is_pending: _bite_confirmation_requested = false @@ -786,6 +817,17 @@ func _set_bite_confirmation_pending(is_pending: bool) -> void: bite_prompt_changed.emit(is_pending) +func _set_fishing_input_priority(active: bool) -> void: + if _fishing_input_priority_active == active: + return + _fishing_input_priority_active = active + fishing_input_priority_changed.emit(active) + + +func is_fishing_input_priority_active() -> bool: + return _fishing_input_priority_active + + func is_returning() -> bool: return state == FishingState.RETURNING @@ -1138,6 +1180,7 @@ func _activate_bite(confirmation_override: bool = false) -> void: _presentation.show_bite() return + _set_fishing_input_priority(true) _set_bite_confirmation_pending(false) _pending_catch = _fish_selector.create_catch(_selected_fish) if _pending_catch == null or not _pending_catch.is_valid(): @@ -1346,7 +1389,7 @@ func _store_catch_progression(fish_catch: FishCatchType) -> void: ) ) _local_inventory.add_catch(fish_catch) - _local_collection_log.mark_quality_discovered( + _local_collection_log.record_catch( fish_catch.fish_id, fish_catch.quality, ) @@ -1414,6 +1457,7 @@ func _finalize_attempt_cleanup( cooldown_message: String, restore_movement: bool = true, ) -> void: + _set_bite_confirmation_pending(false) _showcase_restore_generation += 1 if _active_player != null: _active_player.set_fighting_visual(false) @@ -1458,6 +1502,7 @@ func _finalize_attempt_cleanup( _state_time_remaining = cooldown_duration _cooldown_status = cooldown_message status_changed.emit(_cooldown_status) + _set_fishing_input_priority(false) func _return_to_ready() -> void: @@ -1466,6 +1511,7 @@ func _return_to_ready() -> void: _cooldown_status = "" status_changed.emit("") ready_for_equipment_refresh.emit() + _set_fishing_input_priority(false) func _cancel_attempt() -> void: @@ -1641,6 +1687,47 @@ func build_network_context( return _build_fishing_context(region) +func is_species_available_now(fish: FishDataType) -> bool: + if fish == null or not fish.is_selectable(): + return false + var season := ( + _world_time.get_season() + if _world_time != null + else CalendarSeason.UNKNOWN + ) + if not fish.is_available_in_season(season): + return false + if fish.collection_method != FishDataType.CollectionMethod.FISHING: + return true + for region: FishableWaterRegionType in _get_logbook_water_regions(): + if ( + region == null + or region.fish_pool == null + or region.fish_pool.get_fish_by_id(fish.id) == null + ): + continue + var context := _build_fishing_context(region) + if not fish.is_allowed_in_water(context.water_type): + continue + if fish.availability == null or fish.availability.is_available(context): + return true + return false + + +func _get_logbook_water_regions() -> Array[FishableWaterRegionType]: + var regions: Array[FishableWaterRegionType] = [] + if not _fishable_water_regions_resolver.is_valid(): + return regions + var resolved: Variant = _fishable_water_regions_resolver.call() + if resolved is not Array: + return regions + for value: Variant in resolved: + var region := value as FishableWaterRegionType + if region != null and is_instance_valid(region): + regions.append(region) + return regions + + func _get_active_bait_tags() -> Array[StringName]: if _local_player == null or _item_catalog == null: return [] @@ -1775,6 +1862,7 @@ func _on_network_bite_started(_attempt_id: String) -> void: if state != FishingState.WAITING_FOR_BITE: return _stop_reeling_audio() + _set_fishing_input_priority(true) _set_bite_confirmation_pending(false) state = FishingState.FIGHTING if _active_player != null: diff --git a/fishing/remote_fishing_presentation.gd b/fishing/remote_fishing_presentation.gd index 06224de..380afdf 100644 --- a/fishing/remote_fishing_presentation.gd +++ b/fishing/remote_fishing_presentation.gd @@ -18,6 +18,8 @@ var _showcase_tween: Tween var _return_showcase_catch: FishCatch var _bobber_idle_elapsed: float = 0.0 var _bobber_base_scale: Vector3 = Vector3.ONE +var _attempt_id: String = "" +var _observer_fighting_active: bool = false func setup(owning_player: Player) -> void: @@ -43,7 +45,11 @@ func setup(owning_player: Player) -> void: cleanup() -func show_cast(origin: Vector3, target: Vector3) -> void: +func show_cast( + origin: Vector3, + target: Vector3, + attempt_id: String = "", +) -> void: if ( _owner == null or not origin.is_finite() @@ -52,6 +58,8 @@ func show_cast(origin: Vector3, target: Vector3) -> void: return _kill_cast_tween() _active = true + _attempt_id = attempt_id + _observer_fighting_active = false _bobber_base_scale = Vector3.ONE * _owner.get_character_visual_scale() _target = origin _pending_target = target @@ -86,10 +94,48 @@ func update_bobber(world_position: Vector3) -> void: _redraw_line() +func synchronize_active( + attempt_id: String, + world_position: Vector3, + fighting: bool, +) -> void: + if ( + _owner == null + or attempt_id.is_empty() + or not world_position.is_finite() + ): + return + if _active and not _attempt_id.is_empty() and _attempt_id != attempt_id: + cleanup() + if _attempt_id.is_empty(): + _attempt_id = attempt_id + if not _active: + _active = true + _bobber_base_scale = Vector3.ONE * _owner.get_character_visual_scale() + _target = world_position + _pending_target = world_position + _bobber_idle_elapsed = 0.0 + _bobber.global_position = world_position + _bobber.scale = _bobber_base_scale + _bobber.visible = true + _line.visible = true + _owner.set_active_item_is_rod(true) + _owner.set_fishing_visual(true) + _redraw_line() + else: + update_bobber(world_position) + if fighting != _observer_fighting_active: + _observer_fighting_active = fighting + _owner.set_fighting_visual(fighting) + if not fighting: + _owner.set_fishing_visual(true) + + func show_bite() -> void: if not _active: return if _owner != null and is_instance_valid(_owner): + _observer_fighting_active = true _owner.set_fighting_visual(true) var tween: Tween = create_tween() tween.tween_property(_bobber, "scale", _bobber_base_scale * 0.7, 0.08) @@ -131,6 +177,8 @@ func cleanup() -> void: _kill_return_tween() _kill_showcase_tween() _active = false + _attempt_id = "" + _observer_fighting_active = false _pending_target = Vector3.ZERO _return_showcase_catch = null _bobber_idle_elapsed = 0.0 diff --git a/gathering/catalog/beetle_stag_common.tres b/gathering/catalog/beetle_stag_common.tres index 118d733..c8b7d85 100644 --- a/gathering/catalog/beetle_stag_common.tres +++ b/gathering/catalog/beetle_stag_common.tres @@ -10,6 +10,8 @@ catch_data = ExtResource("2_catch") required_tool_id = &"crab_net" spawn_anchor_set_id = &"starter_reachable_tree_trunks" population = 3 +spawn_anchor_occupancy_ratio = 0.35 +maximum_anchor_population = 64 requires_sneaking = false movement_speed = 0.0 roam_radius = 0.1 @@ -17,7 +19,7 @@ scare_radius = 0.1 capture_radius = 0.34 interaction_range = 2.8 charge_duration = 1.0 -sprite_pixel_size = 0.005 +sprite_pixel_size = 0.0075 sprite_tilt_degrees = 0.0 capture_respawn_min_seconds = 90.0 capture_respawn_max_seconds = 150.0 diff --git a/gathering/catalog/crab_blue.tres b/gathering/catalog/crab_blue.tres index 1ccabe8..705948e 100644 --- a/gathering/catalog/crab_blue.tres +++ b/gathering/catalog/crab_blue.tres @@ -10,5 +10,8 @@ catch_data = ExtResource("2_catch") required_tool_id = &"crab_net" surface_materials = Array[StringName]([&"sand"]) minimum_surface_y = -0.8 +surface_water_relation = 2 population = 4 +surface_population_per_100_square_meters = 0.4 +maximum_surface_population = 16 sprite_pixel_size = 0.0005 diff --git a/gathering/catalog/crab_brown.tres b/gathering/catalog/crab_brown.tres index 83d20c8..b27bb7e 100644 --- a/gathering/catalog/crab_brown.tres +++ b/gathering/catalog/crab_brown.tres @@ -10,7 +10,10 @@ catch_data = ExtResource("2_catch") required_tool_id = &"crab_net" surface_materials = Array[StringName]([&"sand"]) minimum_surface_y = -0.44 +surface_water_relation = 1 population = 2 +surface_population_per_100_square_meters = 0.15 +maximum_surface_population = 24 movement_speed = 0.35 roam_radius = 3.5 scare_radius = 2.8 diff --git a/gathering/gatherable_data.gd b/gathering/gatherable_data.gd index 9f984cf..41de7fe 100644 --- a/gathering/gatherable_data.gd +++ b/gathering/gatherable_data.gd @@ -10,6 +10,12 @@ enum PresentationMode { WATER_SPURT, } +enum SurfaceWaterRelation { + ANY, + ABOVE_SALT_WATER, + BELOW_SALT_WATER, +} + @export var type_id: StringName @export var catch_data: FishDataType @export var required_tool_id: StringName @@ -17,7 +23,20 @@ enum PresentationMode { @export var diggable_area_id: StringName @export var spawn_anchor_set_id: StringName @export_range(-100.0, 100.0, 0.01) var minimum_surface_y: float = 0.08 +@export_range(-100.0, 100.0, 0.01) var maximum_surface_y: float = 100.0 +@export var surface_water_relation := SurfaceWaterRelation.ANY +@export_range(0.0, 2.0, 0.01) var waterline_margin: float = 0.01 @export_range(0, 64, 1) var population: int = 0 +## Anchored gatherables can scale with authored/generated attachment geometry. +## Zero preserves the fixed population above. +@export_range(0.0, 1.0, 0.01) var spawn_anchor_occupancy_ratio := 0.0 +## Zero leaves the anchor count as the only ceiling. +@export_range(0, 256, 1) var maximum_anchor_population := 0 +## Optional density scaling for large generated surfaces. The authored +## population remains the minimum while the maximum keeps large maps bounded. +@export_range(0.0, 8.0, 0.01) +var surface_population_per_100_square_meters := 0.0 +@export_range(0, 256, 1) var maximum_surface_population := 0 @export var presentation_mode: PresentationMode = PresentationMode.VISIBLE_CREATURE @export var requires_sneaking: bool = true @export_range(0.0, 120.0, 0.1) var active_lifetime_seconds: float = 0.0 @@ -72,12 +91,21 @@ func is_valid() -> bool: or uses_spawn_anchors or not surface_materials.is_empty() ) + and maximum_surface_y >= minimum_surface_y and ( not uses_diggable_area or catch_data.collection_method == FishDataType.CollectionMethod.DIGGING ) and population > 0 + and ( + maximum_anchor_population == 0 + or maximum_anchor_population >= population + ) + and ( + maximum_surface_population == 0 + or maximum_surface_population >= population + ) and movement_parameters_valid and _quality_multipliers_are_valid( quality_movement_speed_multipliers @@ -102,6 +130,39 @@ func is_stationary_spawn() -> bool: return is_stationary_hotspot() or not spawn_anchor_set_id.is_empty() +func target_population_for_anchor_count(anchor_count: int) -> int: + if spawn_anchor_set_id.is_empty() or spawn_anchor_occupancy_ratio <= 0.0: + return population + if anchor_count <= 0: + return 0 + var target := maxi( + population, + ceili(float(anchor_count) * spawn_anchor_occupancy_ratio), + ) + target = mini(target, anchor_count) + if maximum_anchor_population > 0: + target = mini(target, maximum_anchor_population) + return target + + +func target_population_for_surface_area(surface_area: float) -> int: + if surface_population_per_100_square_meters <= 0.0: + return population + if surface_area <= 0.0: + return 0 + var target := maxi( + population, + ceili( + surface_area + * surface_population_per_100_square_meters + / 100.0 + ), + ) + if maximum_surface_population > 0: + target = mini(target, maximum_surface_population) + return target + + func can_be_scared() -> bool: return not is_stationary_spawn() and scare_radius > 0.0 diff --git a/gathering/gathering_controller.gd b/gathering/gathering_controller.gd index 2859145..c061db5 100644 --- a/gathering/gathering_controller.gd +++ b/gathering/gathering_controller.gd @@ -341,10 +341,12 @@ func _build_marker() -> void: _marker_invalid_material.albedo_color = MARKER_INVALID_COLOR _marker_invalid_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED _marker_invalid_material.roughness = 1.0 + _marker_invalid_material.no_depth_test = true _marker_valid_material = StandardMaterial3D.new() _marker_valid_material.albedo_color = MARKER_VALID_COLOR _marker_valid_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED _marker_valid_material.roughness = 1.0 + _marker_valid_material.no_depth_test = true var disc := CylinderMesh.new() disc.top_radius = marker_radius disc.bottom_radius = marker_radius diff --git a/gathering/world_gatherable.gd b/gathering/world_gatherable.gd index 8a07ba0..1a71477 100644 --- a/gathering/world_gatherable.gd +++ b/gathering/world_gatherable.gd @@ -29,12 +29,16 @@ func configure( entity_id = configured_entity_id data = configured_data type_id = data.type_id if data != null else StringName() + # Establish the authoritative transform before constructing transient visuals. + # Effects emitted before this point would begin at the default world origin. + apply_network_state(position, yaw, true) if data != null and data.is_stationary_hotspot(): _ensure_water_spurt_visual() _water_spurt_elapsed = ( float(abs(hash(entity_id)) % 1000) / 1000.0 * WATER_SPURT_INTERVAL_SECONDS ) + _emit_water_spurt() else: _ensure_visual() if data != null and data.catch_data != null and _sprite != null: @@ -50,7 +54,6 @@ func configure( ) ) _sprite.rotation_degrees.x = data.sprite_tilt_degrees - apply_network_state(position, yaw, true) func apply_network_state( @@ -147,7 +150,6 @@ func _ensure_water_spurt_visual() -> void: hole.mesh = hole_mesh hole.cast_shadow = GeometryInstance3D.SHADOW_CASTING_SETTING_OFF _water_spurt_root.add_child(hole) - _emit_water_spurt() func _emit_water_spurt() -> void: @@ -159,6 +161,7 @@ func _emit_water_spurt() -> void: particles.amount = 6 particles.lifetime = 0.42 particles.one_shot = true + particles.local_coords = true particles.explosiveness = 1.0 particles.direction = Vector3.UP particles.spread = 32.0 diff --git a/homes/assets/starter_motorcoach.glb b/homes/assets/starter_motorcoach.glb new file mode 100644 index 0000000..becd54e Binary files /dev/null and b/homes/assets/starter_motorcoach.glb differ diff --git a/homes/assets/starter_motorcoach.glb.import b/homes/assets/starter_motorcoach.glb.import new file mode 100644 index 0000000..5cba35b --- /dev/null +++ b/homes/assets/starter_motorcoach.glb.import @@ -0,0 +1,45 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bhph22caipcj6" +path="res://.godot/imported/starter_motorcoach.glb-153681ef1e622a556fba4df576dc6f84.scn" + +[deps] + +source_file="res://homes/assets/starter_motorcoach.glb" +dest_files=["res://.godot/imported/starter_motorcoach.glb-153681ef1e622a556fba4df576dc6f84.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +mesh_library/use_node_names_as_mesh_names=false +array_mesh/deduplicate_surfaces=true +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=2 +gltf/embedded_image_handling=1 +gltf/texture_map_mode=1 diff --git a/homes/assets/starter_rv_interior.glb b/homes/assets/starter_rv_interior.glb new file mode 100644 index 0000000..21608ea Binary files /dev/null and b/homes/assets/starter_rv_interior.glb differ diff --git a/homes/assets/starter_rv_interior.glb.import b/homes/assets/starter_rv_interior.glb.import new file mode 100644 index 0000000..947870a --- /dev/null +++ b/homes/assets/starter_rv_interior.glb.import @@ -0,0 +1,45 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://b815y7svs3ern" +path="res://.godot/imported/starter_rv_interior.glb-9ad8a345e9e831e82874b4b276341224.scn" + +[deps] + +source_file="res://homes/assets/starter_rv_interior.glb" +dest_files=["res://.godot/imported/starter_rv_interior.glb-9ad8a345e9e831e82874b4b276341224.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +mesh_library/use_node_names_as_mesh_names=false +array_mesh/deduplicate_surfaces=true +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=2 +gltf/embedded_image_handling=1 +gltf/texture_map_mode=1 diff --git a/homes/assets/tent_interior.glb b/homes/assets/tent_interior.glb new file mode 100644 index 0000000..3ba2b76 Binary files /dev/null and b/homes/assets/tent_interior.glb differ diff --git a/homes/assets/tent_interior.glb.import b/homes/assets/tent_interior.glb.import new file mode 100644 index 0000000..fc01ba7 --- /dev/null +++ b/homes/assets/tent_interior.glb.import @@ -0,0 +1,45 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dkfqs051shmxe" +path="res://.godot/imported/tent_interior.glb-576cc47c2c633f7ae635651598663518.scn" + +[deps] + +source_file="res://homes/assets/tent_interior.glb" +dest_files=["res://.godot/imported/tent_interior.glb-576cc47c2c633f7ae635651598663518.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +mesh_library/use_node_names_as_mesh_names=false +array_mesh/deduplicate_surfaces=true +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=2 +gltf/embedded_image_handling=1 +gltf/texture_map_mode=1 diff --git a/homes/decor_catalog.gd b/homes/decor_catalog.gd new file mode 100644 index 0000000..14e5e29 --- /dev/null +++ b/homes/decor_catalog.gd @@ -0,0 +1,59 @@ +class_name DecorCatalog +extends RefCounted + +const BASIC_CUBE_ID: StringName = &"basic_cube" +const MAX_OWNED_PER_PRODUCT: int = 32 + +const _PRODUCTS: Dictionary = { + BASIC_CUBE_ID: { + "display_name": "basic cube", + "description": "a simple piece of decor for testing your RV layout.", + "price": 1, + "footprint": Vector2(1.0, 0.8), + "height": 0.8, + }, +} + + +static func get_product_ids() -> Array[StringName]: + var ids: Array[StringName] = [] + for value: Variant in _PRODUCTS.keys(): + ids.append(StringName(str(value))) + ids.sort_custom(func(first: StringName, second: StringName) -> bool: + return String(first) < String(second) + ) + return ids + + +static func has_product(product_id: StringName) -> bool: + return _PRODUCTS.has(product_id) + + +static func get_product(product_id: StringName) -> Dictionary: + var value: Variant = _PRODUCTS.get(product_id) + return ( + (value as Dictionary).duplicate(true) + if typeof(value) == TYPE_DICTIONARY + else {} + ) + + +static func get_display_name(product_id: StringName) -> String: + return str(get_product(product_id).get("display_name", product_id)) + + +static func get_description(product_id: StringName) -> String: + return str(get_product(product_id).get("description", "")) + + +static func get_price(product_id: StringName) -> int: + return int(get_product(product_id).get("price", -1)) + + +static func get_footprint(product_id: StringName) -> Vector2: + var value: Variant = get_product(product_id).get("footprint", Vector2.ZERO) + return value as Vector2 if value is Vector2 else Vector2.ZERO + + +static func get_height(product_id: StringName) -> float: + return float(get_product(product_id).get("height", 0.0)) diff --git a/homes/decor_catalog.gd.uid b/homes/decor_catalog.gd.uid new file mode 100644 index 0000000..10d2530 --- /dev/null +++ b/homes/decor_catalog.gd.uid @@ -0,0 +1 @@ +uid://bvgwmexas2gps diff --git a/homes/home_decor_controller.gd b/homes/home_decor_controller.gd new file mode 100644 index 0000000..f67207f --- /dev/null +++ b/homes/home_decor_controller.gd @@ -0,0 +1,512 @@ +class_name HomeDecorController +extends Node + +const DecorCatalogType = preload("res://homes/decor_catalog.gd") +const DRAG_RESPONSE: float = 22.0 +const DRAG_POSITION_EPSILON: float = 0.005 + +var _player: Player +var _hotbar: PlayerHotbar +var _bag: PlayerBag +var _home_state: PlayerHomeState +var _network_home: NetworkHomeService +var _home_world: HomeWorldService +var _fishing_spot: FishingSpot +var _toolbar: HomeDecorToolbar +var _mode: PlayerHomeState.PlacementMode = PlayerHomeState.PlacementMode.GRID +var _selected_instance_id: String = "" +var _drag_instance_id: String = "" +var _drag_owner_fingerprint: String = "" +var _drag_pointer_offset: Vector3 = Vector3.ZERO +var _drag_original_position: Vector3 = Vector3.ZERO +var _drag_original_yaw: float = 0.0 +var _drag_target_position: Vector3 = Vector3.ZERO +var _drag_target_yaw: float = 0.0 +var _drag_target_valid: bool = false + + +func setup( + player: Player, + hotbar: PlayerHotbar, + bag: PlayerBag, + home_state: PlayerHomeState, + network_home: NetworkHomeService, + home_world: HomeWorldService, + fishing_spot: FishingSpot, + toolbar: HomeDecorToolbar, +) -> void: + _player = player + _hotbar = hotbar + _bag = bag + _home_state = home_state + _network_home = network_home + _home_world = home_world + _fishing_spot = fishing_spot + _toolbar = toolbar + if not _network_home.local_space_changed.is_connected( + _on_local_space_changed + ): + _network_home.local_space_changed.connect(_on_local_space_changed) + if not _network_home.local_manifest_rejected.is_connected( + _on_local_manifest_rejected + ): + _network_home.local_manifest_rejected.connect( + _on_local_manifest_rejected + ) + if not _home_state.changed.is_connected(_on_home_changed): + _home_state.changed.connect(_on_home_changed) + if not _toolbar.placement_mode_requested.is_connected( + _on_placement_mode_requested + ): + _toolbar.placement_mode_requested.connect( + _on_placement_mode_requested + ) + _toolbar.rotate_requested.connect(_rotate_selected) + _toolbar.store_requested.connect(_store_selected) + _toolbar.cancel_requested.connect(_clear_selection) + _toolbar.set_mode(_mode) + _refresh_toolbar() + + +func begin_decorating() -> void: + _refresh_toolbar() + if _toolbar.visible: + _toolbar.report_status( + "use held decor to place it; click or drag placed decor" + ) + + +func _input(event: InputEvent) -> void: + if _drag_instance_id.is_empty(): + return + var pointer_motion := event as InputEventMouseMotion + if pointer_motion != null: + _update_drag(pointer_motion.position) + get_viewport().set_input_as_handled() + return + var pointer_button := event as InputEventMouseButton + if ( + pointer_button != null + and pointer_button.button_index == MOUSE_BUTTON_LEFT + and not pointer_button.pressed + ): + # A gameplay menu can take ownership between the press and release. Do + # not let that release finalize decor behind the menu; preserve the + # original transform instead. + if _can_decorate(): + _finish_drag() + else: + _cancel_drag() + get_viewport().set_input_as_handled() + + +func _unhandled_input(event: InputEvent) -> void: + var pointer_button := event as InputEventMouseButton + if ( + pointer_button != null + and pointer_button.button_index == MOUSE_BUTTON_LEFT + ): + if not pointer_button.pressed or not _can_decorate(): + return + if _begin_drag(pointer_button.position): + get_viewport().set_input_as_handled() + return + var pointer_decor_id: StringName = _get_selected_decor_id() + if ( + not pointer_decor_id.is_empty() + and _bag.get_quantity(pointer_decor_id) > 0 + ): + _place_carried_decor(pointer_decor_id) + get_viewport().set_input_as_handled() + return + if not _can_decorate() or not event.is_action_pressed("fish_primary"): + return + if event is InputEventKey and event.echo: + return + var decor_id: StringName = _get_selected_decor_id() + if not decor_id.is_empty() and _bag.get_quantity(decor_id) > 0: + _place_carried_decor(decor_id) + get_viewport().set_input_as_handled() + + +func _process(delta: float) -> void: + if _toolbar != null and _toolbar.visible: + _toolbar.set_interactive(_can_decorate()) + if _drag_instance_id.is_empty(): + return + # Menus and other gameplay input handoffs must cancel an active drag before + # evaluating a held/released pointer. This prevents a same-frame TAB press + # followed by left-button release from committing a move behind the UI. + if not _can_decorate(): + _cancel_drag() + return + if not Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT): + _finish_drag() + return + if not _drag_target_valid: + return + var current: Dictionary = _home_world.get_decor_preview_transform( + _drag_owner_fingerprint, _drag_instance_id + ) + if current.is_empty(): + _cancel_drag() + return + var current_position: Vector3 = current["position"] + var current_yaw: float = float(current["yaw"]) + var blend: float = 1.0 - exp(-DRAG_RESPONSE * delta) + _home_world.set_decor_preview_transform( + _drag_owner_fingerprint, + _drag_instance_id, + current_position.lerp(_drag_target_position, blend), + lerp_angle(current_yaw, _drag_target_yaw, blend), + ) + + +func _begin_drag(screen_position: Vector2) -> bool: + if _network_home.has_pending_local_decor_mutation(): + _toolbar.report_status("waiting for the previous decor update") + return false + var owner_fingerprint: String = ( + _network_home.get_local_home_owner_fingerprint() + ) + var camera: Camera3D = _player.get_active_gameplay_camera() + var clicked_instance: String = _home_world.find_decor_instance_at_screen( + owner_fingerprint, camera, screen_position + ) + if clicked_instance.is_empty(): + return false + var placement: Dictionary = _home_state.get_placement(clicked_instance) + if placement.is_empty(): + return false + var original_position: Vector3 = _placement_position(placement) + if not original_position.is_finite(): + return false + if not _home_world.set_decor_manipulation_active( + owner_fingerprint, clicked_instance, true + ): + return false + var pointer_position: Vector3 = _home_world.get_floor_position_from_screen( + owner_fingerprint, camera, screen_position + ) + _drag_instance_id = clicked_instance + _drag_owner_fingerprint = owner_fingerprint + _drag_original_position = original_position + _drag_original_yaw = float(placement.get("yaw", 0.0)) + _drag_target_position = original_position + _drag_target_yaw = _drag_original_yaw + _drag_target_valid = true + _drag_pointer_offset = ( + original_position - pointer_position + if pointer_position.is_finite() + else Vector3.ZERO + ) + _drag_pointer_offset.y = 0.0 + _select_instance(clicked_instance) + _toolbar.report_status("drag decor, then release to place it") + return true + + +func _update_drag(screen_position: Vector2) -> void: + if not _can_decorate(): + _cancel_drag() + return + var camera: Camera3D = _player.get_active_gameplay_camera() + var pointer_position: Vector3 = _home_world.get_floor_position_from_screen( + _drag_owner_fingerprint, camera, screen_position + ) + if not pointer_position.is_finite(): + # Keep the most recent valid target when the pointer briefly leaves the + # RV floor. Releasing there should place at that target, not throw the + # decor all the way back to where the drag began. + _toolbar.report_status("keep the pointer over the RV floor") + return + var placement: Dictionary = _home_state.get_placement(_drag_instance_id) + if placement.is_empty(): + _clear_selection() + return + var candidate: Vector3 = pointer_position + _drag_pointer_offset + candidate.y = 0.0 + var normalized: Dictionary = _network_home.get_valid_local_decor_transform( + _drag_instance_id, + candidate, + float(placement.get("yaw", _drag_original_yaw)), + _mode, + ) + if normalized.is_empty(): + # A densely furnished area may have no nearby solution. Preserve the + # last valid preview so the interaction remains stable while the player + # moves the pointer toward open space. + _toolbar.report_status("holding at the nearest available position") + return + _drag_target_position = normalized["position"] + _drag_target_yaw = float(normalized["yaw"]) + _drag_target_valid = true + _toolbar.report_status("release to place decor") + + +func _finish_drag() -> void: + var instance_id: String = _drag_instance_id + var owner_fingerprint: String = _drag_owner_fingerprint + var original_position: Vector3 = _drag_original_position + var original_yaw: float = _drag_original_yaw + var target_position: Vector3 = _drag_target_position + var target_yaw: float = _drag_target_yaw + var target_valid: bool = _drag_target_valid + var placement: Dictionary = _home_state.get_placement(instance_id) + var decor_id := StringName(str(placement.get("decor_id", ""))) + if ( + not target_valid + or decor_id.is_empty() + or not _home_world.is_decor_placement_clear_of_players( + owner_fingerprint, decor_id, target_position, target_yaw + ) + ): + _home_world.set_decor_preview_transform( + owner_fingerprint, + instance_id, + original_position, + original_yaw, + ) + _home_world.set_decor_manipulation_active( + owner_fingerprint, instance_id, false + ) + _reset_drag_state() + _toolbar.report_status( + "a player is in the way" + if target_valid + else "that space is not available" + ) + return + _home_world.set_decor_preview_transform( + owner_fingerprint, instance_id, target_position, target_yaw + ) + if ( + original_position.distance_to(target_position) + <= DRAG_POSITION_EPSILON + and is_zero_approx(angle_difference(original_yaw, target_yaw)) + ): + _home_world.set_decor_manipulation_active( + owner_fingerprint, instance_id, false + ) + _reset_drag_state() + _select_instance(instance_id) + return + if _network_home.update_local_decor( + instance_id, target_position, target_yaw, _mode + ): + _home_world.set_decor_manipulation_active( + owner_fingerprint, instance_id, false + ) + _reset_drag_state() + _toolbar.report_status("decor moved") + return + _home_world.set_decor_preview_transform( + owner_fingerprint, + instance_id, + original_position, + original_yaw, + ) + _home_world.set_decor_manipulation_active( + owner_fingerprint, instance_id, false + ) + _reset_drag_state() + _toolbar.report_status("that space is not available") + + +func _cancel_drag() -> void: + if _drag_instance_id.is_empty(): + return + _home_world.set_decor_preview_transform( + _drag_owner_fingerprint, + _drag_instance_id, + _drag_original_position, + _drag_original_yaw, + ) + _home_world.set_decor_manipulation_active( + _drag_owner_fingerprint, _drag_instance_id, false + ) + _reset_drag_state() + + +func _reset_drag_state() -> void: + _drag_instance_id = "" + _drag_owner_fingerprint = "" + _drag_pointer_offset = Vector3.ZERO + _drag_original_position = Vector3.ZERO + _drag_original_yaw = 0.0 + _drag_target_position = Vector3.ZERO + _drag_target_yaw = 0.0 + _drag_target_valid = false + + +static func _placement_position(placement: Dictionary) -> Vector3: + if placement.is_empty(): + return Vector3.INF + var values: Array = placement.get("position", []) + if values.size() != 3: + return Vector3.INF + return Vector3( + float(values[0]), float(values[1]), float(values[2]) + ) + + +func _place_carried_decor(decor_id: StringName) -> void: + if _network_home.has_pending_local_decor_mutation(): + _toolbar.report_status("waiting for the previous decor update") + return + var owner_fingerprint: String = ( + _network_home.get_local_home_owner_fingerprint() + ) + # RV transitions keep the gameplay root axis-aligned so its transform can be + # synchronized independently from the presentation. Use the visual facing + # direction instead; otherwise carried decor is always placed along world -Z + # instead of in front of the character the player sees. + var forward: Vector3 = _player.get_facing_direction() + var global_position: Vector3 = _player.global_position + forward * 1.45 + var local_position: Vector3 = _home_world.interior_global_to_local( + owner_fingerprint, global_position + ) + var placement_yaw: float = atan2(-forward.x, -forward.z) + var instance_id: String = _network_home.place_local_decor( + decor_id, local_position, placement_yaw, _mode + ) + if instance_id.is_empty(): + _toolbar.report_status("make room in front of you to place this decor") + return + # A local host can reject its own optimistic manifest synchronously. Do not + # claim success after that rollback or leave the player looking for decor that + # was never accepted into the room. + if _home_state.get_placement(instance_id).is_empty(): + _toolbar.report_status("decor placement was not accepted") + return + _select_instance(instance_id) + _toolbar.report_status("decor placed") + + +func _select_instance(instance_id: String) -> void: + var placement: Dictionary = _home_state.get_placement(instance_id) + if placement.is_empty(): + _clear_selection() + return + _selected_instance_id = instance_id + var decor_id := StringName(str(placement.get("decor_id", ""))) + _toolbar.set_selection( + instance_id, DecorCatalogType.get_display_name(decor_id) + ) + + +func _rotate_selected() -> void: + if not _can_decorate() or _selected_instance_id.is_empty(): + return + if _network_home.has_pending_local_decor_mutation(): + _toolbar.report_status("waiting for the previous decor update") + return + var placement: Dictionary = _home_state.get_placement( + _selected_instance_id + ) + if placement.is_empty(): + _clear_selection() + return + var values: Array = placement.get("position", []) + if values.size() != 3: + return + var position := Vector3( + float(values[0]), float(values[1]), float(values[2]) + ) + if _network_home.update_local_decor( + _selected_instance_id, + position, + float(placement.get("yaw", 0.0)) + PI * 0.5, + _mode, + ): + _toolbar.report_status("decor rotated") + else: + _toolbar.report_status("not enough room to rotate here") + + +func _store_selected() -> void: + if _selected_instance_id.is_empty(): + return + if _network_home.has_pending_local_decor_mutation(): + _toolbar.report_status("waiting for the previous decor update") + return + if _network_home.remove_local_decor(_selected_instance_id): + _clear_selection() + _toolbar.report_status("decor packed into storage") + else: + _toolbar.report_status("inventory and storage are full") + + +func _clear_selection() -> void: + _cancel_drag() + _selected_instance_id = "" + if _toolbar != null: + _toolbar.set_selection("") + + +func _on_placement_mode_requested(mode: int) -> void: + _mode = mode as PlayerHomeState.PlacementMode + + +func _on_local_space_changed( + _space_id: StringName, + _owner_fingerprint: String, +) -> void: + _clear_selection() + _refresh_toolbar() + + +func _on_local_manifest_rejected(message: String) -> void: + _clear_selection() + if _toolbar != null and _toolbar.visible: + _toolbar.report_status(message) + + +func _on_home_changed() -> void: + if ( + not _selected_instance_id.is_empty() + and _home_state.get_placement(_selected_instance_id).is_empty() + ): + _clear_selection() + _refresh_toolbar() + + +func _refresh_toolbar() -> void: + if _toolbar == null: + return + var inside_home: bool = _is_inside_home_space() + _toolbar.set_active(inside_home) + _toolbar.set_interactive(_can_decorate()) + if not _toolbar.visible: + _clear_selection() + elif not _can_decorate(): + _toolbar.report_status("decor tools pause while another menu is open") + + +func _is_inside_home_space() -> bool: + return ( + _network_home != null + and String(_network_home.get_local_space()).begins_with("rv:") + ) + + +func _can_decorate() -> bool: + return ( + _player != null + and _network_home != null + and _network_home.can_local_decorate() + and _fishing_spot != null + and _fishing_spot.can_open_fishing_shop() + and _player.is_movement_enabled() + ) + + +func _get_selected_decor_id() -> StringName: + if ( + _hotbar == null + or _hotbar.get_selected_assignment_kind() + != PlayerHotbar.AssignmentKind.ITEM + ): + return StringName() + var item_id: StringName = _hotbar.get_selected_item_id() + return item_id if DecorCatalogType.has_product(item_id) else StringName() diff --git a/homes/home_decor_controller.gd.uid b/homes/home_decor_controller.gd.uid new file mode 100644 index 0000000..1778125 --- /dev/null +++ b/homes/home_decor_controller.gd.uid @@ -0,0 +1 @@ +uid://b5j0mqcvhmi54 diff --git a/homes/home_world_service.gd b/homes/home_world_service.gd new file mode 100644 index 0000000..4ec0645 --- /dev/null +++ b/homes/home_world_service.gd @@ -0,0 +1,1504 @@ +class_name HomeWorldService +extends Node3D + +const NetworkHomeProtocolType = preload( + "res://network/network_home_protocol.gd" +) +const PlayerHomeStateType = preload("res://homes/player_home_state.gd") +const DecorCatalogType = preload("res://homes/decor_catalog.gd") +const STARTER_MOTORCOACH_SCENE: PackedScene = preload( + "res://homes/assets/starter_motorcoach.glb" +) +const TENT_INTERIOR_SCENE: PackedScene = preload( + "res://homes/assets/tent_interior.glb" +) +const STARTER_RV_INTERIOR_SCENE: PackedScene = preload( + "res://homes/assets/starter_rv_interior.glb" +) +const HOME_PROMPT_FONT: Font = preload("res://ui/fonts/Tuffy_Bold.otf") + +const RV_EXTERIOR_BODY_SIZE := Vector3(11.2, 5.0, 4.7) +const RV_EXTERIOR_BODY_CENTER_Y: float = 2.7 +const RV_EXTERIOR_DOOR_LOCAL := Vector3(-0.4, 1.7, 2.96) +const RV_EXTERIOR_SPAWN_LOCAL := Vector3(-0.4, 0.25, 3.95) +const TENT_EXTERIOR_BODY_SIZE := Vector3(4.6, 3.0, 4.6) +const TENT_EXTERIOR_BODY_CENTER_Y: float = 1.5 +const TENT_EXTERIOR_DOOR_LOCAL := Vector3(0.0, 1.0, 2.3) +const TENT_EXTERIOR_SPAWN_LOCAL := Vector3(0.0, 0.25, 3.3) +const RV_EXTERIOR_PROMPT_LOCAL := Vector3(-0.4, 3.72, 3.02) +const TENT_EXTERIOR_PROMPT_LOCAL := Vector3(0.0, 2.48, 2.36) +const HOME_PROMPT_SIZE := Vector2(0.95, 0.28) +const HOME_PROMPT_CORNER_RADIUS: float = 0.08 +const HOME_PROMPT_TEXT_PIXEL_SIZE: float = 0.0045 +const HOME_PROMPT_TEXT_COLOR := Color("c3dfe6") +const HOME_PROMPT_BACKGROUND_COLOR := Color("0a2d3a") +const EXTERIOR_INTERACTION_DISTANCE: float = 2.7 +const INTERIOR_EXIT_DISTANCE: float = 2.1 +const INTERIOR_ORIGIN := Vector3(1000.0, 300.0, 1000.0) +const INTERIOR_SPACING: float = 14.0 +const INTERIOR_MAX_SPAWN_SLOTS: int = 64 +const TENT_INTERIOR_SIZE := Vector2(4.0, 4.0) +const STARTER_RV_INTERIOR_SIZE := Vector2(4.0, 6.0) +const MIN_EXTERIOR_TRIANGLE_AREA: float = 1.0 +const MIN_EXTERIOR_SEPARATION: float = 14.6 +const EXTERIOR_FOOTPRINT_HALF_EXTENTS := Vector2(6.65, 3.73) +const EXTERIOR_SURFACE_INDEX_CELL_SIZE: float = 5.0 +const EXTERIOR_MAX_SURFACE_HEIGHT_DELTA: float = 0.24 +const EXTERIOR_CLEARANCE_HEIGHT: float = 5.5 +const WORLD_GEOMETRY_COLLISION_LAYER: int = 1 +const DECOR_SELECTION_COLLISION_LAYER: int = 1 << 8 +# Includes the player's 0.45 m capsule radius plus enough movement margin for +# a full low-tick-rate frame before a newly solid placement can be reached. +const PLAYER_DECOR_CLEARANCE_RADIUS: float = 0.8 +const BASIC_CUBE_SIZE := Vector3(1.0, 0.8, 0.8) + +var _world: TestWorld +var _spawn_service: PlayerSpawnService +var _session: NetworkSession +var _dedicated_runtime: bool = false +var _exteriors_root: Node3D +var _interiors_root: Node3D +var _presentations_by_fingerprint: Dictionary[String, Dictionary] = {} +var _local_space: StringName = NetworkHomeProtocolType.WORLD_SPACE +var _decor_under_manipulation: Dictionary[String, bool] = {} +var _pending_solid_decor: Dictionary[String, Dictionary] = {} + + +func setup( + world: TestWorld, + spawn_service: PlayerSpawnService, + session: NetworkSession, + dedicated_runtime: bool, +) -> void: + _world = world + _spawn_service = spawn_service + _session = session + _dedicated_runtime = dedicated_runtime + _ensure_roots() + set_process(true) + + +func is_world_ready() -> bool: + return _world != null and _world.is_world_ready() + + +func clear_presentations() -> void: + _presentations_by_fingerprint.clear() + _decor_under_manipulation.clear() + _pending_solid_decor.clear() + if is_instance_valid(_exteriors_root): + for child: Node in _exteriors_root.get_children(): + child.queue_free() + if is_instance_valid(_interiors_root): + for child: Node in _interiors_root.get_children(): + child.queue_free() + + +func remove_presentation(owner_fingerprint: String) -> void: + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + if presentation.is_empty(): + return + _clear_decor_collision_tracking(owner_fingerprint) + _free_presentation_nodes(presentation) + _presentations_by_fingerprint.erase(owner_fingerprint) + + +func apply_manifest(data: Dictionary) -> bool: + if ( + not is_world_ready() + or not NetworkHomeProtocolType.validate_manifest_broadcast(data) + ): + return false + _ensure_roots() + var fingerprint: String = str(data["owner_fingerprint"]) + var prior: Dictionary = _presentations_by_fingerprint.get(fingerprint, {}) + var prior_instance_ids: Dictionary[String, bool] = {} + if not prior.is_empty(): + var prior_home: Dictionary = prior.get("home", {}) + for value: Variant in prior_home.get("placements", []): + if typeof(value) == TYPE_DICTIONARY: + prior_instance_ids[str( + (value as Dictionary).get("instance_id", "") + )] = true + if not prior.is_empty(): + _clear_decor_collision_tracking(fingerprint) + _free_presentation_nodes(prior) + var exterior_transform := NetworkHomeProtocolType.array_to_transform( + data["exterior_transform"] + ) + var interior_index: int = int(data["interior_index"]) + var home_data: Dictionary = PlayerHomeStateType.sanitize_save_data( + data["home"] + ) + var exterior := _build_exterior( + fingerprint, exterior_transform, home_data + ) + var interior := _build_interior(fingerprint, interior_index, home_data) + var presentation: Dictionary = { + "owner_peer_id": int(data["owner_peer_id"]), + "fingerprint": fingerprint, + "home": home_data, + "exterior_transform": exterior_transform, + "interior_index": interior_index, + "exterior": exterior, + "interior": interior, + } + _presentations_by_fingerprint[fingerprint] = presentation + _refresh_local_visibility() + if not prior.is_empty(): + for value: Variant in home_data.get("placements", []): + if typeof(value) != TYPE_DICTIONARY: + continue + var instance_id: String = str( + (value as Dictionary).get("instance_id", "") + ) + if not instance_id.is_empty() and not prior_instance_ids.has( + instance_id + ): + call_deferred( + "_spawn_decor_poof", fingerprint, instance_id + ) + return true + + +func choose_exterior_transform( + owner_peer_id: int, + reserved_transforms: Array[Transform3D], +) -> Transform3D: + var spawn_transform: Transform3D = ( + _world.get_player_spawn_transform() + if _world != null else Transform3D.IDENTITY + ) + var triangles: Array[PackedVector3Array] = ( + _world.get_spawn_surface_triangles( + [&"grass_lite", &"grass", &"sand"], -0.5 + ) + if _world != null else [] + ) + if not triangles.is_empty(): + var surface_index: Dictionary = _build_surface_index(triangles) + var strict_result: Transform3D = _find_exterior_transform( + owner_peer_id, + triangles, + surface_index, + spawn_transform, + reserved_transforms, + true, + true, + ) + if strict_result != Transform3D.IDENTITY: + return strict_result + var relaxed_result: Transform3D = _find_exterior_transform( + owner_peer_id, + triangles, + surface_index, + spawn_transform, + reserved_transforms, + false, + true, + ) + if relaxed_result != Transform3D.IDENTITY: + return relaxed_result + var dry_result: Transform3D = _find_exterior_transform( + owner_peer_id, + triangles, + surface_index, + spawn_transform, + reserved_transforms, + false, + false, + ) + if dry_result != Transform3D.IDENTITY: + push_warning( + "Home exterior used a dry fallback with obstructed clearance." + ) + return dry_result + var emergency_result: Transform3D = _find_exterior_transform( + owner_peer_id, + triangles, + surface_index, + spawn_transform, + [], + false, + false, + ) + if emergency_result != Transform3D.IDENTITY: + push_warning( + "Home exterior used an accessible emergency placement." + ) + return emergency_result + push_error("No dry, level home exterior footprint was available.") + # The authored spawn is the only universally reachable point. Never strand + # a home on an unchecked elevation when malformed terrain offers no site. + return spawn_transform + + +func _find_exterior_transform( + owner_peer_id: int, + triangles: Array[PackedVector3Array], + surface_index: Dictionary, + spawn_transform: Transform3D, + reserved_transforms: Array[Transform3D], + require_spawn_clearance: bool, + require_obstacle_clearance: bool, +) -> Transform3D: + var triangle_count: int = triangles.size() + var start: int = posmod(owner_peer_id * 37, triangle_count) + var step: int = _coprime_step(triangle_count, 29) + for offset: int in triangle_count: + var triangle: PackedVector3Array = triangles[ + (start + offset * step) % triangle_count + ] + if not _is_exterior_candidate_triangle(triangle): + continue + var position: Vector3 = ( + triangle[0] + triangle[1] + triangle[2] + ) / 3.0 + if ( + require_spawn_clearance + and position.distance_to(spawn_transform.origin) < 9.0 + ): + continue + if _too_close_to_reserved(position, reserved_transforms): + continue + var yaw: float = float(posmod(owner_peer_id + offset, 4)) * PI * 0.5 + var grounded_position: Vector3 = _ground_exterior_footprint( + position, yaw, triangles, surface_index + ) + if not grounded_position.is_finite(): + continue + if ( + _world != null + and not _world.is_home_exterior_position_accessible( + grounded_position + ) + ): + continue + if ( + require_obstacle_clearance + and not _exterior_volume_is_clear(grounded_position, yaw) + ): + continue + return Transform3D(Basis(Vector3.UP, yaw), grounded_position) + return Transform3D.IDENTITY + + +func _is_exterior_candidate_triangle(triangle: PackedVector3Array) -> bool: + if triangle.size() != 3: + return false + var normal: Vector3 = (triangle[1] - triangle[0]).cross( + triangle[2] - triangle[0] + ) + var area: float = normal.length() * 0.5 + return ( + area >= MIN_EXTERIOR_TRIANGLE_AREA + and absf(normal.normalized().y) >= 0.94 + ) + + +func _ground_exterior_footprint( + position: Vector3, + yaw: float, + triangles: Array[PackedVector3Array], + surface_index: Dictionary, +) -> Vector3: + var heights: Array[float] = [] + for local_sample: Vector2 in _exterior_footprint_samples(): + var rotated_sample: Vector3 = Vector3( + local_sample.x, 0.0, local_sample.y + ).rotated(Vector3.UP, yaw) + var sample := Vector2( + position.x + rotated_sample.x, + position.z + rotated_sample.z, + ) + var height: float = _surface_height_at( + sample, position.y, triangles, surface_index + ) + if not is_finite(height): + return Vector3.INF + heights.append(height) + var minimum_height: float = heights.min() + var maximum_height: float = heights.max() + if maximum_height - minimum_height > EXTERIOR_MAX_SURFACE_HEIGHT_DELTA: + return Vector3.INF + return Vector3(position.x, maximum_height, position.z) + + +func _exterior_footprint_samples() -> Array[Vector2]: + var samples: Array[Vector2] = [] + for x_factor: float in [-1.0, -0.5, 0.0, 0.5, 1.0]: + for z_factor: float in [-1.0, 0.0, 1.0]: + samples.append(Vector2( + EXTERIOR_FOOTPRINT_HALF_EXTENTS.x * x_factor, + EXTERIOR_FOOTPRINT_HALF_EXTENTS.y * z_factor, + )) + return samples + + +func _build_surface_index( + triangles: Array[PackedVector3Array], +) -> Dictionary: + var result: Dictionary = {} + for triangle_index: int in triangles.size(): + var triangle: PackedVector3Array = triangles[triangle_index] + if triangle.size() != 3: + continue + var minimum_x: float = minf( + triangle[0].x, minf(triangle[1].x, triangle[2].x) + ) + var maximum_x: float = maxf( + triangle[0].x, maxf(triangle[1].x, triangle[2].x) + ) + var minimum_z: float = minf( + triangle[0].z, minf(triangle[1].z, triangle[2].z) + ) + var maximum_z: float = maxf( + triangle[0].z, maxf(triangle[1].z, triangle[2].z) + ) + var minimum_cell := Vector2i( + floori(minimum_x / EXTERIOR_SURFACE_INDEX_CELL_SIZE), + floori(minimum_z / EXTERIOR_SURFACE_INDEX_CELL_SIZE), + ) + var maximum_cell := Vector2i( + floori(maximum_x / EXTERIOR_SURFACE_INDEX_CELL_SIZE), + floori(maximum_z / EXTERIOR_SURFACE_INDEX_CELL_SIZE), + ) + for cell_x: int in range(minimum_cell.x, maximum_cell.x + 1): + for cell_y: int in range(minimum_cell.y, maximum_cell.y + 1): + var cell := Vector2i(cell_x, cell_y) + var bucket: Array = result.get(cell, []) + bucket.append(triangle_index) + result[cell] = bucket + return result + + +func _surface_height_at( + point: Vector2, + preferred_height: float, + triangles: Array[PackedVector3Array], + surface_index: Dictionary, +) -> float: + var cell := Vector2i( + floori(point.x / EXTERIOR_SURFACE_INDEX_CELL_SIZE), + floori(point.y / EXTERIOR_SURFACE_INDEX_CELL_SIZE), + ) + var best_height: float = INF + var best_delta: float = INF + for value: Variant in surface_index.get(cell, []): + var triangle: PackedVector3Array = triangles[int(value)] + var height: float = _triangle_height_at(point, triangle) + if not is_finite(height): + continue + var delta: float = absf(height - preferred_height) + if delta < best_delta: + best_delta = delta + best_height = height + return best_height + + +func _triangle_height_at( + point: Vector2, + triangle: PackedVector3Array, +) -> float: + var a := Vector2(triangle[0].x, triangle[0].z) + var b := Vector2(triangle[1].x, triangle[1].z) + var c := Vector2(triangle[2].x, triangle[2].z) + var denominator: float = ( + (b.y - c.y) * (a.x - c.x) + + (c.x - b.x) * (a.y - c.y) + ) + if absf(denominator) <= 0.000001: + return INF + var weight_a: float = ( + (b.y - c.y) * (point.x - c.x) + + (c.x - b.x) * (point.y - c.y) + ) / denominator + var weight_b: float = ( + (c.y - a.y) * (point.x - c.x) + + (a.x - c.x) * (point.y - c.y) + ) / denominator + var weight_c: float = 1.0 - weight_a - weight_b + const EDGE_EPSILON: float = 0.001 + if ( + weight_a < -EDGE_EPSILON + or weight_b < -EDGE_EPSILON + or weight_c < -EDGE_EPSILON + ): + return INF + return ( + weight_a * triangle[0].y + + weight_b * triangle[1].y + + weight_c * triangle[2].y + ) + + +func _exterior_volume_is_clear(position: Vector3, yaw: float) -> bool: + if not is_inside_tree() or get_world_3d() == null: + return true + var shape := BoxShape3D.new() + shape.size = Vector3( + EXTERIOR_FOOTPRINT_HALF_EXTENTS.x * 2.0, + EXTERIOR_CLEARANCE_HEIGHT, + EXTERIOR_FOOTPRINT_HALF_EXTENTS.y * 2.0, + ) + var query := PhysicsShapeQueryParameters3D.new() + query.shape = shape + query.transform = Transform3D( + Basis(Vector3.UP, yaw), + position + Vector3.UP * (EXTERIOR_CLEARANCE_HEIGHT * 0.5 + 0.2), + ) + query.collision_mask = 1 + query.collide_with_areas = false + query.collide_with_bodies = true + return get_world_3d().direct_space_state.intersect_shape(query, 1).is_empty() + + +func _coprime_step(value: int, preferred_step: int) -> int: + var step: int = mini(preferred_step, maxi(value - 1, 1)) + while step > 1 and _greatest_common_divisor(step, value) != 1: + step -= 1 + return step + + +func _greatest_common_divisor(first: int, second: int) -> int: + var a: int = absi(first) + var b: int = absi(second) + while b != 0: + var remainder: int = a % b + a = b + b = remainder + return a + + +func get_exterior_transform(owner_fingerprint: String) -> Transform3D: + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + return presentation.get("exterior_transform", Transform3D.IDENTITY) + + +func get_exterior_prompt_position(owner_fingerprint: String) -> Vector3: + return get_exterior_transform(owner_fingerprint) * ( + _exterior_prompt_local(owner_fingerprint) + ) + + +func set_exterior_prompt_visible( + owner_fingerprint: String, + requested_visible: bool, + action_text: String = "enter home", +) -> void: + for fingerprint: String in _presentations_by_fingerprint: + var presentation: Dictionary = _presentations_by_fingerprint[fingerprint] + var exterior: Node3D = presentation.get("exterior") + if not is_instance_valid(exterior): + continue + var prompt := exterior.get_node_or_null("DoorPrompt") as Node3D + if prompt == null: + continue + prompt.visible = ( + requested_visible + and fingerprint == owner_fingerprint + and not _dedicated_runtime + ) + if prompt.visible: + var label := prompt.get_node_or_null("Message") as Label3D + if label != null: + label.text = action_text + + +func get_exterior_spawn_transform(owner_fingerprint: String) -> Transform3D: + var exterior_transform: Transform3D = get_exterior_transform( + owner_fingerprint + ) + # Exterior local +Z leads away from the doorway. Player visuals face local + # -Z, so turn the authoritative spawn basis around to start the day facing + # outward instead of looking back into the home. + var outward_spawn_basis: Basis = ( + exterior_transform.basis * Basis(Vector3.UP, PI) + ) + return Transform3D( + outward_spawn_basis, + exterior_transform * _exterior_spawn_local(owner_fingerprint), + ) + + +func get_interior_spawn_transform( + owner_fingerprint: String, + visitor_offset: int = 0, +) -> Transform3D: + # `visitor_offset` is allocated by the host as a compact room-local slot. + # Keep it bounded as a last line of defense if a future caller accidentally + # supplies an engine peer ID instead of a slot. + var visitor_slot: int = posmod(visitor_offset, INTERIOR_MAX_SPAWN_SLOTS) + var exit_direction: Vector3 = get_interior_exit_direction(owner_fingerprint) + var lane_offset: float = ( + float(posmod(visitor_slot, 4)) - 1.5 + ) * 0.28 + var row_offset: float = ( + float(floori(float(visitor_slot) / 4.0)) * 0.28 + ) + # Spawn just through the authored doorway. Local presentation then walks the + # avatar farther into the room before returning movement control. + var spawn_origin: Vector3 = ( + get_interior_exit_position(owner_fingerprint) + + exit_direction * 0.42 + - exit_direction * row_offset + + Vector3(0.0, 0.0, lane_offset) + ) + spawn_origin.y = get_interior_anchor(owner_fingerprint).y + return Transform3D(Basis.IDENTITY, spawn_origin) + + +func get_interior_anchor(owner_fingerprint: String) -> Vector3: + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + var index: int = int(presentation.get("interior_index", 0)) + return INTERIOR_ORIGIN + Vector3(float(index) * INTERIOR_SPACING, 0.0, 0.0) + + +func is_avatar_near_exterior(avatar: Player, owner_fingerprint: String) -> bool: + if avatar == null or not _presentations_by_fingerprint.has(owner_fingerprint): + return false + var transform: Transform3D = get_exterior_transform(owner_fingerprint) + var door_position: Vector3 = ( + transform * _exterior_door_local(owner_fingerprint) + ) + return avatar.global_position.distance_to(door_position) <= ( + EXTERIOR_INTERACTION_DISTANCE + ) + + +func is_avatar_near_interior_exit( + avatar: Player, + owner_fingerprint: String, +) -> bool: + if avatar == null: + return false + return avatar.global_position.distance_to( + get_interior_exit_position(owner_fingerprint) + ) <= INTERIOR_EXIT_DISTANCE + + +func has_avatar_crossed_interior_exit_threshold( + avatar: Player, + owner_fingerprint: String, +) -> bool: + if avatar == null: + return false + var local_position: Vector3 = interior_global_to_local( + owner_fingerprint, + avatar.global_position, + ) + var threshold_position: Vector3 = interior_global_to_local( + owner_fingerprint, + get_interior_exit_position(owner_fingerprint), + ) + var exit_direction: Vector3 = get_interior_exit_direction( + owner_fingerprint + ) + return ( + (local_position - threshold_position).dot(exit_direction) >= 0.0 + and absf(local_position.z - threshold_position.z) <= 0.85 + and local_position.y >= -0.25 + and local_position.y <= 2.25 + ) + + +func get_interior_exit_direction(owner_fingerprint: String) -> Vector3: + return ( + Vector3.LEFT + if _home_tier(owner_fingerprint) + >= PlayerHomeStateType.STARTER_RV_TIER + else Vector3.RIGHT + ) + + +func get_interior_exit_position(owner_fingerprint: String) -> Vector3: + var tier: int = _home_tier(owner_fingerprint) + return get_interior_anchor(owner_fingerprint) + ( + Vector3(-STARTER_RV_INTERIOR_SIZE.x * 0.5 + 0.6, 0.35, 0.0) + if tier >= PlayerHomeStateType.STARTER_RV_TIER + else Vector3(TENT_INTERIOR_SIZE.x * 0.5 - 0.55, 0.35, 0.0) + ) + + +func get_interior_prompt_position(owner_fingerprint: String) -> Vector3: + return get_interior_exit_position(owner_fingerprint) + Vector3.UP * 1.2 + + +func interior_local_to_global( + owner_fingerprint: String, + local_position: Vector3, +) -> Vector3: + return get_interior_anchor(owner_fingerprint) + local_position + + +func interior_global_to_local( + owner_fingerprint: String, + global_position: Vector3, +) -> Vector3: + return global_position - get_interior_anchor(owner_fingerprint) + + +func get_floor_position_from_screen( + owner_fingerprint: String, + camera: Camera3D, + screen_position: Vector2, +) -> Vector3: + if camera == null or owner_fingerprint.is_empty(): + return Vector3.INF + var ray_origin: Vector3 = camera.project_ray_origin(screen_position) + var ray_direction: Vector3 = camera.project_ray_normal(screen_position) + if absf(ray_direction.y) <= 0.0001: + return Vector3.INF + var floor_y: float = get_interior_anchor(owner_fingerprint).y + 0.1 + var distance: float = (floor_y - ray_origin.y) / ray_direction.y + if distance <= 0.0: + return Vector3.INF + return interior_global_to_local( + owner_fingerprint, + ray_origin + ray_direction * distance, + ) + + +func find_decor_instance_at_screen( + owner_fingerprint: String, + camera: Camera3D, + screen_position: Vector2, +) -> String: + if camera == null or owner_fingerprint.is_empty(): + return "" + var ray_origin: Vector3 = camera.project_ray_origin(screen_position) + var ray_end: Vector3 = ray_origin + camera.project_ray_normal( + screen_position + ) * 50.0 + var query := PhysicsRayQueryParameters3D.create(ray_origin, ray_end) + query.collision_mask = DECOR_SELECTION_COLLISION_LAYER + query.collide_with_areas = false + var result: Dictionary = camera.get_world_3d().direct_space_state.intersect_ray( + query + ) + var collider: Object = result.get("collider") + if collider is Node and (collider as Node).has_meta(&"decor_instance_id"): + if str((collider as Node).get_meta(&"decor_owner_fingerprint")) == ( + owner_fingerprint + ): + return str((collider as Node).get_meta(&"decor_instance_id")) + return "" + + +func get_decor_preview_transform( + owner_fingerprint: String, + instance_id: String, +) -> Dictionary: + var decor: Node3D = _get_decor_presentation( + owner_fingerprint, instance_id + ) + if decor == null: + return {} + return { + "position": Vector3(decor.position.x, 0.0, decor.position.z), + "yaw": decor.rotation.y, + } + + +func set_decor_preview_transform( + owner_fingerprint: String, + instance_id: String, + position: Vector3, + yaw_radians: float, +) -> bool: + var decor: Node3D = _get_decor_presentation( + owner_fingerprint, instance_id + ) + if decor == null or not position.is_finite() or not is_finite(yaw_radians): + return false + decor.position = Vector3(position.x, 0.18, position.z) + decor.rotation.y = yaw_radians + return true + + +func set_decor_manipulation_active( + owner_fingerprint: String, + instance_id: String, + active: bool, +) -> bool: + var decor: Node3D = _get_decor_presentation( + owner_fingerprint, instance_id + ) + if decor == null: + return false + var body: StaticBody3D = decor.get_node_or_null( + "BasicCubeCollision" + ) as StaticBody3D + if body == null: + return false + var key: String = _decor_collision_key( + owner_fingerprint, instance_id + ) + if active: + _decor_under_manipulation[key] = true + _pending_solid_decor.erase(key) + body.collision_layer = DECOR_SELECTION_COLLISION_LAYER + return true + _decor_under_manipulation.erase(key) + _queue_decor_world_collision( + owner_fingerprint, + instance_id, + StringName(str(decor.get_meta(&"decor_id", ""))), + body, + ) + return true + + +func is_decor_placement_clear_of_players( + owner_fingerprint: String, + decor_id: StringName, + local_position: Vector3, + yaw_radians: float, +) -> bool: + if ( + owner_fingerprint.is_empty() + or not DecorCatalogType.has_product(decor_id) + or not local_position.is_finite() + or not is_finite(yaw_radians) + ): + return false + if _spawn_service == null: + return true + var global_center: Vector3 = interior_local_to_global( + owner_fingerprint, local_position + ) + var half_size: Vector2 = DecorCatalogType.get_footprint(decor_id) * 0.5 + for peer_id: int in _spawn_service.get_peer_ids(): + var avatar: Player = _spawn_service.get_avatar(peer_id) + if avatar == null or not is_instance_valid(avatar): + continue + var offset := Vector2( + avatar.global_position.x - global_center.x, + avatar.global_position.z - global_center.z, + ).rotated(-yaw_radians) + var nearest := Vector2( + clampf(offset.x, -half_size.x, half_size.x), + clampf(offset.y, -half_size.y, half_size.y), + ) + if offset.distance_squared_to(nearest) < ( + PLAYER_DECOR_CLEARANCE_RADIUS + * PLAYER_DECOR_CLEARANCE_RADIUS + ): + return false + return true + + +func _get_decor_presentation( + owner_fingerprint: String, + instance_id: String, +) -> Node3D: + if owner_fingerprint.is_empty() or instance_id.is_empty(): + return null + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + var interior: Node3D = presentation.get("interior") + if not is_instance_valid(interior): + return null + return interior.get_node_or_null( + "Decor/%s" % instance_id + ) as Node3D + + +func find_nearby_exterior_owner(avatar: Player) -> String: + if avatar == null: + return "" + var closest: String = "" + var closest_distance: float = EXTERIOR_INTERACTION_DISTANCE + for fingerprint: String in _presentations_by_fingerprint: + var transform: Transform3D = get_exterior_transform(fingerprint) + var distance: float = avatar.global_position.distance_to( + transform * _exterior_door_local(fingerprint) + ) + if distance <= closest_distance: + closest = fingerprint + closest_distance = distance + return closest + + +func _home_tier(owner_fingerprint: String) -> int: + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + var home_data: Dictionary = presentation.get("home", {}) + return int(home_data.get("tier", PlayerHomeStateType.STARTER_TIER)) + + +func _exterior_door_local(owner_fingerprint: String) -> Vector3: + return ( + RV_EXTERIOR_DOOR_LOCAL + if _home_tier(owner_fingerprint) + >= PlayerHomeStateType.STARTER_RV_TIER + else TENT_EXTERIOR_DOOR_LOCAL + ) + + +func _exterior_spawn_local(owner_fingerprint: String) -> Vector3: + return ( + RV_EXTERIOR_SPAWN_LOCAL + if _home_tier(owner_fingerprint) + >= PlayerHomeStateType.STARTER_RV_TIER + else TENT_EXTERIOR_SPAWN_LOCAL + ) + + +func _exterior_prompt_local(owner_fingerprint: String) -> Vector3: + return ( + RV_EXTERIOR_PROMPT_LOCAL + if _home_tier(owner_fingerprint) + >= PlayerHomeStateType.STARTER_RV_TIER + else TENT_EXTERIOR_PROMPT_LOCAL + ) + + +func set_local_space(space_id: StringName) -> void: + _local_space = space_id + _refresh_local_visibility() + + +func get_manifest(owner_fingerprint: String) -> Dictionary: + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + return (presentation.get("home", {}) as Dictionary).duplicate(true) + + +func _process(_delta: float) -> void: + _refresh_pending_decor_collisions() + if not _dedicated_runtime: + _refresh_nearest_wall() + + +func _queue_decor_world_collision( + owner_fingerprint: String, + instance_id: String, + decor_id: StringName, + body: StaticBody3D, +) -> void: + if ( + owner_fingerprint.is_empty() + or instance_id.is_empty() + or not DecorCatalogType.has_product(decor_id) + or body == null + ): + return + var key: String = _decor_collision_key( + owner_fingerprint, instance_id + ) + body.collision_layer = DECOR_SELECTION_COLLISION_LAYER + _pending_solid_decor[key] = { + "owner_fingerprint": owner_fingerprint, + "instance_id": instance_id, + "decor_id": decor_id, + "body": body, + } + + +func _refresh_pending_decor_collisions() -> void: + if _pending_solid_decor.is_empty(): + return + var keys: Array[String] = [] + keys.assign(_pending_solid_decor.keys()) + for key: String in keys: + if _decor_under_manipulation.has(key): + continue + var pending: Dictionary = _pending_solid_decor.get(key, {}) + var body: StaticBody3D = pending.get("body") as StaticBody3D + var owner_fingerprint: String = str( + pending.get("owner_fingerprint", "") + ) + var instance_id: String = str(pending.get("instance_id", "")) + var decor_id := StringName(str(pending.get("decor_id", ""))) + var decor: Node3D = _get_decor_presentation( + owner_fingerprint, instance_id + ) + if body == null or decor == null or not is_instance_valid(body): + _pending_solid_decor.erase(key) + continue + if not is_decor_placement_clear_of_players( + owner_fingerprint, + decor_id, + Vector3(decor.position.x, 0.0, decor.position.z), + decor.rotation.y, + ): + continue + body.collision_layer = ( + WORLD_GEOMETRY_COLLISION_LAYER + | DECOR_SELECTION_COLLISION_LAYER + ) + _pending_solid_decor.erase(key) + + +func _clear_decor_collision_tracking(owner_fingerprint: String) -> void: + var prefix: String = "%s/" % owner_fingerprint + for key: String in _decor_under_manipulation.keys(): + if key.begins_with(prefix): + _decor_under_manipulation.erase(key) + for key: String in _pending_solid_decor.keys(): + if key.begins_with(prefix): + _pending_solid_decor.erase(key) + + +static func _decor_collision_key( + owner_fingerprint: String, + instance_id: String, +) -> String: + return "%s/%s" % [owner_fingerprint, instance_id] + + +func _ensure_roots() -> void: + if not is_instance_valid(_exteriors_root): + _exteriors_root = Node3D.new() + _exteriors_root.name = "RVExteriors" + add_child(_exteriors_root) + if not is_instance_valid(_interiors_root): + _interiors_root = Node3D.new() + _interiors_root.name = "RVInteriors" + add_child(_interiors_root) + + +func _build_exterior( + fingerprint: String, + world_transform: Transform3D, + home_data: Dictionary, +) -> Node3D: + var root := Node3D.new() + root.name = "Home_%s" % fingerprint.left(8) + _exteriors_root.add_child(root) + root.global_transform = world_transform + var tier: int = int(home_data.get( + "tier", PlayerHomeStateType.STARTER_TIER + )) + if tier >= PlayerHomeStateType.STARTER_RV_TIER: + if not _dedicated_runtime: + var motorcoach: Node3D = ( + STARTER_MOTORCOACH_SCENE.instantiate() as Node3D + ) + if motorcoach != null: + motorcoach.name = "StarterMotorcoach" + root.add_child(motorcoach) + else: + push_error( + "The starter motorcoach exterior could not be instantiated." + ) + _add_box_collision( + root, + "Body", + RV_EXTERIOR_BODY_SIZE, + Vector3(0.0, RV_EXTERIOR_BODY_CENTER_Y, 0.0), + ) + else: + if not _dedicated_runtime: + _add_tent_exterior(root) + _add_box_collision( + root, + "Body", + TENT_EXTERIOR_BODY_SIZE, + Vector3(0.0, TENT_EXTERIOR_BODY_CENTER_Y, 0.0), + ) + if not _dedicated_runtime: + _add_exterior_prompt(root, tier) + root.visible = not _dedicated_runtime + return root + + +func _build_interior( + fingerprint: String, + interior_index: int, + home_data: Dictionary, +) -> Node3D: + var root := Node3D.new() + root.name = "HomeInterior_%s" % fingerprint.left(8) + root.position = INTERIOR_ORIGIN + Vector3( + float(interior_index) * INTERIOR_SPACING, 0.0, 0.0 + ) + _interiors_root.add_child(root) + var tier: int = int(home_data.get( + "tier", PlayerHomeStateType.STARTER_TIER + )) + var scene: PackedScene = ( + STARTER_RV_INTERIOR_SCENE + if tier >= PlayerHomeStateType.STARTER_RV_TIER + else TENT_INTERIOR_SCENE + ) + var shell: Node3D = scene.instantiate() as Node3D + if shell == null: + push_error("The home interior shell could not be instantiated.") + else: + shell.name = "InteriorShell" + root.add_child(shell) + _prepare_imported_interior(shell) + var decor := Node3D.new() + decor.name = "Decor" + root.add_child(decor) + _rebuild_decor(decor, home_data, fingerprint) + root.visible = false + if _dedicated_runtime: + _set_geometry_visible(root, false) + return root + + +func _add_tent_exterior(parent: Node3D) -> void: + var tent := MeshInstance3D.new() + tent.name = "StarterTent" + var mesh := CylinderMesh.new() + mesh.top_radius = 0.0 + mesh.bottom_radius = 3.05 + mesh.height = 3.0 + mesh.radial_segments = 4 + mesh.rings = 1 + mesh.cap_top = false + mesh.material = _material(Color("9a7049")) + tent.mesh = mesh + tent.position.y = 1.5 + tent.rotation.y = PI * 0.25 + parent.add_child(tent) + _add_box( + parent, + "TentDoor", + Vector3(1.25, 1.85, 0.04), + Vector3(0.0, 0.95, 2.18), + Color("173b32"), + false, + ) + + +func _add_exterior_prompt(parent: Node3D, tier: int) -> void: + var prompt := Node3D.new() + prompt.name = "DoorPrompt" + prompt.position = ( + RV_EXTERIOR_PROMPT_LOCAL + if tier >= PlayerHomeStateType.STARTER_RV_TIER + else TENT_EXTERIOR_PROMPT_LOCAL + ) + prompt.visible = false + parent.add_child(prompt) + + var background := MeshInstance3D.new() + background.name = "Background" + background.mesh = _rounded_rectangle_mesh( + HOME_PROMPT_SIZE, + HOME_PROMPT_CORNER_RADIUS, + ) + background.material_override = _prompt_material( + HOME_PROMPT_BACKGROUND_COLOR + ) + prompt.add_child(background) + + var label := Label3D.new() + label.name = "Message" + label.text = "enter home" + label.position.z = 0.012 + label.font = HOME_PROMPT_FONT + label.font_size = 28 + label.pixel_size = HOME_PROMPT_TEXT_PIXEL_SIZE + label.modulate = HOME_PROMPT_TEXT_COLOR + label.outline_size = 0 + label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER + label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER + label.width = HOME_PROMPT_SIZE.x / HOME_PROMPT_TEXT_PIXEL_SIZE + label.double_sided = true + prompt.add_child(label) + + +func _rounded_rectangle_mesh(size: Vector2, radius: float) -> ArrayMesh: + var half_size: Vector2 = size * 0.5 + var clamped_radius: float = minf( + radius, + minf(half_size.x, half_size.y), + ) + var corners: Array[Vector2] = [ + Vector2(half_size.x - clamped_radius, half_size.y - clamped_radius), + Vector2(-half_size.x + clamped_radius, half_size.y - clamped_radius), + Vector2(-half_size.x + clamped_radius, -half_size.y + clamped_radius), + Vector2(half_size.x - clamped_radius, -half_size.y + clamped_radius), + ] + var start_angles: Array[float] = [0.0, PI * 0.5, PI, PI * 1.5] + var perimeter: Array[Vector2] = [] + const CORNER_SEGMENTS: int = 4 + for corner_index: int in corners.size(): + for segment_index: int in range(CORNER_SEGMENTS + 1): + var angle: float = start_angles[corner_index] + ( + PI * 0.5 * float(segment_index) / float(CORNER_SEGMENTS) + ) + perimeter.append( + corners[corner_index] + + Vector2(cos(angle), sin(angle)) * clamped_radius + ) + var surface := SurfaceTool.new() + surface.begin(Mesh.PRIMITIVE_TRIANGLES) + for index: int in perimeter.size(): + var first: Vector2 = perimeter[index] + var second: Vector2 = perimeter[(index + 1) % perimeter.size()] + for point: Vector2 in [Vector2.ZERO, first, second]: + surface.set_normal(Vector3.FORWARD) + surface.add_vertex(Vector3(point.x, point.y, 0.0)) + return surface.commit() + + +func _prompt_material(color: Color) -> StandardMaterial3D: + var material := StandardMaterial3D.new() + material.albedo_color = color + material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED + material.roughness = 1.0 + material.metallic = 0.0 + material.cull_mode = BaseMaterial3D.CULL_DISABLED + return material + + +func _prepare_imported_interior(shell: Node3D) -> void: + for value: Node in shell.find_children("*", "MeshInstance3D", true, false): + var mesh_instance := value as MeshInstance3D + if mesh_instance == null or mesh_instance.mesh == null: + continue + for surface_index: int in mesh_instance.mesh.get_surface_count(): + var source_material: Material = mesh_instance.get_active_material( + surface_index + ) + var material := source_material as StandardMaterial3D + if material == null: + continue + var flat_material := material.duplicate() as StandardMaterial3D + flat_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED + flat_material.texture_filter = BaseMaterial3D.TEXTURE_FILTER_NEAREST + flat_material.roughness = 1.0 + flat_material.metallic = 0.0 + mesh_instance.set_surface_override_material( + surface_index, flat_material + ) + _add_imported_mesh_collision(mesh_instance) + + +func _add_imported_mesh_collision(mesh_instance: MeshInstance3D) -> void: + var parent: Node = mesh_instance.get_parent() + if parent == null or mesh_instance.mesh == null: + return + var shape: ConcavePolygonShape3D = mesh_instance.mesh.create_trimesh_shape() + if shape == null: + return + var body := StaticBody3D.new() + body.name = "%sCollision" % mesh_instance.name + body.transform = mesh_instance.transform + var collision := CollisionShape3D.new() + collision.shape = shape + body.add_child(collision) + parent.add_child(body) + + +func _rebuild_decor( + parent: Node3D, + home_data: Dictionary, + owner_fingerprint: String, +) -> void: + for value: Variant in home_data.get("placements", []): + if typeof(value) != TYPE_DICTIONARY: + continue + var placement: Dictionary = value + var decor_id := StringName(str(placement["decor_id"])) + if decor_id != DecorCatalogType.BASIC_CUBE_ID: + continue + var position_values: Array = placement["position"] + var placement_root := Node3D.new() + placement_root.name = str(placement["instance_id"]) + placement_root.position = Vector3( + float(position_values[0]), 0.18, float(position_values[2]) + ) + placement_root.rotation.y = float(placement["yaw"]) + placement_root.set_meta( + &"decor_instance_id", str(placement["instance_id"]) + ) + placement_root.set_meta( + &"decor_owner_fingerprint", owner_fingerprint + ) + placement_root.set_meta(&"decor_id", String(decor_id)) + parent.add_child(placement_root) + var body := _add_box( + placement_root, "BasicCube", BASIC_CUBE_SIZE, + Vector3(0.0, BASIC_CUBE_SIZE.y * 0.5, 0.0), + Color("b77a55"), true, + ) + if body != null: + body.collision_layer = DECOR_SELECTION_COLLISION_LAYER + body.set_meta( + &"decor_instance_id", str(placement["instance_id"]) + ) + body.set_meta( + &"decor_owner_fingerprint", owner_fingerprint + ) + body.set_meta(&"decor_id", String(decor_id)) + _queue_decor_world_collision( + owner_fingerprint, + str(placement["instance_id"]), + decor_id, + body, + ) + _add_box( + placement_root, + "BasicCubeFront", + Vector3(BASIC_CUBE_SIZE.x * 0.82, BASIC_CUBE_SIZE.y * 0.68, 0.025), + Vector3( + 0.0, + BASIC_CUBE_SIZE.y * 0.5, + -BASIC_CUBE_SIZE.z * 0.5 - 0.013, + ), + Color("2897a8"), + false, + ) + + +func _add_wall( + parent: Node3D, + node_name: String, + size: Vector3, + position: Vector3, +) -> void: + _add_box(parent, node_name, size, position, Color("d6caaa"), true) + + +func _add_box( + parent: Node3D, + node_name: String, + size: Vector3, + position: Vector3, + color: Color, + with_collision: bool, + invert_faces: bool = false, +) -> StaticBody3D: + var mesh_instance := MeshInstance3D.new() + mesh_instance.name = node_name + var mesh := BoxMesh.new() + mesh.size = size + mesh.material = _material(color) + if invert_faces: + mesh.flip_faces = true + mesh_instance.mesh = mesh + mesh_instance.position = position + parent.add_child(mesh_instance) + if with_collision: + return _add_box_collision(parent, node_name, size, position) + return null + + +func _add_box_collision( + parent: Node3D, + node_name: String, + size: Vector3, + position: Vector3, +) -> StaticBody3D: + var body := StaticBody3D.new() + body.name = "%sCollision" % node_name + body.position = position + var collision := CollisionShape3D.new() + var shape := BoxShape3D.new() + shape.size = size + collision.shape = shape + body.add_child(collision) + parent.add_child(body) + return body + + +func _spawn_decor_poof( + owner_fingerprint: String, + instance_id: String, +) -> void: + var presentation: Dictionary = _presentations_by_fingerprint.get( + owner_fingerprint, {} + ) + var interior: Node3D = presentation.get("interior") + if not is_instance_valid(interior): + return + var placement_root: Node3D = interior.get_node_or_null( + "Decor/%s" % instance_id + ) + if placement_root == null: + return + var poof := CPUParticles3D.new() + poof.name = "DecorPoof" + poof.amount = 12 + poof.lifetime = 0.45 + poof.one_shot = true + poof.explosiveness = 0.9 + poof.direction = Vector3.UP + poof.spread = 80.0 + poof.initial_velocity_min = 0.7 + poof.initial_velocity_max = 1.5 + poof.scale_amount_min = 0.08 + poof.scale_amount_max = 0.16 + var particle_mesh := SphereMesh.new() + particle_mesh.radius = 0.06 + particle_mesh.height = 0.12 + particle_mesh.material = _material(Color("d9c5a3")) + poof.mesh = particle_mesh + placement_root.add_child(poof) + poof.emitting = true + get_tree().create_timer(poof.lifetime + 0.1).timeout.connect( + poof.queue_free + ) + + +func _material(color: Color) -> StandardMaterial3D: + var material := StandardMaterial3D.new() + material.albedo_color = color + material.roughness = 1.0 + material.shading_mode = BaseMaterial3D.SHADING_MODE_PER_VERTEX + return material + + +func _free_presentation_nodes(presentation: Dictionary) -> void: + for key: String in ["exterior", "interior"]: + var node: Node = presentation.get(key) + if is_instance_valid(node): + node.queue_free() + + +func _refresh_local_visibility() -> void: + var active_fingerprint: String = "" + if String(_local_space).begins_with("rv:"): + active_fingerprint = String(_local_space).trim_prefix("rv:") + if _world != null: + _world.set_local_home_interior_presentation_active( + not active_fingerprint.is_empty() + ) + for fingerprint: String in _presentations_by_fingerprint: + var presentation: Dictionary = _presentations_by_fingerprint[fingerprint] + var interior: Node3D = presentation.get("interior") + if is_instance_valid(interior): + interior.visible = ( + not _dedicated_runtime and fingerprint == active_fingerprint + ) + var exterior: Node3D = presentation.get("exterior") + if is_instance_valid(exterior): + exterior.visible = ( + not _dedicated_runtime and active_fingerprint.is_empty() + ) + var local_player: Player = ( + _spawn_service.get_local_player() + if _spawn_service != null else null + ) + if local_player == null: + return + var excluded_wall_rids: Array[RID] = [] + if not active_fingerprint.is_empty(): + var active: Dictionary = _presentations_by_fingerprint.get( + active_fingerprint, {} + ) + var active_interior: Node3D = active.get("interior") + if is_instance_valid(active_interior): + for wall_name: String in [ + "WallNorth", "WallSouth", "WallWest", "WallEast", + ]: + var body := active_interior.find_child( + "%sCollision" % wall_name, true, false + ) as StaticBody3D + if body != null: + excluded_wall_rids.append(body.get_rid()) + local_player.set_rv_interior_camera_mode( + not active_fingerprint.is_empty(), excluded_wall_rids + ) + + +func _refresh_nearest_wall() -> void: + if not String(_local_space).begins_with("rv:") or _spawn_service == null: + return + var fingerprint: String = String(_local_space).trim_prefix("rv:") + var presentation: Dictionary = _presentations_by_fingerprint.get( + fingerprint, {} + ) + var interior: Node3D = presentation.get("interior") + var player: Player = _spawn_service.get_local_player() + if not is_instance_valid(interior) or player == null: + return + var camera: Camera3D = player.get_active_gameplay_camera() + if camera == null: + return + var local_camera: Vector3 = interior.to_local(camera.global_position) + var local_view_direction: Vector3 = ( + interior.global_basis.inverse() * -camera.global_basis.z + ).normalized() + var horizontal_view_weight: float = absf(local_view_direction.x) + var depth_view_weight: float = absf(local_view_direction.z) + var tier: int = int((presentation.get("home", {}) as Dictionary).get( + "tier", PlayerHomeStateType.STARTER_TIER + )) + var interior_size: Vector2 = ( + STARTER_RV_INTERIOR_SIZE + if tier >= PlayerHomeStateType.STARTER_RV_TIER + else TENT_INTERIOR_SIZE + ) + var hidden_walls: Dictionary[String, bool] = {} + var outside_horizontal_wall: bool = ( + absf(local_camera.x) >= interior_size.x * 0.5 - 0.05 + ) + var outside_depth_wall: bool = ( + absf(local_camera.z) >= interior_size.y * 0.5 - 0.05 + ) + # At a diagonal, both near walls occupy the view. Use the camera's viewing + # direction to hide both instead of choosing only the dominant position + # axis and leaving the adjacent wall across the screen. + if ( + outside_horizontal_wall + and horizontal_view_weight >= depth_view_weight * 0.35 + ): + hidden_walls[ + "WallEast" if local_camera.x >= 0.0 else "WallWest" + ] = true + if ( + outside_depth_wall + and depth_view_weight >= horizontal_view_weight * 0.35 + ): + hidden_walls[ + "WallSouth" if local_camera.z >= 0.0 else "WallNorth" + ] = true + if hidden_walls.is_empty(): + var fallback_wall: String = ( + "WallEast" if local_camera.x >= 0.0 else "WallWest" + ) + if depth_view_weight > horizontal_view_weight: + fallback_wall = ( + "WallSouth" if local_camera.z >= 0.0 else "WallNorth" + ) + hidden_walls[fallback_wall] = true + for wall_name: String in [ + "WallNorth", "WallSouth", "WallWest", "WallEast", + ]: + var wall := interior.find_child( + wall_name, true, false + ) as MeshInstance3D + if wall != null: + wall.visible = not hidden_walls.has(wall_name) + for child: Node in interior.find_children( + "%s*" % wall_name, "GeometryInstance3D", true, false + ): + if ( + child is GeometryInstance3D + and String(child.name).begins_with(wall_name) + ): + (child as GeometryInstance3D).visible = ( + not hidden_walls.has(wall_name) + ) + + +func _too_close_to_reserved( + position: Vector3, + reserved_transforms: Array[Transform3D], +) -> bool: + for transform: Transform3D in reserved_transforms: + if position.distance_to(transform.origin) < MIN_EXTERIOR_SEPARATION: + return true + return false + + +func _set_geometry_visible(root: Node, visible: bool) -> void: + for node: Node in root.find_children("*", "GeometryInstance3D", true, false): + (node as GeometryInstance3D).visible = visible diff --git a/homes/home_world_service.gd.uid b/homes/home_world_service.gd.uid new file mode 100644 index 0000000..5505d06 --- /dev/null +++ b/homes/home_world_service.gd.uid @@ -0,0 +1 @@ +uid://cy2kjoxhwxujd diff --git a/homes/player_home_state.gd b/homes/player_home_state.gd new file mode 100644 index 0000000..a89d6a3 --- /dev/null +++ b/homes/player_home_state.gd @@ -0,0 +1,841 @@ +class_name PlayerHomeState +extends Node + +signal changed + +const DecorCatalogType = preload("res://homes/decor_catalog.gd") + +const HOME_SCHEMA_VERSION: int = 1 +const STARTER_TIER: int = 0 +const STARTER_EXTERIOR_ID: StringName = &"starter_tent" +const STARTER_RV_TIER: int = 1 +const STARTER_RV_EXTERIOR_ID: StringName = &"starter_motorcoach" +const MAX_TIER: int = STARTER_RV_TIER +const HOME_UPGRADE_COSTS: Array[int] = [50] +const STORAGE_CAPACITIES: Array[int] = [9, 18] +const MAX_PLACEMENTS: int = 128 +const MAX_INSTANCE_ID_LENGTH: int = 96 +const MAX_REVISION: int = 2147483647 +const GRID_SIZE: float = 0.5 +const FREE_PLACEMENT_SEARCH_STEP: float = 0.1 +const FREE_PLACEMENT_SEARCH_ANGLES: int = 24 +const NEAREST_PLACEMENT_SEARCH_DISTANCE: float = 2.0 +const TENT_INTERIOR_HALF_EXTENTS := Vector2(1.91, 1.91) +const STARTER_RV_INTERIOR_HALF_EXTENTS := Vector2(1.91, 2.91) +const PLACEMENT_EDGE_PADDING: float = 0.02 + +enum Privacy { + OPEN, + CLOSED, +} + +enum PlacementMode { + GRID, + FREE, +} + +var _tier: int = STARTER_TIER +var _exterior_id: StringName = STARTER_EXTERIOR_ID +var _privacy: Privacy = Privacy.OPEN +var _owned_decor: Dictionary[StringName, int] = {} +var _placements: Array[Dictionary] = [] +var _revision: int = 0 +var _next_instance_sequence: int = 1 + + +func get_tier() -> int: + return _tier + + +func get_exterior_id() -> StringName: + return _exterior_id + + +func get_storage_capacity() -> int: + return storage_capacity_for_tier(_tier) + + +func get_next_upgrade_cost() -> int: + if _tier >= MAX_TIER: + return -1 + return HOME_UPGRADE_COSTS[_tier] + + +func get_next_storage_capacity() -> int: + if _tier >= MAX_TIER: + return -1 + return storage_capacity_for_tier(_tier + 1) + + +func upgrade_to_next_tier() -> bool: + if _tier >= MAX_TIER: + return false + _tier += 1 + _exterior_id = exterior_id_for_tier(_tier) + _touch() + return true + + +static func exterior_id_for_tier(tier: int) -> StringName: + return ( + STARTER_RV_EXTERIOR_ID + if tier >= STARTER_RV_TIER + else STARTER_EXTERIOR_ID + ) + + +static func storage_capacity_for_tier(tier: int) -> int: + return STORAGE_CAPACITIES[clampi(tier, STARTER_TIER, MAX_TIER)] + + +static func interior_half_extents_for_tier(tier: int) -> Vector2: + return ( + STARTER_RV_INTERIOR_HALF_EXTENTS + if tier >= STARTER_RV_TIER + else TENT_INTERIOR_HALF_EXTENTS + ) + + +func get_privacy() -> Privacy: + return _privacy + + +func get_revision() -> int: + return _revision + + +func get_owned_count(decor_id: StringName) -> int: + return int(_owned_decor.get(decor_id, 0)) + + +func get_placed_count(decor_id: StringName) -> int: + var count: int = 0 + for placement: Dictionary in _placements: + if StringName(str(placement.get("decor_id", ""))) == decor_id: + count += 1 + return count + + +func get_available_count(decor_id: StringName) -> int: + return maxi( + get_owned_count(decor_id) - get_placed_count(decor_id), + 0, + ) + + +func get_owned_decor() -> Dictionary[StringName, int]: + return _owned_decor.duplicate() + + +func get_placements() -> Array[Dictionary]: + var result: Array[Dictionary] = [] + for placement: Dictionary in _placements: + result.append(placement.duplicate(true)) + return result + + +func get_placement(instance_id: String) -> Dictionary: + var index: int = _placement_index(instance_id) + return _placements[index].duplicate(true) if index >= 0 else {} + + +func can_place_decor( + decor_id: StringName, + position: Vector3, + yaw_radians: float, + mode: PlacementMode, +) -> bool: + if ( + get_available_count(decor_id) <= 0 + or _placements.size() >= MAX_PLACEMENTS + or not _valid_mode(mode) + ): + return false + return not get_nearest_valid_placement_transform( + decor_id, + position, + yaw_radians, + mode, + "", + ).is_empty() + + +func set_privacy(value: Privacy) -> bool: + if value < Privacy.OPEN or value > Privacy.CLOSED: + return false + if _privacy == value: + return true + _privacy = value + _touch() + return true + + +func add_owned_decor( + decor_id: StringName, + quantity: int = 1, +) -> bool: + if ( + not DecorCatalogType.has_product(decor_id) + or quantity <= 0 + ): + return false + var current: int = get_owned_count(decor_id) + if current + quantity > DecorCatalogType.MAX_OWNED_PER_PRODUCT: + return false + _owned_decor[decor_id] = current + quantity + _touch() + return true + + +func remove_owned_decor( + decor_id: StringName, + quantity: int = 1, +) -> bool: + if quantity <= 0: + return false + var current: int = get_owned_count(decor_id) + if current - quantity < get_placed_count(decor_id): + return false + var remaining: int = current - quantity + if remaining < 0: + return false + if remaining == 0: + _owned_decor.erase(decor_id) + else: + _owned_decor[decor_id] = remaining + _touch() + return true + + +func place_decor( + decor_id: StringName, + position: Vector3, + yaw_radians: float, + mode: PlacementMode, +) -> String: + if ( + get_available_count(decor_id) <= 0 + or _placements.size() >= MAX_PLACEMENTS + or not _valid_mode(mode) + ): + return "" + var normalized := get_nearest_valid_placement_transform( + decor_id, + position, + yaw_radians, + mode, + "", + ) + if normalized.is_empty(): + return "" + var instance_id := _make_instance_id() + var placement: Dictionary = { + "instance_id": instance_id, + "decor_id": String(decor_id), + "mode": int(mode), + "position": _vector3_to_array(normalized["position"]), + "yaw": float(normalized["yaw"]), + } + _placements.append(placement) + _touch() + return instance_id + + +func update_placement( + instance_id: String, + position: Vector3, + yaw_radians: float, + mode: PlacementMode, +) -> bool: + var index: int = _placement_index(instance_id) + var normalized: Dictionary = get_valid_update_transform( + instance_id, position, yaw_radians, mode + ) + if index < 0 or normalized.is_empty(): + return false + var placement: Dictionary = _placements[index].duplicate(true) + placement["mode"] = int(mode) + placement["position"] = _vector3_to_array(normalized["position"]) + placement["yaw"] = float(normalized["yaw"]) + _placements[index] = placement + _touch() + return true + + +func get_valid_update_transform( + instance_id: String, + position: Vector3, + yaw_radians: float, + mode: PlacementMode, + candidate_validator: Callable = Callable(), +) -> Dictionary: + var index: int = _placement_index(instance_id) + if index < 0 or not _valid_mode(mode): + return {} + var decor_id := StringName( + str(_placements[index].get("decor_id", "")) + ) + return get_nearest_valid_placement_transform( + decor_id, + position, + yaw_radians, + mode, + instance_id, + candidate_validator, + ) + + +func get_nearest_valid_placement_transform( + decor_id: StringName, + position: Vector3, + yaw_radians: float, + mode: PlacementMode, + ignored_instance_id: String = "", + candidate_validator: Callable = Callable(), +) -> Dictionary: + var normalized: Dictionary = normalized_placement_transform( + decor_id, position, yaw_radians, mode, _tier + ) + if normalized.is_empty(): + return {} + if ( + not _overlaps_existing( + decor_id, normalized, ignored_instance_id + ) + and _candidate_is_accepted(normalized, candidate_validator) + ): + return normalized + return ( + _find_nearest_grid_transform( + decor_id, + normalized, + ignored_instance_id, + candidate_validator, + ) + if mode == PlacementMode.GRID + else _find_nearest_free_transform( + decor_id, + normalized, + ignored_instance_id, + candidate_validator, + ) + ) + + +func remove_placement(instance_id: String) -> bool: + var index: int = _placement_index(instance_id) + if index < 0: + return false + _placements.remove_at(index) + _touch() + return true + + +func reset_to_defaults() -> void: + _tier = STARTER_TIER + _exterior_id = STARTER_EXTERIOR_ID + _privacy = Privacy.OPEN + _owned_decor.clear() + _placements.clear() + _revision = 0 + _next_instance_sequence = 1 + changed.emit() + + +func to_save_data() -> Dictionary: + var owned: Dictionary = {} + var ids: Array[StringName] = [] + ids.assign(_owned_decor.keys()) + ids.sort_custom(func(first: StringName, second: StringName) -> bool: + return String(first) < String(second) + ) + for decor_id: StringName in ids: + owned[String(decor_id)] = _owned_decor[decor_id] + return { + "schema_version": HOME_SCHEMA_VERSION, + "tier": _tier, + "exterior_id": String(_exterior_id), + "privacy": int(_privacy), + "owned_decor": owned, + "placements": get_placements(), + "revision": _revision, + "next_instance_sequence": _next_instance_sequence, + } + + +func restore_from_save_data(data: Dictionary) -> bool: + var sanitized: Dictionary = sanitize_save_data(data) + if sanitized.is_empty(): + return false + _tier = int(sanitized["tier"]) + _exterior_id = exterior_id_for_tier(_tier) + _privacy = int(sanitized["privacy"]) + _owned_decor.clear() + for key: Variant in (sanitized["owned_decor"] as Dictionary): + _owned_decor[StringName(str(key))] = int( + (sanitized["owned_decor"] as Dictionary)[key] + ) + _placements.clear() + for value: Variant in sanitized["placements"] as Array: + _placements.append((value as Dictionary).duplicate(true)) + _revision = int(sanitized["revision"]) + _next_instance_sequence = int(sanitized["next_instance_sequence"]) + changed.emit() + return true + + +static func default_save_data() -> Dictionary: + return { + "schema_version": HOME_SCHEMA_VERSION, + "tier": STARTER_TIER, + "exterior_id": String(STARTER_EXTERIOR_ID), + "privacy": int(Privacy.OPEN), + "owned_decor": {}, + "placements": [], + "revision": 0, + "next_instance_sequence": 1, + } + + +static func sanitize_save_data(data: Dictionary) -> Dictionary: + if ( + not _is_integer_value(data.get("schema_version")) + or int(data.get("schema_version", -1)) != HOME_SCHEMA_VERSION + or not _is_integer_value(data.get("tier")) + or typeof(data.get("exterior_id")) not in [ + TYPE_STRING, TYPE_STRING_NAME, + ] + or not _is_integer_value(data.get("privacy")) + or typeof(data.get("owned_decor")) != TYPE_DICTIONARY + or typeof(data.get("placements")) != TYPE_ARRAY + or not _is_integer_value(data.get("revision")) + or not _is_integer_value(data.get("next_instance_sequence")) + ): + return {} + var tier: int = int(data["tier"]) + var exterior_id: String = str(data["exterior_id"]) + var privacy: int = int(data["privacy"]) + var revision: int = int(data["revision"]) + var next_sequence: int = int(data["next_instance_sequence"]) + if ( + tier < STARTER_TIER + or tier > MAX_TIER + or exterior_id.is_empty() + or exterior_id.length() > 96 + or privacy < Privacy.OPEN + or privacy > Privacy.CLOSED + or revision < 0 + or revision > MAX_REVISION + or next_sequence < 1 + or next_sequence > MAX_REVISION + ): + return {} + exterior_id = String(exterior_id_for_tier(tier)) + var sanitized_owned: Dictionary = {} + var owned: Dictionary = data["owned_decor"] + for key: Variant in owned: + if typeof(key) not in [TYPE_STRING, TYPE_STRING_NAME]: + return {} + var decor_id := StringName(str(key)) + var quantity_value: Variant = owned[key] + if ( + not DecorCatalogType.has_product(decor_id) + or not _is_integer_value(quantity_value) + or int(quantity_value) <= 0 + or int(quantity_value) > DecorCatalogType.MAX_OWNED_PER_PRODUCT + ): + return {} + sanitized_owned[String(decor_id)] = int(quantity_value) + var values: Array = data["placements"] + if values.size() > MAX_PLACEMENTS: + return {} + var sanitized_placements: Array[Dictionary] = [] + var seen_instance_ids: Dictionary[String, bool] = {} + var placed_counts: Dictionary[StringName, int] = {} + for value: Variant in values: + if typeof(value) != TYPE_DICTIONARY: + return {} + var sanitized: Dictionary = sanitize_placement(value, tier) + if sanitized.is_empty(): + return {} + var instance_id: String = str(sanitized["instance_id"]) + var decor_id := StringName(str(sanitized["decor_id"])) + if seen_instance_ids.has(instance_id): + return {} + seen_instance_ids[instance_id] = true + placed_counts[decor_id] = int( + placed_counts.get(decor_id, 0) + ) + 1 + if ( + int(placed_counts[decor_id]) + > int(sanitized_owned.get(String(decor_id), 0)) + ): + return {} + for previous: Dictionary in sanitized_placements: + if placements_overlap(previous, sanitized): + return {} + sanitized_placements.append(sanitized) + return { + "schema_version": HOME_SCHEMA_VERSION, + "tier": tier, + "exterior_id": exterior_id, + "privacy": privacy, + "owned_decor": sanitized_owned, + "placements": sanitized_placements, + "revision": revision, + "next_instance_sequence": next_sequence, + } + + +static func sanitize_placement( + value: Dictionary, + home_tier: int = STARTER_TIER, +) -> Dictionary: + for key: String in [ + "instance_id", "decor_id", "mode", "position", "yaw", + ]: + if not value.has(key): + return {} + if ( + typeof(value["instance_id"]) != TYPE_STRING + or typeof(value["decor_id"]) not in [ + TYPE_STRING, TYPE_STRING_NAME, + ] + or not _is_integer_value(value["mode"]) + or typeof(value["position"]) != TYPE_ARRAY + or typeof(value["yaw"]) not in [TYPE_FLOAT, TYPE_INT] + ): + return {} + var instance_id: String = value["instance_id"] + var decor_id := StringName(str(value["decor_id"])) + var mode: int = int(value["mode"]) + var position_values: Array = value["position"] + var yaw: float = float(value["yaw"]) + if ( + instance_id.is_empty() + or instance_id.length() > MAX_INSTANCE_ID_LENGTH + or not DecorCatalogType.has_product(decor_id) + or not _valid_mode(mode) + or position_values.size() != 3 + or not is_finite(yaw) + ): + return {} + for component: Variant in position_values: + if typeof(component) not in [TYPE_FLOAT, TYPE_INT]: + return {} + var position := Vector3( + float(position_values[0]), + float(position_values[1]), + float(position_values[2]), + ) + var normalized := normalized_placement_transform( + decor_id, + position, + yaw, + mode as PlacementMode, + home_tier, + ) + if normalized.is_empty(): + return {} + return { + "instance_id": instance_id, + "decor_id": String(decor_id), + "mode": mode, + "position": _vector3_to_array(normalized["position"]), + "yaw": float(normalized["yaw"]), + } + + +static func _is_integer_value(value: Variant) -> bool: + if typeof(value) == TYPE_INT: + return true + if typeof(value) != TYPE_FLOAT: + return false + var number: float = float(value) + return is_finite(number) and is_equal_approx(number, roundf(number)) + + +static func normalized_placement_transform( + decor_id: StringName, + position: Vector3, + yaw_radians: float, + mode: PlacementMode, + home_tier: int = STARTER_TIER, +) -> Dictionary: + if ( + not DecorCatalogType.has_product(decor_id) + or not position.is_finite() + or not is_finite(yaw_radians) + or not _valid_mode(mode) + ): + return {} + var normalized_position := Vector3(position.x, 0.0, position.z) + var normalized_yaw: float = wrapf(yaw_radians, -PI, PI) + if mode == PlacementMode.GRID: + normalized_position.x = snappedf(normalized_position.x, GRID_SIZE) + normalized_position.z = snappedf(normalized_position.z, GRID_SIZE) + normalized_yaw = snappedf(normalized_yaw, PI * 0.5) + var footprint: Vector2 = DecorCatalogType.get_footprint(decor_id) + var cosine: float = absf(cos(normalized_yaw)) + var sine: float = absf(sin(normalized_yaw)) + var half_size := Vector2( + (footprint.x * cosine + footprint.y * sine) * 0.5, + (footprint.x * sine + footprint.y * cosine) * 0.5, + ) + var interior_half_extents := interior_half_extents_for_tier(home_tier) + var maximum_x: float = ( + interior_half_extents.x - half_size.x - PLACEMENT_EDGE_PADDING + ) + var maximum_z: float = ( + interior_half_extents.y - half_size.y - PLACEMENT_EDGE_PADDING + ) + if maximum_x < 0.0 or maximum_z < 0.0: + return {} + # Clamp after grid snapping so a grid-placed item can still sit flush at a + # wall even when the wall itself is not on an exact grid interval. + normalized_position.x = clampf( + normalized_position.x, -maximum_x, maximum_x + ) + normalized_position.z = clampf( + normalized_position.z, -maximum_z, maximum_z + ) + return { + "position": normalized_position, + "yaw": normalized_yaw, + } + + +func _find_nearest_grid_transform( + decor_id: StringName, + origin: Dictionary, + ignored_instance_id: String, + candidate_validator: Callable, +) -> Dictionary: + var origin_position: Vector3 = origin["position"] + var yaw: float = float(origin["yaw"]) + var maximum_ring: int = ceili( + NEAREST_PLACEMENT_SEARCH_DISTANCE / GRID_SIZE + ) + var seen: Dictionary[String, bool] = {} + for ring: int in range(1, maximum_ring + 1): + var nearest: Dictionary = {} + var nearest_distance_squared: float = INF + for x_offset: int in range(-ring, ring + 1): + for z_offset: int in range(-ring, ring + 1): + if maxi(absi(x_offset), absi(z_offset)) != ring: + continue + var candidate: Dictionary = normalized_placement_transform( + decor_id, + origin_position + Vector3( + float(x_offset) * GRID_SIZE, + 0.0, + float(z_offset) * GRID_SIZE, + ), + yaw, + PlacementMode.GRID, + _tier, + ) + if candidate.is_empty() or not _mark_candidate_unseen( + candidate, seen + ): + continue + if _overlaps_existing( + decor_id, candidate, ignored_instance_id + ) or not _candidate_is_accepted( + candidate, candidate_validator + ): + continue + var candidate_position: Vector3 = candidate["position"] + var distance_squared: float = origin_position.distance_squared_to( + candidate_position + ) + if distance_squared < nearest_distance_squared: + nearest = candidate + nearest_distance_squared = distance_squared + if not nearest.is_empty(): + return nearest + return {} + + +func _find_nearest_free_transform( + decor_id: StringName, + origin: Dictionary, + ignored_instance_id: String, + candidate_validator: Callable, +) -> Dictionary: + var origin_position: Vector3 = origin["position"] + var yaw: float = float(origin["yaw"]) + var maximum_ring: int = ceili( + NEAREST_PLACEMENT_SEARCH_DISTANCE / FREE_PLACEMENT_SEARCH_STEP + ) + var seen: Dictionary[String, bool] = {} + for ring: int in range(1, maximum_ring + 1): + var radius: float = float(ring) * FREE_PLACEMENT_SEARCH_STEP + var nearest: Dictionary = {} + var nearest_distance_squared: float = INF + for angle_index: int in FREE_PLACEMENT_SEARCH_ANGLES: + var angle: float = ( + TAU * float(angle_index) / float(FREE_PLACEMENT_SEARCH_ANGLES) + ) + var candidate: Dictionary = normalized_placement_transform( + decor_id, + origin_position + Vector3( + cos(angle) * radius, 0.0, sin(angle) * radius + ), + yaw, + PlacementMode.FREE, + _tier, + ) + if candidate.is_empty() or not _mark_candidate_unseen( + candidate, seen + ): + continue + if _overlaps_existing( + decor_id, candidate, ignored_instance_id + ) or not _candidate_is_accepted( + candidate, candidate_validator + ): + continue + var candidate_position: Vector3 = candidate["position"] + var distance_squared: float = origin_position.distance_squared_to( + candidate_position + ) + if distance_squared < nearest_distance_squared: + nearest = candidate + nearest_distance_squared = distance_squared + if not nearest.is_empty(): + return nearest + return {} + + +static func _mark_candidate_unseen( + candidate: Dictionary, + seen: Dictionary[String, bool], +) -> bool: + var position: Vector3 = candidate["position"] + var key := "%d:%d" % [ + roundi(position.x * 10000.0), + roundi(position.z * 10000.0), + ] + if seen.has(key): + return false + seen[key] = true + return true + + +static func _candidate_is_accepted( + candidate: Dictionary, + validator: Callable, +) -> bool: + return not validator.is_valid() or bool(validator.call(candidate)) + + +static func placements_overlap(first: Dictionary, second: Dictionary) -> bool: + var first_id := StringName(str(first.get("decor_id", ""))) + var second_id := StringName(str(second.get("decor_id", ""))) + if ( + not DecorCatalogType.has_product(first_id) + or not DecorCatalogType.has_product(second_id) + ): + return true + var first_position: Vector3 = _array_to_vector3(first.get("position", [])) + var second_position: Vector3 = _array_to_vector3(second.get("position", [])) + var first_yaw: float = float(first.get("yaw", 0.0)) + var second_yaw: float = float(second.get("yaw", 0.0)) + var first_half: Vector2 = ( + DecorCatalogType.get_footprint(first_id) * 0.5 + ) + var second_half: Vector2 = ( + DecorCatalogType.get_footprint(second_id) * 0.5 + ) + var first_axes: Array[Vector2] = _placement_axes(first_yaw) + var second_axes: Array[Vector2] = _placement_axes(second_yaw) + var delta := Vector2( + second_position.x - first_position.x, + second_position.z - first_position.z, + ) + for axis: Vector2 in [ + first_axes[0], first_axes[1], second_axes[0], second_axes[1], + ]: + var first_radius: float = ( + absf(axis.dot(first_axes[0])) * first_half.x + + absf(axis.dot(first_axes[1])) * first_half.y + ) + var second_radius: float = ( + absf(axis.dot(second_axes[0])) * second_half.x + + absf(axis.dot(second_axes[1])) * second_half.y + ) + if absf(delta.dot(axis)) >= ( + first_radius + second_radius - 0.001 + ): + return false + return true + + +func _make_instance_id() -> String: + var result := "decor-%d-%d" % [ + Time.get_ticks_usec(), + _next_instance_sequence, + ] + _next_instance_sequence = mini( + _next_instance_sequence + 1, + MAX_REVISION, + ) + return result + + +func _placement_index(instance_id: String) -> int: + if instance_id.is_empty(): + return -1 + for index: int in _placements.size(): + if str(_placements[index].get("instance_id", "")) == instance_id: + return index + return -1 + + +func _overlaps_existing( + decor_id: StringName, + normalized: Dictionary, + ignored_instance_id: String, +) -> bool: + var candidate: Dictionary = { + "decor_id": String(decor_id), + "position": _vector3_to_array(normalized["position"]), + "yaw": float(normalized["yaw"]), + } + for placement: Dictionary in _placements: + if str(placement.get("instance_id", "")) == ignored_instance_id: + continue + if placements_overlap(candidate, placement): + return true + return false + + +func _touch() -> void: + _revision = mini(_revision + 1, MAX_REVISION) + changed.emit() + + +static func _valid_mode(value: int) -> bool: + return value >= PlacementMode.GRID and value <= PlacementMode.FREE + + +static func _vector3_to_array(value: Vector3) -> Array[float]: + return [value.x, value.y, value.z] + + +static func _array_to_vector3(value: Variant) -> Vector3: + if typeof(value) != TYPE_ARRAY or (value as Array).size() != 3: + return Vector3.INF + var components: Array = value + return Vector3( + float(components[0]), + float(components[1]), + float(components[2]), + ) + + +static func _placement_axes(yaw: float) -> Array[Vector2]: + var cosine: float = cos(yaw) + var sine: float = sin(yaw) + return [Vector2(cosine, sine), Vector2(-sine, cosine)] diff --git a/homes/player_home_state.gd.uid b/homes/player_home_state.gd.uid new file mode 100644 index 0000000..37836c6 --- /dev/null +++ b/homes/player_home_state.gd.uid @@ -0,0 +1 @@ +uid://ggfdoak2ixxx diff --git a/inventory/player_bag.gd b/inventory/player_bag.gd index e33f1e4..d94845d 100644 --- a/inventory/player_bag.gd +++ b/inventory/player_bag.gd @@ -60,6 +60,28 @@ func add_item(item_id: StringName, quantity: int = 1) -> bool: return true +func add_item_to_storage(item_id: StringName, quantity: int = 1) -> bool: + var existing: OwnedItemType = get_owned_item(item_id) + if existing != null: + return add_item(item_id, quantity) + var item: ItemDataType = _resolve_available_item(item_id) + if ( + item == null + or quantity <= 0 + or quantity > (item.max_stack if item.stackable else 1) + or _inventory_layout == null + or not _inventory_layout.can_accept_item_in_storage(item_id) + ): + return false + var owned := OwnedItemType.new() + owned.item_id = item_id + owned.quantity = quantity + owned.storage_slot = _first_available_storage_slot(item, _items) + _items.append(owned) + contents_changed.emit() + return true + + func can_add_item(item_id: StringName, quantity: int = 1) -> bool: var item: ItemDataType = _resolve_available_item(item_id) if item == null or quantity <= 0: diff --git a/inventory/player_hotbar.gd b/inventory/player_hotbar.gd index b7d5197..36068ea 100644 --- a/inventory/player_hotbar.gd +++ b/inventory/player_hotbar.gd @@ -314,6 +314,25 @@ func get_fish_slots() -> Array[StringName]: return _fish_slots.duplicate() +func find_item_slot(item_id: StringName) -> int: + return _slots.find(item_id) + + +func find_first_empty_slot() -> int: + for slot_index: int in SLOT_COUNT: + if get_assignment_kind(slot_index) != AssignmentKind.EMPTY: + continue + if ( + _inventory_layout == null + or _inventory_layout.get_key_at( + PlayerInventoryLayout.InventoryContainer.HOTBAR, + slot_index, + ).is_empty() + ): + return slot_index + return -1 + + func replace_state( slots: Array[StringName], selected_slot: int, diff --git a/inventory/player_inventory_layout.gd b/inventory/player_inventory_layout.gd index 244e10b..bce726e 100644 --- a/inventory/player_inventory_layout.gd +++ b/inventory/player_inventory_layout.gd @@ -37,6 +37,7 @@ var _fish_inventory: FishInventoryType var _item_catalog: ItemCatalogType var _storage_capacity: PlayerCoolerCapacityType var _placements: Dictionary[String, Dictionary] = {} +var _prepared_item_placements: Dictionary[String, Dictionary] = {} var _reconciling: bool = false var _backpack_level: int = 0 @@ -72,7 +73,44 @@ func can_accept_item(item_id: StringName) -> bool: if not is_managed_item(item_id): return true var key := item_key(item_id) - return _placements.has(key) or _first_free_slot(InventoryContainer.INVENTORY) >= 0 + return ( + _placements.has(key) + or _is_prepared_item_placement_available(key) + or _first_free_slot(InventoryContainer.INVENTORY) >= 0 + ) + + +func prepare_new_item_placement( + item_id: StringName, + target_container: InventoryContainer, + target_slot: int, +) -> bool: + if not is_managed_item(item_id): + return false + var key := item_key(item_id) + if ( + _placements.has(key) + or not _is_slot_valid(target_container, target_slot) + or not _key_at(target_container, target_slot).is_empty() + or _prepared_slot_is_occupied(target_container, target_slot) + ): + return false + _prepared_item_placements[key] = { + "container": int(target_container), + "slot": target_slot, + } + return true + + +func cancel_prepared_item_placement(item_id: StringName) -> void: + _prepared_item_placements.erase(item_key(item_id)) + + +func can_accept_item_in_storage(item_id: StringName) -> bool: + if not is_managed_item(item_id): + return true + var key := item_key(item_id) + return _placements.has(key) or _first_free_slot(InventoryContainer.STORAGE) >= 0 func can_accept_catch(catch_id: StringName = StringName()) -> bool: @@ -332,6 +370,7 @@ func restore_from_save_data(data: Dictionary) -> bool: "container": container, "slot": slot, } + _prepared_item_placements.clear() _placements = restored _reconcile(true) return true @@ -340,6 +379,7 @@ func restore_from_save_data(data: Dictionary) -> bool: func reset_to_defaults() -> void: var capacity_changed := _backpack_level != 0 _backpack_level = 0 + _prepared_item_placements.clear() _placements.clear() _reconcile(true) if capacity_changed: @@ -402,8 +442,17 @@ func _reconcile(force_signal: bool) -> void: for key: String in expected: if _placements.has(key): continue + var prepared: Dictionary = _prepared_item_placements.get(key, {}) var target_container := InventoryContainer.INVENTORY - var target_slot := _first_free_slot(target_container) + var target_slot: int = -1 + if _is_prepared_item_placement_available(key): + target_container = int( + prepared["container"] + ) as InventoryContainer + target_slot = int(prepared["slot"]) + _prepared_item_placements.erase(key) + if target_slot < 0: + target_slot = _first_free_slot(target_container) if target_slot < 0: target_container = InventoryContainer.STORAGE target_slot = _first_free_slot(target_container) @@ -484,6 +533,37 @@ func _first_free_slot(container: InventoryContainer) -> int: return -1 +func _is_prepared_item_placement_available(key: String) -> bool: + var placement: Dictionary = _prepared_item_placements.get(key, {}) + if placement.is_empty(): + return false + var container: int = int(placement.get("container", -1)) + var slot: int = int(placement.get("slot", -1)) + if ( + container not in [ + InventoryContainer.INVENTORY, + InventoryContainer.STORAGE, + InventoryContainer.HOTBAR, + ] + or not _is_slot_valid(container as InventoryContainer, slot) + ): + return false + return _key_at(container as InventoryContainer, slot).is_empty() + + +func _prepared_slot_is_occupied( + container: InventoryContainer, + slot: int, +) -> bool: + for placement: Dictionary in _prepared_item_placements.values(): + if ( + int(placement.get("container", -1)) == int(container) + and int(placement.get("slot", -1)) == slot + ): + return true + return false + + func _key_at(container: InventoryContainer, slot: int) -> String: for key: String in _placements: var placement: Dictionary = _placements[key] diff --git a/items/catalog/basic_cube.tres b/items/catalog/basic_cube.tres new file mode 100644 index 0000000..86a2cf9 --- /dev/null +++ b/items/catalog/basic_cube.tres @@ -0,0 +1,17 @@ +[gd_resource type="Resource" script_class="ItemData" load_steps=3 format=3] + +[ext_resource type="Script" path="res://items/item_data.gd" id="1_item"] +[ext_resource type="Texture2D" path="res://ui/icons/pictograms/x_light.png" id="2_icon"] + +[resource] +script = ExtResource("1_item") +item_id = &"basic_cube" +display_name = "basic cube" +description = "a simple piece of decor for testing your RV layout." +category = 6 +icon = ExtResource("2_icon") +stackable = true +max_stack = 32 +usable = false +equippable = true +hotbar_allowed = true diff --git a/items/catalog/item_catalog.tres b/items/catalog/item_catalog.tres index 63ef3ea..2f15e0a 100644 --- a/items/catalog/item_catalog.tres +++ b/items/catalog/item_catalog.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="ItemCatalog" load_steps=41 format=3] +[gd_resource type="Resource" script_class="ItemCatalog" load_steps=42 format=3] [ext_resource type="Script" path="res://items/item_catalog.gd" id="1_script"] [ext_resource type="Resource" path="res://items/catalog/basic_fishing_rod.tres" id="2_rod"] @@ -40,7 +40,8 @@ [ext_resource type="Resource" path="res://items/catalog/crab_net.tres" id="39_crab_net"] [ext_resource type="Resource" path="res://items/catalog/standard_shovel.tres" id="40_shovel"] [ext_resource type="Resource" path="res://items/catalog/fishing_net.tres" id="41_fishing_net"] +[ext_resource type="Resource" path="res://items/catalog/basic_cube.tres" id="42_basic_cube"] [resource] script = ExtResource("1_script") -items = [ExtResource("2_rod"), ExtResource("3_coffee"), ExtResource("4_energy"), ExtResource("5_snack"), ExtResource("6_finder"), ExtResource("8_art_kit"), ExtResource("9_worms"), ExtResource("10_snails"), ExtResource("11_shrimp"), ExtResource("12_squid"), ExtResource("14_sardine"), ExtResource("13_anchovy"), ExtResource("15_roe"), ExtResource("16_standby"), ExtResource("17_batteries"), ExtResource("18_cardboard"), ExtResource("19_pond"), ExtResource("20_river"), ExtResource("21_lake"), ExtResource("22_salt"), ExtResource("23_whisker"), ExtResource("24_reef"), ExtResource("25_moonbeam"), ExtResource("26_sun"), ExtResource("27_rain"), ExtResource("28_fog"), ExtResource("29_guide"), ExtResource("30_small"), ExtResource("31_heavy"), ExtResource("32_rocket"), ExtResource("33_lucky"), ExtResource("34_showboat"), ExtResource("35_deep"), ExtResource("36_oddity"), ExtResource("37_aurora"), ExtResource("38_magnet"), ExtResource("39_crab_net"), ExtResource("40_shovel"), ExtResource("41_fishing_net")] +items = [ExtResource("2_rod"), ExtResource("3_coffee"), ExtResource("4_energy"), ExtResource("5_snack"), ExtResource("6_finder"), ExtResource("8_art_kit"), ExtResource("9_worms"), ExtResource("10_snails"), ExtResource("11_shrimp"), ExtResource("12_squid"), ExtResource("14_sardine"), ExtResource("13_anchovy"), ExtResource("15_roe"), ExtResource("16_standby"), ExtResource("17_batteries"), ExtResource("18_cardboard"), ExtResource("19_pond"), ExtResource("20_river"), ExtResource("21_lake"), ExtResource("22_salt"), ExtResource("23_whisker"), ExtResource("24_reef"), ExtResource("25_moonbeam"), ExtResource("26_sun"), ExtResource("27_rain"), ExtResource("28_fog"), ExtResource("29_guide"), ExtResource("30_small"), ExtResource("31_heavy"), ExtResource("32_rocket"), ExtResource("33_lucky"), ExtResource("34_showboat"), ExtResource("35_deep"), ExtResource("36_oddity"), ExtResource("37_aurora"), ExtResource("38_magnet"), ExtResource("39_crab_net"), ExtResource("40_shovel"), ExtResource("41_fishing_net"), ExtResource("42_basic_cube")] diff --git a/main/main.gd b/main/main.gd index 5e3a097..324c268 100644 --- a/main/main.gd +++ b/main/main.gd @@ -13,6 +13,9 @@ const WaterRecoveryControllerType = preload( const PlayerSaveManagerType = preload( "res://save/player_save_manager.gd" ) +const PlayerSaveSlotCatalogType = preload( + "res://save/player_save_slot_catalog.gd" +) const PlayerSettingsManagerType = preload( "res://settings/player_settings_manager.gd" ) @@ -34,6 +37,12 @@ const FishingShopType = preload("res://ui/fishing_shop.gd") const FishingShopInteractionType = preload( "res://world/fishing_shop_interaction.gd" ) +const DecorShopInteractionType = preload( + "res://world/decor_shop_interaction.gd" +) +const RVUpgradeInteractionType = preload( + "res://world/rv_upgrade_interaction.gd" +) const PlayerStorageInteractionType = preload( "res://world/player_storage_interaction.gd" ) @@ -67,6 +76,7 @@ const NetworkFishingServiceType = preload( "res://network/network_fishing_service.gd" ) const PlayerHotbarType = preload("res://inventory/player_hotbar.gd") +const DecorCatalogType = preload("res://homes/decor_catalog.gd") const NetworkSaleServiceType = preload( "res://network/network_sale_service.gd" ) @@ -120,6 +130,14 @@ const GatheringControllerType = preload( const NetworkWorldSpawnServiceType = preload( "res://network/network_world_spawn_service.gd" ) +const PlayerHomeStateType = preload("res://homes/player_home_state.gd") +const HomeWorldServiceType = preload("res://homes/home_world_service.gd") +const NetworkHomeServiceType = preload( + "res://network/network_home_service.gd" +) +const HomeDecorControllerType = preload( + "res://homes/home_decor_controller.gd" +) const TITLE_MUSIC_SILENCE_DB: float = -80.0 const TITLE_MUSIC_PATH: String = ( @@ -131,6 +149,15 @@ const TIME_CROSSING_EPSILON_HOURS: float = 0.000001 const PLAYER_MENU_PATTERN_SCALE: float = 0.85 const PLAYER_MENU_PATTERN_SCROLL_VELOCITY := Vector2(-7.0, -5.0) const SHOP_PATTERN_SCALE: float = 1.75 +const DEDICATED_IDLE_PHYSICS_TICKS_PER_SECOND: int = 10 +const DEDICATED_ACTIVE_PHYSICS_TICKS_PER_SECOND: int = 30 +const HOME_ENTRY_INPUT_OWNER: StringName = &"home_entry_transition" +const HOME_EXIT_INPUT_OWNER: StringName = &"home_exit_transition" +const HOME_EXIT_FADE_GENERATION: int = -104729 +const HOME_ENTRY_WALK_DISTANCE: float = 1.05 +const HOME_ENTRY_WALK_DURATION: float = 0.55 +const HOME_EXIT_WALK_DISTANCE: float = 1.25 +const HOME_EXIT_WALK_DURATION: float = 0.62 @export var fish_catalog: FishPoolType @export var pelican_buyer_profile: FishBuyerProfileType @@ -148,6 +175,7 @@ const SHOP_PATTERN_SCALE: float = 1.75 @onready var _game_ui: GameUIType = %GameUI @onready var _water_recovery: WaterRecoveryControllerType = %WaterRecovery @onready var _save_manager: PlayerSaveManagerType = %PlayerSaveManager +@onready var _home_state: PlayerHomeStateType = %PlayerHomeState @onready var _settings_manager: PlayerSettingsManagerType = %PlayerSettingsManager @onready var _controller_mapping_manager: ControllerMappingManagerType = ( %ControllerMappingManager @@ -207,6 +235,10 @@ const SHOP_PATTERN_SCALE: float = 1.75 ) @onready var _network_sale: NetworkSaleServiceType = %NetworkSaleService @onready var _network_shop: NetworkShopServiceType = %NetworkShopService +@onready var _network_home: NetworkHomeServiceType = %NetworkHomeService +@onready var _home_decor_controller: HomeDecorControllerType = ( + %HomeDecorController +) @onready var _network_item_use: NetworkItemUseServiceType = ( %NetworkItemUseService ) @@ -229,12 +261,16 @@ const SHOP_PATTERN_SCALE: float = 1.75 @onready var _players_root: Node3D = $Players @onready var _surface_drawings_root: Node3D = $SurfaceDrawings @onready var _world_gatherables_root: Node3D = $WorldGatherables +@onready var _home_world: HomeWorldServiceType = %HomeWorldService @onready var _title_background: ColorRect = %TitleBackground @onready var _player_menu_backdrop: ColorRect = %PlayerMenuBackdrop @onready var _shop_backdrop: ColorRect = %ShopBackdrop var _gameplay_started: bool = false +var _save_slots := PlayerSaveSlotCatalogType.new() var _shop_interaction: FishingShopInteractionType +var _decor_shop_interaction: DecorShopInteractionType +var _rv_upgrade_shop_interaction: RVUpgradeInteractionType var _storage_interaction: PlayerStorageInteractionType var _title_music_tween: Tween var _title_music_transition_generation: int = 0 @@ -246,6 +282,10 @@ var _join_requested_from_pause: bool = false var _player_menu_backdrop_tween: Tween var _shop_backdrop_tween: Tween var _pending_join_endpoint: String = "" +var _social_prompt_queue: Array[Dictionary] = [] +var _active_social_prompt: Dictionary = {} +var _pending_social_invite_join: bool = false +var _pending_social_invite_gameplay: bool = false var _server_trust_dialog: ConfirmationDialog var _pending_trust_changed: bool = false var _identity_notice_dialog: AcceptDialog @@ -260,15 +300,26 @@ var _performance_profile: RuntimePerformanceProfileType var _pending_existing_root_path := "" var _local_recovery_attempt_id: String = "" var _dedicated_runtime: bool = false +var _dedicated_metrics_accumulator: float = 0.0 +var _home_exit_transition_active: bool = false +var _home_exit_waiting_for_network: bool = false +var _home_exit_start_position: Vector3 = Vector3.ZERO +var _home_exit_walk_tween: Tween +var _home_entry_transition_active: bool = false +var _home_entry_walk_tween: Tween @onready var _shoreline_ambience: ShorelineAmbience = %ShorelineAmbience var _rain_ambience: RainAmbienceType func _ready() -> void: + _data_root.prepare_legacy_user_data() _performance_profile = RuntimePerformanceProfileType.from_environment() _dedicated_runtime = _is_dedicated_server_runtime() if _dedicated_runtime: + Engine.max_fps = 30 + Engine.physics_ticks_per_second = 30 + _disable_dedicated_presentation_tree() call_deferred("_start_dedicated_server") return _world_pixelation.set_light_performance_profile( @@ -280,7 +331,7 @@ func _ready() -> void: _configure_presentation_performance_profile( _performance_profile.is_light() ) - DisplayServer.window_set_title("NETfishing") + DisplayServer.window_set_title("straywild") _rain_ambience = RainAmbienceType.new() _rain_ambience.name = "RainAmbience" add_child(_rain_ambience) @@ -310,11 +361,12 @@ func _ready() -> void: func _configure_presentation_performance_profile(light_profile: bool) -> void: - _game_ui.get_title_screen().set_minimal_presentation(light_profile) _game_ui.set_light_performance_profile(light_profile) - var title_water_material := _title_background.material as ShaderMaterial - if title_water_material != null: - title_water_material.set_shader_parameter( + var title_background_material := ( + _title_background.material as ShaderMaterial + ) + if title_background_material != null: + title_background_material.set_shader_parameter( "animation_enabled", not light_profile, ) @@ -382,16 +434,81 @@ func _is_dedicated_server_runtime() -> bool: return "--dedicated-server" in OS.get_cmdline_user_args() +func _disable_dedicated_presentation_tree() -> void: + for path: NodePath in [ + NodePath("TitleBackgroundLayer"), + NodePath("PlayerMenuBackdrop"), + NodePath("ShopBackdrop"), + NodePath("WorldPixelationPostprocess"), + NodePath("UIPresentation"), + NodePath("PixelationResetOverlay"), + NodePath("WorldTimeVisualController"), + NodePath("GatheringController"), + NodePath("FishingSpot"), + NodePath("WaterRecovery"), + NodePath("ControllerMappingManager"), + NodePath("KeyboardMouseMappingManager"), + ]: + var presentation_node: Node = get_node_or_null(path) + if presentation_node == null: + continue + presentation_node.process_mode = Node.PROCESS_MODE_DISABLED + if presentation_node is CanvasItem: + (presentation_node as CanvasItem).visible = false + elif presentation_node is CanvasLayer: + (presentation_node as CanvasLayer).visible = false + for audio_path: NodePath in [ + NodePath("TitleMusic"), + NodePath("NewGameMusic"), + NodePath("DuskMusic"), + NodePath("ShorelineAmbience"), + ]: + var audio_node: Node = get_node_or_null(audio_path) + if audio_node == null: + continue + if audio_node.has_method("stop"): + audio_node.call("stop") + audio_node.process_mode = Node.PROCESS_MODE_DISABLED + + +func _print_dedicated_metrics() -> void: + var metrics: Dictionary = { + "players": _network_session.get_player_count(), + "fps": Engine.get_frames_per_second(), + "frame_process_ms": Performance.get_monitor( + Performance.TIME_PROCESS + ) * 1000.0, + "frame_physics_ms": Performance.get_monitor( + Performance.TIME_PHYSICS_PROCESS + ) * 1000.0, + "memory_mib": Performance.get_monitor( + Performance.MEMORY_STATIC + ) / (1024.0 * 1024.0), + "nodes": int(Performance.get_monitor(Performance.OBJECT_NODE_COUNT)), + "physics_active_objects": int(Performance.get_monitor( + Performance.PHYSICS_3D_ACTIVE_OBJECTS + )), + "physics_collision_pairs": int(Performance.get_monitor( + Performance.PHYSICS_3D_COLLISION_PAIRS + )), + "movement": _network_session.get_movement_metrics(), + } + if _network_fishing.has_method("get_network_metrics"): + metrics["fishing"] = _network_fishing.call("get_network_metrics") + if _network_world_spawns.has_method("get_network_metrics"): + metrics["gatherables"] = _network_world_spawns.call( + "get_network_metrics" + ) + print("straywild server metrics: %s" % JSON.stringify(metrics)) + + func _start_dedicated_server() -> void: var config: DedicatedServerConfigType = DedicatedServerConfigType.from_runtime() if not config.is_valid(): _fail_dedicated_server(config.error_message) return var data_path: String = config.data_directory - var manifest_path: String = data_path.path_join( - PlayerDataRoot.MANIFEST_FILENAME - ) - if not FileAccess.file_exists(manifest_path): + if not _data_root.has_data_manifest(data_path): var created: Dictionary = _data_root.create_unbound_root(data_path) if not bool(created.get("ok", false)): _fail_dedicated_server(str(created.get( @@ -429,6 +546,7 @@ func _start_dedicated_server() -> void: ): _fail_dedicated_server("The configured world seed could not be generated.") return + _test_world.set_dedicated_simulation(true) if not _network_session.set_host_world( WorldLayoutType.GENERATED, config.world_seed, @@ -441,10 +559,17 @@ func _start_dedicated_server() -> void: return _initialize_application(true) _player.set_local_control(false) + _player.set_network_simulation_only(true) _player.visible = false _player.collision_layer = 0 _player.collision_mask = 0 _player.set_physics_process(false) + if not _network_session.peer_count_changed.is_connected( + _on_dedicated_peer_count_changed + ): + _network_session.peer_count_changed.connect( + _on_dedicated_peer_count_changed + ) if not _network_session.start_dedicated_host( config.port, config.max_players, @@ -456,13 +581,17 @@ func _start_dedicated_server() -> void: if not _network_session.set_host_open(true): _fail_dedicated_server("Could not open the dedicated server.") return + _on_dedicated_peer_count_changed( + _network_session.get_player_count(), + config.max_players, + ) _player_jobs.begin_progression_session() if config.public_listing and not _discovery.set_discoverable(true): _network_session.disconnect_session("Discovery setup failed.") _fail_dedicated_server(_discovery.get_host_status_message()) return print( - "NETfishing dedicated server ready: %s on %s:%d (%d players, %s, timezone %s)" + "straywild dedicated server ready: %s on %s:%d (%d players, %s, timezone %s)" % [ config.server_name, config.bind_address, @@ -478,15 +607,34 @@ func _start_dedicated_server() -> void: ) +func _on_dedicated_peer_count_changed( + player_count: int, + _max_players: int, +) -> void: + if not _dedicated_runtime: + return + Engine.physics_ticks_per_second = ( + DEDICATED_ACTIVE_PHYSICS_TICKS_PER_SECOND + if player_count > 0 + else DEDICATED_IDLE_PHYSICS_TICKS_PER_SECOND + ) + + func _fail_dedicated_server(message: String) -> void: push_error("Dedicated server startup failed: %s" % message) get_tree().quit(1) func _configure_portable_stores() -> void: - _save_manager.configure_storage( - _data_root.path_for(&"player_save"), _data_root - ) + if _dedicated_runtime: + _save_manager.configure_storage( + _data_root.path_for(&"player_save"), _data_root + ) + elif not _save_slots.configure(_data_root, _save_manager): + push_error( + "Save-slot catalog setup failed: %s" + % _save_slots.get_error_message() + ) _network_profile.configure_storage( _data_root.path_for(&"network_profile"), _data_root ) @@ -523,7 +671,8 @@ func _initialize_application(dedicated: bool) -> void: _player_spawn_service.setup( _players_root, _player, - _test_world.get_player_spawn_transform() + _test_world.get_player_spawn_transform(), + dedicated, ) _network_session.setup( _network_profile, @@ -536,7 +685,7 @@ func _initialize_application(dedicated: bool) -> void: _host_bans, dedicated, ) - _discovery.setup(_network_session) + _discovery.setup(_network_session, _relationships) if not dedicated: _world_time_visuals.setup( _world_time, @@ -611,6 +760,7 @@ func _initialize_application(dedicated: bool) -> void: _player.wallet, _asset_reservations ) + _player.cooler_capacity.bind_home_state(_home_state) _player.bag.setup(item_catalog) _player.inventory_layout.setup( _player.bag, @@ -627,14 +777,24 @@ func _initialize_application(dedicated: bool) -> void: _player.inventory_layout, ) _shop_interaction = _test_world.get_fishing_shop() + _decor_shop_interaction = _test_world.get_decor_shop() + _rv_upgrade_shop_interaction = _test_world.get_rv_upgrade_shop() _storage_interaction = _test_world.get_player_storage() if not dedicated: + if not _home_state.changed.is_connected(_on_home_state_changed): + _home_state.changed.connect(_on_home_state_changed) _shop_interaction.setup_local_player(_player) _shop_interaction.local_player_range_changed.connect( _on_shop_range_changed ) - _game_ui.set_shop_npc_player_in_range( - _shop_interaction.is_local_player_in_range() + _refresh_shop_npc_speech_state() + _decor_shop_interaction.setup_local_player(_player) + _decor_shop_interaction.local_player_range_changed.connect( + _on_decor_shop_range_changed + ) + _rv_upgrade_shop_interaction.setup_local_player(_player) + _rv_upgrade_shop_interaction.local_player_range_changed.connect( + _on_rv_upgrade_shop_range_changed ) _storage_interaction.setup_local_player(_player) _storage_interaction.local_player_range_changed.connect( @@ -657,6 +817,23 @@ func _initialize_application(dedicated: bool) -> void: _world_weather, _player_jobs, _player, + _home_state, + ) + _home_world.setup( + _test_world, + _player_spawn_service, + _network_session, + dedicated, + ) + _network_home.setup( + _network_session, + _player_spawn_service, + _home_state, + _save_manager, + _home_world, + _player.bag, + _player.inventory_layout, + _player.hotbar, ) _player_jobs.set_save_manager(_save_manager) _save_manager.set_autosave_enabled(false) @@ -699,6 +876,7 @@ func _initialize_application(dedicated: bool) -> void: _save_manager, _network_item_use, _world_time, + not dedicated, ) _gathering_controller.setup( _player, @@ -747,7 +925,8 @@ func _initialize_application(dedicated: bool) -> void: _save_manager, item_catalog, fish_catalog, - _network_item_use + _network_item_use, + not dedicated, ) var sale_buyers: Array[FishBuyerProfileType] = [ pelican_buyer_profile, @@ -788,6 +967,10 @@ func _initialize_application(dedicated: bool) -> void: _save_manager, _asset_reservations, _player.inventory_layout, + _home_state, + _network_home, + _decor_shop_interaction, + _rv_upgrade_shop_interaction, ) _fishing_spot.setup( _player, @@ -805,6 +988,7 @@ func _initialize_application(dedicated: bool) -> void: _network_fishing, _world_time, _world_weather, + Callable(_test_world, "get_fishable_water_regions"), ) if dedicated: return @@ -826,11 +1010,14 @@ func _initialize_application(dedicated: bool) -> void: _player.fishing_upgrades, _shop_interaction, _storage_interaction, + _decor_shop_interaction, + _rv_upgrade_shop_interaction, _player.item_effects, _player.cooler_capacity, _network_session, _network_sale, _network_shop, + _home_state, _network_chat, _network_profile, _player_spawn_service, @@ -848,18 +1035,51 @@ func _initialize_application(dedicated: bool) -> void: _test_world.get_world_environment(), _test_world.get_sun(), ) + _home_decor_controller.setup( + _player, + _player.hotbar, + _player.bag, + _home_state, + _network_home, + _home_world, + _fishing_spot, + _game_ui.get_home_decor_toolbar(), + ) + _game_ui.get_player_storage().decorate_requested.connect( + _home_decor_controller.begin_decorating + ) + _network_home.local_space_changed.connect(_on_local_home_space_changed) + _network_home.local_transition_finished.connect( + _on_local_home_transition_finished + ) + _game_ui.get_screen_fade().transition_completed.connect( + _on_home_exit_fade_transition_completed + ) + _game_ui.rv_storage_requested.connect(_on_rv_storage_requested) _game_ui.setup_data_and_identity( _data_root, - _save_manager, _identity_backups, _player_identity, _host_identity, _network_session, _interface_fonts, ) + _game_ui.data_root_changed.connect(_on_data_root_changed) _game_ui.setup_controller_mapping(_controller_mapping_manager) _ui_pixelation.setup_controller_mapping(_controller_mapping_manager) _game_ui.setup_keyboard_mouse_mapping(_keyboard_mouse_mapping_manager) + _network_player_list.friend_request_received.connect( + _on_friend_request_received + ) + _discovery.friend_invite_received.connect(_on_friend_invite_received) + _discovery.public_join_prepared.connect( + _on_social_public_join_prepared + ) + _discovery.public_join_status_changed.connect( + _on_social_public_join_status_changed + ) + _game_ui.social_prompt_accepted.connect(_on_social_prompt_accepted) + _game_ui.social_prompt_declined.connect(_on_social_prompt_declined) _data_root.conflict_detected.connect(_on_portable_conflict) if ( PortableFileGuard.has_syncthing_conflict( @@ -879,7 +1099,8 @@ func _initialize_application(dedicated: bool) -> void: _game_ui, _game_ui.get_screen_fade(), _test_world.get_player_water_triggers(), - _test_world.get_safe_respawn_points() + _test_world.get_safe_respawn_points(), + Callable(_test_world, "get_water_recovery_position"), ) _ui_pixelation.effective_pixel_size_changed.connect( _on_effective_ui_pixel_size_changed @@ -909,16 +1130,19 @@ func _initialize_application(dedicated: bool) -> void: _apply_runtime_settings(_settings_manager.current_settings) _set_gameplay_active(false) var title_screen: TitleScreenType = _game_ui.get_title_screen() - title_screen.new_game_requested.connect(_on_new_game_requested) - title_screen.continue_game_requested.connect(_on_continue_game_requested) + title_screen.slot_play_requested.connect(_on_slot_play_requested) + title_screen.new_slot_requested.connect(_on_new_slot_requested) title_screen.quit_requested.connect(_on_quit_requested) title_screen.setup( _save_manager, + _save_slots, _settings_manager, _network_session, _saved_servers, _server_trust, _discovery, + _data_root, + _interface_fonts, ) var pause_menu: PauseMenuType = _game_ui.get_pause_menu() pause_menu.setup( @@ -966,7 +1190,7 @@ func _initialize_application(dedicated: bool) -> void: func _show_data_root_setup() -> void: if _data_setup_dialog == null: _data_setup_dialog = ConfirmationDialog.new() - _data_setup_dialog.title = "NETfishing player data" + _data_setup_dialog.title = "straywild player data" _data_setup_dialog.ok_button_text = "Use This Folder" _data_setup_dialog.cancel_button_text = "Quit" _data_setup_dialog.confirmed.connect(_use_default_data_root) @@ -983,14 +1207,14 @@ func _show_data_root_setup() -> void: var default_path: String = _data_root.default_visible_path() var legacy: bool = PortableDataMigration.legacy_files_present() _data_setup_dialog.dialog_text = ( - ("Move your existing NETfishing data to an easy-to-find folder." - if legacy else "Choose where NETfishing stores your player data.") + ("Move your existing straywild data to an easy-to-find folder." + if legacy else "Choose where straywild stores your player data.") + "\n\n%s\n\nYou can choose a Syncthing folder." % (default_path if not default_path.is_empty() else "Choose a folder") ) _data_setup_dialog.ok_button_text = ( ( - "Move to Documents/NETFISHING" + "Move to Documents/straywild" if legacy else "Use This Folder" ) if not default_path.is_empty() @@ -999,7 +1223,7 @@ func _show_data_root_setup() -> void: _data_setup_current_button.visible = not default_path.is_empty() if not _data_root.error_message.is_empty(): _data_setup_dialog.dialog_text = ( - "Your NETfishing data folder is unavailable.\n\n%s" + "Your straywild data folder is unavailable.\n\n%s" % _data_root.error_message ) _data_setup_dialog.popup_centered(Vector2i(640, 360)) @@ -1135,11 +1359,11 @@ func _activate_selected_data_path(path: String, app_data: bool = false) -> void: func _show_existing_root_choice(path: String) -> void: _pending_existing_root_path = path var dialog: ConfirmationDialog = ConfirmationDialog.new() - dialog.title = "Existing NETfishing data" + dialog.title = "Existing straywild data" dialog.ok_button_text = "Use Data Already in Selected Folder" dialog.cancel_button_text = "Cancel" dialog.dialog_text = ( - "This folder already contains NETfishing player data.\n\n" + "This folder already contains straywild player data.\n\n" + "Choose which complete data set to use. Data is never merged automatically." ) dialog.add_button( @@ -1213,6 +1437,18 @@ func _on_data_root_status(message: String) -> void: _configure_popup_dialog.call_deferred(dialog, dialog.get_ok_button()) +func _on_data_root_changed() -> void: + _save_manager.set_autosave_enabled(false) + _save_manager.cancel_pending_autosave() + _configure_portable_stores() + if not _network_profile_service.reload_persisted_profile(): + push_warning("The selected data folder's player profile could not be loaded.") + _network_session.set_local_appearance_snapshot( + _appearance_store.get_snapshot() + ) + _game_ui.get_title_screen().refresh_after_data_root_change() + + func _on_server_trust_required( endpoint: String, expected_fingerprint: String, @@ -1331,6 +1567,12 @@ func _input(event: InputEvent) -> void: if _game_ui.get_player_storage().consume_escape(): get_viewport().set_input_as_handled() return + if _game_ui.get_decor_shop().consume_escape(): + get_viewport().set_input_as_handled() + return + if _game_ui.get_rv_upgrade_shop().consume_escape(): + get_viewport().set_input_as_handled() + return if fishing_shop.consume_escape(): get_viewport().set_input_as_handled() return @@ -1429,19 +1671,54 @@ func _is_pause_open_request(event: InputEvent) -> bool: func _unhandled_input(event: InputEvent) -> void: + if ( + _gameplay_started + and event.is_action_pressed("fish_primary") + and not (event is InputEventKey and event.echo) + and _fishing_spot.try_use_active_non_fishing_item() + ): + get_viewport().set_input_as_handled() + return if ( not _gameplay_started or not event.is_action_pressed("interact") or (event is InputEventKey and event.echo) ): return + var home_owner: String = _network_home.get_local_home_owner_fingerprint() + if not home_owner.is_empty(): + if ( + _network_home.can_local_decorate() + and _fishing_spot.can_open_fishing_shop() + and _game_ui.get_player_storage().open_storage_from_home(true) + ): + _refresh_home_door_prompt({}) + get_viewport().set_input_as_handled() + return + var nearby_home_owner: String = _home_world.find_nearby_exterior_owner( + _player + ) + if not nearby_home_owner.is_empty(): + if _network_home.request_enter(nearby_home_owner): + _refresh_home_door_prompt({}) + get_viewport().set_input_as_handled() + return if ( - _storage_interaction != null - and _storage_interaction.is_local_player_in_range() + _rv_upgrade_shop_interaction != null + and _rv_upgrade_shop_interaction.is_local_player_in_range() and _fishing_spot.can_open_fishing_shop() - and _game_ui.get_player_storage().open_storage() + and _game_ui.get_rv_upgrade_shop().open_shop() ): - _game_ui.set_storage_prompt_visible(false) + _game_ui.set_shop_prompt_visible(false) + get_viewport().set_input_as_handled() + return + if ( + _decor_shop_interaction != null + and _decor_shop_interaction.is_local_player_in_range() + and _fishing_spot.can_open_fishing_shop() + and _game_ui.get_decor_shop().open_shop() + ): + _game_ui.set_shop_prompt_visible(false) get_viewport().set_input_as_handled() return if ( @@ -1454,40 +1731,58 @@ func _unhandled_input(event: InputEvent) -> void: get_viewport().set_input_as_handled() -func _process(_delta: float) -> void: +func _process(delta: float) -> void: if _dedicated_runtime: + _dedicated_metrics_accumulator += delta + if _dedicated_metrics_accumulator >= 60.0: + _dedicated_metrics_accumulator = fmod( + _dedicated_metrics_accumulator, + 60.0, + ) + _print_dedicated_metrics() return - var show_shop_prompt := _can_show_shop_prompt() + _maybe_begin_home_exit_transition() + var show_rv_upgrade_prompt := _can_show_rv_upgrade_shop_prompt() + var show_decor_shop_prompt := _can_show_decor_shop_prompt() + var show_shop_prompt := ( + show_rv_upgrade_prompt + or show_decor_shop_prompt + or _can_show_shop_prompt() + ) var shop_prompt_anchor := ( - _shop_interaction.get_prompt_anchor_position() - if _shop_interaction != null - else Vector3.ZERO + _rv_upgrade_shop_interaction.get_prompt_anchor_position() + if show_rv_upgrade_prompt + else ( + _decor_shop_interaction.get_prompt_anchor_position() + if show_decor_shop_prompt + else ( + _shop_interaction.get_prompt_anchor_position() + if _shop_interaction != null else Vector3.ZERO + ) + ) ) _game_ui.set_shop_prompt_visible( show_shop_prompt, shop_prompt_anchor, ) - var show_storage_prompt := _can_show_storage_prompt() - var storage_prompt_anchor := ( - _storage_interaction.get_prompt_anchor_position() - if _storage_interaction != null - else Vector3.ZERO - ) - _game_ui.set_storage_prompt_visible( - show_storage_prompt, - storage_prompt_anchor, + var home_prompt := _get_home_prompt() + _refresh_home_door_prompt(home_prompt) + _game_ui.set_rv_storage_button_visible( + _can_show_rv_storage_button() ) func _apply_runtime_settings(settings: PlayerSettingsType) -> void: if settings == null: return - var requested_window_mode: DisplayServer.WindowMode = ( - DisplayServer.WINDOW_MODE_FULLSCREEN - if settings.fullscreen_enabled - else DisplayServer.WINDOW_MODE_WINDOWED + var current_window_mode: DisplayServer.WindowMode = ( + DisplayServer.window_get_mode() ) - if DisplayServer.window_get_mode() != requested_window_mode: + var requested_window_mode: DisplayServer.WindowMode = resolve_window_mode( + settings.fullscreen_enabled, + current_window_mode, + ) + if current_window_mode != requested_window_mode: DisplayServer.window_set_mode(requested_window_mode) _apply_world_pixelation(settings.world_pixel_size) _ui_pixelation.set_pixel_size(settings.ui_pixel_size) @@ -1500,7 +1795,8 @@ func _apply_runtime_settings(settings: PlayerSettingsType) -> void: _player.apply_camera_settings( settings.mouse_camera_sensitivity, settings.controller_camera_sensitivity, - settings.invert_camera_y + settings.invert_camera_y, + settings.swap_hotbar_camera_scroll, ) _fishing_spot.configure_accessibility_auto_click( settings.auto_click_enabled, @@ -1513,6 +1809,25 @@ func _apply_runtime_settings(settings: PlayerSettingsType) -> void: ) +static func resolve_window_mode( + fullscreen_enabled: bool, + current_mode: DisplayServer.WindowMode, +) -> DisplayServer.WindowMode: + var is_fullscreen: bool = current_mode in [ + DisplayServer.WINDOW_MODE_FULLSCREEN, + DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN, + ] + if fullscreen_enabled: + return ( + current_mode + if is_fullscreen + else DisplayServer.WINDOW_MODE_FULLSCREEN + ) + if is_fullscreen: + return DisplayServer.WINDOW_MODE_WINDOWED + return current_mode + + func _apply_world_pixelation(pixel_size: int) -> void: var root_viewport: Viewport = get_viewport() root_viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_NEAREST @@ -1760,6 +2075,97 @@ func _on_continue_game_requested() -> void: _enter_gameplay() +func _on_slot_play_requested(slot_id: String) -> void: + if _gameplay_started or _quit_in_progress: + return + if not _save_slots.activate_slot(slot_id): + _game_ui.get_title_screen().report_network_error( + "The selected save slot could not be opened." + ) + return + if not _save_manager.load_player_data(): + _game_ui.get_title_screen().report_network_error( + "Failed to load that save slot. The original was preserved." + ) + return + var world_layout: StringName = _save_manager.get_world_layout() + var world_seed: int = _save_manager.get_world_seed() + if ( + not _apply_world(world_layout, world_seed, true) + or not _prepare_host_world(world_layout, world_seed) + ): + _game_ui.get_title_screen().report_network_error( + "The saved world could not be loaded. The save was preserved." + ) + return + if not _prepare_private_host(): + return + _save_slots.mark_played(slot_id) + _enter_gameplay() + + +func _on_new_slot_requested( + display_name: String, + world_layout: StringName, + world_seed: int, + duplicate_source_slot_id: String, +) -> void: + if _gameplay_started or _quit_in_progress: + return + var created: Dictionary = ( + _save_slots.duplicate_slot( + duplicate_source_slot_id, + display_name, + world_layout, + world_seed, + ) + if not duplicate_source_slot_id.is_empty() + else _save_slots.create_empty_slot(display_name) + ) + if not bool(created.get("ok", false)): + _game_ui.get_title_screen().report_network_error( + str(created.get("message", "The save slot could not be created.")) + ) + return + var slot_id: String = str(created.get("slot_id", "")) + if not _save_slots.activate_slot(slot_id): + _game_ui.get_title_screen().report_network_error( + "The new save slot could not be selected." + ) + return + if not duplicate_source_slot_id.is_empty(): + _on_slot_play_requested(slot_id) + return + _start_new_game_music() + if not _apply_world(world_layout, world_seed, true): + _show_title_music(true) + _game_ui.get_title_screen().report_network_error( + "Could not prepare that world. Try another seed or the starter island." + ) + return + if not _prepare_host_world(world_layout, world_seed): + _show_title_music(true) + _game_ui.get_title_screen().report_network_error( + "Could not prepare that world for hosting." + ) + return + if not _prepare_private_host(): + _show_title_music(true) + return + if ( + not _save_manager.delete_progression_save() + or not _save_manager.initialize_new_game(world_seed, world_layout) + ): + _network_session.disconnect_session("New Game setup failed.") + _show_title_music(true) + _game_ui.get_title_screen().report_network_error( + "Could not initialize local progression." + ) + return + _save_slots.mark_played(slot_id) + _enter_gameplay() + + func _prepare_private_host() -> bool: _join_requested_from_title = false _join_requested_from_pause = false @@ -1816,6 +2222,12 @@ func _on_return_to_title_requested() -> void: func _on_title_join_game_requested(endpoint: String) -> void: if _quit_in_progress or _gameplay_started: return + var active_slot: Dictionary = _save_slots.ensure_active_slot() + if not bool(active_slot.get("ok", false)): + _game_ui.get_title_screen().report_network_error( + str(active_slot.get("message", "Local progression is unavailable.")) + ) + return if _network_session.state != NetworkSessionType.State.INACTIVE: _network_session.disconnect_session("Preparing direct connection.") _join_requested_from_title = true @@ -1849,6 +2261,135 @@ func _on_pause_join_game_requested(endpoint: String) -> void: ) +func _on_friend_request_received( + request_id: String, + fingerprint: String, + display_name: String, +) -> void: + _queue_social_prompt({ + "kind": "friend_request", + "request_id": request_id, + "fingerprint": fingerprint, + "display_name": display_name, + }) + + +func _on_friend_invite_received( + fingerprint: String, + display_name: String, + room: Dictionary, +) -> void: + if ( + not _relationships.is_friend(fingerprint) + or _relationships.is_blocked(fingerprint) + ): + return + _queue_social_prompt({ + "kind": "friend_invite", + "fingerprint": fingerprint, + "display_name": display_name, + "room": room.duplicate(true), + }) + + +func _queue_social_prompt(details: Dictionary) -> void: + _social_prompt_queue.append(details.duplicate(true)) + _show_next_social_prompt() + + +func _show_next_social_prompt() -> void: + if ( + not _active_social_prompt.is_empty() + or _game_ui.is_social_prompt_open() + or _social_prompt_queue.is_empty() + ): + return + _active_social_prompt = _social_prompt_queue.pop_front() + var kind := str(_active_social_prompt.get("kind", "")) + var display_name := str( + _active_social_prompt.get("display_name", "Player") + ) + var shown: bool = false + if kind == "friend_request": + shown = _game_ui.show_social_prompt( + "%s wants to add you as a friend.\n" % display_name + + "Friendships are saved on this device.", + "accept", + "decline", + ) + elif kind == "friend_invite": + var room: Dictionary = _active_social_prompt.get("room", {}) + var room_name := str(room.get("room_name", "their room")) + shown = _game_ui.show_social_prompt( + "%s invited you to join %s." % [display_name, room_name], + "join", + "not now", + ) + if not shown: + _active_social_prompt.clear() + call_deferred("_show_next_social_prompt") + + +func _on_social_prompt_accepted() -> void: + var details: Dictionary = _active_social_prompt.duplicate(true) + _active_social_prompt.clear() + match str(details.get("kind", "")): + "friend_request": + _network_player_list.respond_friend_request( + str(details.get("request_id", "")), true + ) + "friend_invite": + var room: Dictionary = details.get("room", {}) + _pending_social_invite_join = true + _pending_social_invite_gameplay = _gameplay_started + if room.is_empty() or not _discovery.prepare_public_join(room): + _pending_social_invite_join = false + _report_social_join_error( + "This person needs to be online to do this." + ) + call_deferred("_show_next_social_prompt") + + +func _on_social_prompt_declined() -> void: + var details: Dictionary = _active_social_prompt.duplicate(true) + _active_social_prompt.clear() + if str(details.get("kind", "")) == "friend_request": + _network_player_list.respond_friend_request( + str(details.get("request_id", "")), false + ) + call_deferred("_show_next_social_prompt") + + +func _on_social_public_join_prepared(endpoint: String) -> void: + if not _pending_social_invite_join: + return + var from_gameplay := _pending_social_invite_gameplay + _pending_social_invite_join = false + _pending_social_invite_gameplay = false + if from_gameplay: + _on_pause_join_game_requested(endpoint) + else: + _on_title_join_game_requested(endpoint) + + +func _on_social_public_join_status_changed( + message: String, + is_error: bool, +) -> void: + if not _pending_social_invite_join or not is_error: + return + _pending_social_invite_join = false + _pending_social_invite_gameplay = false + _report_social_join_error(message) + + +func _report_social_join_error(message: String) -> void: + if _gameplay_started: + _game_ui.get_pause_menu().report_network_error(message) + else: + _game_ui.get_title_screen().report_network_error(message) + + func _on_network_join_authenticated() -> void: var connected_endpoint: ConnectionEndpoint = ( _network_session.get_current_endpoint() @@ -1880,6 +2421,7 @@ func _on_network_join_authenticated() -> void: ) _join_requested_from_title = false return + _save_slots.mark_played(_save_slots.get_active_slot_id()) if not _apply_joined_world(server_metadata): return _fade_out_title_music() @@ -1967,17 +2509,9 @@ func _on_remote_recovery_requested( peer_id, "Fishing attempt ended." ) - var target_position: Vector3 = _test_world.get_player_spawn_transform().origin - var nearest_distance: float = INF - for point: SafeRespawnPoint in _test_world.get_safe_respawn_points(): - if point == null or not point.enabled: - continue - var distance: float = point.get_horizontal_distance_squared( - entry_position - ) - if distance < nearest_distance: - nearest_distance = distance - target_position = point.global_position + var target_position := _test_world.get_water_recovery_position( + entry_position + ) target_position.y += _water_recovery.respawn_height_offset avatar.global_position = target_position avatar.velocity = Vector3.ZERO @@ -2049,11 +2583,14 @@ func _apply_world( _player.velocity = Vector3.ZERO if _application_initialized: _refresh_active_world_bindings() + _network_world_spawns.refresh_world_context() + _network_home.refresh_world_presentations() if _application_initialized and not _dedicated_runtime: _water_recovery.update_world_context( spawn_transform, _test_world.get_player_water_triggers(), _test_world.get_safe_respawn_points(), + Callable(_test_world, "get_water_recovery_position"), ) _shoreline_ambience.configure( _player, @@ -2077,10 +2614,30 @@ func _refresh_active_world_bindings() -> void: _storage_interaction.local_player_range_changed.disconnect( _on_storage_range_changed ) + if is_instance_valid(_decor_shop_interaction): + if _decor_shop_interaction.local_player_range_changed.is_connected( + _on_decor_shop_range_changed + ): + _decor_shop_interaction.local_player_range_changed.disconnect( + _on_decor_shop_range_changed + ) + if is_instance_valid(_rv_upgrade_shop_interaction): + if _rv_upgrade_shop_interaction.local_player_range_changed.is_connected( + _on_rv_upgrade_shop_range_changed + ): + _rv_upgrade_shop_interaction.local_player_range_changed.disconnect( + _on_rv_upgrade_shop_range_changed + ) _shop_interaction = _test_world.get_fishing_shop() + _decor_shop_interaction = _test_world.get_decor_shop() + _rv_upgrade_shop_interaction = _test_world.get_rv_upgrade_shop() _storage_interaction = _test_world.get_player_storage() _network_sale.set_shop_interaction(_shop_interaction) _network_shop.set_shop_interaction(_shop_interaction) + _network_shop.set_decor_shop_interaction(_decor_shop_interaction) + _network_shop.set_rv_upgrade_shop_interaction( + _rv_upgrade_shop_interaction + ) if _dedicated_runtime: return if _shop_interaction != null: @@ -2093,9 +2650,21 @@ func _refresh_active_world_bindings() -> void: _storage_interaction.local_player_range_changed.connect( _on_storage_range_changed ) + if _decor_shop_interaction != null: + _decor_shop_interaction.setup_local_player(_player) + _decor_shop_interaction.local_player_range_changed.connect( + _on_decor_shop_range_changed + ) + if _rv_upgrade_shop_interaction != null: + _rv_upgrade_shop_interaction.setup_local_player(_player) + _rv_upgrade_shop_interaction.local_player_range_changed.connect( + _on_rv_upgrade_shop_range_changed + ) _game_ui.set_world_interactions( _shop_interaction, _storage_interaction, + _decor_shop_interaction, + _rv_upgrade_shop_interaction, ) _on_shop_range_changed( _shop_interaction != null @@ -2105,6 +2674,14 @@ func _refresh_active_world_bindings() -> void: _storage_interaction != null and _storage_interaction.is_local_player_in_range() ) + _on_decor_shop_range_changed( + _decor_shop_interaction != null + and _decor_shop_interaction.is_local_player_in_range() + ) + _on_rv_upgrade_shop_range_changed( + _rv_upgrade_shop_interaction != null + and _rv_upgrade_shop_interaction.is_local_player_in_range() + ) func _on_water_recovery_starting() -> void: @@ -2118,6 +2695,8 @@ func _on_water_recovery_starting() -> void: _game_ui.close_player_menu_for_water_recovery() _game_ui.get_pause_menu().close_for_water_recovery() _game_ui.get_fishing_shop().close_for_water_recovery() + _game_ui.get_decor_shop().close_for_water_recovery() + _game_ui.get_rv_upgrade_shop().close_for_water_recovery() _game_ui.get_player_storage().close_for_water_recovery() @@ -2166,6 +2745,7 @@ func _on_active_hotbar_item_changed( and item != null and item.is_available() and _player.bag.owns_item(item_id) + and not String(_network_home.get_local_space()).begins_with("rv:") ) var active_is_catching_net: bool = ( item_id == FishingShopStockType.CRAB_NET_ID @@ -2179,6 +2759,12 @@ func _on_active_hotbar_item_changed( and item.is_available() and _player.bag.owns_item(item_id) ) + var active_is_decor: bool = ( + DecorCatalogType.has_product(item_id) + and item != null + and item.is_available() + and _player.bag.owns_item(item_id) + ) _player.set_active_fishing_rod( item as FishingRodDataType if active_is_rod else null, true, @@ -2189,6 +2775,7 @@ func _on_active_hotbar_item_changed( ) _player.set_active_catching_net(active_is_catching_net) _player.set_active_shovel(active_is_shovel) + _player.set_active_decor_package(active_is_decor) _game_ui.set_surface_drawing_hotbar_selected(active_is_art_kit) _network_item_use.submit_local_equipped(item_id, active_is_rod or ( item != null and _player.bag.owns_item(item_id) @@ -2308,6 +2895,8 @@ func _finish_quit() -> void: func _exit_tree() -> void: + _cancel_home_entry_transition() + _cancel_home_exit_transition(true) if _dedicated_runtime and _network_session != null: _network_session.disconnect_session("Dedicated server stopping.") if _title_music_tween != null: @@ -2325,16 +2914,224 @@ func _exit_tree() -> void: func _on_shop_range_changed(in_range: bool) -> void: - _game_ui.set_shop_npc_player_in_range(in_range) + _refresh_shop_npc_speech_state() if not in_range: _game_ui.get_fishing_shop().close_for_range_exit() - _game_ui.set_shop_prompt_visible(_can_show_shop_prompt()) + _game_ui.set_shop_prompt_visible(_can_show_any_shop_prompt()) func _on_storage_range_changed(in_range: bool) -> void: if not in_range: _game_ui.get_player_storage().close_for_range_exit() - _game_ui.set_storage_prompt_visible(_can_show_storage_prompt()) + var prompt := _get_home_prompt() + _refresh_home_door_prompt(prompt) + _game_ui.set_rv_storage_button_visible( + _can_show_rv_storage_button() + ) + + +func _on_decor_shop_range_changed(in_range: bool) -> void: + _refresh_shop_npc_speech_state() + if not in_range: + _game_ui.get_decor_shop().close_for_range_exit() + _game_ui.set_shop_prompt_visible(_can_show_any_shop_prompt()) + + +func _on_rv_upgrade_shop_range_changed(in_range: bool) -> void: + _refresh_shop_npc_speech_state() + if not in_range: + _game_ui.get_rv_upgrade_shop().close_for_range_exit() + _game_ui.set_shop_prompt_visible(_can_show_any_shop_prompt()) + + +func _on_home_state_changed() -> void: + _refresh_shop_npc_speech_state() + + +func _on_local_home_space_changed( + space_id: StringName, + owner_fingerprint: String, +) -> void: + var inside_rv: bool = String(space_id).begins_with("rv:") + _refresh_active_hotbar_item() + _fishing_spot.set_fishing_environment_enabled(not inside_rv) + _game_ui.set_rv_interior_camera_mode( + inside_rv + ) + _game_ui.set_rv_storage_button_visible( + _can_show_rv_storage_button() + ) + if inside_rv and not _home_exit_transition_active: + _begin_home_entry_transition(owner_fingerprint) + elif not inside_rv and _home_entry_transition_active: + _cancel_home_entry_transition() + + +func _begin_home_entry_transition(owner_fingerprint: String) -> void: + if owner_fingerprint.is_empty() or _home_entry_transition_active: + return + _home_entry_transition_active = true + _refresh_home_door_prompt({}) + _player.set_local_input_suppressed(HOME_ENTRY_INPUT_OWNER, true) + _player.set_camera_input_suppressed(HOME_ENTRY_INPUT_OWNER, true) + var inward_direction: Vector3 = ( + -_home_world.get_interior_exit_direction(owner_fingerprint) + ) + _player.face_world_direction(inward_direction) + _player.begin_animation_action(PlayerType.CHARACTER_WALKING_ANIMATION) + _home_entry_walk_tween = create_tween() + _home_entry_walk_tween.set_trans(Tween.TRANS_SINE) + _home_entry_walk_tween.set_ease(Tween.EASE_IN_OUT) + _home_entry_walk_tween.tween_property( + _player, + "global_position", + _player.global_position + inward_direction * HOME_ENTRY_WALK_DISTANCE, + HOME_ENTRY_WALK_DURATION, + ) + _home_entry_walk_tween.finished.connect( + _cancel_home_entry_transition, + CONNECT_ONE_SHOT, + ) + + +func _cancel_home_entry_transition() -> void: + if _home_entry_walk_tween != null and _home_entry_walk_tween.is_valid(): + _home_entry_walk_tween.kill() + _home_entry_walk_tween = null + if is_instance_valid(_player): + _player.end_animation_action() + _player.set_local_input_suppressed(HOME_ENTRY_INPUT_OWNER, false) + _player.set_camera_input_suppressed(HOME_ENTRY_INPUT_OWNER, false) + _home_entry_transition_active = false + + +func _maybe_begin_home_exit_transition() -> void: + if ( + _home_exit_transition_active + or _home_entry_transition_active + or not _gameplay_started + or _water_recovery.is_recovery_active() + or not _fishing_spot.can_open_fishing_shop() + or _game_ui.get_player_storage().visible + or _game_ui.get_fishing_shop().visible + or _game_ui.get_decor_shop().visible + or _game_ui.get_rv_upgrade_shop().visible + ): + return + var owner_fingerprint: String = ( + _network_home.get_local_home_owner_fingerprint() + ) + if ( + owner_fingerprint.is_empty() + or not _home_world.has_avatar_crossed_interior_exit_threshold( + _player, + owner_fingerprint, + ) + ): + return + _begin_home_exit_transition(owner_fingerprint) + + +func _begin_home_exit_transition(owner_fingerprint: String) -> void: + _home_exit_transition_active = true + _home_exit_waiting_for_network = false + _home_exit_start_position = _player.global_position + _refresh_home_door_prompt({}) + _player.set_local_input_suppressed(HOME_EXIT_INPUT_OWNER, true) + _player.set_camera_input_suppressed(HOME_EXIT_INPUT_OWNER, true) + var exit_direction: Vector3 = _home_world.get_interior_exit_direction( + owner_fingerprint + ) + _player.face_world_direction(exit_direction) + _player.begin_animation_action(PlayerType.CHARACTER_WALKING_ANIMATION) + _home_exit_walk_tween = create_tween() + _home_exit_walk_tween.set_trans(Tween.TRANS_SINE) + _home_exit_walk_tween.set_ease(Tween.EASE_IN_OUT) + _home_exit_walk_tween.tween_property( + _player, + "global_position", + _player.global_position + exit_direction * HOME_EXIT_WALK_DISTANCE, + HOME_EXIT_WALK_DURATION, + ) + _home_exit_walk_tween.finished.connect( + _on_home_exit_walk_finished, + CONNECT_ONE_SHOT, + ) + + +func _on_home_exit_walk_finished() -> void: + _home_exit_walk_tween = null + if not _home_exit_transition_active: + return + # End the walking action on the same frame translation ends. The fade and + # authoritative relocation may take longer, but a stationary avatar must + # never keep cycling its walk animation during that wait. + _player.end_animation_action() + _game_ui.get_screen_fade().fade_to_black(HOME_EXIT_FADE_GENERATION) + + +func _on_home_exit_fade_transition_completed( + generation: int, + faded_to_black: bool, +) -> void: + if ( + generation != HOME_EXIT_FADE_GENERATION + or not _home_exit_transition_active + ): + return + if faded_to_black: + # A local host can apply the authoritative transition synchronously from + # request_exit(). Mark this first so its completion signal is not lost. + _home_exit_waiting_for_network = true + var request_started: bool = _network_home.request_exit() + if not request_started: + _home_exit_waiting_for_network = false + _player.global_position = _home_exit_start_position + _game_ui.get_screen_fade().fade_from_black( + HOME_EXIT_FADE_GENERATION + ) + return + _cancel_home_exit_transition(false) + + +func _on_local_home_transition_finished( + accepted: bool, + _message: String, +) -> void: + if ( + not _home_exit_transition_active + or not _home_exit_waiting_for_network + ): + return + _home_exit_waiting_for_network = false + if not accepted: + _player.global_position = _home_exit_start_position + _game_ui.get_screen_fade().fade_from_black(HOME_EXIT_FADE_GENERATION) + + +func _cancel_home_exit_transition(reset_fade: bool) -> void: + if _home_exit_walk_tween != null and _home_exit_walk_tween.is_valid(): + _home_exit_walk_tween.kill() + _home_exit_walk_tween = null + if is_instance_valid(_player): + _player.end_animation_action() + _player.set_local_input_suppressed(HOME_EXIT_INPUT_OWNER, false) + _player.set_camera_input_suppressed(HOME_EXIT_INPUT_OWNER, false) + if ( + reset_fade + and is_instance_valid(_game_ui) + and is_instance_valid(_game_ui.get_screen_fade()) + ): + _game_ui.get_screen_fade().reset_immediately() + _home_exit_transition_active = false + _home_exit_waiting_for_network = false + _home_exit_start_position = Vector3.ZERO + + +func _on_rv_storage_requested() -> void: + if not _can_show_rv_storage_button(): + return + _game_ui.get_player_storage().open_storage_from_home(true) func _can_show_shop_prompt() -> bool: @@ -2343,18 +3140,141 @@ func _can_show_shop_prompt() -> bool: and _shop_interaction != null and _shop_interaction.is_local_player_in_range() and not _game_ui.get_fishing_shop().visible + and not _game_ui.get_decor_shop().visible + and not _game_ui.get_rv_upgrade_shop().visible and not _water_recovery.is_recovery_active() and _fishing_spot.can_open_fishing_shop() ) +func _can_show_decor_shop_prompt() -> bool: + return ( + _gameplay_started + and _decor_shop_interaction != null + and _decor_shop_interaction.is_local_player_in_range() + and not _game_ui.get_decor_shop().visible + and not _game_ui.get_fishing_shop().visible + and not _game_ui.get_rv_upgrade_shop().visible + and not _water_recovery.is_recovery_active() + and _fishing_spot.can_open_fishing_shop() + ) + + +func _can_show_rv_upgrade_shop_prompt() -> bool: + return ( + _gameplay_started + and _rv_upgrade_shop_interaction != null + and _rv_upgrade_shop_interaction.is_local_player_in_range() + and not _game_ui.get_rv_upgrade_shop().visible + and not _game_ui.get_fishing_shop().visible + and not _game_ui.get_decor_shop().visible + and not _water_recovery.is_recovery_active() + and _fishing_spot.can_open_fishing_shop() + ) + + +func _can_show_any_shop_prompt() -> bool: + return ( + _can_show_shop_prompt() + or _can_show_decor_shop_prompt() + or _can_show_rv_upgrade_shop_prompt() + ) + + +func _is_any_shop_npc_in_range() -> bool: + return ( + ( + _shop_interaction != null + and _shop_interaction.is_local_player_in_range() + ) + or ( + _decor_shop_interaction != null + and _decor_shop_interaction.is_local_player_in_range() + ) + or ( + _rv_upgrade_shop_interaction != null + and _rv_upgrade_shop_interaction.is_local_player_in_range() + ) + ) + + +func _refresh_shop_npc_speech_state() -> void: + var interaction := _get_active_shop_npc_interaction() + var dialogue_text: String = "" + if interaction != null: + dialogue_text = interaction.get_dialogue_text(_home_state.get_tier()) + _game_ui.set_shop_npc_player_in_range( + interaction != null, + dialogue_text, + ) + + +func _get_active_shop_npc_interaction() -> FishingShopInteractionType: + # Match the interaction and prompt priority used above: RV, decor, fishing. + if ( + _rv_upgrade_shop_interaction != null + and _rv_upgrade_shop_interaction.is_local_player_in_range() + ): + return _rv_upgrade_shop_interaction + if ( + _decor_shop_interaction != null + and _decor_shop_interaction.is_local_player_in_range() + ): + return _decor_shop_interaction + if ( + _shop_interaction != null + and _shop_interaction.is_local_player_in_range() + ): + return _shop_interaction + return null + + func _can_show_storage_prompt() -> bool: + return not _get_home_prompt().is_empty() + + +func _refresh_home_door_prompt(prompt: Dictionary) -> void: + # Home entry belongs to the doorway in world space. Keep the retired HUD + # prompt hidden so it cannot overlap the compact door-mounted sign. + _game_ui.set_storage_prompt_visible(false) + _home_world.set_exterior_prompt_visible( + str(prompt.get("owner_fingerprint", "")), + not prompt.is_empty(), + str(prompt.get("label", "enter home")), + ) + + +func _can_show_rv_storage_button() -> bool: return ( _gameplay_started - and _storage_interaction != null - and _storage_interaction.is_local_player_in_range() - and not _game_ui.get_player_storage().visible - and not _game_ui.get_fishing_shop().visible + and not _network_home.get_local_home_owner_fingerprint().is_empty() + and _network_home.can_local_decorate() and not _water_recovery.is_recovery_active() and _fishing_spot.can_open_fishing_shop() ) + + +func _get_home_prompt() -> Dictionary: + if ( + not _gameplay_started + or _game_ui.get_player_storage().visible + or _game_ui.get_fishing_shop().visible + or _game_ui.get_decor_shop().visible + or _game_ui.get_rv_upgrade_shop().visible + or _water_recovery.is_recovery_active() + or not _fishing_spot.can_open_fishing_shop() + ): + return {} + var owner_fingerprint: String = ( + _network_home.get_local_home_owner_fingerprint() + ) + if not owner_fingerprint.is_empty(): + return {} + var nearby_owner: String = _home_world.find_nearby_exterior_owner(_player) + if nearby_owner.is_empty(): + return {} + return { + "label": "enter home", + "anchor": _home_world.get_exterior_prompt_position(nearby_owner), + "owner_fingerprint": nearby_owner, + } diff --git a/main/main.tscn b/main/main.tscn index b9ad6fb..778a1d4 100644 --- a/main/main.tscn +++ b/main/main.tscn @@ -38,7 +38,7 @@ [ext_resource type="Script" uid="uid://dpiv6wttry0j4" path="res://network/player_data_root.gd" id="37_data_root"] [ext_resource type="Script" uid="uid://bu5q4a8jfvxkf" path="res://network/identity_backup_service.gd" id="38_identity_backup"] [ext_resource type="Script" uid="uid://djmxy6jibi5y3" path="res://ui/interface_font_controller.gd" id="39_fonts"] -[ext_resource type="Shader" uid="uid://c8s1g7tn771du" path="res://ui/title_water_background.gdshader" id="40_title_water"] +[ext_resource type="Texture2D" uid="uid://doju2lbj2ghwa" path="res://world/generation/chunks/assets/chunk_0000_grass_lite.png" id="40_title_grass"] [ext_resource type="Texture2D" uid="uid://f8a0cs0s7ler" path="res://art/patterns/pattern_tealdot.png" id="41_menu_pattern"] [ext_resource type="Shader" uid="uid://byw3iub66qvog" path="res://ui/player_menu_pattern.gdshader" id="42_menu_pattern"] [ext_resource type="Texture2D" uid="uid://b6xws1d2dnbnn" path="res://art/patterns/pattern_moneyfish.png" id="43_shop_pattern"] @@ -58,19 +58,17 @@ [ext_resource type="Resource" path="res://gathering/catalog/gatherable_catalog.tres" id="58_gatherable_catalog"] [ext_resource type="Script" path="res://network/network_world_spawn_service.gd" id="59_world_spawns"] [ext_resource type="Script" path="res://gathering/gathering_controller.gd" id="60_gathering_controller"] +[ext_resource type="Script" path="res://homes/player_home_state.gd" id="61_home_state"] +[ext_resource type="Script" path="res://homes/home_world_service.gd" id="62_home_world"] +[ext_resource type="Script" path="res://network/network_home_service.gd" id="63_network_home"] +[ext_resource type="Script" path="res://homes/home_decor_controller.gd" id="64_home_decor_controller"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_title_water_native"] -shader = ExtResource("40_title_water") -shader_parameter/surface_color = Color(0.1, 0.45, 0.62, 1) -shader_parameter/middle_color = Color(0.055, 0.285, 0.4, 1) -shader_parameter/depth_color = Color(0.02, 0.16, 0.27, 1) -shader_parameter/virtual_pixel_density = Vector2(320, 180) -shader_parameter/color_step_count = 14.0 -shader_parameter/continuous_depth_blend = 0.12 -shader_parameter/wave_speed = 0.1 -shader_parameter/wave_scale = 2.4 -shader_parameter/wave_strength = 0.012 -shader_parameter/caustic_strength = 0.018 +[sub_resource type="ShaderMaterial" id="ShaderMaterial_title_grass_native"] +shader = ExtResource("42_menu_pattern") +shader_parameter/pattern_texture = ExtResource("40_title_grass") +shader_parameter/source_tile_size = Vector2(128, 128) +shader_parameter/display_scale = 1.0 +shader_parameter/scroll_velocity_pixels = Vector2(-7.5, -7.5) [sub_resource type="ShaderMaterial" id="ShaderMaterial_player_menu_pattern"] shader = ExtResource("42_menu_pattern") @@ -139,7 +137,7 @@ layer = -1 [node name="TitleBackground" type="ColorRect" parent="TitleBackgroundLayer" unique_id=1768697365] unique_name_in_owner = true -material = SubResource("ShaderMaterial_title_water_native") +material = SubResource("ShaderMaterial_title_grass_native") anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -265,6 +263,14 @@ script = ExtResource("22_network_sale") unique_name_in_owner = true script = ExtResource("23_network_shop") +[node name="NetworkHomeService" type="Node" parent="."] +unique_name_in_owner = true +script = ExtResource("63_network_home") + +[node name="HomeDecorController" type="Node" parent="."] +unique_name_in_owner = true +script = ExtResource("64_home_decor_controller") + [node name="NetworkItemUseService" type="Node" parent="." unique_id=255154670] unique_name_in_owner = true script = ExtResource("24_network_item") @@ -328,6 +334,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.3999481, 12.07081) [node name="WorldGatherables" type="Node3D" parent="."] +[node name="HomeWorldService" type="Node3D" parent="."] +unique_name_in_owner = true +script = ExtResource("62_home_world") + [node name="GatheringController" type="Node3D" parent="."] unique_name_in_owner = true script = ExtResource("60_gathering_controller") @@ -344,6 +354,10 @@ script = ExtResource("8_recovery") unique_name_in_owner = true script = ExtResource("9_save") +[node name="PlayerHomeState" type="Node" parent="."] +unique_name_in_owner = true +script = ExtResource("61_home_state") + [node name="PlayerSettingsManager" type="Node" parent="." unique_id=906991991] unique_name_in_owner = true script = ExtResource("10_settings") diff --git a/main/runtime_performance_profile.gd b/main/runtime_performance_profile.gd index ee2581d..f18e63a 100644 --- a/main/runtime_performance_profile.gd +++ b/main/runtime_performance_profile.gd @@ -2,9 +2,13 @@ class_name RuntimePerformanceProfile extends RefCounted const PROFILE_ENVIRONMENT_VARIABLE: String = ( + "straywild_PERFORMANCE_PROFILE" +) +const LEGACY_LIGHT_ENVIRONMENT_VARIABLE: String = "straywild_LOW_END" +const NETFISHING_PROFILE_ENVIRONMENT_VARIABLE := ( "NETFISHING_PERFORMANCE_PROFILE" ) -const LEGACY_LIGHT_ENVIRONMENT_VARIABLE: String = "NETFISHING_LOW_END" +const NETFISHING_LIGHT_ENVIRONMENT_VARIABLE := "NETFISHING_LOW_END" const NORMAL_PROFILE: StringName = &"normal" const LIGHT_PROFILE: StringName = &"light" const NORMAL_WORLD_RENDER_SCALE: float = 1.0 @@ -14,9 +18,19 @@ var _profile_name: StringName = NORMAL_PROFILE static func from_environment() -> RuntimePerformanceProfile: + var profile_name: String = OS.get_environment( + PROFILE_ENVIRONMENT_VARIABLE + ) + if profile_name.is_empty(): + profile_name = OS.get_environment( + NETFISHING_PROFILE_ENVIRONMENT_VARIABLE + ) return from_name( - StringName(OS.get_environment(PROFILE_ENVIRONMENT_VARIABLE)), - OS.get_environment(LEGACY_LIGHT_ENVIRONMENT_VARIABLE) == "1", + StringName(profile_name), + ( + OS.get_environment(LEGACY_LIGHT_ENVIRONMENT_VARIABLE) == "1" + or OS.get_environment(NETFISHING_LIGHT_ENVIRONMENT_VARIABLE) == "1" + ), ) diff --git a/main/texture_sampling_policy.gd b/main/texture_sampling_policy.gd index 3d041d0..35a92a0 100644 --- a/main/texture_sampling_policy.gd +++ b/main/texture_sampling_policy.gd @@ -1,6 +1,6 @@ extends Node -## Enforces NETfishing's nearest-neighbor-only artwork policy at runtime. +## Enforces straywild's nearest-neighbor-only artwork policy at runtime. ## ## Godot uses separate texture-filter enums for CanvasItem and 3D materials. ## Applying both here prevents imported models, dynamically created controls, @@ -15,8 +15,12 @@ func _enter_tree() -> void: func _on_node_added(node: Node) -> void: enforce_node(node) # Some runtime presenters assign their mesh or material immediately after - # add_child(). Recheck once deferred so those resources are covered too. - call_deferred("_enforce_deferred_node", weakref(node)) + # add_child(). Recheck those 3D resource owners once deferred so the newly + # assigned resources are covered too. CanvasItems keep their filter setting + # when their texture changes, so deferring every dynamic UI node only floods + # the message queue during large inventory and catalog refreshes. + if _needs_deferred_resource_check(node): + call_deferred("_enforce_deferred_node", weakref(node)) func _enforce_existing_tree() -> void: @@ -29,6 +33,15 @@ func _enforce_deferred_node(node_ref: WeakRef) -> void: enforce_node(node) +static func _needs_deferred_resource_check(node: Node) -> bool: + return ( + node is GeometryInstance3D + or node is MultiMeshInstance3D + or node is GPUParticles3D + or node is CPUParticles3D + ) + + static func enforce_subtree(node: Node) -> void: enforce_node(node) for child: Node in node.get_children(): diff --git a/network/discovery_client.gd b/network/discovery_client.gd index bf15bbf..d8e602a 100644 --- a/network/discovery_client.gd +++ b/network/discovery_client.gd @@ -9,14 +9,24 @@ signal host_state_changed(state: int) signal public_join_prepared(endpoint: String) signal public_join_status_changed(message: String, is_error: bool) signal public_join_state_changed(state: int) +signal friend_presence_updated(friends: Array[Dictionary]) +signal presence_sharing_changed(enabled: bool) +signal social_status_changed(message: String, is_error: bool) +signal friend_invite_received( + fingerprint: String, + display_name: String, + room: Dictionary, +) +signal friend_invite_finished(success: bool, message: String) const BASE_URL_SETTING: String = "network/discovery/base_url" -const BASE_URL_ENVIRONMENT: String = "NETFISHING_DISCOVERY_URL" +const BASE_URL_ENVIRONMENT: String = "straywild_DISCOVERY_URL" +const LEGACY_BASE_URL_ENVIRONMENT: String = "NETFISHING_DISCOVERY_URL" const SETTINGS_PATH: String = "user://network_discovery.cfg" const DEFAULT_ROOM_NAME: String = "Player's Server" -const LEGACY_DEFAULT_ROOM_NAME: String = "NETfishing Room" +const LEGACY_DEFAULT_ROOM_NAME: String = "straywild Room" const LEGACY_DEDICATED_DEFAULT_ROOM_NAME: String = ( - "NETfishing Dedicated Server" + "straywild Dedicated Server" ) const ROOM_NAME_SUFFIX: String = "'s Server" const MAX_ROOM_NAME_LENGTH: int = 48 @@ -24,10 +34,11 @@ const HEARTBEAT_INTERVAL_SECONDS: float = 15.0 const REQUEST_TIMEOUT_SECONDS: float = 8.0 const TRAVERSAL_POLL_INTERVAL_SECONDS: float = 1.0 const JOIN_PROBE_INTERVAL_SECONDS: float = 0.35 -const TRAVERSAL_PACKET_PREFIX: String = "NETFISHING_TRAVERSAL_V1 " +const TRAVERSAL_PACKET_PREFIX: String = "straywild_TRAVERSAL_V1 " const UPNP_MAPPING_DURATION_SECONDS: int = 3600 const UPNP_RENEW_INTERVAL_SECONDS: float = 2700.0 const UPNP_RETRY_INTERVAL_SECONDS: float = 300.0 +const SOCIAL_POLL_INTERVAL_SECONDS: float = 5.0 enum HostState { UNAVAILABLE, @@ -55,6 +66,7 @@ enum HostRequestKind { } var _session: NetworkSession +var _relationships: PlayerRelationshipStore var _base_url: String = "" var _room_name: String = DEFAULT_ROOM_NAME var _room_name_uses_default: bool = true @@ -92,6 +104,18 @@ var _upnp_operation_is_renewal: bool = false var _upnp_renew_timer: Timer var _upnp: UPNP var _upnp_mapped_port: int = 0 +var _presence_sharing: bool = false +var _social_timer: Timer +var _presence_request: HTTPRequest +var _presence_query_request: HTTPRequest +var _invitation_poll_request: HTTPRequest +var _invitation_send_request: HTTPRequest +var _friend_presence: Dictionary[String, Dictionary] = {} +var _published_presence_tokens: PackedStringArray = PackedStringArray() +var _pending_presence_online: bool = false +var _pending_presence_tokens: PackedStringArray = PackedStringArray() +var _pending_invite_fingerprint: String = "" +var _joined_public_room_id: String = "" func _ready() -> void: @@ -147,16 +171,48 @@ func _ready() -> void: _join_probe_timer.one_shot = false add_child(_join_probe_timer) _join_probe_timer.timeout.connect(_send_pending_join_probe) + + _presence_request = _make_social_request( + "FriendPresencePublish", _on_presence_request_completed + ) + _presence_query_request = _make_social_request( + "FriendPresenceQuery", _on_presence_query_completed + ) + _invitation_poll_request = _make_social_request( + "FriendInvitationPoll", _on_invitation_poll_completed + ) + _invitation_send_request = _make_social_request( + "FriendInvitationSend", _on_invitation_send_completed + ) + _social_timer = Timer.new() + _social_timer.name = "FriendPresencePoll" + _social_timer.wait_time = SOCIAL_POLL_INTERVAL_SECONDS + _social_timer.one_shot = false + add_child(_social_timer) + _social_timer.timeout.connect(_refresh_social_state) _load_settings() _base_url = _configured_base_url() -func setup(session: NetworkSession) -> void: +func setup( + session: NetworkSession, + relationships: PlayerRelationshipStore = null, +) -> void: _session = session + _relationships = relationships if _room_name_uses_default: _room_name = _default_room_name(_session.get_local_display_name()) _save_settings() _session.set_session_display_name(_room_name) + if ( + _relationships != null + and not _relationships.relationship_changed.is_connected( + _on_social_relationship_changed + ) + ): + _relationships.relationship_changed.connect( + _on_social_relationship_changed + ) if not _session.state_changed.is_connected(_on_session_state_changed): _session.state_changed.connect(_on_session_state_changed) if not _session.peer_count_changed.is_connected(_on_peer_count_changed): @@ -173,6 +229,9 @@ func setup(session: NetworkSession) -> void: else: _set_host_state(HostState.CLOSED) _set_host_status("Open the game before listing it publicly.", false) + if is_configured() and _relationships != null: + _social_timer.start() + call_deferred("_refresh_social_state") func is_configured() -> bool: @@ -183,6 +242,112 @@ func get_base_url() -> String: return _base_url +func is_presence_sharing() -> bool: + return _presence_sharing + + +func set_presence_sharing(enabled: bool) -> bool: + if enabled and (not is_configured() or _relationships == null): + social_status_changed.emit( + "Friend presence is not configured in this build.", true + ) + return false + if _presence_sharing == enabled: + return true + _presence_sharing = enabled + _save_settings() + presence_sharing_changed.emit(enabled) + _refresh_social_state() + return true + + +func get_friend_presence() -> Array[Dictionary]: + var result: Array[Dictionary] = [] + if _relationships == null: + return result + for friend: Dictionary in _relationships.get_friends(): + var fingerprint := str(friend.get("fingerprint", "")) + var live: Dictionary = _friend_presence.get(fingerprint, {}) + result.append({ + "fingerprint": fingerprint, + "display_name": str( + friend.get("last_known_display_name", "Player") + ), + "online": bool(live.get("online", false)), + "room": ( + live.get("room", {}).duplicate(true) + if typeof(live.get("room", {})) == TYPE_DICTIONARY + else {} + ), + }) + result.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: + if bool(a["online"]) != bool(b["online"]): + return bool(a["online"]) + return str(a["display_name"]).naturalnocasecmp_to( + str(b["display_name"]) + ) < 0 + ) + return result + + +func request_friend_presence() -> bool: + if not is_configured() or _relationships == null: + friend_presence_updated.emit(get_friend_presence()) + return false + _refresh_social_state() + return true + + +func send_friend_invite(fingerprint: String) -> bool: + if ( + _relationships == null + or not _relationships.is_friend(fingerprint) + or _relationships.is_blocked(fingerprint) + or not is_configured() + ): + friend_invite_finished.emit( + false, "This person needs to be online to do this." + ) + return false + if ( + _session == null + or not _session.is_host() + or not _host_verified + or _lease_room_id.is_empty() + ): + friend_invite_finished.emit( + false, + "List your open room in discovery before inviting friends.", + ) + return false + if ( + not _pending_invite_fingerprint.is_empty() + or _invitation_send_request.get_http_client_status() + != HTTPClient.STATUS_DISCONNECTED + ): + return false + var friend: Dictionary = _relationships.get_friend_record(fingerprint) + var inbox_token := str(friend.get("remote_invite_token", "")) + if inbox_token.is_empty(): + friend_invite_finished.emit(false, "Friend invitation is unavailable.") + return false + var error := _post_social_json( + _invitation_send_request, + "/v1/invitations", + { + "inbox_token": inbox_token, + "room_id": _lease_room_id, + }, + ) + if error != OK: + friend_invite_finished.emit( + false, "Friend invitation could not be sent." + ) + return false + _pending_invite_fingerprint = fingerprint + return true + + func set_base_url_override(value: String) -> bool: var normalized: String = value.strip_edges() while normalized.ends_with("/"): @@ -345,7 +510,7 @@ func prepare_public_join(room: Dictionary) -> bool: func request_rooms() -> bool: if not is_configured(): - rooms_updated.emit([]) + rooms_updated.emit(_empty_rooms()) browse_status_changed.emit( "Public room discovery is not configured in this build.", true ) @@ -362,7 +527,7 @@ func request_rooms() -> bool: ] var error: Error = _browse_request.request(url) if error != OK: - rooms_updated.emit([]) + rooms_updated.emit(_empty_rooms()) browse_status_changed.emit("Could not request public rooms.", true) return false _browse_request_in_flight = true @@ -389,6 +554,10 @@ func is_own_room(room: Dictionary) -> bool: func _configured_base_url() -> String: var value: String = OS.get_environment(BASE_URL_ENVIRONMENT).strip_edges() + if value.is_empty(): + value = OS.get_environment( + LEGACY_BASE_URL_ENVIRONMENT + ).strip_edges() if value.is_empty(): value = str(ProjectSettings.get_setting(BASE_URL_SETTING, "")).strip_edges() while value.ends_with("/"): @@ -396,7 +565,7 @@ func _configured_base_url() -> String: if not value.is_empty() and not ( value.begins_with("https://") or value.begins_with("http://") ): - push_warning("Ignored invalid NETfishing discovery URL.") + push_warning("Ignored invalid straywild discovery URL.") return "" return value @@ -645,7 +814,7 @@ func _on_traversal_request_completed( var port: int = int(endpoint.get("port", 0)) if address.is_empty() or port < 1 or port > 65535: continue - var punch: PackedByteArray = "NETFISHING_PUNCH_V1".to_utf8_buffer() + var punch: PackedByteArray = "straywild_PUNCH_V1".to_utf8_buffer() for _attempt: int in 3: _session.send_traversal_packet(address, port, punch) @@ -731,13 +900,13 @@ func _configure_upnp_mapping(port: int) -> Dictionary: var mapping_result: int = upnp.add_port_mapping( port, port, - "NETfishing", + "straywild", "UDP", UPNP_MAPPING_DURATION_SECONDS, ) if mapping_result == UPNP.UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED: mapping_result = upnp.add_port_mapping( - port, port, "NETfishing", "UDP", 0 + port, port, "straywild", "UDP", 0 ) return { "success": mapping_result == UPNP.UPNP_RESULT_SUCCESS, @@ -813,12 +982,12 @@ func _on_browse_request_completed( _browse_request_in_flight = false var response: Dictionary = _parse_response_dictionary(body) if result != HTTPRequest.RESULT_SUCCESS or response_code != HTTPClient.RESPONSE_OK: - rooms_updated.emit([]) + rooms_updated.emit(_empty_rooms()) browse_status_changed.emit(_request_failure(response), true) return var raw_rooms: Variant = response.get("rooms", []) if typeof(raw_rooms) != TYPE_ARRAY: - rooms_updated.emit([]) + rooms_updated.emit(_empty_rooms()) browse_status_changed.emit("Discovery returned an invalid room list.", true) return var rooms: Array[Dictionary] = [] @@ -873,6 +1042,309 @@ func _valid_json_integer(value: Variant, minimum: int, maximum: int) -> bool: ) +func _make_social_request(name: String, callback: Callable) -> HTTPRequest: + var request := HTTPRequest.new() + request.name = name + request.timeout = REQUEST_TIMEOUT_SECONDS + add_child(request) + request.request_completed.connect(callback) + return request + + +func _social_payload(fields: Dictionary = {}) -> Dictionary: + var payload: Dictionary = fields.duplicate(true) + payload["game_version"] = NetworkProtocol.game_version() + payload["protocol_version"] = NetworkProtocol.PROTOCOL_VERSION + return payload + + +func _post_social_json( + request: HTTPRequest, + path: String, + fields: Dictionary, +) -> Error: + return request.request( + _base_url + path, + PackedStringArray(["Content-Type: application/json"]), + HTTPClient.METHOD_POST, + JSON.stringify(_social_payload(fields)), + ) + + +func _refresh_social_state() -> void: + if not is_configured() or _relationships == null: + return + _publish_friend_presence() + _query_friend_presence() + _poll_friend_invitations() + + +func _publish_friend_presence() -> void: + if ( + _presence_request.get_http_client_status() + != HTTPClient.STATUS_DISCONNECTED + ): + return + var current_tokens := _friend_social_values( + "local_presence_write_token" + ) + var online := _presence_sharing and not current_tokens.is_empty() + var publish_online := online + var tokens := PackedStringArray() + if online: + # Revoke removed or blocked friendships before refreshing the remaining + # capabilities. This makes status disappear on the next request instead of + # waiting for the server's short presence TTL. + tokens = _presence_tokens_not_in( + _published_presence_tokens, current_tokens + ) + if not tokens.is_empty(): + publish_online = false + else: + tokens = current_tokens + else: + tokens = _published_presence_tokens + if tokens.is_empty(): + return + var error := _post_social_json( + _presence_request, + "/v1/presence", + { + "display_name": _session.get_local_display_name(), + "room_id": _current_presence_room_id(), + "online": publish_online, + "write_tokens": Array(tokens), + }, + ) + if error == OK: + _pending_presence_online = publish_online + _pending_presence_tokens = tokens.duplicate() + else: + social_status_changed.emit("Could not update friend presence.", true) + + +func _query_friend_presence() -> void: + if ( + _presence_query_request.get_http_client_status() + != HTTPClient.STATUS_DISCONNECTED + ): + return + var channels := _friend_social_values("remote_presence_channel") + if channels.is_empty(): + var had_presence := not _friend_presence.is_empty() + _friend_presence.clear() + if had_presence: + friend_presence_updated.emit(get_friend_presence()) + return + var error := _post_social_json( + _presence_query_request, + "/v1/presence/query", + {"channels": Array(channels)}, + ) + if error != OK: + social_status_changed.emit("Could not refresh friend status.", true) + + +func _poll_friend_invitations() -> void: + if ( + _invitation_poll_request.get_http_client_status() + != HTTPClient.STATUS_DISCONNECTED + ): + return + var tokens := _friend_social_values("local_invite_token") + if tokens.is_empty(): + return + var error := _post_social_json( + _invitation_poll_request, + "/v1/invitations/poll", + {"inbox_tokens": Array(tokens)}, + ) + if error != OK: + social_status_changed.emit("Could not check friend invitations.", true) + + +func _friend_social_values(key: String) -> PackedStringArray: + var result := PackedStringArray() + if _relationships == null: + return result + for friend: Dictionary in _relationships.get_friends(): + var value := str(friend.get(key, "")) + if not value.is_empty() and value not in result: + result.append(value) + return result + + +func _current_presence_room_id() -> String: + if _session == null: + return "" + if _session.is_host() and _host_verified: + return _lease_room_id + if _session.is_joined_client(): + return _joined_public_room_id + return "" + + +func _on_presence_request_completed( + result: int, + response_code: int, + _headers: PackedStringArray, + body: PackedByteArray, +) -> void: + var published_online := _pending_presence_online + var request_tokens := _pending_presence_tokens.duplicate() + _pending_presence_online = false + _pending_presence_tokens = PackedStringArray() + var response := _parse_response_dictionary(body) + if result != HTTPRequest.RESULT_SUCCESS or response_code != HTTPClient.RESPONSE_OK: + social_status_changed.emit(_request_failure(response), true) + return + if published_online: + for token: String in request_tokens: + if token not in _published_presence_tokens: + _published_presence_tokens.append(token) + else: + for token: String in request_tokens: + var index := _published_presence_tokens.find(token) + if index >= 0: + _published_presence_tokens.remove_at(index) + if _presence_publish_needs_follow_up(): + call_deferred("_publish_friend_presence") + + +func _presence_publish_needs_follow_up() -> bool: + var desired := ( + _friend_social_values("local_presence_write_token") + if _presence_sharing + else PackedStringArray() + ) + return ( + not _presence_tokens_not_in( + _published_presence_tokens, desired + ).is_empty() + or not _presence_tokens_not_in( + desired, _published_presence_tokens + ).is_empty() + ) + + +func _presence_tokens_not_in( + first: PackedStringArray, + second: PackedStringArray, +) -> PackedStringArray: + var result := PackedStringArray() + for token: String in first: + if token not in second: + result.append(token) + return result + + +func _on_presence_query_completed( + result: int, + response_code: int, + _headers: PackedStringArray, + body: PackedByteArray, +) -> void: + var response := _parse_response_dictionary(body) + if result != HTTPRequest.RESULT_SUCCESS or response_code != HTTPClient.RESPONSE_OK: + social_status_changed.emit(_request_failure(response), true) + return + var by_channel: Dictionary[String, String] = {} + for friend: Dictionary in _relationships.get_friends(): + by_channel[str(friend.get("remote_presence_channel", ""))] = str( + friend.get("fingerprint", "") + ) + var next_presence: Dictionary[String, Dictionary] = {} + var raw_presence: Variant = response.get("presence", []) + if typeof(raw_presence) == TYPE_ARRAY: + for value: Variant in raw_presence: + if typeof(value) != TYPE_DICTIONARY: + continue + var presence: Dictionary = value + var fingerprint := str( + by_channel.get(str(presence.get("channel", "")), "") + ) + if fingerprint.is_empty() or _relationships.is_blocked(fingerprint): + continue + var room: Dictionary = {} + var raw_room: Variant = presence.get("room", {}) + if typeof(raw_room) == TYPE_DICTIONARY and _valid_public_room(raw_room): + room = (raw_room as Dictionary).duplicate(true) + next_presence[fingerprint] = { + "online": true, + "room": room, + } + if next_presence == _friend_presence: + return + _friend_presence = next_presence + friend_presence_updated.emit(get_friend_presence()) + + +func _on_invitation_poll_completed( + result: int, + response_code: int, + _headers: PackedStringArray, + body: PackedByteArray, +) -> void: + var response := _parse_response_dictionary(body) + if result != HTTPRequest.RESULT_SUCCESS or response_code != HTTPClient.RESPONSE_OK: + return + var by_inbox: Dictionary[String, Dictionary] = {} + for friend: Dictionary in _relationships.get_friends(): + var token := str(friend.get("local_invite_token", "")) + if not token.is_empty(): + by_inbox[PlayerRelationshipStore.invite_inbox_id(token)] = friend + var invitations: Variant = response.get("invitations", []) + if typeof(invitations) != TYPE_ARRAY: + return + for value: Variant in invitations: + if typeof(value) != TYPE_DICTIONARY: + continue + var invitation: Dictionary = value + var friend: Dictionary = by_inbox.get( + str(invitation.get("inbox_id", "")), {} + ) + var raw_room: Variant = invitation.get("room", {}) + if friend.is_empty() or typeof(raw_room) != TYPE_DICTIONARY: + continue + var room := raw_room as Dictionary + if not _valid_public_room(room): + continue + var fingerprint := str(friend.get("fingerprint", "")) + if _relationships.is_blocked(fingerprint): + continue + friend_invite_received.emit( + fingerprint, + str(friend.get("last_known_display_name", "Player")), + room.duplicate(true), + ) + + +func _on_invitation_send_completed( + result: int, + response_code: int, + _headers: PackedStringArray, + body: PackedByteArray, +) -> void: + _pending_invite_fingerprint = "" + var response := _parse_response_dictionary(body) + var success := ( + result == HTTPRequest.RESULT_SUCCESS + and response_code == HTTPClient.RESPONSE_CREATED + ) + friend_invite_finished.emit( + success, + "Invitation sent." if success else _request_failure(response), + ) + + +func _on_social_relationship_changed(_fingerprint: String) -> void: + for fingerprint: String in _friend_presence.keys(): + if not _relationships.is_friend(fingerprint): + _friend_presence.erase(fingerprint) + friend_presence_updated.emit(get_friend_presence()) + call_deferred("_refresh_social_state") + + func _parse_response_dictionary(body: PackedByteArray) -> Dictionary: if body.is_empty(): return {} @@ -907,23 +1379,38 @@ func _discovery_version_mismatch_message(required_version: String) -> String: match rejection: NetworkProtocol.RejectionCode.CLIENT_OUTDATED: return ( - "Your NETfishing version is out of date. Update to %s to " + "Your straywild version is out of date. Update to %s to " + "enable public discovery. This room will not be listed " + "until you update." ) % required_version NetworkProtocol.RejectionCode.SERVER_OUTDATED: return ( - "Public discovery is still on NETfishing %s. This room " + "Public discovery is still on straywild %s. This room " + "will not be listed until discovery is updated for %s." ) % [required_version, local_version] _: return ( - "Public discovery requires NETfishing %s. This room will " + "Public discovery requires straywild %s. This room will " + "not be listed until both versions match." ) % required_version func _on_session_state_changed(state: NetworkSession.State) -> void: + if state == NetworkSession.State.JOINED_CLIENT: + if not _pending_join_room_id.is_empty(): + _joined_public_room_id = _pending_join_room_id + elif state in [ + NetworkSession.State.PRIVATE_HOST, + NetworkSession.State.OPEN_HOST, + NetworkSession.State.SERVER_LOST, + NetworkSession.State.CONNECTION_FAILED, + ]: + _joined_public_room_id = "" + elif ( + state == NetworkSession.State.INACTIVE + and not _preserve_pending_join_on_inactive + ): + _joined_public_room_id = "" if state == NetworkSession.State.CONNECTING and not _pending_join_token.is_empty(): _preserve_pending_join_on_inactive = false _set_public_join_state(PublicJoinState.CONNECTING) @@ -979,6 +1466,7 @@ func _on_session_state_changed(state: NetworkSession.State) -> void: _set_host_status("Open the game before listing it publicly.", false) else: _set_host_state(HostState.CLOSED) + call_deferred("_refresh_social_state") func _on_host_openness_changed(is_open: bool) -> void: @@ -1039,6 +1527,10 @@ func _set_public_join_state(state: PublicJoinState) -> void: public_join_state_changed.emit(int(state)) +func _empty_rooms() -> Array[Dictionary]: + return [] + + func _sanitize_room_name(value: String) -> String: var cleaned: String = value.strip_edges().replace("\n", " ").replace("\r", " ") cleaned = cleaned.replace("\t", " ") @@ -1065,7 +1557,7 @@ func _load_settings() -> void: ) if not saved_name.is_empty(): _room_name = saved_name - _room_name_uses_default = bool(config.get_value( + _room_name_uses_default = bool(config.get_value( "host", "room_name_uses_default", saved_name in [ @@ -1073,6 +1565,9 @@ func _load_settings() -> void: LEGACY_DEFAULT_ROOM_NAME, LEGACY_DEDICATED_DEFAULT_ROOM_NAME, ], + )) + _presence_sharing = bool(config.get_value( + "social", "share_presence", false )) @@ -1084,6 +1579,7 @@ func _save_settings() -> void: config.set_value( "host", "room_name_uses_default", _room_name_uses_default ) + config.set_value("social", "share_presence", _presence_sharing) var error: Error = config.save(SETTINGS_PATH) if error != OK: - push_warning("Could not save the local NETfishing room name.") + push_warning("Could not save local straywild discovery settings.") diff --git a/network/host_ban_store.gd b/network/host_ban_store.gd index f8c4bf9..1251846 100644 --- a/network/host_ban_store.gd +++ b/network/host_ban_store.gd @@ -17,6 +17,10 @@ var _data_root: PlayerDataRoot func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _store_path = path _data_root = data_root + _namespaces.clear() + _loaded = false + _write_blocked = false + _expected_hash = "" func is_banned(host_fingerprint: String, target_fingerprint: String) -> bool: diff --git a/network/identity_backup_service.gd b/network/identity_backup_service.gd index ff7396c..c383e7b 100644 --- a/network/identity_backup_service.gd +++ b/network/identity_backup_service.gd @@ -3,7 +3,8 @@ extends Node signal operation_finished(success: bool, message: String) -const MAGIC := "NETFISHING_IDENTITY_BACKUP" +const MAGIC := "straywild_IDENTITY_BACKUP" +const LEGACY_MAGIC := "NETFISHING_IDENTITY_BACKUP" const FORMAT_VERSION := 1 const MAX_BACKUP_BYTES := 256 * 1024 const MIN_PASSPHRASE_LENGTH := 12 @@ -110,8 +111,9 @@ func inspect_backup( if json.parse(text) != OK or typeof(json.data) != TYPE_DICTIONARY: return {"ok": false} var data: Dictionary = json.data + var legacy_backup: bool = data.get("magic") == LEGACY_MAGIC if ( - data.get("magic") != MAGIC + data.get("magic") not in [MAGIC, LEGACY_MAGIC] or data.get("format_version") != FORMAT_VERSION or data.get("identity_type") != expected_type or data.get("algorithm") != NetworkIdentityCrypto.ALGORITHM @@ -134,12 +136,23 @@ func inspect_backup( var signature: PackedByteArray = Marshalls.base64_to_raw( str(data.get("self_signature", "")) ) - if not NetworkIdentityCrypto.verify_fields( - NetworkIdentityCrypto.load_public_key(public_pem), - "identity_backup_self_test", - [expected_type, fingerprint], - signature, - ): + var public_key: CryptoKey = NetworkIdentityCrypto.load_public_key(public_pem) + var backup_signature_valid: bool = ( + NetworkIdentityCrypto.verify_legacy_fields( + public_key, + "identity_backup_self_test", + [expected_type, fingerprint], + signature, + ) + if legacy_backup + else NetworkIdentityCrypto.verify_fields( + public_key, + "identity_backup_self_test", + [expected_type, fingerprint], + signature, + ) + ) + if not backup_signature_valid: return {"ok": false} var fresh: PackedByteArray = NetworkIdentityCrypto.sign_fields( key, "identity_import_self_test", [fingerprint] @@ -189,7 +202,7 @@ func import_backup( ) _finish( bool(result.get("ok", false)), - "Identity imported. Restart NETfishing before multiplayer." + "Identity imported. Restart straywild before multiplayer." if bool(result.get("ok", false)) else "Could not install this identity backup.", ) diff --git a/network/known_player_store.gd b/network/known_player_store.gd index 0c6b859..1118656 100644 --- a/network/known_player_store.gd +++ b/network/known_player_store.gd @@ -15,6 +15,10 @@ var _data_root: PlayerDataRoot func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _store_path = path _data_root = data_root + _records.clear() + _loaded = false + _write_blocked = false + _expected_hash = "" func observe(fingerprint: String, display_name: String) -> String: diff --git a/network/network_chat_service.gd b/network/network_chat_service.gd index b24d558..55ba768 100644 --- a/network/network_chat_service.gd +++ b/network/network_chat_service.gd @@ -5,6 +5,7 @@ const BURST_COUNT: int = 3 const WINDOW_COUNT: int = 5 const WINDOW_SECONDS: float = 10.0 const CALL_COOLDOWN_MILLISECONDS: int = 90 +const MAX_PENDING_MESSAGES_PER_PEER: int = 8 const DEDICATED_CHAT_WARNING: String = ( "Privacy notice: This dedicated server records and retains chat messages." ) @@ -40,6 +41,7 @@ var _last_call_msec: Dictionary[int, int] = {} var _call_variant_indices: Dictionary[int, int] = {} var _sequence: int = 0 var _peer_names: Dictionary[int, String] = {} +var _pending_peer_messages: Dictionary[int, Array] = {} var _relationships: PlayerRelationshipStore var _dedicated_history_enabled: bool = false var _chat_log_path: String = "" @@ -418,9 +420,11 @@ func _apply_message( else: var sender_id := int(data["sender_peer_id"]) var record := _session.get_peer_record(sender_id) + if record == null: + _queue_pending_peer_message(sender_id, data, emit_live_signals) + return valid_signature = ( - record != null - and record.identity_fingerprint == str(data["sender_fingerprint"]) + record.identity_fingerprint == str(data["sender_fingerprint"]) and _session.verify_peer_action( sender_id, "chat_send", @@ -466,7 +470,47 @@ func receive_chat_rejection(message: String) -> void: send_rejected.emit(message.left(80)) +func _queue_pending_peer_message( + peer_id: int, + message: Dictionary, + emit_live_signals: bool, +) -> void: + if peer_id <= 0: + return + var pending: Array = _pending_peer_messages.get(peer_id, []) + var message_id := str(message.get("message_id", "")) + for value: Variant in pending: + if ( + typeof(value) == TYPE_DICTIONARY + and str(value.get("message", {}).get("message_id", "")) == message_id + ): + return + pending.append({ + "message": message.duplicate(true), + "emit_live_signals": emit_live_signals, + }) + while pending.size() > MAX_PENDING_MESSAGES_PER_PEER: + pending.pop_front() + _pending_peer_messages[peer_id] = pending + + +func _flush_pending_peer_messages(peer_id: int) -> void: + var pending: Array = _pending_peer_messages.get(peer_id, []) + _pending_peer_messages.erase(peer_id) + for value: Variant in pending: + if typeof(value) != TYPE_DICTIONARY: + continue + var queued: Dictionary = value + if typeof(queued.get("message")) != TYPE_DICTIONARY: + continue + _apply_message( + queued["message"], + bool(queued.get("emit_live_signals", true)), + ) + + func _on_peer_authenticated(peer_id: int, display_name: String) -> void: + _flush_pending_peer_messages(peer_id) if not _session.is_host(): return _peer_names[peer_id] = display_name @@ -500,6 +544,7 @@ func _on_peer_removed(peer_id: int) -> void: _rate_times.erase(peer_id) _last_call_msec.erase(peer_id) _call_variant_indices.erase(peer_id) + _pending_peer_messages.erase(peer_id) if not _session.is_host(): return var display_name: String = _peer_names.get(peer_id, "Player") @@ -601,6 +646,7 @@ func _on_session_state_changed(state: NetworkSession.State) -> void: _last_call_msec.clear() _call_variant_indices.clear() _peer_names.clear() + _pending_peer_messages.clear() _sequence = 0 history_replaced.emit([]) diff --git a/network/network_fish_showcase_protocol.gd b/network/network_fish_showcase_protocol.gd index d69e9dd..2ecd1ee 100644 --- a/network/network_fish_showcase_protocol.gd +++ b/network/network_fish_showcase_protocol.gd @@ -2,7 +2,7 @@ class_name NetworkFishShowcaseProtocol extends RefCounted const CAPABILITY: StringName = &"fish_showcase_v1" -const RELIABLE_CHANNEL: int = NetworkProtocol.ITEM_RELIABLE_CHANNEL +const RELIABLE_CHANNEL: int = NetworkProtocol.SHOWCASE_RELIABLE_CHANNEL const MAX_SESSION_ID_LENGTH: int = 96 const MAX_FISH_ID_LENGTH: int = 96 const MAX_WEIGHT_LB: float = 1000.0 diff --git a/network/network_fish_showcase_service.gd b/network/network_fish_showcase_service.gd index 068ee7d..d956240 100644 --- a/network/network_fish_showcase_service.gd +++ b/network/network_fish_showcase_service.gd @@ -7,6 +7,7 @@ const FishCatchType = preload("res://fish/fish_catch.gd") const FishQualityType = preload("res://fish/fish_quality.gd") const FishInventoryType = preload("res://inventory/fish_inventory.gd") const PlayerHotbarType = preload("res://inventory/player_hotbar.gd") +const LOCAL_STATE_RETRY_SECONDS: float = 0.75 var _session: NetworkSession var _spawn_service: PlayerSpawnService @@ -15,6 +16,8 @@ var _local_inventory: FishInventoryType var _local_hotbar: PlayerHotbarType var _states: Dictionary[int, Dictionary] = {} var _local_revision: int = 0 +var _local_acknowledged_revision: int = -1 +var _local_state_retry_elapsed: float = 0.0 var _local_visible: bool = false var _local_catch_id: StringName @@ -54,6 +57,30 @@ func setup( ) +func _process(delta: float) -> void: + if ( + _session == null + or not _session.is_joined_client() + or _local_revision <= 0 + or _local_revision <= _local_acknowledged_revision + ): + _local_state_retry_elapsed = 0.0 + return + _local_state_retry_elapsed += delta + if _local_state_retry_elapsed < LOCAL_STATE_RETRY_SECONDS: + return + var fish_catch: FishCatchType + if _local_visible: + fish_catch = _local_inventory.get_catch_by_id(_local_catch_id) + if fish_catch == null or not fish_catch.is_valid(): + _submit_local_state(null, false) + return + # A client can finish a generated-world transition on the same frame that + # its local showcase changes. Republish until the authoritative echo arrives + # so that one early application-level miss cannot leave held fish out of sync. + _submit_local_state(fish_catch, _local_visible) + + func toggle_selected_fish() -> bool: if _local_hotbar == null or _local_inventory == null: return false @@ -78,6 +105,7 @@ func get_local_showcase_catch_id() -> StringName: func _submit_local_state(fish_catch: FishCatchType, should_show: bool) -> void: _local_revision += 1 + _local_state_retry_elapsed = 0.0 var local_peer_id: int = ( _session.get_local_peer_id() if _session != null else 1 ) @@ -166,6 +194,11 @@ func receive_showcase_state(data: Dictionary) -> void: ): return var peer_id: int = int(data["owner_peer_id"]) + if peer_id == _session.get_local_peer_id(): + _local_acknowledged_revision = maxi( + _local_acknowledged_revision, + int(data["revision"]), + ) var previous: Dictionary = _states.get(peer_id, {}) if int(data["revision"]) <= int(previous.get("revision", -1)): return @@ -267,6 +300,8 @@ func _on_session_state_changed(state: NetworkSession.State) -> void: _states.clear() _local_visible = false _local_catch_id = StringName() + _local_acknowledged_revision = -1 + _local_state_retry_elapsed = 0.0 var local_avatar: Player = _spawn_service.get_avatar( _session.get_local_peer_id() ) diff --git a/network/network_fishing_protocol.gd b/network/network_fishing_protocol.gd index 8df59b7..7f15fdd 100644 --- a/network/network_fishing_protocol.gd +++ b/network/network_fishing_protocol.gd @@ -8,6 +8,8 @@ const MAX_REEL_SPEED: float = 10.0 const MAX_BARRIER_DAMAGE: int = 128 const INPUT_CHANNEL: int = 3 const SNAPSHOT_CHANNEL: int = 4 +const OBSERVER_SNAPSHOT_CHANNEL: int = 10 +const RELIABLE_CHANNEL: int = NetworkProtocol.FISHING_RELIABLE_CHANNEL const INPUT_RATE: float = 1.0 / 30.0 const SNAPSHOT_RATE: float = 1.0 / 20.0 @@ -35,6 +37,7 @@ static func validate_cast_request(data: Variant) -> String: "rarity_multipliers", "discovered_fish_ids", "capacity_available", + "movement_sequence", ]: if not payload.has(key): return "Malformed fishing request." @@ -51,11 +54,16 @@ static func validate_cast_request(data: Variant) -> String: or typeof(payload["rarity_multipliers"]) != TYPE_ARRAY or typeof(payload["discovered_fish_ids"]) != TYPE_ARRAY or typeof(payload["capacity_available"]) != TYPE_BOOL + or typeof(payload["movement_sequence"]) != TYPE_INT ): return "Malformed fishing request." - if payload.has("bait_id") and typeof(payload["bait_id"]) not in [TYPE_STRING, TYPE_STRING_NAME]: + if payload.has("bait_id") and typeof(payload["bait_id"]) not in [ + TYPE_STRING, TYPE_STRING_NAME + ]: return "Malformed fishing request." - if payload.has("lure_id") and typeof(payload["lure_id"]) not in [TYPE_STRING, TYPE_STRING_NAME]: + if payload.has("lure_id") and typeof(payload["lure_id"]) not in [ + TYPE_STRING, TYPE_STRING_NAME + ]: return "Malformed fishing request." var request_id: String = payload["request_id"] var session_id: String = payload["session_id"] @@ -92,6 +100,8 @@ static func validate_cast_request(data: Variant) -> String: or str(payload["rod_id"]).is_empty() or str(payload["rod_id"]).length() > 96 or str(payload.get("lure_id", "")).length() > 96 + or int(payload["movement_sequence"]) < 0 + or int(payload["movement_sequence"]) > 2147483647 ): return "Fishing request values are outside allowed limits." for value: Variant in rarity: diff --git a/network/network_fishing_service.gd b/network/network_fishing_service.gd index 95de131..8c9c798 100644 --- a/network/network_fishing_service.gd +++ b/network/network_fishing_service.gd @@ -21,6 +21,8 @@ const MAX_LEDGER_ENTRIES_PER_PEER: int = 64 const CAST_ORIGIN_TOLERANCE: float = 2.5 const CAPACITY_RESPONSE_TIMEOUT: float = 5.0 const MIN_CAST_INTERVAL: float = 0.25 +const OBSERVER_SNAPSHOT_INTERVAL: float = 0.1 +const OBSERVER_RELEVANCE_DISTANCE: float = 96.0 signal local_cast_accepted(attempt_id: String, target: Vector3) signal local_cast_rejected(message: String) @@ -51,7 +53,13 @@ var _last_input_time: Dictionary[int, float] = {} var _remote_presentations: Dictionary[int, RemoteFishingPresentation] = {} var _pending_local_bait_by_request: Dictionary[String, StringName] = {} var _snapshot_accumulator: float = 0.0 +var _observer_snapshot_accumulator: float = 0.0 var _local_input_sequence: int = 0 +var _presentation_enabled: bool = true +var _owner_snapshot_packets_sent: int = 0 +var _owner_snapshot_states_sent: int = 0 +var _observer_snapshot_packets_sent: int = 0 +var _observer_snapshot_states_sent: int = 0 func setup( @@ -67,6 +75,7 @@ func setup( item_catalog: ItemCatalog, fish_catalog: FishPoolType, item_use: NetworkItemUseService, + presentation_enabled: bool = true, ) -> void: _session = session _spawn_service = spawn_service @@ -80,6 +89,7 @@ func setup( _item_catalog = item_catalog _fish_catalog = fish_catalog _item_use = item_use + _presentation_enabled = presentation_enabled if not _session.peer_removed.is_connected(_on_peer_removed): _session.peer_removed.connect(_on_peer_removed) if not _session.state_changed.is_connected(_on_session_state_changed): @@ -130,6 +140,7 @@ func request_local_cast( "capacity_available": bool(evidence.get("capacity_available", false)), "bait_id": str(bait_id), "lure_id": str(lure_id), + "movement_sequence": _session.get_latest_movement_input_sequence(), } if _session.is_host(): _handle_cast_request(_session.get_local_peer_id(), data) @@ -213,15 +224,27 @@ func _process(delta: float) -> void: if now >= attempt.capacity_deadline: _cancel_attempt(peer_id, "Fishing attempt ended.") _snapshot_accumulator += delta + _observer_snapshot_accumulator += delta if _snapshot_accumulator >= NetworkFishingProtocol.SNAPSHOT_RATE: _snapshot_accumulator = fmod( _snapshot_accumulator, NetworkFishingProtocol.SNAPSHOT_RATE ) - _broadcast_snapshots() + _broadcast_owner_snapshots() + if _observer_snapshot_accumulator >= OBSERVER_SNAPSHOT_INTERVAL: + _observer_snapshot_accumulator = fmod( + _observer_snapshot_accumulator, + OBSERVER_SNAPSHOT_INTERVAL, + ) + _broadcast_observer_snapshots() -@rpc("any_peer", "call_remote", "reliable", 0) +@rpc( + "any_peer", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func submit_cast_request(data: Dictionary) -> void: var sender_id: int = multiplayer.get_remote_sender_id() if not _session.is_host() or not _session.is_authenticated_peer(sender_id): @@ -268,7 +291,13 @@ func _handle_cast_request(peer_id: int, data: Dictionary) -> void: return var origin: Vector3 = NetworkFishingProtocol.array_to_vector3(data["origin"]) var target: Vector3 = NetworkFishingProtocol.array_to_vector3(data["target"]) - var authoritative_origin: Vector3 = avatar.get_cast_origin_position() + var movement_state: Dictionary = avatar.get_lag_compensated_movement_state( + int(data.get("movement_sequence", 0)) + ) + var authoritative_origin: Vector3 = movement_state.get( + "cast_origin", + avatar.get_cast_origin_position(), + ) if origin.distance_to(authoritative_origin) > CAST_ORIGIN_TOLERANCE: _record_and_reject(peer_id, request_id, "Cannot fish here.") return @@ -279,7 +308,10 @@ func _handle_cast_request(peer_id: int, data: Dictionary) -> void: _fishing_spot.maximum_cast_distance, float(data["charge"]) ) - var facing: Vector3 = avatar.get_facing_direction() + var facing: Vector3 = movement_state.get( + "facing", + avatar.get_facing_direction(), + ) facing.y = 0.0 if ( cast_offset.length() < _fishing_spot.minimum_cast_distance - 0.25 @@ -642,7 +674,12 @@ func _handle_fishing_input(peer_id: int, data: Dictionary) -> void: attempt.controller.handle_primary_pressed() -@rpc("any_peer", "call_remote", "reliable", 0) +@rpc( + "any_peer", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func submit_cancel_request(attempt_id: String) -> void: var sender_id: int = multiplayer.get_remote_sender_id() var attempt: NetworkFishingAttempt = _attempts.get(sender_id) @@ -687,16 +724,59 @@ func _on_encounter_updated( }) -func _broadcast_snapshots() -> void: - var snapshots: Array[Dictionary] = [] +func _broadcast_owner_snapshots() -> void: for attempt: NetworkFishingAttempt in _attempts.values(): var snapshot: Dictionary = attempt.get_meta("snapshot", {}) - if not snapshot.is_empty(): - snapshots.append(snapshot) - if snapshots.is_empty(): + if snapshot.is_empty(): + continue + var owner_peer_id: int = attempt.owner_peer_id + if owner_peer_id == _session.get_local_peer_id(): + _apply_snapshots([snapshot]) + elif owner_peer_id > 1: + receive_fishing_snapshots.rpc_id(owner_peer_id, [snapshot]) + _owner_snapshot_packets_sent += 1 + _owner_snapshot_states_sent += 1 + + +func _broadcast_observer_snapshots() -> void: + if _attempts.is_empty(): return - _apply_snapshots(snapshots) - receive_fishing_snapshots.rpc(snapshots) + var observer_ids: Array[int] = _session.get_authenticated_peer_ids() + for observer_peer_id: int in observer_ids: + var observer_avatar: Player = _spawn_service.get_avatar(observer_peer_id) + if observer_avatar == null: + continue + var summaries: Array = [] + for attempt: NetworkFishingAttempt in _attempts.values(): + if attempt.owner_peer_id == observer_peer_id: + continue + var owner_avatar: Player = _spawn_service.get_avatar( + attempt.owner_peer_id + ) + if ( + owner_avatar == null + or observer_avatar.global_position.distance_squared_to( + owner_avatar.global_position + ) > OBSERVER_RELEVANCE_DISTANCE * OBSERVER_RELEVANCE_DISTANCE + ): + continue + summaries.append([ + attempt.attempt_id, + attempt.owner_peer_id, + attempt.bobber_position, + int(attempt.phase), + ]) + if summaries.is_empty(): + continue + if observer_peer_id == _session.get_local_peer_id(): + _apply_observer_snapshots(summaries) + elif observer_peer_id > 1: + receive_fishing_observer_snapshots.rpc_id( + observer_peer_id, + summaries, + ) + _observer_snapshot_packets_sent += 1 + _observer_snapshot_states_sent += summaries.size() @rpc("authority", "call_remote", "unreliable_ordered", 4) @@ -704,6 +784,55 @@ func receive_fishing_snapshots(snapshots: Array) -> void: _apply_snapshots(snapshots) +@rpc( + "authority", + "call_remote", + "unreliable_ordered", + NetworkFishingProtocol.OBSERVER_SNAPSHOT_CHANNEL, +) +func receive_fishing_observer_snapshots(summaries: Array) -> void: + _apply_observer_snapshots(summaries) + + +func _apply_observer_snapshots(summaries: Array) -> void: + if not _presentation_enabled or summaries.size() > 128: + return + for value: Variant in summaries: + if typeof(value) != TYPE_ARRAY: + continue + var fields: Array = value + if ( + fields.size() != 4 + or typeof(fields[0]) != TYPE_STRING + or str(fields[0]).is_empty() + or str(fields[0]).length() > NetworkFishingProtocol.MAX_ID_LENGTH + or typeof(fields[1]) != TYPE_INT + or int(fields[1]) <= 0 + or typeof(fields[2]) != TYPE_VECTOR3 + or typeof(fields[3]) != TYPE_INT + or not (fields[2] as Vector3).is_finite() + or int(fields[3]) not in [ + NetworkFishingAttempt.Phase.WAITING_FOR_BITE, + NetworkFishingAttempt.Phase.FIGHTING, + NetworkFishingAttempt.Phase.PENDING_CAPACITY, + ] + ): + continue + var owner_peer_id: int = int(fields[1]) + if owner_peer_id == _session.get_local_peer_id(): + continue + var presentation := _get_remote_presentation(owner_peer_id) + if presentation != null: + presentation.synchronize_active( + str(fields[0]), + fields[2], + int(fields[3]) in [ + NetworkFishingAttempt.Phase.FIGHTING, + NetworkFishingAttempt.Phase.PENDING_CAPACITY, + ], + ) + + func _apply_snapshots(snapshots: Array) -> void: var local_peer_id: int = _session.get_local_peer_id() for value: Variant in snapshots: @@ -810,7 +939,12 @@ func _on_attempt_caught(peer_id: int) -> void: receive_capacity_probe.rpc_id(peer_id, probe) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_capacity_probe(data: Dictionary) -> void: _handle_local_capacity_probe(data) @@ -844,7 +978,12 @@ func _handle_local_capacity_probe(data: Dictionary) -> void: ) -@rpc("any_peer", "call_remote", "reliable", 0) +@rpc( + "any_peer", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func submit_capacity_response( attempt_id: String, capacity_nonce: String, @@ -902,7 +1041,12 @@ func _finalize_catch(attempt: NetworkFishingAttempt) -> void: _dispose_attempt(attempt.owner_peer_id) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_target_outcome(data: Dictionary) -> void: _apply_target_outcome(data) @@ -934,7 +1078,7 @@ func _apply_target_outcome(data: Dictionary) -> void: ) ) _local_inventory.add_catch(fish_catch) - _local_collection.mark_quality_discovered( + _local_collection.record_catch( fish_id, fish_catch.quality, ) @@ -970,7 +1114,12 @@ func _acknowledge_result(result_id: String, catch_id: StringName) -> void: acknowledge_fishing_result.rpc_id(1, result_id, str(catch_id)) -@rpc("any_peer", "call_remote", "reliable", 0) +@rpc( + "any_peer", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func acknowledge_fishing_result(result_id: String, catch_id: String) -> void: var sender_id: int = multiplayer.get_remote_sender_id() if ( @@ -1027,7 +1176,12 @@ func _broadcast_public_outcome( receive_public_outcome.rpc(data) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_public_outcome(data: Dictionary) -> void: _apply_public_outcome(data) @@ -1079,7 +1233,12 @@ func _broadcast_cast_accepted(data: Dictionary) -> void: receive_cast_accepted.rpc(data) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_cast_accepted(data: Dictionary) -> void: _apply_cast_accepted(data) @@ -1114,10 +1273,19 @@ func _apply_cast_accepted(data: Dictionary) -> void: else: var presentation := _get_remote_presentation(peer_id) if presentation != null: - presentation.show_cast(origin, target) + presentation.show_cast( + origin, + target, + str(data["attempt_id"]), + ) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_bite_pending(data: Dictionary) -> void: _apply_bite_pending(data) @@ -1132,7 +1300,12 @@ func _apply_bite_pending(data: Dictionary) -> void: local_bite_pending.emit(str(data["attempt_id"])) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_bite_started(data: Dictionary) -> void: _apply_bite_started(data) @@ -1193,7 +1366,12 @@ func _send_cast_rejected( receive_cast_rejected.rpc_id(peer_id, request_id, message.left(128)) -@rpc("authority", "call_remote", "reliable", 0) +@rpc( + "authority", + "call_remote", + "reliable", + NetworkFishingProtocol.RELIABLE_CHANNEL, +) func receive_cast_rejected(request_id: String, message: String) -> void: _pending_local_bait_by_request.erase(request_id) local_cast_rejected.emit(message) @@ -1228,6 +1406,8 @@ func _resend_request_response(peer_id: int, response: Dictionary) -> void: func _get_remote_presentation( peer_id: int, ) -> RemoteFishingPresentation: + if not _presentation_enabled: + return null var existing: RemoteFishingPresentation = _remote_presentations.get(peer_id) if existing != null and is_instance_valid(existing): return existing @@ -1330,9 +1510,21 @@ func _clear_all() -> void: _last_input_time.clear() _pending_local_bait_by_request.clear() _snapshot_accumulator = 0.0 + _observer_snapshot_accumulator = 0.0 _local_input_sequence = 0 +func get_network_metrics() -> Dictionary: + return { + "active_attempts": _attempts.size(), + "remote_presentations": _remote_presentations.size(), + "owner_snapshot_packets_sent": _owner_snapshot_packets_sent, + "owner_snapshot_states_sent": _owner_snapshot_states_sent, + "observer_snapshot_packets_sent": _observer_snapshot_packets_sent, + "observer_snapshot_states_sent": _observer_snapshot_states_sent, + } + + func _bound_result_ledger() -> void: while _result_ledgers.size() > MAX_LEDGER_ENTRIES_PER_PEER: _result_ledgers.erase(_result_ledgers.keys().front()) diff --git a/network/network_home_protocol.gd b/network/network_home_protocol.gd new file mode 100644 index 0000000..96756e9 --- /dev/null +++ b/network/network_home_protocol.gd @@ -0,0 +1,188 @@ +class_name NetworkHomeProtocol +extends RefCounted + +const PlayerHomeStateType = preload("res://homes/player_home_state.gd") + +const CAPABILITY: StringName = &"portable_home_v1" +const RELIABLE_CHANNEL: int = NetworkProtocol.HOME_RELIABLE_CHANNEL +const MAX_ID_LENGTH: int = 96 +const MAX_MESSAGE_LENGTH: int = 160 +const MAX_TRANSITION_COORDINATE: float = 10000.0 +const WORLD_SPACE: StringName = &"world" + +enum TransitionAction { + ENTER, + EXIT, +} + + +static func make_space_id(owner_fingerprint: String) -> StringName: + return StringName("rv:%s" % owner_fingerprint) + + +static func manifest_digest(home_data: Dictionary) -> String: + var sanitized: Dictionary = PlayerHomeStateType.sanitize_save_data(home_data) + if sanitized.is_empty(): + return "" + var canonical_owned: Array[Dictionary] = [] + var owned: Dictionary = sanitized["owned_decor"] + var owned_ids: Array[String] = [] + for value: Variant in owned.keys(): + owned_ids.append(str(value)) + owned_ids.sort() + for decor_id: String in owned_ids: + canonical_owned.append({ + "id": decor_id, + "quantity": int(owned[decor_id]), + }) + var placements: Array[Dictionary] = [] + for value: Variant in sanitized["placements"]: + placements.append((value as Dictionary).duplicate(true)) + placements.sort_custom(func(first: Dictionary, second: Dictionary) -> bool: + return str(first["instance_id"]) < str(second["instance_id"]) + ) + var canonical: Dictionary = { + "schema_version": int(sanitized["schema_version"]), + "tier": int(sanitized["tier"]), + "exterior_id": str(sanitized["exterior_id"]), + "privacy": int(sanitized["privacy"]), + "owned": canonical_owned, + "placements": placements, + "revision": int(sanitized["revision"]), + "next_instance_sequence": int(sanitized["next_instance_sequence"]), + } + return JSON.stringify(canonical).sha256_text() + + +static func manifest_signature_fields(data: Dictionary) -> Array: + return [ + str(data.get("session_id", "")), + str(data.get("request_id", "")), + str(data.get("owner_fingerprint", "")), + int((data.get("home", {}) as Dictionary).get("revision", -1)), + str(data.get("digest", "")), + ] + + +static func validate_manifest_request(value: Variant) -> bool: + if typeof(value) != TYPE_DICTIONARY: + return false + var data: Dictionary = value + if ( + not _valid_id(data.get("request_id")) + or not _valid_id(data.get("session_id")) + or not NetworkIdentityCrypto.valid_fingerprint( + data.get("owner_fingerprint") + ) + or typeof(data.get("home")) != TYPE_DICTIONARY + or typeof(data.get("digest")) != TYPE_STRING + or str(data["digest"]).length() != 64 + or typeof(data.get("sender_signature")) != TYPE_PACKED_BYTE_ARRAY + ): + return false + var sanitized: Dictionary = PlayerHomeStateType.sanitize_save_data( + data["home"] + ) + return ( + not sanitized.is_empty() + and manifest_digest(sanitized) == str(data["digest"]) + ) + + +static func validate_manifest_broadcast(value: Variant) -> bool: + if typeof(value) != TYPE_DICTIONARY: + return false + var data: Dictionary = value + return ( + typeof(data.get("owner_peer_id")) == TYPE_INT + and int(data["owner_peer_id"]) > 0 + and NetworkIdentityCrypto.valid_fingerprint( + data.get("owner_fingerprint") + ) + and typeof(data.get("home")) == TYPE_DICTIONARY + and not PlayerHomeStateType.sanitize_save_data(data["home"]).is_empty() + and _valid_transform(data.get("exterior_transform")) + and typeof(data.get("interior_index")) == TYPE_INT + and int(data["interior_index"]) >= 0 + and int(data["interior_index"]) < 128 + ) + + +static func transition_signature_fields(data: Dictionary) -> Array: + return [ + str(data.get("session_id", "")), + str(data.get("request_id", "")), + int(data.get("action", -1)), + str(data.get("owner_fingerprint", "")), + ] + + +static func validate_transition_request(value: Variant) -> bool: + if typeof(value) != TYPE_DICTIONARY: + return false + var data: Dictionary = value + return ( + _valid_id(data.get("request_id")) + and _valid_id(data.get("session_id")) + and typeof(data.get("action")) == TYPE_INT + and int(data["action"]) >= TransitionAction.ENTER + and int(data["action"]) <= TransitionAction.EXIT + and NetworkIdentityCrypto.valid_fingerprint( + data.get("owner_fingerprint") + ) + and typeof(data.get("sender_signature")) == TYPE_PACKED_BYTE_ARRAY + ) + + +static func transform_to_array(value: Transform3D) -> Array[float]: + return [ + value.basis.x.x, value.basis.x.y, value.basis.x.z, + value.basis.y.x, value.basis.y.y, value.basis.y.z, + value.basis.z.x, value.basis.z.y, value.basis.z.z, + value.origin.x, value.origin.y, value.origin.z, + ] + + +static func array_to_transform(value: Variant) -> Transform3D: + if not validate_transition_transform(value): + return Transform3D() + var fields: Array = value + return Transform3D( + Basis( + Vector3(float(fields[0]), float(fields[1]), float(fields[2])), + Vector3(float(fields[3]), float(fields[4]), float(fields[5])), + Vector3(float(fields[6]), float(fields[7]), float(fields[8])), + ), + Vector3(float(fields[9]), float(fields[10]), float(fields[11])), + ) + + +static func validate_transition_transform(value: Variant) -> bool: + if not _valid_transform(value): + return false + var fields: Array = value + return ( + absf(float(fields[9])) <= MAX_TRANSITION_COORDINATE + and absf(float(fields[10])) <= MAX_TRANSITION_COORDINATE + and absf(float(fields[11])) <= MAX_TRANSITION_COORDINATE + ) + + +static func _valid_transform(value: Variant) -> bool: + if typeof(value) != TYPE_ARRAY or (value as Array).size() != 12: + return false + for component: Variant in value: + if ( + typeof(component) not in [TYPE_FLOAT, TYPE_INT] + or not is_finite(float(component)) + ): + return false + return true + + +static func _valid_id(value: Variant) -> bool: + return ( + typeof(value) == TYPE_STRING + and not str(value).is_empty() + and str(value).length() <= MAX_ID_LENGTH + ) diff --git a/network/network_home_protocol.gd.uid b/network/network_home_protocol.gd.uid new file mode 100644 index 0000000..24b6aae --- /dev/null +++ b/network/network_home_protocol.gd.uid @@ -0,0 +1 @@ +uid://fl3qwiluejhm diff --git a/network/network_home_service.gd b/network/network_home_service.gd new file mode 100644 index 0000000..4885961 --- /dev/null +++ b/network/network_home_service.gd @@ -0,0 +1,1450 @@ +class_name NetworkHomeService +extends Node + +const NetworkHomeProtocolType = preload( + "res://network/network_home_protocol.gd" +) +const PlayerHomeStateType = preload("res://homes/player_home_state.gd") +const DecorCatalogType = preload("res://homes/decor_catalog.gd") +const OwnedItemType = preload("res://items/owned_item.gd") + +signal local_transition_finished(accepted: bool, message: String) +signal local_space_changed(space_id: StringName, owner_fingerprint: String) +signal local_manifest_rejected(message: String) + +const MAX_MANIFESTS: int = 128 +const MAX_PENDING_LOCAL_DECOR_TRANSACTIONS: int = 16 + +var _session: NetworkSession +var _spawn_service: PlayerSpawnService +var _local_home: PlayerHomeStateType +var _save_manager: PlayerSaveManager +var _world_service: HomeWorldService +var _bag: PlayerBag +var _inventory_layout: PlayerInventoryLayout +var _hotbar: PlayerHotbar +var _manifests_by_fingerprint: Dictionary[String, Dictionary] = {} +var _fingerprint_by_peer: Dictionary[int, String] = {} +var _authorized_owned_counts: Dictionary[int, Dictionary] = {} +var _authorization_result_owner: Dictionary[String, int] = {} +var _authorized_home_tiers: Dictionary[int, int] = {} +var _home_upgrade_result_owner: Dictionary[String, int] = {} +var _interior_slots_by_space: Dictionary[StringName, Dictionary] = {} +var _next_interior_index: int = 0 +var _suppress_local_submission: bool = false +var _publish_queued: bool = false +var _last_submitted_local_home_revision: int = -1 +var _pending_local_decor_transactions: Dictionary[int, Dictionary] = {} + + +func setup( + session: NetworkSession, + spawn_service: PlayerSpawnService, + local_home: PlayerHomeStateType, + save_manager: PlayerSaveManager, + world_service: HomeWorldService, + bag: PlayerBag, + inventory_layout: PlayerInventoryLayout, + hotbar: PlayerHotbar, +) -> void: + _session = session + _spawn_service = spawn_service + _local_home = local_home + _save_manager = save_manager + _world_service = world_service + _bag = bag + _inventory_layout = inventory_layout + _hotbar = hotbar + if not _session.state_changed.is_connected(_on_session_state_changed): + _session.state_changed.connect(_on_session_state_changed) + if not _session.join_authenticated.is_connected(_on_join_authenticated): + _session.join_authenticated.connect(_on_join_authenticated) + if not _session.peer_authenticated.is_connected(_on_peer_authenticated): + _session.peer_authenticated.connect(_on_peer_authenticated) + if not _session.peer_removed.is_connected(_on_peer_removed): + _session.peer_removed.connect(_on_peer_removed) + if not _local_home.changed.is_connected(_on_local_home_changed): + _local_home.changed.connect(_on_local_home_changed) + + +func get_local_space() -> StringName: + if _session == null or not _session.is_gameplay_session_active(): + return NetworkHomeProtocolType.WORLD_SPACE + return _session.get_peer_space(_session.get_local_peer_id()) + + +func get_local_home_owner_fingerprint() -> String: + var space_id: String = String(get_local_space()) + return space_id.trim_prefix("rv:") if space_id.begins_with("rv:") else "" + + +func can_local_decorate() -> bool: + return ( + get_local_home_owner_fingerprint() + == _session.get_local_identity_fingerprint() + ) + + +func has_pending_local_decor_mutation() -> bool: + return not _pending_local_decor_transactions.is_empty() + + +func get_authoritative_owned_count( + peer_id: int, + decor_id: StringName, +) -> int: + var authorized: Dictionary = _authorized_owned_counts.get(peer_id, {}) + if authorized.has(String(decor_id)): + return int(authorized[String(decor_id)]) + var fingerprint: String = _fingerprint_for_peer(peer_id) + var manifest: Dictionary = _manifests_by_fingerprint.get(fingerprint, {}) + if manifest.is_empty(): + return -1 + var home: Dictionary = manifest.get("home", {}) + var owned: Dictionary = home.get("owned_decor", {}) + return int(owned.get(String(decor_id), 0)) + + +func get_authoritative_home_tier(peer_id: int) -> int: + if _authorized_home_tiers.has(peer_id): + return int(_authorized_home_tiers[peer_id]) + var fingerprint: String = _fingerprint_for_peer(peer_id) + var manifest: Dictionary = _manifests_by_fingerprint.get(fingerprint, {}) + if manifest.is_empty(): + return -1 + var home: Dictionary = manifest.get("home", {}) + return int(home.get("tier", -1)) + + +func place_local_decor( + decor_id: StringName, + position: Vector3, + yaw_radians: float, + mode: PlayerHomeStateType.PlacementMode, +) -> String: + if ( + not can_local_decorate() + or has_pending_local_decor_mutation() + or _bag == null + or _bag.get_quantity(decor_id) <= 0 + or _world_service == null + ): + return "" + var owner_fingerprint: String = ( + _session.get_local_identity_fingerprint() + ) + var normalized: Dictionary = ( + _local_home.get_nearest_valid_placement_transform( + decor_id, + position, + yaw_radians, + mode, + "", + Callable( + self, "_candidate_clear_of_players" + ).bind(owner_fingerprint, decor_id), + ) + ) + if normalized.is_empty(): + return "" + var transaction: Dictionary = _capture_local_decor_transaction() + if transaction.is_empty(): + return "" + _suppress_local_submission = true + var instance_id: String = _local_home.place_decor( + decor_id, + normalized["position"], + float(normalized["yaw"]), + mode, + ) + if instance_id.is_empty(): + _suppress_local_submission = false + return "" + if not _bag.remove_item(decor_id, 1): + _local_home.remove_placement(instance_id) + _suppress_local_submission = false + return "" + _suppress_local_submission = false + if not _commit_local_decor_transaction(transaction): + return "" + return instance_id + + +func remove_local_decor(instance_id: String) -> bool: + if ( + not can_local_decorate() + or has_pending_local_decor_mutation() + or _bag == null + or _inventory_layout == null + or _hotbar == null + ): + return false + var placement: Dictionary = _local_home.get_placement(instance_id) + if placement.is_empty(): + return false + var transaction: Dictionary = _capture_local_decor_transaction() + if transaction.is_empty(): + return false + var decor_id := StringName(str(placement["decor_id"])) + var target_hotbar_slot: int = _hotbar.find_item_slot(decor_id) + if target_hotbar_slot < 0: + target_hotbar_slot = _hotbar.find_first_empty_slot() + var prepared_hotbar_placement: bool = false + if ( + target_hotbar_slot >= 0 + and _inventory_layout.get_container( + PlayerInventoryLayout.EntryKind.ITEM, + decor_id, + ) < 0 + ): + prepared_hotbar_placement = ( + _inventory_layout.prepare_new_item_placement( + decor_id, + PlayerInventoryLayout.InventoryContainer.HOTBAR, + target_hotbar_slot, + ) + ) + var returned_to_inventory: bool = _bag.add_item(decor_id, 1) + if not returned_to_inventory: + if prepared_hotbar_placement: + _inventory_layout.cancel_prepared_item_placement(decor_id) + returned_to_inventory = _bag.add_item_to_storage(decor_id, 1) + if not returned_to_inventory: + if prepared_hotbar_placement: + _inventory_layout.cancel_prepared_item_placement(decor_id) + return false + if target_hotbar_slot >= 0: + _hotbar.assign_item(target_hotbar_slot, decor_id) + _hotbar.select_slot(target_hotbar_slot) + _suppress_local_submission = true + if not _local_home.remove_placement(instance_id): + _suppress_local_submission = false + _restore_local_decor_transaction(transaction) + return false + _suppress_local_submission = false + if not _commit_local_decor_transaction(transaction): + return false + return true + + +func update_local_decor( + instance_id: String, + position: Vector3, + yaw_radians: float, + mode: PlayerHomeStateType.PlacementMode, +) -> bool: + if has_pending_local_decor_mutation(): + return false + var normalized: Dictionary = get_valid_local_decor_transform( + instance_id, position, yaw_radians, mode + ) + if normalized.is_empty(): + return false + var transaction: Dictionary = _capture_local_decor_transaction() + if transaction.is_empty(): + return false + _suppress_local_submission = true + if not _local_home.update_placement( + instance_id, + normalized["position"], + float(normalized["yaw"]), + mode, + ): + _suppress_local_submission = false + return false + _suppress_local_submission = false + if not _commit_local_decor_transaction(transaction): + return false + return true + + +func get_valid_local_decor_transform( + instance_id: String, + position: Vector3, + yaw_radians: float, + mode: PlayerHomeStateType.PlacementMode, +) -> Dictionary: + if not can_local_decorate() or _world_service == null: + return {} + var placement: Dictionary = _local_home.get_placement(instance_id) + if placement.is_empty(): + return {} + var decor_id := StringName(str(placement.get("decor_id", ""))) + return _local_home.get_valid_update_transform( + instance_id, + position, + yaw_radians, + mode, + Callable( + self, "_candidate_clear_of_players" + ).bind( + _session.get_local_identity_fingerprint(), decor_id + ), + ) + + +func _candidate_clear_of_players( + candidate: Dictionary, + owner_fingerprint: String, + decor_id: StringName, +) -> bool: + return ( + _world_service != null + and _world_service.is_decor_placement_clear_of_players( + owner_fingerprint, + decor_id, + candidate["position"], + float(candidate["yaw"]), + ) + ) + + +func request_enter(owner_fingerprint: String) -> bool: + if ( + _session == null + or not _session.is_gameplay_session_active() + or not _manifests_by_fingerprint.has(owner_fingerprint) + or get_local_space() != NetworkHomeProtocolType.WORLD_SPACE + ): + return false + return _submit_transition( + NetworkHomeProtocolType.TransitionAction.ENTER, + owner_fingerprint, + ) + + +func request_exit() -> bool: + var owner_fingerprint: String = get_local_home_owner_fingerprint() + if owner_fingerprint.is_empty(): + return false + return _submit_transition( + NetworkHomeProtocolType.TransitionAction.EXIT, + owner_fingerprint, + ) + + +func authorize_decor_purchase( + peer_id: int, + product_id: StringName, + resulting_count: int, + result_id: String, +) -> void: + if not _session.is_host() or peer_id <= 0 or result_id.is_empty(): + return + var counts: Dictionary = _authorized_owned_counts.get(peer_id, {}) + counts[String(product_id)] = resulting_count + _authorized_owned_counts[peer_id] = counts + _authorization_result_owner[result_id] = peer_id + + +func finalize_decor_purchase( + peer_id: int, + result_id: String, + applied: bool, +) -> void: + if _authorization_result_owner.get(result_id, 0) != peer_id: + return + _authorization_result_owner.erase(result_id) + if applied: + return + _authorized_owned_counts.erase(peer_id) + + +func authorize_home_upgrade( + peer_id: int, + resulting_tier: int, + result_id: String, +) -> void: + if ( + not _session.is_host() + or peer_id <= 0 + or result_id.is_empty() + or resulting_tier < PlayerHomeStateType.STARTER_TIER + or resulting_tier > PlayerHomeStateType.MAX_TIER + ): + return + _authorized_home_tiers[peer_id] = resulting_tier + _home_upgrade_result_owner[result_id] = peer_id + + +func finalize_home_upgrade( + peer_id: int, + result_id: String, + applied: bool, +) -> void: + if _home_upgrade_result_owner.get(result_id, 0) != peer_id: + return + _home_upgrade_result_owner.erase(result_id) + if not applied: + _authorized_home_tiers.erase(peer_id) + + +func refresh_world_presentations() -> void: + if _world_service == null: + return + _world_service.clear_presentations() + if not _world_service.is_world_ready(): + return + if not _session.is_host(): + for manifest: Dictionary in _manifests_by_fingerprint.values(): + _world_service.apply_manifest(manifest) + return + var local_fingerprint: String = _session.get_local_identity_fingerprint() + if ( + not _session.is_dedicated_host() + and not _manifests_by_fingerprint.has(local_fingerprint) + ): + publish_local_home() + var fingerprints: Array[String] = [] + fingerprints.assign(_manifests_by_fingerprint.keys()) + fingerprints.sort() + var reserved: Array[Transform3D] = [] + for fingerprint: String in fingerprints: + var manifest: Dictionary = _manifests_by_fingerprint[fingerprint] + var transform: Transform3D = _world_service.choose_exterior_transform( + int(manifest["owner_peer_id"]), reserved + ) + reserved.append(transform) + manifest["exterior_transform"] = ( + NetworkHomeProtocolType.transform_to_array(transform) + ) + _manifests_by_fingerprint[fingerprint] = manifest + _broadcast_manifest(manifest) + for fingerprint: String in fingerprints: + var manifest: Dictionary = _manifests_by_fingerprint[fingerprint] + _spawn_peer_at_exterior( + int(manifest["owner_peer_id"]), fingerprint + ) + + +func publish_local_home( + allow_pending_decor_transaction: bool = false, +) -> bool: + if ( + _session == null + or not _session.is_gameplay_session_active() + or _session.is_dedicated_host() + or _local_home == null + ): + return false + # A purchase can update the owned decor count while an optimistic placement + # is waiting on the host. Hold that follow-up manifest until the placement is + # accepted or rolled back; otherwise it can carry the still-unverified + # placement and turn one rejection into a second stale rejection. + if ( + not allow_pending_decor_transaction + and has_pending_local_decor_mutation() + ): + _publish_queued = true + return true + if _session.is_host() and ( + _world_service == null or not _world_service.is_world_ready() + ): + return false + var home_data: Dictionary = _local_home.to_save_data() + var revision: int = int(home_data.get("revision", -1)) + if revision >= 0 and revision == _last_submitted_local_home_revision: + return true + var request: Dictionary = { + "request_id": _new_id("home"), + "session_id": _session.get_session_id(), + "owner_fingerprint": _session.get_local_identity_fingerprint(), + "home": home_data, + "digest": NetworkHomeProtocolType.manifest_digest(home_data), + } + request["sender_signature"] = _session.sign_local_action( + "portable_home_manifest", + NetworkHomeProtocolType.manifest_signature_fields(request), + ) + _last_submitted_local_home_revision = revision + if _session.is_host(): + _process_manifest_request(_session.get_local_peer_id(), request) + else: + submit_home_manifest.rpc_id(1, request) + return true + + +@rpc( + "any_peer", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func submit_home_manifest(data: Dictionary) -> void: + var sender_id: int = multiplayer.get_remote_sender_id() + if ( + _session == null + or not _session.is_host() + or not _session.is_authenticated_peer(sender_id) + ): + return + _process_manifest_request(sender_id, data) + + +func _process_manifest_request(peer_id: int, data: Dictionary) -> void: + if ( + not NetworkHomeProtocolType.validate_manifest_request(data) + or str(data["session_id"]) != _session.get_session_id() + ): + _reject_manifest(peer_id, "The home update was invalid.") + return + var record := _session.get_peer_record(peer_id) + var fingerprint: String = str(data["owner_fingerprint"]) + if ( + record == null + or record.identity_fingerprint != fingerprint + or not _session.verify_peer_action( + peer_id, + "portable_home_manifest", + NetworkHomeProtocolType.manifest_signature_fields(data), + data["sender_signature"], + ) + ): + _reject_manifest(peer_id, "The home owner could not be verified.") + return + var home_data: Dictionary = PlayerHomeStateType.sanitize_save_data( + data["home"] + ) + var prior: Dictionary = _manifests_by_fingerprint.get(fingerprint, {}) + var is_first_manifest: bool = prior.is_empty() + if not _valid_manifest_revision(peer_id, prior, home_data): + _reject_manifest(peer_id, "The home update was rejected by the host.") + return + if not _moved_decor_clear_of_players(fingerprint, prior, home_data): + _reject_manifest(peer_id, "A player is in the way of that decor.") + return + var manifest: Dictionary + if prior.is_empty(): + if _manifests_by_fingerprint.size() >= MAX_MANIFESTS: + _reject_manifest(peer_id, "This room cannot place another home.") + return + var reserved: Array[Transform3D] = [] + for existing: Dictionary in _manifests_by_fingerprint.values(): + reserved.append(NetworkHomeProtocolType.array_to_transform( + existing["exterior_transform"] + )) + var exterior_transform: Transform3D = ( + _world_service.choose_exterior_transform(peer_id, reserved) + ) + manifest = { + "owner_peer_id": peer_id, + "owner_fingerprint": fingerprint, + "home": home_data, + "exterior_transform": ( + NetworkHomeProtocolType.transform_to_array(exterior_transform) + ), + "interior_index": _next_interior_index, + } + _next_interior_index += 1 + else: + manifest = prior.duplicate(true) + manifest["home"] = home_data + manifest["owner_peer_id"] = peer_id + _manifests_by_fingerprint[fingerprint] = manifest + _fingerprint_by_peer[peer_id] = fingerprint + _consume_owned_authorizations(peer_id, home_data) + if peer_id == _session.get_local_peer_id(): + _discard_local_decor_transactions_through( + int(home_data.get("revision", -1)) + ) + if _last_submitted_local_home_revision == int( + home_data.get("revision", -1) + ): + _last_submitted_local_home_revision = -1 + _flush_queued_local_home_publish() + _broadcast_manifest(manifest) + if is_first_manifest: + _spawn_peer_at_exterior(peer_id, fingerprint) + + +func _valid_manifest_revision( + peer_id: int, + prior_manifest: Dictionary, + home_data: Dictionary, +) -> bool: + if prior_manifest.is_empty(): + # A portable RV is owned by the player's signed local save. A new host has + # no prior room ledger with which to compare its first manifest. + return true + var prior_home: Dictionary = prior_manifest["home"] + var prior_tier: int = int(prior_home["tier"]) + var next_tier: int = int(home_data["tier"]) + var tier_is_authorized: bool = ( + next_tier != prior_tier + and int(_authorized_home_tiers.get(peer_id, -1)) == next_tier + ) + if ( + int(home_data["revision"]) <= int(prior_home["revision"]) + or (next_tier != prior_tier and not tier_is_authorized) + or str(home_data["exterior_id"]) + != str(PlayerHomeStateType.exterior_id_for_tier(next_tier)) + ): + return false + var prior_owned: Dictionary = prior_home["owned_decor"] + var next_owned: Dictionary = home_data["owned_decor"] + var all_ids: Dictionary[String, bool] = {} + for value: Variant in prior_owned.keys(): + all_ids[str(value)] = true + for value: Variant in next_owned.keys(): + all_ids[str(value)] = true + var authorized: Dictionary = _authorized_owned_counts.get(peer_id, {}) + for product_id: String in all_ids: + var prior_count: int = int(prior_owned.get(product_id, 0)) + var next_count: int = int(next_owned.get(product_id, 0)) + if prior_count == next_count: + continue + if next_count < prior_count or int(authorized.get(product_id, -1)) != next_count: + return false + return true + + +func _moved_decor_clear_of_players( + owner_fingerprint: String, + prior_manifest: Dictionary, + home_data: Dictionary, +) -> bool: + if _world_service == null: + return false + var prior_by_instance: Dictionary[String, Dictionary] = {} + if not prior_manifest.is_empty(): + var prior_home: Dictionary = prior_manifest.get("home", {}) + for value: Variant in prior_home.get("placements", []): + if typeof(value) != TYPE_DICTIONARY: + continue + var prior_placement: Dictionary = value + prior_by_instance[str( + prior_placement.get("instance_id", "") + )] = prior_placement + for value: Variant in home_data.get("placements", []): + if typeof(value) != TYPE_DICTIONARY: + return false + var placement: Dictionary = value + var instance_id: String = str(placement.get("instance_id", "")) + var prior_placement: Dictionary = prior_by_instance.get( + instance_id, {} + ) + if ( + not prior_placement.is_empty() + and _same_decor_transform(prior_placement, placement) + ): + continue + var decor_id := StringName(str(placement.get("decor_id", ""))) + var position: Vector3 = _placement_position(placement) + if ( + not position.is_finite() + or not _world_service.is_decor_placement_clear_of_players( + owner_fingerprint, + decor_id, + position, + float(placement.get("yaw", 0.0)), + ) + ): + return false + return true + + +static func _same_decor_transform( + first: Dictionary, + second: Dictionary, +) -> bool: + if str(first.get("decor_id", "")) != str(second.get("decor_id", "")): + return false + var first_position: Vector3 = _placement_position(first) + var second_position: Vector3 = _placement_position(second) + return ( + first_position.is_equal_approx(second_position) + and is_equal_approx( + float(first.get("yaw", 0.0)), + float(second.get("yaw", 0.0)), + ) + ) + + +static func _placement_position(placement: Dictionary) -> Vector3: + var values: Array = placement.get("position", []) + if values.size() != 3: + return Vector3.INF + return Vector3( + float(values[0]), float(values[1]), float(values[2]) + ) + + +func _consume_owned_authorizations(peer_id: int, home_data: Dictionary) -> void: + if ( + _authorized_home_tiers.has(peer_id) + and int(home_data["tier"]) == int(_authorized_home_tiers[peer_id]) + ): + _authorized_home_tiers.erase(peer_id) + var authorized: Dictionary = _authorized_owned_counts.get(peer_id, {}) + if authorized.is_empty(): + return + var owned: Dictionary = home_data["owned_decor"] + for product_id: String in authorized.keys(): + if int(owned.get(product_id, -1)) == int(authorized[product_id]): + authorized.erase(product_id) + if authorized.is_empty(): + _authorized_owned_counts.erase(peer_id) + else: + _authorized_owned_counts[peer_id] = authorized + + +func _broadcast_manifest(manifest: Dictionary) -> void: + if _world_service != null and _world_service.is_world_ready(): + _world_service.apply_manifest(manifest) + for peer_id: int in _session.get_authenticated_peer_ids(): + if peer_id == 1: + continue + receive_home_manifest.rpc_id(peer_id, manifest) + + +@rpc( + "authority", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func receive_home_manifest(data: Dictionary) -> void: + if not NetworkHomeProtocolType.validate_manifest_broadcast(data): + return + var fingerprint: String = str(data["owner_fingerprint"]) + _manifests_by_fingerprint[fingerprint] = data.duplicate(true) + _fingerprint_by_peer[int(data["owner_peer_id"])] = fingerprint + if fingerprint == _session.get_local_identity_fingerprint(): + var home: Dictionary = data.get("home", {}) + _discard_local_decor_transactions_through( + int(home.get("revision", -1)) + ) + if _last_submitted_local_home_revision == int( + home.get("revision", -1) + ): + _last_submitted_local_home_revision = -1 + _flush_queued_local_home_publish() + if _world_service != null and _world_service.is_world_ready(): + _world_service.apply_manifest(data) + + +func _reject_manifest(peer_id: int, message: String) -> void: + var fingerprint: String = _fingerprint_for_peer(peer_id) + var canonical: Dictionary = _manifests_by_fingerprint.get(fingerprint, {}) + if peer_id == _session.get_local_peer_id(): + _apply_manifest_rejection(message, canonical) + else: + receive_home_manifest_rejection.rpc_id(peer_id, message, canonical) + + +@rpc( + "authority", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func receive_home_manifest_rejection( + message: String, + canonical: Dictionary, +) -> void: + _apply_manifest_rejection(message, canonical) + + +func _apply_manifest_rejection(message: String, canonical: Dictionary) -> void: + _last_submitted_local_home_revision = -1 + var canonical_home: Dictionary = canonical.get("home", {}) + var canonical_revision: int = int(canonical_home.get("revision", -1)) + var transaction: Dictionary = _get_local_decor_rejection_transaction( + canonical_revision + ) + if canonical.is_empty() or not NetworkHomeProtocolType.validate_manifest_broadcast(canonical): + if not transaction.is_empty(): + _restore_local_decor_transaction(transaction) + _pending_local_decor_transactions.clear() + if _save_manager != null and not _save_manager.save_if_dirty(): + push_warning("Unable to save the restored RV decor state.") + _flush_queued_local_home_publish() + local_manifest_rejected.emit(message) + return + # A shop result can be accepted locally while its own home manifest is still + # in flight. A delayed rejection for an earlier placement must not erase that + # accepted purchase just because the host's canonical manifest predates it. + var locally_owned_decor: Dictionary[StringName, int] = ( + _capture_local_owned_decor_counts() + ) + # Only carry ownership forward across an actual pending decor-action + # rejection. A standalone rejected manifest must remain authoritative rather + # than repeatedly re-submitting an unverified owned-count increase. + var has_owned_decor_increase: bool = ( + not transaction.is_empty() + and _has_local_owned_decor_increase( + locally_owned_decor, + canonical_home, + ) + ) + _suppress_local_submission = true + var restored: bool = _local_home.restore_from_save_data(canonical_home) + var owned_decor_restored: bool = ( + restored + and ( + not has_owned_decor_increase + or _restore_local_owned_decor_increases(locally_owned_decor) + ) + ) + var reconciled: bool = ( + restored + and owned_decor_restored + and _reconcile_local_decor_inventory(transaction) + ) + _suppress_local_submission = false + _discard_local_decor_transactions_after(canonical_revision) + if not reconciled: + push_error("Unable to reconcile RV decor after a host rejection.") + elif _save_manager != null and not _save_manager.save_if_dirty(): + push_warning("Unable to save the restored RV decor state.") + receive_home_manifest(canonical) + if reconciled and has_owned_decor_increase: + # Submit the preserved purchase as a fresh revision after applying the + # canonical placement rollback. This is deliberately separate from the + # rejected action, so the host can validate the already-authorized count. + if not publish_local_home(): + push_warning("Unable to publish the restored RV decor ownership.") + local_manifest_rejected.emit(message) + + +func _capture_local_decor_transaction() -> Dictionary: + if ( + _local_home == null + or _bag == null + or _inventory_layout == null + or _hotbar == null + ): + return {} + var saved_items: Array[OwnedItemType] = [] + for item: OwnedItemType in _bag.get_all_items(): + saved_items.append(item.duplicate_record()) + return { + "home": _local_home.to_save_data(), + "bag_items": saved_items, + "layout": _inventory_layout.to_save_data(), + "hotbar_slots": _hotbar.get_slots(), + "hotbar_fish_slots": _hotbar.get_fish_slots(), + "selected_hotbar_slot": _hotbar.get_selected_slot(), + } + + +func _capture_local_owned_decor_counts() -> Dictionary[StringName, int]: + var counts: Dictionary[StringName, int] = {} + if _local_home == null: + return counts + for decor_id: StringName in DecorCatalogType.get_product_ids(): + counts[decor_id] = _local_home.get_owned_count(decor_id) + return counts + + +func _has_local_owned_decor_increase( + local_counts: Dictionary[StringName, int], + canonical_home: Dictionary, +) -> bool: + var canonical_owned: Dictionary = canonical_home.get("owned_decor", {}) + for decor_id: StringName in DecorCatalogType.get_product_ids(): + if int(local_counts.get(decor_id, 0)) > int( + canonical_owned.get(String(decor_id), 0) + ): + return true + return false + + +func _restore_local_owned_decor_increases( + local_counts: Dictionary[StringName, int], +) -> bool: + if _local_home == null: + return false + for decor_id: StringName in DecorCatalogType.get_product_ids(): + var local_count: int = int(local_counts.get(decor_id, 0)) + var canonical_count: int = _local_home.get_owned_count(decor_id) + while canonical_count < local_count: + if not _local_home.add_owned_decor(decor_id, 1): + return false + canonical_count += 1 + return true + + +func _commit_local_decor_transaction(transaction: Dictionary) -> bool: + if _save_manager == null or not _save_manager.save_if_dirty(): + _restore_local_decor_transaction(transaction) + return false + var revision: int = _local_home.get_revision() + _pending_local_decor_transactions[revision] = transaction.duplicate(true) + _trim_pending_local_decor_transactions() + if publish_local_home(true): + return true + _pending_local_decor_transactions.erase(revision) + _restore_local_decor_transaction(transaction) + _flush_queued_local_home_publish() + # The optimistic mutation was already written before we attempted to publish + # it. If the session ended or could not accept the manifest, immediately + # persist the restored state so a restart cannot resurrect the rejected + # placement or consume its decor item. + if _save_manager != null and not _save_manager.save_if_dirty(): + push_warning("Unable to save the restored RV decor state.") + return false + + +func _restore_local_decor_transaction(transaction: Dictionary) -> bool: + if ( + transaction.is_empty() + or _local_home == null + or _bag == null + or _inventory_layout == null + or _hotbar == null + ): + return false + var home_data: Variant = transaction.get("home", {}) + var layout_data: Variant = transaction.get("layout", {}) + var stored_items: Variant = transaction.get("bag_items", []) + var stored_slots: Variant = transaction.get("hotbar_slots", []) + var stored_fish_slots: Variant = transaction.get("hotbar_fish_slots", []) + if ( + typeof(home_data) != TYPE_DICTIONARY + or typeof(layout_data) != TYPE_DICTIONARY + or typeof(stored_items) != TYPE_ARRAY + or typeof(stored_slots) != TYPE_ARRAY + or typeof(stored_fish_slots) != TYPE_ARRAY + ): + return false + var items: Array[OwnedItemType] = [] + for value: Variant in stored_items as Array: + if not value is OwnedItemType: + return false + items.append((value as OwnedItemType).duplicate_record()) + var slots: Array[StringName] = [] + for value: Variant in stored_slots as Array: + slots.append(StringName(str(value))) + var fish_slots: Array[StringName] = [] + for value: Variant in stored_fish_slots as Array: + fish_slots.append(StringName(str(value))) + var was_suppressed: bool = _suppress_local_submission + _suppress_local_submission = true + var home_restored: bool = _local_home.restore_from_save_data( + home_data as Dictionary + ) + var bag_restored: bool = _bag.replace_all_items(items) + var layout_restored: bool = _inventory_layout.restore_from_save_data( + layout_data as Dictionary + ) + var hotbar_restored: bool = _hotbar.replace_state( + slots, + int(transaction.get("selected_hotbar_slot", 0)), + fish_slots, + false, + ) + _suppress_local_submission = was_suppressed + return home_restored and bag_restored and layout_restored and hotbar_restored + + +func _reconcile_local_decor_inventory(transaction: Dictionary) -> bool: + if _bag == null or _local_home == null: + return false + var preferred_slots: Dictionary[StringName, int] = ( + _decor_hotbar_slots_from_transaction(transaction) + ) + for decor_id: StringName in DecorCatalogType.get_product_ids(): + var target_quantity: int = _local_home.get_available_count(decor_id) + var current_quantity: int = _bag.get_quantity(decor_id) + if current_quantity > target_quantity: + if not _bag.remove_item( + decor_id, current_quantity - target_quantity + ): + return false + continue + while current_quantity < target_quantity: + var preferred_slot: int = int( + preferred_slots.get(decor_id, -1) + ) + if not _restore_decor_item_to_bag(decor_id, preferred_slot): + return false + current_quantity += 1 + return true + + +func _decor_hotbar_slots_from_transaction( + transaction: Dictionary, +) -> Dictionary[StringName, int]: + var result: Dictionary[StringName, int] = {} + var stored_slots: Variant = transaction.get("hotbar_slots", []) + if typeof(stored_slots) != TYPE_ARRAY: + return result + for slot_index: int in range((stored_slots as Array).size()): + var decor_id := StringName(str((stored_slots as Array)[slot_index])) + if DecorCatalogType.has_product(decor_id): + result[decor_id] = slot_index + return result + + +func _restore_decor_item_to_bag( + decor_id: StringName, + preferred_hotbar_slot: int, +) -> bool: + if _bag == null: + return false + var prepared_slot: int = -1 + if ( + _inventory_layout != null + and _hotbar != null + and _inventory_layout.get_container( + PlayerInventoryLayout.EntryKind.ITEM, decor_id + ) < 0 + ): + var candidate_slot: int = preferred_hotbar_slot + if candidate_slot < 0: + candidate_slot = _hotbar.find_first_empty_slot() + if candidate_slot >= 0 and _inventory_layout.prepare_new_item_placement( + decor_id, + PlayerInventoryLayout.InventoryContainer.HOTBAR, + candidate_slot, + ): + prepared_slot = candidate_slot + var restored: bool = _bag.add_item(decor_id, 1) + if not restored: + if prepared_slot >= 0: + _inventory_layout.cancel_prepared_item_placement(decor_id) + if _bag.get_owned_item(decor_id) == null: + restored = _bag.add_item_to_storage(decor_id, 1) + if restored and prepared_slot >= 0: + _hotbar.assign_item(prepared_slot, decor_id) + _hotbar.select_slot(prepared_slot) + return restored + + +func _get_local_decor_rejection_transaction( + canonical_revision: int, +) -> Dictionary: + var revisions: Array[int] = [] + revisions.assign(_pending_local_decor_transactions.keys()) + revisions.sort() + for revision: int in revisions: + if canonical_revision < 0 or revision > canonical_revision: + return _pending_local_decor_transactions[revision].duplicate(true) + return {} + + +func _discard_local_decor_transactions_through(revision: int) -> void: + for pending_revision: int in _pending_local_decor_transactions.keys(): + if pending_revision <= revision: + _pending_local_decor_transactions.erase(pending_revision) + + +func _discard_local_decor_transactions_after(revision: int) -> void: + for pending_revision: int in _pending_local_decor_transactions.keys(): + if pending_revision > revision: + _pending_local_decor_transactions.erase(pending_revision) + + +func _trim_pending_local_decor_transactions() -> void: + var revisions: Array[int] = [] + revisions.assign(_pending_local_decor_transactions.keys()) + revisions.sort() + while revisions.size() > MAX_PENDING_LOCAL_DECOR_TRANSACTIONS: + _pending_local_decor_transactions.erase(revisions.pop_front()) + + +func _submit_transition(action: int, owner_fingerprint: String) -> bool: + var request: Dictionary = { + "request_id": _new_id("home_transition"), + "session_id": _session.get_session_id(), + "action": action, + "owner_fingerprint": owner_fingerprint, + } + request["sender_signature"] = _session.sign_local_action( + "portable_home_transition", + NetworkHomeProtocolType.transition_signature_fields(request), + ) + if _session.is_host(): + _process_transition_request(_session.get_local_peer_id(), request) + else: + submit_home_transition.rpc_id(1, request) + return true + + +@rpc( + "any_peer", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func submit_home_transition(data: Dictionary) -> void: + var sender_id: int = multiplayer.get_remote_sender_id() + if ( + not _session.is_host() + or not _session.is_authenticated_peer(sender_id) + ): + return + _process_transition_request(sender_id, data) + + +func _process_transition_request(peer_id: int, data: Dictionary) -> void: + if ( + not NetworkHomeProtocolType.validate_transition_request(data) + or str(data["session_id"]) != _session.get_session_id() + or not _session.verify_peer_action( + peer_id, + "portable_home_transition", + NetworkHomeProtocolType.transition_signature_fields(data), + data["sender_signature"], + ) + ): + _send_transition_rejection(peer_id, "The home transition was invalid.") + return + var owner_fingerprint: String = str(data["owner_fingerprint"]) + var action: int = int(data["action"]) + var avatar: Player = _spawn_service.get_avatar(peer_id) + var manifest: Dictionary = _manifests_by_fingerprint.get( + owner_fingerprint, {} + ) + if avatar == null or manifest.is_empty(): + _send_transition_rejection(peer_id, "That home is unavailable.") + return + if action == NetworkHomeProtocolType.TransitionAction.ENTER: + var record := _session.get_peer_record(peer_id) + var owner_is_local: bool = ( + record != null and record.identity_fingerprint == owner_fingerprint + ) + var privacy: int = int((manifest["home"] as Dictionary)["privacy"]) + if ( + (not owner_is_local and privacy != PlayerHomeStateType.Privacy.OPEN) + or _session.get_peer_space(peer_id) + != NetworkHomeProtocolType.WORLD_SPACE + or not _world_service.is_avatar_near_exterior( + avatar, owner_fingerprint + ) + ): + _send_transition_rejection(peer_id, "You cannot enter that home.") + return + var interior_space: StringName = ( + NetworkHomeProtocolType.make_space_id(owner_fingerprint) + ) + var visitor_slot: int = _reserve_interior_slot( + interior_space, peer_id + ) + _apply_host_transition( + peer_id, + interior_space, + owner_fingerprint, + _world_service.get_interior_spawn_transform( + owner_fingerprint, visitor_slot + ), + ) + return + if ( + _session.get_peer_space(peer_id) + != NetworkHomeProtocolType.make_space_id(owner_fingerprint) + or not _world_service.is_avatar_near_interior_exit( + avatar, owner_fingerprint + ) + ): + _send_transition_rejection(peer_id, "Move closer to the home door.") + return + _apply_host_transition( + peer_id, + NetworkHomeProtocolType.WORLD_SPACE, + owner_fingerprint, + _world_service.get_exterior_spawn_transform(owner_fingerprint), + ) + + +func _spawn_peer_at_exterior( + peer_id: int, + owner_fingerprint: String, +) -> void: + if ( + not _session.is_host() + or _session.get_peer_space(peer_id) + != NetworkHomeProtocolType.WORLD_SPACE + or _spawn_service.get_avatar(peer_id) == null + ): + return + _apply_host_transition( + peer_id, + NetworkHomeProtocolType.WORLD_SPACE, + owner_fingerprint, + _world_service.get_exterior_spawn_transform(owner_fingerprint), + ) + + +func _apply_host_transition( + peer_id: int, + space_id: StringName, + owner_fingerprint: String, + transform: Transform3D, +) -> void: + var avatar: Player = _spawn_service.get_avatar(peer_id) + var movement_sequence: int = 0 + if avatar != null: + movement_sequence = int( + avatar.make_network_snapshot(peer_id).get( + "acknowledged_input", 0 + ) + ) + var transform_data: Array[float] = ( + NetworkHomeProtocolType.transform_to_array(transform) + ) + if not NetworkHomeProtocolType.validate_transition_transform( + transform_data + ): + push_error("Refused an out-of-bounds RV transition transform.") + return + var previous_space: StringName = _session.get_peer_space(peer_id) + if ( + String(previous_space).begins_with("rv:") + and previous_space != space_id + ): + _release_interior_slot(previous_space, peer_id) + var result: Dictionary = { + "peer_id": peer_id, + "space_id": String(space_id), + "owner_fingerprint": owner_fingerprint, + "transform": transform_data, + "movement_sequence": movement_sequence, + } + _apply_transition_result(result) + for recipient_id: int in _session.get_authenticated_peer_ids(): + if recipient_id == 1: + continue + receive_home_transition.rpc_id(recipient_id, result) + + +@rpc( + "authority", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func receive_home_transition(data: Dictionary) -> void: + if ( + typeof(data.get("peer_id")) != TYPE_INT + or typeof(data.get("space_id")) not in [TYPE_STRING, TYPE_STRING_NAME] + or typeof(data.get("movement_sequence", 0)) != TYPE_INT + or int(data.get("movement_sequence", 0)) < 0 + or not NetworkIdentityCrypto.valid_fingerprint( + data.get("owner_fingerprint") + ) + or not NetworkHomeProtocolType.validate_transition_transform( + data.get("transform") + ) + ): + return + _apply_transition_result(data) + + +func _apply_transition_result(data: Dictionary) -> void: + var peer_id: int = int(data["peer_id"]) + var space_id := StringName(str(data["space_id"])) + if not NetworkHomeProtocolType.validate_transition_transform( + data.get("transform") + ): + return + var target_transform: Transform3D = ( + NetworkHomeProtocolType.array_to_transform(data["transform"]) + ) + if not _session.set_peer_space(peer_id, space_id): + return + if not _session.apply_authoritative_space_transition( + peer_id, + target_transform, + int(data.get("movement_sequence", 0)), + ): + return + if peer_id == _session.get_local_peer_id(): + _world_service.set_local_space(space_id) + local_space_changed.emit(space_id, str(data["owner_fingerprint"])) + local_transition_finished.emit(true, "") + _refresh_peer_visibility() + + +func _send_transition_rejection(peer_id: int, message: String) -> void: + if peer_id == _session.get_local_peer_id(): + local_transition_finished.emit(false, message) + else: + receive_home_transition_rejection.rpc_id(peer_id, message) + + +@rpc( + "authority", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func receive_home_transition_rejection(message: String) -> void: + local_transition_finished.emit( + false, message.left(NetworkHomeProtocolType.MAX_MESSAGE_LENGTH) + ) + + +func _refresh_peer_visibility() -> void: + var local_peer_id: int = _session.get_local_peer_id() + if local_peer_id <= 0: + return + for peer_id: int in _spawn_service.get_peer_ids(): + if peer_id == local_peer_id: + continue + _spawn_service.set_peer_presentation_visible( + peer_id, _session.peers_share_space(local_peer_id, peer_id) + ) + + +func _on_local_home_changed() -> void: + if _suppress_local_submission or _publish_queued: + return + _publish_queued = true + call_deferred("_publish_queued_home") + + +func _publish_queued_home() -> void: + if has_pending_local_decor_mutation(): + return + _publish_queued = false + if _save_manager != null: + _save_manager.save_if_dirty() + publish_local_home() + + +func _flush_queued_local_home_publish() -> void: + if not _publish_queued or has_pending_local_decor_mutation(): + return + call_deferred("_publish_queued_home") + + +func _on_join_authenticated() -> void: + publish_local_home() + + +func _on_peer_authenticated(peer_id: int, _display_name: String) -> void: + if not _session.is_host(): + return + for manifest: Dictionary in _manifests_by_fingerprint.values(): + receive_home_manifest.rpc_id(peer_id, manifest) + for existing_peer_id: int in _session.get_authenticated_peer_ids(): + if existing_peer_id == peer_id: + continue + var avatar: Player = _spawn_service.get_avatar(existing_peer_id) + if avatar == null: + continue + var space_id: StringName = _session.get_peer_space(existing_peer_id) + var owner_fingerprint: String = ( + String(space_id).trim_prefix("rv:") + if String(space_id).begins_with("rv:") + else _fingerprint_for_peer(existing_peer_id) + ) + if owner_fingerprint.is_empty(): + continue + receive_home_transition.rpc_id(peer_id, { + "peer_id": existing_peer_id, + "space_id": String(space_id), + "owner_fingerprint": owner_fingerprint, + "transform": NetworkHomeProtocolType.transform_to_array( + avatar.global_transform + ), + }) + + +func _on_peer_removed(peer_id: int) -> void: + _release_peer_interior_slots(peer_id) + var fingerprint: String = _fingerprint_by_peer.get(peer_id, "") + _fingerprint_by_peer.erase(peer_id) + _authorized_owned_counts.erase(peer_id) + _authorized_home_tiers.erase(peer_id) + for result_id: String in _home_upgrade_result_owner.keys(): + if int(_home_upgrade_result_owner[result_id]) == peer_id: + _home_upgrade_result_owner.erase(result_id) + if fingerprint.is_empty(): + return + if _session.is_host(): + for occupant_id: int in _session.get_authenticated_peer_ids(): + if ( + occupant_id == peer_id + or _session.get_peer_space(occupant_id) + != NetworkHomeProtocolType.make_space_id(fingerprint) + ): + continue + _apply_host_transition( + occupant_id, + NetworkHomeProtocolType.WORLD_SPACE, + fingerprint, + _world_service.get_exterior_spawn_transform(fingerprint), + ) + _manifests_by_fingerprint.erase(fingerprint) + _world_service.remove_presentation(fingerprint) + if _session.is_host(): + for recipient_id: int in _session.get_authenticated_peer_ids(): + if recipient_id != 1: + receive_home_removed.rpc_id(recipient_id, fingerprint) + + +@rpc( + "authority", "call_remote", "reliable", + NetworkHomeProtocolType.RELIABLE_CHANNEL, +) +func receive_home_removed(owner_fingerprint: String) -> void: + if not NetworkIdentityCrypto.valid_fingerprint(owner_fingerprint): + return + _manifests_by_fingerprint.erase(owner_fingerprint) + _world_service.remove_presentation(owner_fingerprint) + + +func _on_session_state_changed(state: NetworkSession.State) -> void: + if state in [NetworkSession.State.PRIVATE_HOST, NetworkSession.State.OPEN_HOST]: + if ( + not _session.is_dedicated_host() + and _world_service != null + and _world_service.is_world_ready() + ): + publish_local_home() + return + if state in [ + NetworkSession.State.INACTIVE, + NetworkSession.State.DISCONNECTING, + NetworkSession.State.CONNECTION_FAILED, + NetworkSession.State.SERVER_LOST, + ]: + _manifests_by_fingerprint.clear() + _fingerprint_by_peer.clear() + _authorized_owned_counts.clear() + _authorization_result_owner.clear() + _authorized_home_tiers.clear() + _home_upgrade_result_owner.clear() + _publish_queued = false + _last_submitted_local_home_revision = -1 + _pending_local_decor_transactions.clear() + _interior_slots_by_space.clear() + _next_interior_index = 0 + _world_service.clear_presentations() + _world_service.set_local_space(NetworkHomeProtocolType.WORLD_SPACE) + local_space_changed.emit(NetworkHomeProtocolType.WORLD_SPACE, "") + + +func _fingerprint_for_peer(peer_id: int) -> String: + if _fingerprint_by_peer.has(peer_id): + return _fingerprint_by_peer[peer_id] + var record := _session.get_peer_record(peer_id) + return record.identity_fingerprint if record != null else "" + + +func _reserve_interior_slot(space_id: StringName, peer_id: int) -> int: + var slots: Dictionary = _interior_slots_by_space.get(space_id, {}) + if slots.has(peer_id): + return int(slots[peer_id]) + var used_slots: Dictionary[int, bool] = {} + for value: Variant in slots.values(): + used_slots[int(value)] = true + var slot: int = 0 + while used_slots.has(slot): + slot += 1 + slots[peer_id] = slot + _interior_slots_by_space[space_id] = slots + return slot + + +func _release_interior_slot(space_id: StringName, peer_id: int) -> void: + var slots: Dictionary = _interior_slots_by_space.get(space_id, {}) + if slots.is_empty(): + return + slots.erase(peer_id) + if slots.is_empty(): + _interior_slots_by_space.erase(space_id) + else: + _interior_slots_by_space[space_id] = slots + + +func _release_peer_interior_slots(peer_id: int) -> void: + for space_id: StringName in _interior_slots_by_space.keys(): + _release_interior_slot(space_id, peer_id) + + +func _new_id(prefix: String) -> String: + return "%s:%s" % [ + prefix, Crypto.new().generate_random_bytes(16).hex_encode(), + ] diff --git a/network/network_home_service.gd.uid b/network/network_home_service.gd.uid new file mode 100644 index 0000000..be233ed --- /dev/null +++ b/network/network_home_service.gd.uid @@ -0,0 +1 @@ +uid://ong8kug36ku7 diff --git a/network/network_identity_crypto.gd b/network/network_identity_crypto.gd index 4886cca..9d4f09c 100644 --- a/network/network_identity_crypto.gd +++ b/network/network_identity_crypto.gd @@ -5,7 +5,8 @@ const ALGORITHM: String = "RSA-3072-SHA256" const FINGERPRINT_LENGTH: int = 64 const MAX_PUBLIC_KEY_BYTES: int = 8192 const MAX_SIGNATURE_BYTES: int = 1024 -const DOMAIN_PREFIX: String = "NETFISHING" +const DOMAIN_PREFIX: String = "straywild" +const LEGACY_DOMAIN_PREFIX: String = "NETFISHING" const IDENTITY_VERSION: String = "identity_v1" @@ -50,8 +51,16 @@ static func secure_id(byte_count: int = 16) -> String: static func canonical_bytes(domain: String, fields: Array) -> PackedByteArray: + return canonical_bytes_for_prefix(DOMAIN_PREFIX, domain, fields) + + +static func canonical_bytes_for_prefix( + prefix: String, + domain: String, + fields: Array, +) -> PackedByteArray: var output := PackedByteArray() - _append_string(output, DOMAIN_PREFIX) + _append_string(output, prefix) _append_string(output, IDENTITY_VERSION) _append_string(output, domain) for value: Variant in fields: @@ -117,6 +126,37 @@ static func verify_fields( ) +static func verify_legacy_fields( + public_key: CryptoKey, + domain: String, + fields: Array, + signature: PackedByteArray, +) -> bool: + if ( + public_key == null + or signature.is_empty() + or signature.size() > MAX_SIGNATURE_BYTES + ): + return false + var bytes: PackedByteArray = canonical_bytes_for_prefix( + LEGACY_DOMAIN_PREFIX, + domain, + fields, + ) + if bytes.is_empty(): + return false + var context := HashingContext.new() + if context.start(HashingContext.HASH_SHA256) != OK: + return false + context.update(bytes) + return Crypto.new().verify( + HashingContext.HASH_SHA256, + context.finish(), + signature, + public_key, + ) + + static func load_public_key(public_pem: String) -> CryptoKey: var normalized := normalize_public_pem(public_pem) if normalized.is_empty() or normalized.to_utf8_buffer().size() > MAX_PUBLIC_KEY_BYTES: diff --git a/network/network_item_use_service.gd b/network/network_item_use_service.gd index 7ae0f92..024eca9 100644 --- a/network/network_item_use_service.gd +++ b/network/network_item_use_service.gd @@ -5,6 +5,7 @@ const FishingRodDataType = preload("res://items/fishing_rod_data.gd") const ArtShopStockType = preload("res://economy/art_shop_stock.gd") const FishingShopStockType = preload("res://economy/fishing_shop_stock.gd") +const DecorCatalogType = preload("res://homes/decor_catalog.gd") const MAX_LEDGER_ENTRIES: int = 64 @@ -47,6 +48,7 @@ func setup( _session.peer_removed.connect(_on_peer_removed) _session.state_changed.connect(_on_session_state_changed) _session.peer_authenticated.connect(_on_peer_authenticated) + _spawn_service.avatar_spawned.connect(_on_avatar_spawned) func request_use(item_id: StringName) -> String: @@ -393,6 +395,10 @@ func _apply_equipped(data: Dictionary) -> void: item_id == FishingShopStockType.STANDARD_SHOVEL_ID and bool(data["owns_item"]), ) + avatar.set_active_decor_package( + DecorCatalogType.has_product(item_id) + and bool(data["owns_item"]), + ) equipped_state_changed.emit( peer_id, StringName(str(data["item_id"])), int(data["category"]) ) @@ -436,6 +442,12 @@ func _on_peer_authenticated(peer_id: int, _display_name: String) -> void: receive_equipped_state.rpc_id(peer_id, state) +func _on_avatar_spawned(peer_id: int, _avatar: Player) -> void: + var state: Dictionary = _equipped_states.get(peer_id, {}) + if not state.is_empty(): + _apply_equipped(state) + + func _on_peer_removed(peer_id: int) -> void: _requests.erase(peer_id) _pending_by_peer.erase(peer_id) diff --git a/network/network_player_list_service.gd b/network/network_player_list_service.gd index 2014665..677df05 100644 --- a/network/network_player_list_service.gd +++ b/network/network_player_list_service.gd @@ -3,6 +3,15 @@ extends Node signal entries_changed signal moderation_finished(success: bool, message: String) +signal friend_request_received( + request_id: String, + fingerprint: String, + display_name: String, +) +signal friend_action_finished(success: bool, message: String) + +const MAX_PENDING_FRIEND_REQUESTS := 16 +const FRIEND_REQUEST_ID_LENGTH := 32 var _session: NetworkSession var _relationships: PlayerRelationshipStore @@ -18,6 +27,9 @@ var _peer_fingerprints: Dictionary[int, String] = {} var _remote_bans: Array[Dictionary] = [] var _ban_snapshot_requested: bool = false var _ban_snapshot_loaded: bool = false +var _pending_outgoing_friends: Dictionary[String, Dictionary] = {} +var _pending_incoming_friends: Dictionary[String, Dictionary] = {} +var _host_friend_routes: Dictionary[String, Dictionary] = {} func setup( @@ -74,6 +86,18 @@ func get_entries() -> Array[PlayerListEntry]: entry.ping_to_host_ms = _session.get_peer_rtt_ms(peer_id) entry.muted = _relationships.is_muted(record.identity_fingerprint) entry.blocked = blocked + entry.is_friend = _relationships.is_friend(record.identity_fingerprint) + entry.can_request_friend = ( + not entry.is_local_player + and not entry.is_friend + and not entry.blocked + and _session.supports_server_capability( + NetworkProtocol.FRIENDS_CAPABILITY + ) + and _session.peer_supports_capability( + peer_id, NetworkProtocol.FRIENDS_CAPABILITY + ) + ) entry.can_kick = ( _session.can_local_moderate() and peer_id != local_id @@ -125,6 +149,10 @@ func get_relationships() -> Array[Dictionary]: return _relationships.get_records() +func get_friends() -> Array[Dictionary]: + return _relationships.get_friends() + + func get_bans() -> Array[Dictionary]: if _session.is_host(): return _bans.get_bans(_session.get_host_identity_fingerprint()) @@ -180,6 +208,160 @@ func set_blocked(fingerprint: String, display_name: String, value: bool) -> bool return _relationships.set_blocked(fingerprint, display_name, value) +func remove_friend(fingerprint: String, display_name: String) -> bool: + if fingerprint == _session.get_local_identity_fingerprint(): + return false + var ok := _relationships.remove_friend(fingerprint, display_name) + friend_action_finished.emit( + ok, + "Friend removed." if ok else "Friend could not be removed.", + ) + return ok + + +func send_friend_request( + peer_id: int, + fingerprint: String, + display_name: String, +) -> bool: + if ( + _pending_outgoing_friends.size() >= MAX_PENDING_FRIEND_REQUESTS + or fingerprint == _session.get_local_identity_fingerprint() + or _relationships.is_blocked(fingerprint) + or _relationships.is_friend(fingerprint) + or not _valid_friend_target(peer_id, fingerprint) + ): + friend_action_finished.emit( + false, "This person needs to be online to do this." + ) + return false + var local_capabilities: Dictionary = ( + _relationships.create_friend_capabilities() + ) + if local_capabilities.is_empty(): + friend_action_finished.emit(false, "Friend request could not be created.") + return false + var request_id := NetworkIdentityCrypto.secure_id(16) + _pending_outgoing_friends[request_id] = { + "target_peer_id": peer_id, + "target_fingerprint": fingerprint, + "target_display_name": display_name, + "local_capabilities": local_capabilities, + } + var public_capabilities := _public_friend_capabilities(local_capabilities) + if _session.is_host(): + _route_friend_request( + _session.get_local_peer_id(), peer_id, request_id, public_capabilities + ) + else: + request_friendship.rpc_id( + 1, peer_id, request_id, public_capabilities + ) + friend_action_finished.emit(true, "Friend request sent.") + return true + + +func respond_friend_request(request_id: String, accepted: bool) -> bool: + var pending: Dictionary = _pending_incoming_friends.get(request_id, {}) + if pending.is_empty(): + friend_action_finished.emit( + false, "This friend request is no longer available." + ) + return false + _pending_incoming_friends.erase(request_id) + var local_capabilities: Dictionary = {} + var public_capabilities: Dictionary = {} + var response_accepted := accepted + if accepted: + local_capabilities = _relationships.create_friend_capabilities() + response_accepted = ( + not local_capabilities.is_empty() + and _relationships.add_friend( + str(pending["requester_fingerprint"]), + str(pending["requester_display_name"]), + local_capabilities, + pending["remote_capabilities"], + ) + ) + if response_accepted: + public_capabilities = _public_friend_capabilities(local_capabilities) + if _session.is_host(): + _route_friend_response( + _session.get_local_peer_id(), + request_id, + response_accepted, + public_capabilities, + ) + else: + respond_friendship.rpc_id( + 1, request_id, response_accepted, public_capabilities + ) + friend_action_finished.emit( + response_accepted or not accepted, + "Friend added." + if response_accepted + else "Friend request declined." + if not accepted + else "Friend could not be saved.", + ) + return response_accepted or not accepted + + +@rpc("any_peer", "call_remote", "reliable", 0) +func request_friendship( + target_peer_id: int, + request_id: String, + public_capabilities: Dictionary, +) -> void: + _route_friend_request( + multiplayer.get_remote_sender_id(), + target_peer_id, + request_id, + public_capabilities, + ) + + +@rpc("authority", "call_remote", "reliable", 0) +func receive_friend_request( + request_id: String, + requester_fingerprint: String, + requester_display_name: String, + public_capabilities: Dictionary, +) -> void: + _receive_friend_request_local( + request_id, + requester_fingerprint, + requester_display_name, + public_capabilities, + ) + + +@rpc("any_peer", "call_remote", "reliable", 0) +func respond_friendship( + request_id: String, + accepted: bool, + public_capabilities: Dictionary, +) -> void: + _route_friend_response( + multiplayer.get_remote_sender_id(), + request_id, + accepted, + public_capabilities, + ) + + +@rpc("authority", "call_remote", "reliable", 0) +func receive_friend_result( + request_id: String, + accepted: bool, + public_capabilities: Dictionary, + message: String, +) -> void: + _receive_friend_result_local( + request_id, accepted, public_capabilities, message + ) + + func kick(peer_id: int, fingerprint: String, revision: int) -> bool: if _session.is_host(): return _kick_on_host(peer_id, fingerprint, revision, true) @@ -454,6 +636,32 @@ func _on_peer_removed(peer_id: int) -> void: for key: String in _host_block_pairs.keys(): if fingerprint in key.split(":"): _host_block_pairs.erase(key) + for request_id: String in _host_friend_routes.keys(): + var route: Dictionary = _host_friend_routes[request_id] + if int(route.get("target_peer_id", 0)) == peer_id: + _send_friend_result_to_peer( + int(route.get("requester_peer_id", 0)), + request_id, + false, + {}, + "This person needs to be online to do this.", + ) + if ( + int(route.get("target_peer_id", 0)) == peer_id + or int(route.get("requester_peer_id", 0)) == peer_id + ): + _host_friend_routes.erase(request_id) + for request_id: String in _pending_outgoing_friends.keys(): + var pending: Dictionary = _pending_outgoing_friends[request_id] + if str(pending.get("target_fingerprint", "")) == fingerprint: + _pending_outgoing_friends.erase(request_id) + friend_action_finished.emit( + false, "This person needs to be online to do this." + ) + for request_id: String in _pending_incoming_friends.keys(): + var pending: Dictionary = _pending_incoming_friends[request_id] + if str(pending.get("requester_fingerprint", "")) == fingerprint: + _pending_incoming_friends.erase(request_id) _changed() @@ -469,6 +677,9 @@ func _on_session_state_changed(state: NetworkSession.State) -> void: _remote_bans.clear() _ban_snapshot_requested = false _ban_snapshot_loaded = false + _pending_outgoing_friends.clear() + _pending_incoming_friends.clear() + _host_friend_routes.clear() elif state == NetworkSession.State.JOINED_CLIENT: _request_ban_snapshot() _changed() @@ -506,6 +717,245 @@ func _peer_for_fingerprint(fingerprint: String) -> int: return 0 +func _valid_friend_target(peer_id: int, fingerprint: String) -> bool: + if ( + not _session.is_gameplay_session_active() + or not _session.supports_server_capability( + NetworkProtocol.FRIENDS_CAPABILITY + ) + or not _session.peer_supports_capability( + peer_id, NetworkProtocol.FRIENDS_CAPABILITY + ) + ): + return false + var record: PeerRegistry.PeerRecord = _session.get_peer_record(peer_id) + return ( + record != null + and record.identity_authenticated + and record.identity_fingerprint == fingerprint + ) + + +func _route_friend_request( + requester_peer_id: int, + target_peer_id: int, + request_id: String, + public_capabilities: Dictionary, +) -> void: + if ( + not _session.is_host() + or not _valid_friend_request_id(request_id) + or not _valid_public_friend_capabilities(public_capabilities) + or not _session.is_authenticated_peer(requester_peer_id) + ): + return + var requester: PeerRegistry.PeerRecord = ( + _session.get_peer_record(requester_peer_id) + ) + var target: PeerRegistry.PeerRecord = _session.get_peer_record(target_peer_id) + var can_route := ( + requester != null + and target != null + and requester_peer_id != target_peer_id + and _valid_friend_target( + target_peer_id, target.identity_fingerprint + ) + and _session.peer_supports_capability( + requester_peer_id, NetworkProtocol.FRIENDS_CAPABILITY + ) + and not pair_is_blocked( + requester.identity_fingerprint, target.identity_fingerprint + ) + and _host_friend_routes.size() < ( + MAX_PENDING_FRIEND_REQUESTS * 8 + ) + ) + if not can_route: + _send_friend_result_to_peer( + requester_peer_id, + request_id, + false, + {}, + "This person needs to be online to do this.", + ) + return + var requester_pending_count := 0 + for route: Dictionary in _host_friend_routes.values(): + if int(route.get("requester_peer_id", 0)) == requester_peer_id: + requester_pending_count += 1 + if requester_pending_count >= MAX_PENDING_FRIEND_REQUESTS: + _send_friend_result_to_peer( + requester_peer_id, + request_id, + false, + {}, + "Too many friend requests are pending.", + ) + return + _host_friend_routes[request_id] = { + "requester_peer_id": requester_peer_id, + "target_peer_id": target_peer_id, + } + if target_peer_id == _session.get_local_peer_id(): + _receive_friend_request_local( + request_id, + requester.identity_fingerprint, + requester.display_name, + public_capabilities, + ) + else: + receive_friend_request.rpc_id( + target_peer_id, + request_id, + requester.identity_fingerprint, + requester.display_name, + public_capabilities, + ) + + +func _receive_friend_request_local( + request_id: String, + requester_fingerprint: String, + requester_display_name: String, + public_capabilities: Dictionary, +) -> void: + if ( + not _valid_friend_request_id(request_id) + or not _valid_public_friend_capabilities(public_capabilities) + or not NetworkIdentityCrypto.valid_fingerprint(requester_fingerprint) + or not NetworkProfilePreferences.is_valid_display_name( + requester_display_name + ) + or _pending_incoming_friends.size() + >= MAX_PENDING_FRIEND_REQUESTS + or _relationships.is_blocked(requester_fingerprint) + or _relationships.is_friend(requester_fingerprint) + ): + _decline_friend_request(request_id) + return + _pending_incoming_friends[request_id] = { + "requester_fingerprint": requester_fingerprint, + "requester_display_name": requester_display_name, + "remote_capabilities": public_capabilities.duplicate(true), + } + friend_request_received.emit( + request_id, requester_fingerprint, requester_display_name + ) + + +func _decline_friend_request(request_id: String) -> void: + if _session.is_host(): + _route_friend_response( + _session.get_local_peer_id(), request_id, false, {} + ) + elif _session.is_joined_client(): + respond_friendship.rpc_id(1, request_id, false, {}) + + +func _route_friend_response( + responder_peer_id: int, + request_id: String, + accepted: bool, + public_capabilities: Dictionary, +) -> void: + if not _session.is_host(): + return + var route: Dictionary = _host_friend_routes.get(request_id, {}) + if ( + route.is_empty() + or int(route.get("target_peer_id", 0)) != responder_peer_id + ): + return + _host_friend_routes.erase(request_id) + var response_accepted := ( + accepted and _valid_public_friend_capabilities(public_capabilities) + ) + _send_friend_result_to_peer( + int(route["requester_peer_id"]), + request_id, + response_accepted, + public_capabilities if response_accepted else {}, + "Friend request accepted." + if response_accepted + else "Friend request declined." + if not accepted + else "Friend request could not be completed.", + ) + + +func _send_friend_result_to_peer( + peer_id: int, + request_id: String, + accepted: bool, + public_capabilities: Dictionary, + message: String, +) -> void: + if peer_id == _session.get_local_peer_id(): + _receive_friend_result_local( + request_id, accepted, public_capabilities, message + ) + elif _session.is_authenticated_peer(peer_id): + receive_friend_result.rpc_id( + peer_id, + request_id, + accepted, + public_capabilities, + message.left(120), + ) + + +func _receive_friend_result_local( + request_id: String, + accepted: bool, + public_capabilities: Dictionary, + message: String, +) -> void: + var pending: Dictionary = _pending_outgoing_friends.get(request_id, {}) + if pending.is_empty(): + return + _pending_outgoing_friends.erase(request_id) + var success := false + if accepted and _valid_public_friend_capabilities(public_capabilities): + success = _relationships.add_friend( + str(pending["target_fingerprint"]), + str(pending["target_display_name"]), + pending["local_capabilities"], + public_capabilities, + ) + message = "Friend added." if success else "Friend could not be saved." + friend_action_finished.emit(success, message.left(120)) + + +func _public_friend_capabilities(capabilities: Dictionary) -> Dictionary: + return { + "presence_channel": str(capabilities.get("presence_channel", "")), + "invite_token": str(capabilities.get("invite_token", "")), + } + + +func _valid_public_friend_capabilities(capabilities: Dictionary) -> bool: + return ( + _valid_friend_hex(str(capabilities.get("presence_channel", ""))) + and _valid_friend_hex(str(capabilities.get("invite_token", ""))) + ) + + +func _valid_friend_request_id(request_id: String) -> bool: + return _valid_friend_hex(request_id, FRIEND_REQUEST_ID_LENGTH) + + +func _valid_friend_hex( + value: String, + expected_length: int = PlayerRelationshipStore.SOCIAL_TOKEN_LENGTH, +) -> bool: + if value.length() != expected_length: + return false + for character: String in value: + if character not in "0123456789abcdef": + return false + return true + + func _valid_moderation_target( peer_id: int, fingerprint: String, diff --git a/network/network_profile_preferences.gd b/network/network_profile_preferences.gd index 3c4996b..b6cac63 100644 --- a/network/network_profile_preferences.gd +++ b/network/network_profile_preferences.gd @@ -21,6 +21,8 @@ var _future_version := false func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _profile_path = path _data_root = data_root + _expected_hash = "" + _future_version = false func _temp_path() -> String: diff --git a/network/network_profile_service.gd b/network/network_profile_service.gd index da26d86..ff967f1 100644 --- a/network/network_profile_service.gd +++ b/network/network_profile_service.gd @@ -51,6 +51,17 @@ func setup( _apply_local_voice_to_avatar() +func reload_persisted_profile() -> bool: + if ( + not _preferences.load_or_create() + or not _appearance_store.load_preferences() + ): + return false + _apply_to_avatar(1, _appearance_store.get_snapshot()) + _apply_local_voice_to_avatar() + return true + + func get_persisted_name() -> String: return _preferences.display_name @@ -97,6 +108,10 @@ func preview_appearance(appearance: Dictionary) -> bool: _preferences.display_name, snapshot, ) + var authorization := _make_appearance_preview_authorization(snapshot) + var local_record := _session.get_peer_record(local_peer_id) + if local_record != null: + local_record.profile_authorization = authorization.duplicate(true) if _session.is_host(): _broadcast_appearance_preview_to_supported_peers( local_peer_id, @@ -105,20 +120,27 @@ func preview_appearance(appearance: Dictionary) -> bool: elif _session.supports_server_capability( NetworkProtocol.APPEARANCE_PREVIEW_CAPABILITY ): - var request: Dictionary = { - "request_id": _new_id(), - "session_id": _session.get_session_id(), - "appearance": snapshot.duplicate(true), - "sender_fingerprint": _session.get_local_identity_fingerprint(), - } - request["sender_signature"] = _session.sign_local_action( - "appearance_preview", - NetworkProfileProtocol.appearance_preview_signature_fields(request), - ) - submit_appearance_preview.rpc_id(1, request) + submit_appearance_preview.rpc_id(1, authorization) return true +func _make_appearance_preview_authorization( + appearance: Dictionary, +) -> Dictionary: + var request: Dictionary = { + "domain": "appearance_preview", + "request_id": _new_id(), + "session_id": _session.get_session_id(), + "appearance": appearance.duplicate(true), + "sender_fingerprint": _session.get_local_identity_fingerprint(), + } + request["sender_signature"] = _session.sign_local_action( + "appearance_preview", + NetworkProfileProtocol.appearance_preview_signature_fields(request), + ) + return request + + func restore_persisted_appearance() -> void: preview_appearance(_appearance_store.get_snapshot()) @@ -274,6 +296,9 @@ func submit_appearance_preview(data: Dictionary) -> void: var appearance := CharacterCustomizationCatalog.sanitized_snapshot( data["appearance"] ) + var authorization := data.duplicate(true) + authorization["domain"] = "appearance_preview" + record.profile_authorization = authorization _session.apply_canonical_profile( sender_id, record.display_name, @@ -482,23 +507,16 @@ func broadcast_profile_snapshot( or not CharacterCustomizationCatalog.validate_snapshot(appearance) ): return - if not authorization.is_empty(): - var signed := authorization.duplicate(true) - signed["display_name"] = display_name - signed["appearance"] = appearance - var record := _session.get_peer_record(peer_id) - if ( - record == null - or record.identity_fingerprint - != str(signed.get("sender_fingerprint", "")) - or not _session.verify_peer_action( - peer_id, - "profile_update", - NetworkProfileProtocol.signature_fields(signed), - signed.get("sender_signature", PackedByteArray()), - ) - ): - return + if ( + not authorization.is_empty() + and not _session.verify_profile_authorization( + peer_id, + display_name, + appearance, + authorization, + ) + ): + return _session.apply_canonical_profile(peer_id, display_name, appearance) _apply_to_avatar(peer_id, appearance) profile_snapshot_changed.emit(peer_id, display_name, appearance.duplicate(true)) diff --git a/network/network_protocol.gd b/network/network_protocol.gd index 9a30a27..5b3ca89 100644 --- a/network/network_protocol.gd +++ b/network/network_protocol.gd @@ -3,7 +3,7 @@ extends RefCounted const WorldLayoutType = preload("res://world/world_layout.gd") -const PROTOCOL_VERSION: int = 9 +const PROTOCOL_VERSION: int = 12 const GAME_BUILD: String = "prealpha" const MAX_GAME_VERSION_LENGTH: int = 64 const MAX_DISPLAY_NAME_LENGTH: int = 24 @@ -13,14 +13,25 @@ const MAX_PUBLIC_KEY_LENGTH: int = 8192 const MAX_SIGNATURE_LENGTH: int = 2048 # ENet channels: 0 reliable lifecycle, 1 movement input, 2 movement # snapshots, 3 fishing input, 4 fishing snapshots, 5 reliable sales, -# 6 reliable shop transactions, 7 reliable item/equipment/showcase/drawing, -# 8 reliable ordered session chat, 9 reliable private session mail. +# 6 reliable shop transactions, 7 reliable item/equipment, +# 8 reliable ordered session chat, 9 reliable private session mail, +# 10 observer-only fishing summaries, 11 reliable movement animation state, +# 12 reliable fish showcase state, 13 reliable world-spawn events, +# 14 reliable artwork state, 15 world-spawn snapshots, 16 reliable fishing +# lifecycle, and 17 reliable portable-home state. Bulk world/art payloads must +# not head-of-line block held items, fishing, animation, or home transitions. const SALE_RELIABLE_CHANNEL: int = 5 const SHOP_RELIABLE_CHANNEL: int = 6 const ITEM_RELIABLE_CHANNEL: int = 7 const CHAT_RELIABLE_CHANNEL: int = 8 const MAIL_RELIABLE_CHANNEL: int = 9 -const ENET_CHANNEL_COUNT: int = 10 +const MOVEMENT_ANIMATION_CHANNEL: int = 11 +const SHOWCASE_RELIABLE_CHANNEL: int = 12 +const WORLD_SPAWN_RELIABLE_CHANNEL: int = 13 +const DRAWING_RELIABLE_CHANNEL: int = 14 +const FISHING_RELIABLE_CHANNEL: int = 16 +const HOME_RELIABLE_CHANNEL: int = 17 +const ENET_CHANNEL_COUNT: int = 18 const SURFACE_DRAWING_CAPABILITY: String = "surface_drawing_v2" const ART_SHOP_CAPABILITY: String = "art_shop_v1" const BACKPACK_SHOP_CAPABILITY: String = "backpack_shop_v1" @@ -32,6 +43,11 @@ const WORLD_SPAWN_CAPABILITY: String = "world_spawn_envelope_v1" const APPEARANCE_PREVIEW_CAPABILITY: String = "appearance_preview_v1" const WORLD_GENERATION_CAPABILITY: String = "world_generation_v1" const WORLD_LAYOUT_CAPABILITY: String = "world_layout_v1" +const FRIENDS_CAPABILITY: String = "friends_v1" +const MOVEMENT_RECONCILIATION_CAPABILITY: String = "movement_reconciliation_v2" +const FISHING_REPLICATION_CAPABILITY: String = "fishing_replication_v2" +const HOME_CAPABILITY: String = "portable_home_v1" +const HOME_UPGRADE_CAPABILITY: String = "home_upgrade_v1" const DEFAULT_WORLD_SEED: int = 13001 const MAX_WORLD_SEED: int = 2147483646 @@ -186,6 +202,11 @@ static func make_client_hello( BACKPACK_SHOP_CAPABILITY, WORLD_GENERATION_CAPABILITY, WORLD_LAYOUT_CAPABILITY, + FRIENDS_CAPABILITY, + MOVEMENT_RECONCILIATION_CAPABILITY, + FISHING_REPLICATION_CAPABILITY, + HOME_CAPABILITY, + HOME_UPGRADE_CAPABILITY, ]), "cosmetic_snapshot": cosmetic_snapshot, "identity_fingerprint": identity_fingerprint, @@ -288,7 +309,7 @@ static func make_server_hello( assigned_peer_id: int, player_count: int, max_players: int, - server_display_name: String = "NETfishing", + server_display_name: String = "straywild", world_seed: int = DEFAULT_WORLD_SEED, world_layout: StringName = WorldLayoutType.GENERATED, ) -> Dictionary: @@ -323,6 +344,11 @@ static func make_server_hello( APPEARANCE_PREVIEW_CAPABILITY, WORLD_GENERATION_CAPABILITY, WORLD_LAYOUT_CAPABILITY, + FRIENDS_CAPABILITY, + MOVEMENT_RECONCILIATION_CAPABILITY, + FISHING_REPLICATION_CAPABILITY, + HOME_CAPABILITY, + HOME_UPGRADE_CAPABILITY, "chat_v1", "mail_v1", "profile_v1", @@ -353,17 +379,17 @@ static func rejection_text(code: int) -> String: return "You are not permitted to join this server." RejectionCode.CLIENT_OUTDATED: return ( - "Your NETfishing version is out of date. " + "Your straywild version is out of date. " + "Update the game to join this server." ) RejectionCode.SERVER_OUTDATED: return ( "This server is out of date. " - + "The host needs to update NETfishing." + + "The host needs to update straywild." ) RejectionCode.VERSION_MISMATCH: return ( - "This game and server use different NETfishing versions. " + "This game and server use different straywild versions. " + "Update both to the latest release." ) _: diff --git a/network/network_sale_service.gd b/network/network_sale_service.gd index 38af917..a80f221 100644 --- a/network/network_sale_service.gd +++ b/network/network_sale_service.gd @@ -14,6 +14,7 @@ const PlayerBagType = preload("res://inventory/player_bag.gd") const ItemResalePolicyType = preload("res://economy/item_resale_policy.gd") const MAX_LEDGER_ENTRIES_PER_PEER: int = 64 +const LOCAL_REQUEST_RETRY_SECONDS: float = 2.0 const PELICAN_BUYER_ID: StringName = &"pelicans" const MAIN_SHOP_BUYER_ID: StringName = &"main_fishing_shop" @@ -45,6 +46,8 @@ var _acknowledged_results: Dictionary[String, bool] = {} var _applied_results: Dictionary[String, bool] = {} var _received_results: Dictionary[String, bool] = {} var _pending_local_request_id: String = "" +var _pending_local_request: Dictionary = {} +var _local_request_retry_elapsed: float = 0.0 var _pending_local_catch_ids: Array[StringName] = [] var _pending_local_items: Array[Dictionary] = [] var _pending_local_buyer_id: StringName @@ -52,6 +55,25 @@ var _reservations: PlayerAssetReservationService var _inventory_layout: PlayerInventoryLayout +func _process(delta: float) -> void: + if ( + _pending_local_request.is_empty() + or _session == null + or not _session.is_joined_client() + ): + _local_request_retry_elapsed = 0.0 + return + _local_request_retry_elapsed += delta + if _local_request_retry_elapsed < LOCAL_REQUEST_RETRY_SECONDS: + return + _local_request_retry_elapsed = 0.0 + # The request ID is stable and the host ledger is idempotent, so an + # application-level retry cannot apply a sale twice. This covers the narrow + # transition where a generated client has authenticated but is only just + # resuming regular multiplayer polling. + submit_sale_request.rpc_id(1, _pending_local_request) + + func setup( session: NetworkSession, spawn_service: PlayerSpawnService, @@ -208,6 +230,8 @@ func request_local_mixed_sale( "items": item_evidence, } _pending_local_request_id = request_id + _pending_local_request = request.duplicate(true) + _local_request_retry_elapsed = 0.0 _pending_local_catch_ids = catch_ids.duplicate() _pending_local_items = item_evidence.duplicate(true) _pending_local_buyer_id = buyer.id @@ -595,6 +619,8 @@ func _finish_local_sale( payout: int, ) -> void: _pending_local_request_id = "" + _pending_local_request.clear() + _local_request_retry_elapsed = 0.0 _pending_local_catch_ids.clear() _pending_local_items.clear() _pending_local_buyer_id = StringName() @@ -730,6 +756,8 @@ func _clear_session_state() -> void: _applied_results.clear() _received_results.clear() _pending_local_request_id = "" + _pending_local_request.clear() + _local_request_retry_elapsed = 0.0 _pending_local_catch_ids.clear() _pending_local_items.clear() _pending_local_buyer_id = StringName() diff --git a/network/network_session.gd b/network/network_session.gd index 21d400c..7c259e0 100644 --- a/network/network_session.gd +++ b/network/network_session.gd @@ -7,12 +7,51 @@ const DEFAULT_SESSION_MAX_PLAYERS: int = 8 const DEFAULT_TRANSPORT_MAX_CLIENTS: int = 31 const CONNECTION_TIMEOUT_SECONDS: float = 10.0 const AUTHENTICATION_TIMEOUT_SECONDS: float = 60.0 +const ENET_TIMEOUT_LIMIT: int = 32 +const ENET_TIMEOUT_MINIMUM_MS: int = 10000 +const ENET_TIMEOUT_MAXIMUM_MS: int = 120000 const INPUT_INTERVAL: float = 1.0 / 30.0 +const IDLE_INPUT_INTERVAL: float = 1.0 / 5.0 const SNAPSHOT_INTERVAL: float = 1.0 / 30.0 +const OWNER_SNAPSHOT_DIVISOR: int = 3 +const NEAR_REMOTE_SNAPSHOT_DIVISOR: int = 2 +const FAR_REMOTE_SNAPSHOT_DIVISOR: int = 6 +const DISTANT_REMOTE_SNAPSHOT_DIVISOR: int = 8 +const NEAR_REMOTE_DISTANCE: float = 48.0 +const FAR_REMOTE_DISTANCE: float = 96.0 const MOVEMENT_SNAPSHOT_BATCH_SIZE: int = 8 -const MOVEMENT_SNAPSHOT_FIELD_COUNT: int = 13 +const MOVEMENT_INPUT_FIELD_COUNT: int = 8 +const MOVEMENT_SNAPSHOT_FIELD_COUNT: int = 6 +const MOVEMENT_ANIMATION_FIELD_COUNT: int = 7 +const MOVEMENT_ANIMATION_ACTION_FIELD_COUNT: int = 5 +const MAX_PENDING_MOVEMENT_INPUTS: int = 96 +const ANIMATION_REFRESH_INTERVAL: float = 1.0 const MAX_MOVEMENT_INPUT_SEQUENCE: int = 2147483647 const MAX_MOVEMENT_ONE_WAY_TRANSIT_SECONDS: float = 0.25 +const SPACE_TRANSITION_SNAPSHOT_GUARD_DISTANCE: float = 12.0 + +const MOVEMENT_FLAG_JUMP: int = 1 << 0 +const MOVEMENT_FLAG_SPRINT: int = 1 << 1 +const MOVEMENT_FLAG_SNEAK: int = 1 << 2 +const MOVEMENT_FLAG_SLOW_WALK: int = 1 << 3 +const MOVEMENT_FLAG_SITTING: int = 1 << 4 +const MOVEMENT_FLAG_CASTING: int = 1 << 5 +const MOVEMENT_ALLOWED_FLAGS: int = ( + MOVEMENT_FLAG_JUMP + | MOVEMENT_FLAG_SPRINT + | MOVEMENT_FLAG_SNEAK + | MOVEMENT_FLAG_SLOW_WALK + | MOVEMENT_FLAG_SITTING + | MOVEMENT_FLAG_CASTING +) +const SNAPSHOT_FLAG_GROUNDED: int = 1 << 0 +const SNAPSHOT_FLAG_SITTING: int = 1 << 1 +const SNAPSHOT_FLAG_CASTING: int = 1 << 2 +const SNAPSHOT_ALLOWED_FLAGS: int = ( + SNAPSHOT_FLAG_GROUNDED + | SNAPSHOT_FLAG_SITTING + | SNAPSHOT_FLAG_CASTING +) signal state_changed(state: State) signal status_message_changed(message: String) @@ -80,7 +119,25 @@ var _client_nonce: String = "" var _current_route: ConnectionRoute var _input_sequence: int = 0 var _input_accumulator: float = 0.0 +var _idle_input_accumulator: float = 0.0 +var _last_input_state_hash: int = 0 +var _pending_movement_inputs: Array[Dictionary] = [] var _snapshot_accumulator: float = 0.0 +var _movement_snapshot_tick: int = 0 +var _last_local_snapshot_received_msec: int = 0 +var _local_space_transition_guard_active: bool = false +var _local_space_transition_guard_position: Vector3 = Vector3.ZERO +var _local_space_transition_minimum_ack: int = 0 +var _animation_refresh_accumulator: float = 0.0 +var _last_animation_state_by_peer: Dictionary[int, Dictionary] = {} +var _pending_animation_state_by_peer: Dictionary[int, Dictionary] = {} +var _last_local_animation_action_signature: Array = [] +var _movement_inputs_sent: int = 0 +var _movement_inputs_received: int = 0 +var _movement_snapshot_packets_sent: int = 0 +var _movement_snapshot_states_sent: int = 0 +var _movement_animation_packets_sent: int = 0 +var _movement_animation_states_sent: int = 0 var _last_server_max_players: int = DEFAULT_SESSION_MAX_PLAYERS var _last_server_player_count: int = 0 var _last_server_display_name: String = "" @@ -88,6 +145,7 @@ var _last_server_protocol_version: int = 0 var _last_server_world_seed: int = NetworkProtocol.DEFAULT_WORLD_SEED var _last_server_world_layout: StringName = WorldLayout.GENERATED var _server_capabilities: PackedStringArray = PackedStringArray() +var _peer_space_ids: Dictionary[int, StringName] = {} var _profile_ready: bool = false var _player_identity: PlayerIdentityStore var _host_identity: HostIdentityStore @@ -107,7 +165,7 @@ var _local_appearance_snapshot: Dictionary = ( ) var _moderation_disconnect_message := "" var _host_port: int = 0 -var _session_display_name: String = "NETfishing Room" +var _session_display_name: String = "straywild Room" var _dedicated_host: bool = false var _configured_operator_fingerprints: Dictionary[String, bool] = {} var _session_operator_fingerprints: Dictionary[String, bool] = {} @@ -278,6 +336,11 @@ func _register_player_host() -> void: NetworkProtocol.BACKPACK_SHOP_CAPABILITY, NetworkProtocol.WORLD_GENERATION_CAPABILITY, NetworkProtocol.WORLD_LAYOUT_CAPABILITY, + NetworkProtocol.FRIENDS_CAPABILITY, + NetworkProtocol.MOVEMENT_RECONCILIATION_CAPABILITY, + NetworkProtocol.FISHING_REPLICATION_CAPABILITY, + NetworkProtocol.HOME_CAPABILITY, + NetworkProtocol.HOME_UPGRADE_CAPABILITY, ]), ) _registry.update_appearance(1, _local_appearance_snapshot) @@ -376,7 +439,7 @@ func set_peer_operator( func set_session_display_name(value: String) -> void: var cleaned: String = value.strip_edges().left(48) if cleaned.is_empty(): - cleaned = "NETfishing Room" + cleaned = "straywild Room" if cleaned == _session_display_name: return _session_display_name = cleaned @@ -602,6 +665,11 @@ func supports_server_capability(capability: StringName) -> bool: NetworkProtocol.APPEARANCE_PREVIEW_CAPABILITY, NetworkProtocol.WORLD_GENERATION_CAPABILITY, NetworkProtocol.WORLD_LAYOUT_CAPABILITY, + NetworkProtocol.FRIENDS_CAPABILITY, + NetworkProtocol.MOVEMENT_RECONCILIATION_CAPABILITY, + NetworkProtocol.FISHING_REPLICATION_CAPABILITY, + NetworkProtocol.HOME_CAPABILITY, + NetworkProtocol.HOME_UPGRADE_CAPABILITY, "chat_v1", "mail_v1", "profile_v1", @@ -626,6 +694,55 @@ func get_authenticated_peer_ids() -> Array[int]: return _registry.get_peer_ids() +func set_peer_space(peer_id: int, space_id: StringName) -> bool: + if not _registry.has_peer(peer_id) or space_id.is_empty(): + return false + _peer_space_ids[peer_id] = space_id + return true + + +func get_peer_space(peer_id: int) -> StringName: + return _peer_space_ids.get(peer_id, &"world") + + +func peers_share_space(first_peer_id: int, second_peer_id: int) -> bool: + return get_peer_space(first_peer_id) == get_peer_space(second_peer_id) + + +func apply_authoritative_space_transition( + peer_id: int, + target_transform: Transform3D, + acknowledged_input: int, +) -> bool: + if not target_transform.origin.is_finite(): + return false + var local_peer_id: int = get_local_peer_id() + var local_transition: bool = peer_id == local_peer_id + var avatar: Player = _spawn_service.get_avatar(peer_id) + # Remote home transitions can arrive before their player-spawn message. Keep + # the new space assignment so the later spawn inherits correct visibility; + # only a missing local avatar is a transition failure. + if avatar == null: + return not local_transition + avatar.apply_network_space_transition(target_transform, local_transition) + if ( + local_transition + and state == State.JOINED_CLIENT + ): + # Movement snapshots use another ENet channel and a pre-transition audit + # can therefore arrive after the reliable home transition. Clear local + # prediction and reject those old-world snapshots until the host publishes + # its first audit from the new space. + _pending_movement_inputs.clear() + _last_local_snapshot_received_msec = 0 + _last_input_state_hash = 0 + _idle_input_accumulator = IDLE_INPUT_INTERVAL + _local_space_transition_guard_active = true + _local_space_transition_guard_position = target_transform.origin + _local_space_transition_minimum_ack = maxi(acknowledged_input, 0) + return true + + func get_peer_rtt_ms(peer_id: int) -> int: if peer_id == 1: return 0 @@ -649,6 +766,18 @@ func get_peer_rtt_ms(peer_id: int) -> int: return int(packet_peer.get_statistic(ENetPacketPeer.PEER_ROUND_TRIP_TIME)) +func get_movement_metrics() -> Dictionary: + return { + "inputs_sent": _movement_inputs_sent, + "inputs_received": _movement_inputs_received, + "snapshot_packets_sent": _movement_snapshot_packets_sent, + "snapshot_states_sent": _movement_snapshot_states_sent, + "animation_packets_sent": _movement_animation_packets_sent, + "animation_states_sent": _movement_animation_states_sent, + "pending_local_inputs": _pending_movement_inputs.size(), + } + + func kick_authenticated_peer( peer_id: int, fingerprint: String, @@ -813,6 +942,10 @@ func get_local_peer_id() -> int: return multiplayer.get_unique_id() if is_gameplay_session_active() else 0 +func get_latest_movement_input_sequence() -> int: + return _input_sequence if state == State.JOINED_CLIENT else 0 + + func _process(delta: float) -> void: var now: float = Time.get_ticks_msec() / 1000.0 if ( @@ -833,9 +966,13 @@ func _process(delta: float) -> void: return _input_accumulator += delta _snapshot_accumulator += delta + _animation_refresh_accumulator += delta if state == State.JOINED_CLIENT and _input_accumulator >= INPUT_INTERVAL: + var elapsed_input_time: float = _input_accumulator _input_accumulator = fmod(_input_accumulator, INPUT_INTERVAL) - _send_local_input() + _idle_input_accumulator += elapsed_input_time + _maybe_send_local_animation_action() + _maybe_send_local_input() if is_host() and _snapshot_accumulator >= SNAPSHOT_INTERVAL: _snapshot_accumulator = fmod(_snapshot_accumulator, SNAPSHOT_INTERVAL) _broadcast_movement_snapshots() @@ -873,6 +1010,7 @@ func _on_peer_connected(peer_id: int) -> void: if state != State.OPEN_HOST: multiplayer.multiplayer_peer.disconnect_peer(peer_id) return + _configure_enet_peer_timeout(peer_id) _pending_authentication[peer_id] = ( Time.get_ticks_msec() / 1000.0 + AUTHENTICATION_TIMEOUT_SECONDS ) @@ -881,6 +1019,7 @@ func _on_peer_connected(peer_id: int) -> void: func _on_connected_to_server() -> void: if state != State.CONNECTING: return + _configure_enet_peer_timeout(1) _set_state(State.AUTHENTICATING, "Authenticating...") _client_nonce = NetworkIdentityCrypto.secure_id(32) _client_identity_attempt = NetworkProtocol.make_identity_hello( @@ -892,6 +1031,24 @@ func _on_connected_to_server() -> void: submit_identity_hello.rpc_id(1, _client_identity_attempt) +func _configure_enet_peer_timeout(peer_id: int) -> void: + var enet := multiplayer.multiplayer_peer as ENetMultiplayerPeer + if enet == null: + return + var packet_peer: ENetPacketPeer = enet.get_peer(peer_id) + if packet_peer == null: + return + # A deterministic generated world can temporarily occupy the client's main + # thread during the authenticated join transition. Keep that bounded load + # from looking like a dead connection while retaining normal ENet liveness + # checks once the client resumes polling. + packet_peer.set_timeout( + ENET_TIMEOUT_LIMIT, + ENET_TIMEOUT_MINIMUM_MS, + ENET_TIMEOUT_MAXIMUM_MS, + ) + + func _on_connection_failed() -> void: if state not in [ State.CONNECTING, @@ -931,6 +1088,9 @@ func _on_peer_disconnected(peer_id: int) -> void: _pending_identity_challenges.erase(peer_id) _authenticated_identity_cache.erase(peer_id) _operator_peer_ids.erase(peer_id) + _peer_space_ids.erase(peer_id) + _last_animation_state_by_peer.erase(peer_id) + _pending_animation_state_by_peer.erase(peer_id) var recovery_attempt: String = _recovery_attempts.get(peer_id, "") if not recovery_attempt.is_empty(): _recovery_attempts.erase(peer_id) @@ -1086,7 +1246,7 @@ func resolve_server_trust(accepted: bool) -> void: if not _server_trust.trust( get_current_endpoint(), str(_pending_server_proof["server_fingerprint"]), - "NETfishing", + "straywild", ): _fail_identity("The server identity could not be pinned.") return @@ -1209,6 +1369,17 @@ func submit_client_hello(data: Dictionary) -> void: NetworkProtocol.RejectionCode.UNSUPPORTED_CLIENT, ) return + for required_capability: String in [ + NetworkProtocol.MOVEMENT_RECONCILIATION_CAPABILITY, + NetworkProtocol.FISHING_REPLICATION_CAPABILITY, + NetworkProtocol.HOME_CAPABILITY, + ]: + if required_capability not in client_capabilities: + _reject_peer( + sender_id, + NetworkProtocol.RejectionCode.UNSUPPORTED_CLIENT, + ) + return if ( _host_world_layout == WorldLayout.STARTER_ISLAND and NetworkProtocol.WORLD_LAYOUT_CAPABILITY not in client_capabilities @@ -1432,6 +1603,15 @@ func receive_server_hello(data: Dictionary) -> void: _teardown_peer() _fail("This server does not support generated worlds.") return + for required_capability: String in [ + NetworkProtocol.MOVEMENT_RECONCILIATION_CAPABILITY, + NetworkProtocol.FISHING_REPLICATION_CAPABILITY, + NetworkProtocol.HOME_CAPABILITY, + ]: + if required_capability not in _server_capabilities: + _teardown_peer() + _fail("This server is missing required network capabilities.") + return if ( received_world_layout == WorldLayout.STARTER_ISLAND and NetworkProtocol.WORLD_LAYOUT_CAPABILITY not in _server_capabilities @@ -1456,6 +1636,11 @@ func receive_server_hello(data: Dictionary) -> void: NetworkProtocol.BACKPACK_SHOP_CAPABILITY, NetworkProtocol.WORLD_GENERATION_CAPABILITY, NetworkProtocol.WORLD_LAYOUT_CAPABILITY, + NetworkProtocol.FRIENDS_CAPABILITY, + NetworkProtocol.MOVEMENT_RECONCILIATION_CAPABILITY, + NetworkProtocol.FISHING_REPLICATION_CAPABILITY, + NetworkProtocol.HOME_CAPABILITY, + NetworkProtocol.HOME_UPGRADE_CAPABILITY, ]), ) _registry.update_appearance(local_peer_id, _local_appearance_snapshot) @@ -1501,6 +1686,9 @@ func receive_peer_despawn(peer_id: int) -> void: if state != State.JOINED_CLIENT: return _operator_peer_ids.erase(peer_id) + _peer_space_ids.erase(peer_id) + _last_animation_state_by_peer.erase(peer_id) + _pending_animation_state_by_peer.erase(peer_id) _registry.remove_peer(peer_id) _spawn_service.remove_peer(peer_id) peer_removed.emit(peer_id) @@ -1542,6 +1730,10 @@ func _apply_spawn_entry(entry: Dictionary) -> void: or typeof(entry.get("display_name")) != TYPE_STRING or typeof(entry.get("position")) != TYPE_ARRAY or typeof(entry.get("yaw")) not in [TYPE_FLOAT, TYPE_INT] + or typeof(entry.get("sitting")) != TYPE_BOOL + or not NetworkPlayerAnimationProtocol.validate_state( + entry.get("animation_state") + ) ): return if not _verify_spawn_identity(entry): @@ -1557,10 +1749,12 @@ func _apply_spawn_entry(entry: Dictionary) -> void: ) own_snapshot["position"] = own_position own_snapshot["visual_yaw"] = float(entry["yaw"]) + own_snapshot["sitting"] = bool(entry["sitting"]) own_avatar.apply_network_teleport(own_snapshot) return + var peer_was_added: bool = false if not _registry.has_peer(peer_id): - _registry.add_peer( + if not _registry.add_peer( peer_id, entry["profile_id"], entry["display_name"], @@ -1568,8 +1762,14 @@ func _apply_spawn_entry(entry: Dictionary) -> void: str(entry.get("identity_fingerprint", "")), str(entry.get("identity_public_key", "")), _sanitized_capabilities(entry.get("capability_flags", [])), - ) + ): + return + peer_was_added = true var added_record := _registry.get_peer(peer_id) + if added_record != null: + added_record.profile_authorization = Dictionary( + entry.get("profile_authorization", {}) + ).duplicate(true) if added_record != null and added_record.identity_authenticated: _archive_authenticated_identity(added_record) var status := _known_players.observe( @@ -1596,6 +1796,20 @@ func _apply_spawn_entry(entry: Dictionary) -> void: var record := _registry.get_peer(peer_id) if avatar != null and record != null: avatar.apply_appearance_snapshot(record.appearance_snapshot) + # Lifecycle and animation updates use separate reliable ENet channels. + # Include the current authoritative state in the spawn record so a peer + # joining during an action presents it immediately, regardless of which + # channel arrives first. + avatar.apply_network_animation_state(entry["animation_state"]) + avatar.apply_network_sitting_state(bool(entry["sitting"])) + var pending_animation: Dictionary = ( + _pending_animation_state_by_peer.get(peer_id, {}) + ) + if not pending_animation.is_empty(): + avatar.apply_network_animation_state(pending_animation) + _pending_animation_state_by_peer.erase(peer_id) + if peer_was_added and record != null: + peer_authenticated.emit(peer_id, record.display_name) func _build_spawn_list() -> Array[Dictionary]: @@ -1618,6 +1832,15 @@ func _make_spawn_entry( transform: Transform3D, ) -> Dictionary: var record: PeerRegistry.PeerRecord = _registry.get_peer(peer_id) + var avatar: Player = _spawn_service.get_avatar(peer_id) + var animation_state: Dictionary = ( + avatar.make_network_animation_state() + if avatar != null + else NetworkPlayerAnimationProtocol.make_state( + NetworkPlayerAnimationProtocol.LOCOMOTION_IDLE, + true, + ) + ) return { "peer_id": peer_id, "profile_id": record.profile_id if record != null else "", @@ -1628,6 +1851,12 @@ func _make_spawn_entry( transform.origin.z, ], "yaw": transform.basis.get_euler().y, + "sitting": ( + avatar.get_network_sitting_state() + if avatar != null + else false + ), + "animation_state": animation_state, "appearance": ( record.appearance_snapshot.duplicate(true) if record != null @@ -1695,25 +1924,62 @@ func _update_local_operator() -> void: _local_operator = bool(_operator_peer_ids.get(local_peer_id, false)) -func _verify_spawn_identity(entry: Dictionary) -> bool: - var fingerprint := str(entry.get("identity_fingerprint", "")) - var public_pem := NetworkIdentityCrypto.normalize_public_pem( - str(entry.get("identity_public_key", "")) - ) - if ( - NetworkIdentityCrypto.fingerprint_public_pem(public_pem) != fingerprint - or typeof(entry.get("profile_authorization")) != TYPE_DICTIONARY - ): +func verify_profile_authorization( + peer_id: int, + display_name: String, + appearance: Dictionary, + authorization: Dictionary, +) -> bool: + var record := _registry.get_peer(peer_id) + if record == null: + return false + return _verify_profile_authorization_fields( + peer_id, + record.profile_id, + display_name, + appearance, + record.identity_fingerprint, + record.identity_public_key, + authorization, + ) + + +func _verify_spawn_identity(entry: Dictionary) -> bool: + if typeof(entry.get("profile_authorization")) != TYPE_DICTIONARY: + return false + return _verify_profile_authorization_fields( + int(entry.get("peer_id", 0)), + str(entry.get("profile_id", "")), + str(entry.get("display_name", "")), + Dictionary(entry.get("appearance", {})), + str(entry.get("identity_fingerprint", "")), + str(entry.get("identity_public_key", "")), + Dictionary(entry.get("profile_authorization", {})), + ) + + +func _verify_profile_authorization_fields( + peer_id: int, + profile_id: String, + display_name: String, + appearance: Dictionary, + fingerprint: String, + identity_public_key: String, + authorization: Dictionary, +) -> bool: + var public_pem := NetworkIdentityCrypto.normalize_public_pem( + identity_public_key + ) + if NetworkIdentityCrypto.fingerprint_public_pem(public_pem) != fingerprint: return false - var authorization: Dictionary = entry["profile_authorization"] if authorization.is_empty(): - return int(entry.get("peer_id", 0)) == 1 + return peer_id == 1 if authorization.get("domain") == "handshake_client_profile": var hello := NetworkProtocol.make_client_hello( - str(entry.get("profile_id", "")), - str(entry.get("display_name", "")), + profile_id, + display_name, str(authorization.get("client_nonce", "")), - Dictionary(entry.get("appearance", {})), + appearance, fingerprint, authorization.get("signature", PackedByteArray()), ) @@ -1723,10 +1989,23 @@ func _verify_spawn_identity(entry: Dictionary) -> bool: NetworkProtocol.client_profile_fields(hello), hello["identity_signature"], ) + if authorization.get("domain") == "appearance_preview": + if str(authorization.get("sender_fingerprint", "")) != fingerprint: + return false + var preview := authorization.duplicate(true) + preview["appearance"] = appearance + return NetworkIdentityCrypto.verify_fields( + NetworkIdentityCrypto.load_public_key(public_pem), + "appearance_preview", + NetworkProfileProtocol.appearance_preview_signature_fields(preview), + preview.get("sender_signature", PackedByteArray()), + ) if authorization.has("sender_signature"): + if str(authorization.get("sender_fingerprint", "")) != fingerprint: + return false var signed := authorization.duplicate(true) - signed["display_name"] = entry.get("display_name", "") - signed["appearance"] = entry.get("appearance", {}) + signed["display_name"] = display_name + signed["appearance"] = appearance return NetworkIdentityCrypto.verify_fields( NetworkIdentityCrypto.load_public_key(public_pem), "profile_update", @@ -1803,14 +2082,69 @@ func _fail_identity(message: String) -> void: _fail(message) +func _maybe_send_local_input() -> void: + var peer_id: int = multiplayer.get_unique_id() + var avatar: Player = _spawn_service.get_avatar(peer_id) + if avatar == null: + return + var state_hash: int = avatar.get_network_input_state_hash() + var state_changed: bool = state_hash != _last_input_state_hash + if ( + avatar.has_active_network_input() + or state_changed + or _idle_input_accumulator >= IDLE_INPUT_INTERVAL + ): + _send_local_input() + _last_input_state_hash = state_hash + _idle_input_accumulator = 0.0 + + func _send_local_input() -> void: var peer_id: int = multiplayer.get_unique_id() var avatar: Player = _spawn_service.get_avatar(peer_id) if avatar == null: return - _input_sequence += 1 + _input_sequence = ( + 1 + if _input_sequence >= MAX_MOVEMENT_INPUT_SEQUENCE + else _input_sequence + 1 + ) var input: Dictionary = avatar.capture_network_input(_input_sequence) - submit_movement_input.rpc_id(1, input) + var encoded: Array = _encode_movement_input(input) + if encoded.is_empty(): + return + _pending_movement_inputs.append(input.duplicate(true)) + while _pending_movement_inputs.size() > MAX_PENDING_MOVEMENT_INPUTS: + _pending_movement_inputs.pop_front() + _movement_inputs_sent += 1 + submit_movement_input.rpc_id(1, encoded) + + +func _maybe_send_local_animation_action() -> void: + var peer_id: int = multiplayer.get_unique_id() + var avatar: Player = _spawn_service.get_avatar(peer_id) + if avatar == null: + return + var state: Dictionary = avatar.make_network_animation_state() + var action: Dictionary = state.get("action", {}) + if not NetworkPlayerAnimationProtocol.validate_action_state(action): + return + var signature: Array = [ + str(action["id"]), + int(action["sequence"]), + bool(action.get("paused", false)), + avatar.get_network_sitting_intent(), + ] + if signature == _last_local_animation_action_signature: + return + var encoded: Array = _encode_movement_animation_action( + action, + avatar.get_network_sitting_intent(), + ) + if encoded.is_empty(): + return + _last_local_animation_action_signature = signature + submit_movement_animation_action.rpc_id(1, encoded) func submit_neutral_local_movement() -> void: @@ -1820,17 +2154,112 @@ func submit_neutral_local_movement() -> void: @rpc("any_peer", "call_remote", "unreliable_ordered", 1) -func submit_movement_input(data: Dictionary) -> void: +func submit_movement_input(encoded: Array) -> void: var sender_id: int = multiplayer.get_remote_sender_id() if not is_host() or not _registry.has_peer(sender_id): return var avatar: Player = _spawn_service.get_avatar(sender_id) - if avatar == null or not _is_valid_movement_input(data): + var data: Dictionary = _decode_movement_input(encoded) + if avatar == null or data.is_empty(): return - avatar.apply_authoritative_network_input(data) + _movement_inputs_received += 1 + avatar.apply_authoritative_network_input( + data, + Player.resolve_network_input_stale_timeout_seconds( + get_peer_rtt_ms(sender_id) + ), + ) -func _is_valid_movement_input(data: Dictionary) -> bool: +@rpc( + "any_peer", + "call_remote", + "reliable", + NetworkProtocol.MOVEMENT_ANIMATION_CHANNEL, +) +func submit_movement_animation_action(encoded: Array) -> void: + var sender_id: int = multiplayer.get_remote_sender_id() + if not is_host() or not _registry.has_peer(sender_id): + return + var avatar: Player = _spawn_service.get_avatar(sender_id) + var state: Dictionary = _decode_movement_animation_action(encoded) + if avatar == null or state.is_empty(): + return + avatar.apply_authoritative_network_animation_action(state["action"]) + avatar.apply_authoritative_network_sitting_state(bool(state["sitting"])) + + +static func _encode_movement_input(data: Dictionary) -> Array: + if not _is_valid_movement_input(data): + return [] + var axis: Array = data["axis"] + var flags: int = 0 + if bool(data["jump"]): + flags |= MOVEMENT_FLAG_JUMP + if bool(data["sprint"]): + flags |= MOVEMENT_FLAG_SPRINT + if bool(data["sneak"]): + flags |= MOVEMENT_FLAG_SNEAK + if bool(data["slow_walk"]): + flags |= MOVEMENT_FLAG_SLOW_WALK + if bool(data["sitting"]): + flags |= MOVEMENT_FLAG_SITTING + if bool(data["casting"]): + flags |= MOVEMENT_FLAG_CASTING + var action: Dictionary = data["animation_action"] + return [ + int(data["sequence"]), + Vector2(float(axis[0]), float(axis[1])), + float(data["camera_yaw"]), + flags, + str(action["id"]), + int(action["sequence"]), + float(action["elapsed"]), + bool(action.get("paused", false)), + ] + + +static func _decode_movement_input(value: Variant) -> Dictionary: + if typeof(value) != TYPE_ARRAY: + return {} + var fields: Array = value + if ( + fields.size() != MOVEMENT_INPUT_FIELD_COUNT + or typeof(fields[0]) != TYPE_INT + or typeof(fields[1]) != TYPE_VECTOR2 + or typeof(fields[2]) not in [TYPE_FLOAT, TYPE_INT] + or typeof(fields[3]) != TYPE_INT + or typeof(fields[4]) not in [TYPE_STRING, TYPE_STRING_NAME] + or typeof(fields[5]) != TYPE_INT + or typeof(fields[6]) not in [TYPE_FLOAT, TYPE_INT] + or typeof(fields[7]) != TYPE_BOOL + ): + return {} + var axis: Vector2 = fields[1] + var flags: int = int(fields[3]) + if flags < 0 or flags & ~MOVEMENT_ALLOWED_FLAGS != 0: + return {} + var decoded: Dictionary = { + "sequence": int(fields[0]), + "axis": [axis.x, axis.y], + "camera_yaw": float(fields[2]), + "jump": bool(flags & MOVEMENT_FLAG_JUMP), + "sprint": bool(flags & MOVEMENT_FLAG_SPRINT), + "sneak": bool(flags & MOVEMENT_FLAG_SNEAK), + "slow_walk": bool(flags & MOVEMENT_FLAG_SLOW_WALK), + "sitting": bool(flags & MOVEMENT_FLAG_SITTING), + "casting": bool(flags & MOVEMENT_FLAG_CASTING), + "animation_action": NetworkPlayerAnimationProtocol.make_action_state( + StringName(str(fields[4])), + int(fields[5]), + float(fields[6]), + bool(fields[7]), + ), + } + return decoded if _is_valid_movement_input(decoded) else {} + + +static func _is_valid_movement_input(data: Dictionary) -> bool: if ( typeof(data.get("sequence")) != TYPE_INT or typeof(data.get("axis")) != TYPE_ARRAY @@ -1870,49 +2299,153 @@ func _is_valid_movement_input(data: Dictionary) -> bool: func _broadcast_movement_snapshots() -> void: - var snapshots: Array = [] - for peer_id: int in _registry.get_peer_ids(): - var avatar: Player = _spawn_service.get_avatar(peer_id) - if avatar == null: + _movement_snapshot_tick += 1 + var peer_ids: Array[int] = _registry.get_peer_ids() + for recipient_id: int in peer_ids: + # Peer 1 is the local listen-server player. Dedicated servers do not + # register a peer 1, so every remaining record is a remote recipient. + if recipient_id == 1: continue - var encoded: Array = _encode_movement_snapshot( - avatar.make_network_snapshot(peer_id) - ) - if not encoded.is_empty(): - snapshots.append(encoded) - # The compact v5 representation keeps a normal eight-player update near - # 1 KiB instead of the roughly 3.7 KiB dictionary representation. Rooms - # configured above the normal cap are divided into the same safe size. + var recipient_avatar: Player = _spawn_service.get_avatar(recipient_id) + if recipient_avatar == null: + continue + var snapshots: Array = [] + for subject_id: int in peer_ids: + if not peers_share_space(recipient_id, subject_id): + continue + var subject_avatar: Player = _spawn_service.get_avatar(subject_id) + if subject_avatar == null: + continue + if subject_id == recipient_id: + # The owner already simulates locally. Its authoritative state is + # an audit and acknowledgement, not a presentation stream, so it + # does not need the full 30 Hz observer snapshot rate. + if _movement_snapshot_tick % OWNER_SNAPSHOT_DIVISOR != 0: + continue + elif not _should_send_remote_snapshot( + recipient_avatar.global_position, + subject_avatar.global_position, + ): + continue + var encoded: Array = _encode_movement_snapshot( + subject_avatar.make_network_snapshot(subject_id) + ) + if not encoded.is_empty(): + snapshots.append(encoded) + _send_movement_snapshot_batches(recipient_id, snapshots) + _broadcast_movement_animation_updates(peer_ids) + + +func _should_send_remote_snapshot( + recipient_position: Vector3, + subject_position: Vector3, +) -> bool: + var distance_squared: float = recipient_position.distance_squared_to( + subject_position + ) + var divisor: int = DISTANT_REMOTE_SNAPSHOT_DIVISOR + if distance_squared <= NEAR_REMOTE_DISTANCE * NEAR_REMOTE_DISTANCE: + divisor = NEAR_REMOTE_SNAPSHOT_DIVISOR + elif distance_squared <= FAR_REMOTE_DISTANCE * FAR_REMOTE_DISTANCE: + divisor = FAR_REMOTE_SNAPSHOT_DIVISOR + return _movement_snapshot_tick % divisor == 0 + + +func _send_movement_snapshot_batches( + recipient_id: int, + snapshots: Array, +) -> void: for start_index: int in range( 0, snapshots.size(), MOVEMENT_SNAPSHOT_BATCH_SIZE, ): - receive_movement_snapshots.rpc( - snapshots.slice( - start_index, - mini( - start_index + MOVEMENT_SNAPSHOT_BATCH_SIZE, - snapshots.size(), - ), - ) + var batch: Array = snapshots.slice( + start_index, + mini( + start_index + MOVEMENT_SNAPSHOT_BATCH_SIZE, + snapshots.size(), + ), ) + receive_movement_snapshots.rpc_id(recipient_id, batch) + _movement_snapshot_packets_sent += 1 + _movement_snapshot_states_sent += batch.size() + + +func _broadcast_movement_animation_updates(peer_ids: Array[int]) -> void: + var refresh_all: bool = ( + _animation_refresh_accumulator >= ANIMATION_REFRESH_INTERVAL + ) + if refresh_all: + _animation_refresh_accumulator = fmod( + _animation_refresh_accumulator, + ANIMATION_REFRESH_INTERVAL, + ) + var updates_by_subject: Dictionary[int, Array] = {} + for subject_id: int in peer_ids: + var avatar: Player = _spawn_service.get_avatar(subject_id) + if avatar == null: + continue + var state: Dictionary = avatar.make_network_animation_state() + var previous: Dictionary = _last_animation_state_by_peer.get( + subject_id, {} + ) + if ( + not refresh_all + and _movement_animation_signature(state) + == _movement_animation_signature(previous) + ): + continue + _last_animation_state_by_peer[subject_id] = state.duplicate(true) + var encoded: Array = _encode_movement_animation(subject_id, state) + if not encoded.is_empty(): + updates_by_subject[subject_id] = encoded + if updates_by_subject.is_empty(): + return + for recipient_id: int in peer_ids: + if recipient_id == 1: + continue + var updates: Array = [] + for subject_id: int in updates_by_subject: + if peers_share_space(recipient_id, subject_id): + updates.append(updates_by_subject[subject_id]) + if updates.is_empty(): + continue + receive_movement_animations.rpc_id(recipient_id, updates) + _movement_animation_packets_sent += 1 + _movement_animation_states_sent += updates.size() + + +static func _movement_animation_signature(state: Dictionary) -> Array: + if not NetworkPlayerAnimationProtocol.validate_state(state): + return [] + var action: Dictionary = state["action"] + return [ + str(state["locomotion_id"]), + bool(state["grounded"]), + str(action["id"]), + int(action["sequence"]), + bool(action.get("paused", false)), + ] static func _encode_movement_snapshot(snapshot: Dictionary) -> Array: var position: Variant = snapshot.get("position") var snapshot_velocity: Variant = snapshot.get("velocity") - var animation_value: Variant = snapshot.get("animation_state") if ( typeof(position) != TYPE_ARRAY or position.size() != 3 or typeof(snapshot_velocity) != TYPE_ARRAY or snapshot_velocity.size() != 3 - or not NetworkPlayerAnimationProtocol.validate_state(animation_value) ): return [] - var animation: Dictionary = animation_value - var action: Dictionary = animation["action"] + var flags: int = 0 + if bool(snapshot.get("grounded", false)): + flags |= SNAPSHOT_FLAG_GROUNDED + if bool(snapshot.get("sitting", false)): + flags |= SNAPSHOT_FLAG_SITTING + if bool(snapshot.get("casting", false)): + flags |= SNAPSHOT_FLAG_CASTING return [ int(snapshot.get("peer_id", 0)), int(snapshot.get("acknowledged_input", 0)), @@ -1923,14 +2456,7 @@ static func _encode_movement_snapshot(snapshot: Dictionary) -> Array: float(snapshot_velocity[2]), ), float(snapshot.get("visual_yaw", 0.0)), - str(animation["locomotion_id"]), - bool(animation["grounded"]), - str(action["id"]), - int(action["sequence"]), - float(action["elapsed"]), - bool(action.get("paused", false)), - bool(snapshot.get("sitting", false)), - bool(snapshot.get("casting", false)), + flags, ] @@ -1945,18 +2471,22 @@ static func _decode_movement_snapshot(value: Variant) -> Dictionary: or typeof(fields[2]) != TYPE_VECTOR3 or typeof(fields[3]) != TYPE_VECTOR3 or typeof(fields[4]) not in [TYPE_FLOAT, TYPE_INT] - or typeof(fields[5]) not in [TYPE_STRING, TYPE_STRING_NAME] - or typeof(fields[6]) != TYPE_BOOL - or typeof(fields[7]) not in [TYPE_STRING, TYPE_STRING_NAME] - or typeof(fields[8]) != TYPE_INT - or typeof(fields[9]) not in [TYPE_FLOAT, TYPE_INT] - or typeof(fields[10]) != TYPE_BOOL - or typeof(fields[11]) != TYPE_BOOL - or typeof(fields[12]) != TYPE_BOOL + or typeof(fields[5]) != TYPE_INT ): return {} var position: Vector3 = fields[2] var snapshot_velocity: Vector3 = fields[3] + var flags: int = int(fields[5]) + if ( + int(fields[0]) <= 0 + or int(fields[1]) < 0 + or not position.is_finite() + or not snapshot_velocity.is_finite() + or not is_finite(float(fields[4])) + or flags < 0 + or flags & ~SNAPSHOT_ALLOWED_FLAGS != 0 + ): + return {} return { "peer_id": int(fields[0]), "acknowledged_input": int(fields[1]), @@ -1967,19 +2497,100 @@ static func _decode_movement_snapshot(value: Variant) -> Dictionary: snapshot_velocity.z, ], "visual_yaw": float(fields[4]), - "animation_state": NetworkPlayerAnimationProtocol.make_state( - StringName(str(fields[5])), - bool(fields[6]), - StringName(str(fields[7])), - int(fields[8]), - float(fields[9]), - bool(fields[10]), - ), - "sitting": bool(fields[11]), - "casting": bool(fields[12]), + "grounded": bool(flags & SNAPSHOT_FLAG_GROUNDED), + "sitting": bool(flags & SNAPSHOT_FLAG_SITTING), + "casting": bool(flags & SNAPSHOT_FLAG_CASTING), } +static func _encode_movement_animation( + peer_id: int, + state: Dictionary, +) -> Array: + if not NetworkPlayerAnimationProtocol.validate_state(state): + return [] + var action: Dictionary = state["action"] + return [ + peer_id, + str(state["locomotion_id"]), + bool(state["grounded"]), + str(action["id"]), + int(action["sequence"]), + float(action["elapsed"]), + bool(action.get("paused", false)), + ] + + +static func _decode_movement_animation(value: Variant) -> Dictionary: + if typeof(value) != TYPE_ARRAY: + return {} + var fields: Array = value + if ( + fields.size() != MOVEMENT_ANIMATION_FIELD_COUNT + or typeof(fields[0]) != TYPE_INT + or typeof(fields[1]) not in [TYPE_STRING, TYPE_STRING_NAME] + or typeof(fields[2]) != TYPE_BOOL + or typeof(fields[3]) not in [TYPE_STRING, TYPE_STRING_NAME] + or typeof(fields[4]) != TYPE_INT + or typeof(fields[5]) not in [TYPE_FLOAT, TYPE_INT] + or typeof(fields[6]) != TYPE_BOOL + ): + return {} + var state: Dictionary = NetworkPlayerAnimationProtocol.make_state( + StringName(str(fields[1])), + bool(fields[2]), + StringName(str(fields[3])), + int(fields[4]), + float(fields[5]), + bool(fields[6]), + ) + if ( + int(fields[0]) <= 0 + or not NetworkPlayerAnimationProtocol.validate_state(state) + ): + return {} + return {"peer_id": int(fields[0]), "state": state} + + +static func _encode_movement_animation_action( + action: Dictionary, + sitting: bool, +) -> Array: + if not NetworkPlayerAnimationProtocol.validate_action_state(action): + return [] + return [ + str(action["id"]), + int(action["sequence"]), + float(action["elapsed"]), + bool(action.get("paused", false)), + sitting, + ] + + +static func _decode_movement_animation_action(value: Variant) -> Dictionary: + if typeof(value) != TYPE_ARRAY: + return {} + var fields: Array = value + if ( + fields.size() != MOVEMENT_ANIMATION_ACTION_FIELD_COUNT + or typeof(fields[0]) not in [TYPE_STRING, TYPE_STRING_NAME] + or typeof(fields[1]) != TYPE_INT + or typeof(fields[2]) not in [TYPE_FLOAT, TYPE_INT] + or typeof(fields[3]) != TYPE_BOOL + or typeof(fields[4]) != TYPE_BOOL + ): + return {} + var action: Dictionary = NetworkPlayerAnimationProtocol.make_action_state( + StringName(str(fields[0])), + int(fields[1]), + float(fields[2]), + bool(fields[3]), + ) + if not NetworkPlayerAnimationProtocol.validate_action_state(action): + return {} + return {"action": action, "sitting": bool(fields[4])} + + @rpc("authority", "call_remote", "unreliable_ordered", 2) func receive_movement_snapshots(encoded_snapshots: Array) -> void: if state != State.JOINED_CLIENT: @@ -1999,11 +2610,17 @@ func receive_movement_snapshots(encoded_snapshots: Array) -> void: if avatar == null: continue if peer_id == local_peer_id: + if _reject_stale_space_transition_snapshot(snapshot): + continue + _discard_acknowledged_movement_inputs( + int(snapshot.get("acknowledged_input", 0)) + ) avatar.apply_local_prediction_correction( snapshot, _input_sequence, INPUT_INTERVAL, estimated_transit_seconds, + _local_snapshot_delta_seconds(), ) else: avatar.push_network_snapshot( @@ -2012,6 +2629,80 @@ func receive_movement_snapshots(encoded_snapshots: Array) -> void: ) +func _reject_stale_space_transition_snapshot(snapshot: Dictionary) -> bool: + if not _local_space_transition_guard_active: + return false + var position_values: Array = snapshot.get("position", []) + if position_values.size() != 3: + return true + var position := Vector3( + float(position_values[0]), + float(position_values[1]), + float(position_values[2]), + ) + var acknowledged_input: int = int( + snapshot.get("acknowledged_input", 0) + ) + if acknowledged_input < _local_space_transition_minimum_ack: + return true + if acknowledged_input > _local_space_transition_minimum_ack: + _local_space_transition_guard_active = false + return false + if position.distance_to(_local_space_transition_guard_position) > ( + SPACE_TRANSITION_SNAPSHOT_GUARD_DISTANCE + ): + return true + _local_space_transition_guard_active = false + return false + + +func _discard_acknowledged_movement_inputs(acknowledged_sequence: int) -> void: + while ( + not _pending_movement_inputs.is_empty() + and int(_pending_movement_inputs[0].get("sequence", 0)) + <= acknowledged_sequence + ): + _pending_movement_inputs.pop_front() + + +func _local_snapshot_delta_seconds() -> float: + var now_msec: int = Time.get_ticks_msec() + if _last_local_snapshot_received_msec <= 0: + _last_local_snapshot_received_msec = now_msec + return 0.0 + var elapsed_seconds: float = clampf( + float(now_msec - _last_local_snapshot_received_msec) / 1000.0, + 0.0, + Player.LOCAL_PREDICTION_MAX_AUDIT_DELTA_SECONDS, + ) + _last_local_snapshot_received_msec = now_msec + return elapsed_seconds + + +@rpc( + "authority", + "call_remote", + "reliable", + NetworkProtocol.MOVEMENT_ANIMATION_CHANNEL, +) +func receive_movement_animations(encoded_states: Array) -> void: + if state != State.JOINED_CLIENT: + return + for value: Variant in encoded_states: + var decoded: Dictionary = _decode_movement_animation(value) + if decoded.is_empty(): + continue + var avatar: Player = _spawn_service.get_avatar( + int(decoded["peer_id"]) + ) + if avatar == null: + _pending_animation_state_by_peer[int(decoded["peer_id"])] = ( + Dictionary(decoded["state"]).duplicate(true) + ) + continue + avatar.apply_network_animation_state(decoded["state"]) + + func _estimated_movement_transit_seconds() -> float: if state != State.JOINED_CLIENT: return -1.0 @@ -2287,8 +2978,21 @@ func _teardown_peer() -> void: _connection_deadline = 0.0 _input_sequence = 0 _input_accumulator = 0.0 + _idle_input_accumulator = 0.0 + _last_input_state_hash = 0 + _pending_movement_inputs.clear() _snapshot_accumulator = 0.0 + _movement_snapshot_tick = 0 + _last_local_snapshot_received_msec = 0 + _local_space_transition_guard_active = false + _local_space_transition_guard_position = Vector3.ZERO + _local_space_transition_minimum_ack = 0 + _animation_refresh_accumulator = 0.0 + _last_animation_state_by_peer.clear() + _pending_animation_state_by_peer.clear() + _last_local_animation_action_signature.clear() _server_capabilities = PackedStringArray() + _peer_space_ids.clear() _server_identity_fingerprint = "" _server_identity_public_key = "" _session_identity_keys.clear() diff --git a/network/network_shop_protocol.gd b/network/network_shop_protocol.gd index 2de9cc1..e58556e 100644 --- a/network/network_shop_protocol.gd +++ b/network/network_shop_protocol.gd @@ -4,6 +4,8 @@ extends RefCounted const CAPABILITY: StringName = &"shop_v1" const ART_CAPABILITY: StringName = &"art_shop_v1" const BACKPACK_CAPABILITY: StringName = &"backpack_shop_v1" +const DECOR_CAPABILITY: StringName = &"portable_home_v1" +const HOME_UPGRADE_CAPABILITY: StringName = &"home_upgrade_v1" const RELIABLE_CHANNEL: int = NetworkProtocol.SHOP_RELIABLE_CHANNEL const MAX_ID_LENGTH: int = 96 const MAX_MESSAGE_LENGTH: int = 160 @@ -14,10 +16,11 @@ enum ProductCategory { ROD, REEL_SPEED_UPGRADE, BARRIER_POWER_UPGRADE, - COOLER_CAPACITY_UPGRADE, + HOME_UPGRADE, ART_KIT, ART_UPGRADE, BACKPACK_CAPACITY_UPGRADE, + DECOR, } diff --git a/network/network_shop_service.gd b/network/network_shop_service.gd index 6f31c40..e4d6f9c 100644 --- a/network/network_shop_service.gd +++ b/network/network_shop_service.gd @@ -8,11 +8,14 @@ const ItemDataType = preload("res://items/item_data.gd") const FishingRodDataType = preload("res://items/fishing_rod_data.gd") const OwnedItemType = preload("res://items/owned_item.gd") const ArtShopStockType = preload("res://economy/art_shop_stock.gd") +const DecorCatalogType = preload("res://homes/decor_catalog.gd") -const SHOP_ID: StringName = &"main_fishing_shop" +const FISHING_SHOP_ID: StringName = &"main_fishing_shop" +const DECOR_SHOP_ID: StringName = &"rv_decor_shop" +const RV_UPGRADE_SHOP_ID: StringName = &"rv_upgrade_shop" const REEL_PRODUCT_ID: StringName = &"reel_speed_upgrade" const BARRIER_PRODUCT_ID: StringName = &"barrier_power_upgrade" -const COOLER_PRODUCT_ID: StringName = &"cooler_capacity_upgrade" +const HOME_UPGRADE_PRODUCT_ID: StringName = &"starter_rv_upgrade" const BACKPACK_PRODUCT_ID: StringName = &"backpack_capacity_upgrade" const MAX_LEDGER_ENTRIES_PER_PEER: int = 64 @@ -31,6 +34,8 @@ var _session: NetworkSession var _spawn_service: PlayerSpawnService var _network_fishing: NetworkFishingService var _interaction: FishingShopInteraction +var _decor_interaction: DecorShopInteraction +var _rv_upgrade_interaction: FishingShopInteraction var _wallet: PlayerWallet var _bag: PlayerBag var _item_catalog: ItemCatalog @@ -47,6 +52,8 @@ var _received_results: Dictionary[String, bool] = {} var _applied_results: Dictionary[String, bool] = {} var _pending_local_request: Dictionary = {} var _reservations: PlayerAssetReservationService +var _home_state: PlayerHomeState +var _network_home: NetworkHomeService func setup( @@ -63,6 +70,10 @@ func setup( save_manager: PlayerSaveManager, reservations: PlayerAssetReservationService, inventory_layout: PlayerInventoryLayout = null, + home_state: PlayerHomeState = null, + network_home: NetworkHomeService = null, + decor_interaction: DecorShopInteraction = null, + rv_upgrade_interaction: FishingShopInteraction = null, ) -> void: _session = session _spawn_service = spawn_service @@ -77,6 +88,10 @@ func setup( _save_manager = save_manager _reservations = reservations _inventory_layout = inventory_layout + _home_state = home_state + _network_home = network_home + _decor_interaction = decor_interaction + _rv_upgrade_interaction = rv_upgrade_interaction if not _session.peer_removed.is_connected(_on_peer_removed): _session.peer_removed.connect(_on_peer_removed) if not _session.state_changed.is_connected(_on_session_state_changed): @@ -87,6 +102,18 @@ func set_shop_interaction(interaction: FishingShopInteraction) -> void: _interaction = interaction +func set_decor_shop_interaction( + interaction: DecorShopInteraction, +) -> void: + _decor_interaction = interaction + + +func set_rv_upgrade_shop_interaction( + interaction: FishingShopInteraction, +) -> void: + _rv_upgrade_interaction = interaction + + func can_request_purchase() -> bool: return ( _session != null @@ -124,6 +151,32 @@ func can_request_backpack_purchase() -> bool: ) +func can_request_decor_purchase() -> bool: + return ( + can_request_purchase() + and _home_state != null + and ( + _session.is_host() + or _session.supports_server_capability( + NetworkShopProtocol.DECOR_CAPABILITY + ) + ) + ) + + +func can_request_home_upgrade() -> bool: + return ( + can_request_purchase() + and _home_state != null + and ( + _session.is_host() + or _session.supports_server_capability( + NetworkShopProtocol.HOME_UPGRADE_CAPABILITY + ) + ) + ) + + func is_local_purchase_pending() -> bool: return not _pending_local_request.is_empty() @@ -174,12 +227,12 @@ func request_barrier_power_upgrade() -> String: ) -func request_cooler_capacity_upgrade() -> String: +func request_home_upgrade() -> String: return _request_purchase( - COOLER_PRODUCT_ID, - NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE, + HOME_UPGRADE_PRODUCT_ID, + NetworkShopProtocol.ProductCategory.HOME_UPGRADE, 1, - _cooler_capacity.get_level() if _cooler_capacity != null else 0 + _home_state.get_tier() if _home_state != null else 0 ) @@ -193,6 +246,15 @@ func request_backpack_capacity_upgrade() -> String: ) +func request_decor(product_id: StringName) -> String: + return _request_purchase( + product_id, + NetworkShopProtocol.ProductCategory.DECOR, + 1, + _home_state.get_owned_count(product_id) if _home_state != null else 0, + ) + + func request_art_kit() -> String: return _request_purchase( ArtShopStockType.ART_KIT_ITEM_ID, @@ -269,11 +331,30 @@ func _request_purchase( product_id, category, 0, 0, ) return "" + if ( + category == NetworkShopProtocol.ProductCategory.HOME_UPGRADE + and not can_request_home_upgrade() + ): + local_purchase_finished.emit( + "", false, "RV upgrades require a newer server.", + product_id, category, 0, 0, + ) + return "" + if ( + category == NetworkShopProtocol.ProductCategory.DECOR + and not can_request_decor_purchase() + ): + local_purchase_finished.emit( + "", false, "Decor require a newer server.", + product_id, category, 0, 0, + ) + return "" var request_id: String = _new_id("shop") + var shop_id: StringName = _shop_id_for_category(category) var request: Dictionary = { "request_id": request_id, "session_id": _session.get_session_id(), - "shop_id": str(SHOP_ID), + "shop_id": str(shop_id), "product_id": str(product_id), "category": category, "quantity": quantity, @@ -345,16 +426,38 @@ func _handle_purchase_request(peer_id: int, data: Dictionary) -> void: _rejected_result(data, "A purchase is already pending.") ) return - if not _is_shop_available_for_peer(peer_id): + var requested_shop_id := StringName(str(data["shop_id"])) + if not _is_shop_available_for_peer(peer_id, requested_shop_id): var avatar: Player = _spawn_service.get_avatar(peer_id) + var requested_interaction: FishingShopInteraction = ( + _interaction_for_shop(requested_shop_id) + ) var message: String = ( "The shop is unavailable." - if avatar == null or _interaction == null + if avatar == null or requested_interaction == null else "Move closer to the shop." ) _record_and_send(peer_id, _rejected_result(data, message)) return var result: Dictionary = _build_authoritative_result(peer_id, data) + if ( + bool(result.get("accepted", false)) + and _network_home != null + ): + match int(result.get("category", -1)): + NetworkShopProtocol.ProductCategory.DECOR: + _network_home.authorize_decor_purchase( + peer_id, + StringName(str(result["product_id"])), + int(result["resulting_state"]), + str(result["result_id"]), + ) + NetworkShopProtocol.ProductCategory.HOME_UPGRADE: + _network_home.authorize_home_upgrade( + peer_id, + int(result["resulting_state"]), + str(result["result_id"]), + ) _pending_by_peer[peer_id] = request_id _record_and_send(peer_id, result) @@ -368,10 +471,29 @@ func _build_authoritative_result( var quantity: int = request["quantity"] var wallet_balance: int = request["wallet_balance"] var current_state: int = request["current_state"] + if ( + category == NetworkShopProtocol.ProductCategory.DECOR + and _network_home != null + ): + var authoritative_count: int = ( + _network_home.get_authoritative_owned_count(peer_id, product_id) + ) + if authoritative_count >= 0: + current_state = authoritative_count + elif ( + category == NetworkShopProtocol.ProductCategory.HOME_UPGRADE + and _network_home != null + ): + var authoritative_tier: int = ( + _network_home.get_authoritative_home_tier(peer_id) + ) + if authoritative_tier >= 0: + current_state = authoritative_tier var cost: int = -1 var resulting_state: int = current_state var rejection: String = "" - if StringName(str(request["shop_id"])) != SHOP_ID: + var expected_shop_id: StringName = _shop_id_for_category(category) + if StringName(str(request["shop_id"])) != expected_shop_id: rejection = "The shop is unavailable." elif quantity < 1: rejection = "Purchase could not be completed." @@ -484,18 +606,14 @@ func _build_authoritative_result( ] ) resulting_state = current_state + 1 - NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE: + NetworkShopProtocol.ProductCategory.HOME_UPGRADE: if ( - product_id != COOLER_PRODUCT_ID - or current_state >= PlayerCoolerCapacity.MAX_LEVEL + product_id != HOME_UPGRADE_PRODUCT_ID + or current_state >= PlayerHomeState.MAX_TIER ): rejection = "Upgrade is already at maximum." else: - cost = ( - PlayerCoolerCapacity.EXPANSION_COSTS[ - current_state - ] - ) + cost = PlayerHomeState.HOME_UPGRADE_COSTS[current_state] resulting_state = current_state + 1 NetworkShopProtocol.ProductCategory.BACKPACK_CAPACITY_UPGRADE: if ( @@ -545,6 +663,19 @@ func _build_authoritative_result( resulting_state = PlayerArtUnlocks.resulting_mask( current_state, product_id ) + NetworkShopProtocol.ProductCategory.DECOR: + cost = DecorCatalogType.get_price(product_id) + if ( + not DecorCatalogType.has_product(product_id) + or quantity != 1 + or current_state < 0 + or current_state + >= DecorCatalogType.MAX_OWNED_PER_PRODUCT + or cost < 0 + ): + rejection = "Decor is unavailable." + else: + resulting_state = current_state + 1 if rejection.is_empty() and (cost < 0 or wallet_balance < cost): rejection = "Insufficient funds." if not rejection.is_empty(): @@ -667,6 +798,9 @@ func _apply_purchase_result(data: Dictionary) -> void: if _inventory_layout != null else 0 ) var art_snapshot: int = _art_unlocks.get_unlock_mask() + var home_snapshot: Dictionary = ( + _home_state.to_save_data() if _home_state != null else {} + ) var applied: bool = _apply_local_product(data) if not applied or not _save_manager.save_if_dirty(): _bag.replace_all_items(bag_snapshot) @@ -676,6 +810,8 @@ func _apply_purchase_result(data: Dictionary) -> void: if _inventory_layout != null: _inventory_layout.restore_backpack_level(backpack_snapshot) _art_unlocks.restore_mask(art_snapshot) + if _home_state != null and not home_snapshot.is_empty(): + _home_state.restore_from_save_data(home_snapshot) _wallet.restore_balance(wallet_snapshot) _save_manager.save_if_dirty() _fail_local_apply(data, "Purchase could not be completed.") @@ -696,6 +832,7 @@ func _validate_local_result(data: Dictionary) -> String: or _cooler_capacity == null or _art_unlocks == null or _save_manager == null + or _home_state == null or _wallet.get_balance() != int(data["expected_wallet"]) or str(data["product_id"]) != str(_pending_local_request.get("product_id", "")) @@ -770,10 +907,12 @@ func _validate_local_result(data: Dictionary) -> String: return "Purchase could not be completed." if _upgrades.get_next_barrier_power_cost() != cost: return "Purchase could not be completed." - NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE: - if _cooler_capacity.get_level() != expected_state: - return "Purchase could not be completed." - if _cooler_capacity.get_next_cost() != cost: + NetworkShopProtocol.ProductCategory.HOME_UPGRADE: + if ( + product_id != HOME_UPGRADE_PRODUCT_ID + or _home_state.get_tier() != expected_state + or _home_state.get_next_upgrade_cost() != cost + ): return "Purchase could not be completed." NetworkShopProtocol.ProductCategory.BACKPACK_CAPACITY_UPGRADE: if ( @@ -806,6 +945,20 @@ func _validate_local_result(data: Dictionary) -> String: or cost != ArtShopStockType.UPGRADE_PRICE ): return "Purchase could not be completed." + NetworkShopProtocol.ProductCategory.DECOR: + if ( + not DecorCatalogType.has_product(product_id) + or _home_state.get_owned_count(product_id) != expected_state + or resulting_state != expected_state + 1 + or cost != DecorCatalogType.get_price(product_id) + or expected_state >= DecorCatalogType.MAX_OWNED_PER_PRODUCT + or not _bag.can_add_item(product_id, 1) + ): + return ( + "Your inventory is full." + if not _bag.can_add_item(product_id, 1) + else "Purchase could not be completed." + ) _: return "Purchase could not be completed." return "" @@ -829,8 +982,11 @@ func _apply_local_product(data: Dictionary) -> bool: return _upgrades.purchase_reel_speed(_wallet) NetworkShopProtocol.ProductCategory.BARRIER_POWER_UPGRADE: return _upgrades.purchase_barrier_power(_wallet) - NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE: - return _cooler_capacity.purchase(_wallet) + NetworkShopProtocol.ProductCategory.HOME_UPGRADE: + return ( + _wallet.debit(int(data["total_cost"])) + and _home_state.upgrade_to_next_tier() + ) NetworkShopProtocol.ProductCategory.BACKPACK_CAPACITY_UPGRADE: return ( _inventory_layout != null @@ -845,6 +1001,12 @@ func _apply_local_product(data: Dictionary) -> bool: return _art_unlocks.purchase_product( product_id, _wallet, int(data["total_cost"]) ) + NetworkShopProtocol.ProductCategory.DECOR: + return ( + _wallet.debit(int(data["total_cost"])) + and _bag.add_item(product_id, 1) + and _home_state.add_owned_decor(product_id, 1) + ) return false @@ -921,7 +1083,7 @@ func _handle_acknowledgement( peer_id: int, result_id: String, request_id: String, - _applied: bool, + applied: bool, message: String, ) -> void: if ( @@ -933,20 +1095,31 @@ func _handle_acknowledgement( or _result_owners.get(result_id, 0) != peer_id ): return + if _network_home != null: + _network_home.finalize_decor_purchase( + peer_id, result_id, applied + ) + _network_home.finalize_home_upgrade( + peer_id, result_id, applied + ) _acknowledged_results[result_id] = true _bound_dictionary(_acknowledged_results) if _pending_by_peer.get(peer_id, "") == request_id: _pending_by_peer.erase(peer_id) -func _is_shop_available_for_peer(peer_id: int) -> bool: +func _is_shop_available_for_peer( + peer_id: int, + shop_id: StringName, +) -> bool: + var interaction: FishingShopInteraction = _interaction_for_shop(shop_id) if ( _session == null or not _session.is_host() or not _session.is_gameplay_session_active() or _spawn_service == null - or _interaction == null - or not is_instance_valid(_interaction) + or interaction == null + or not is_instance_valid(interaction) ): return false var avatar: Player = _spawn_service.get_avatar(peer_id) @@ -957,10 +1130,28 @@ func _is_shop_available_for_peer(peer_id: int) -> bool: _network_fishing == null or not _network_fishing.has_peer_attempt(peer_id) ) - and _interaction.is_avatar_in_range(avatar) + and interaction.is_avatar_in_range(avatar) ) +func _shop_id_for_category(category: int) -> StringName: + match category: + NetworkShopProtocol.ProductCategory.DECOR: + return DECOR_SHOP_ID + NetworkShopProtocol.ProductCategory.HOME_UPGRADE: + return RV_UPGRADE_SHOP_ID + return FISHING_SHOP_ID + + +func _interaction_for_shop(shop_id: StringName) -> FishingShopInteraction: + match shop_id: + DECOR_SHOP_ID: + return _decor_interaction + RV_UPGRADE_SHOP_ID: + return _rv_upgrade_interaction + return _interaction + + func _on_peer_removed(peer_id: int) -> void: _request_ledgers.erase(peer_id) _pending_by_peer.erase(peer_id) diff --git a/network/network_surface_drawing_service.gd b/network/network_surface_drawing_service.gd index 10348aa..485dfaa 100644 --- a/network/network_surface_drawing_service.gd +++ b/network/network_surface_drawing_service.gd @@ -52,6 +52,7 @@ var _canvas_states: Dictionary[String, Dictionary] = {} var _canvas_nodes: Dictionary[String, SurfaceDrawingCanvas] = {} var _selected_canvas_id: String = "" var _hovered_canvas_id: String = "" +var _last_hovered_canvas_id: String = "" var _brush_preview: MultiMeshInstance3D var _brush_preview_multimesh: MultiMesh var _brush_preview_material: ShaderMaterial @@ -236,6 +237,7 @@ func activate( return _active = true _placing_grid = false + _last_hovered_canvas_id = "" _clear_stamp_mode() _eraser_mode = false _clear_armed_guide_action(false) @@ -248,7 +250,11 @@ func activate( _pointer_screen_position = _clamped_pointer_position( initial_pointer_position ) - _prior_mouse_mode = Input.mouse_mode + # Art-kit activation can occur while the prior right-click camera drag is + # still held. Stop that drag before recording a return mode, then restore + # normal camera availability so right-click continues to work while drawing. + _stop_camera_drag_for_art_kit() + _prior_mouse_mode = _get_restorable_mouse_mode(Input.mouse_mode) Input.mouse_mode = Input.MOUSE_MODE_VISIBLE _update_aim() _refresh_stencil_visibility() @@ -264,16 +270,35 @@ func deactivate() -> void: _eraser_mode = false _clear_armed_guide_action(false) _camera_look_active = false + # Do not leave a drag captured when drawing is closed by a menu, hotbar + # change, or session transition. The next camera drag must start on a fresh + # physical right-click press. + _stop_camera_drag_for_art_kit() _reset_stroke() _selected_canvas_id = "" _hovered_canvas_id = "" + _last_hovered_canvas_id = "" _aim_hit.clear() _hide_previews() _refresh_stencil_visibility() - Input.mouse_mode = _prior_mouse_mode + Input.mouse_mode = _get_restorable_mouse_mode(_prior_mouse_mode) _emit_hud_state("") +func _stop_camera_drag_for_art_kit() -> void: + if _local_player == null or not is_instance_valid(_local_player): + return + var camera_input_enabled: bool = _local_player.is_camera_input_enabled() + _local_player.set_camera_input_enabled(false) + _local_player.set_camera_input_enabled(camera_input_enabled) + + +func _get_restorable_mouse_mode(mouse_mode: Input.MouseMode) -> Input.MouseMode: + if mouse_mode == Input.MOUSE_MODE_CAPTURED: + return Input.MOUSE_MODE_VISIBLE + return mouse_mode + + func is_active() -> bool: return _active @@ -849,10 +874,22 @@ func select_saved_stamp(path: String) -> bool: func export_aimed_canvas() -> String: _update_aim() - if _hovered_canvas_id.is_empty(): + var canvas_id: String = ( + _hovered_canvas_id + if not _hovered_canvas_id.is_empty() + else _last_hovered_canvas_id + ) + var canvas: SurfaceDrawingCanvas = _canvas_nodes.get(canvas_id) + if ( + canvas_id.is_empty() + or canvas == null + or not is_instance_valid(canvas) + or canvas.is_hidden_by_relationship() + ): + _last_hovered_canvas_id = "" _emit_hud_state("aim at artwork before exporting") return "" - return export_canvas_png(_hovered_canvas_id) + return export_canvas_png(canvas_id) func export_canvas_png(canvas_id: String) -> String: @@ -864,7 +901,7 @@ func export_canvas_png(canvas_id: String) -> String: _emit_hud_state("paint something before exporting") return "" if _data_root == null or _data_root.root_path.is_empty(): - _emit_hud_state("choose a NETfishing data folder before exporting") + _emit_hud_state("choose a straywild data folder before exporting") return "" var export_directory: String = _artwork_directory() if DirAccess.make_dir_recursive_absolute(export_directory) != OK: @@ -975,7 +1012,7 @@ func _stamp_entry_is_unlocked(entry: Dictionary) -> bool: func _next_artwork_export_path(directory: String) -> String: var date_time: Dictionary = Time.get_datetime_dict_from_system() - var stem: String = "netfishing-artwork-%04d%02d%02d-%02d%02d%02d" % [ + var stem: String = "straywild-artwork-%04d%02d%02d-%02d%02d%02d" % [ int(date_time.get("year", 0)), int(date_time.get("month", 0)), int(date_time.get("day", 0)), @@ -1070,6 +1107,8 @@ func _update_aim() -> void: selected_layer = layer _selected_canvas_id = found_canvas_id _hovered_canvas_id = found_hovered_canvas_id + if not _hovered_canvas_id.is_empty(): + _last_hovered_canvas_id = _hovered_canvas_id if previous_canvas_id != _selected_canvas_id: _reset_stroke() _update_previews() @@ -2865,6 +2904,7 @@ func _clear_session_artwork_state() -> void: _canvas_sequence = 0 _selected_canvas_id = "" _hovered_canvas_id = "" + _last_hovered_canvas_id = "" _stroke_history_by_peer.clear() _cell_last_stroke.clear() _last_local_stroke_id = "" @@ -2900,6 +2940,8 @@ func _remove_canvas_state(canvas_id: String) -> void: _selected_canvas_id = "" if _hovered_canvas_id == canvas_id: _hovered_canvas_id = "" + if _last_hovered_canvas_id == canvas_id: + _last_hovered_canvas_id = "" func _emit_artwork_changed() -> void: diff --git a/network/network_transport.gd b/network/network_transport.gd index ce68172..5aed6ca 100644 --- a/network/network_transport.gd +++ b/network/network_transport.gd @@ -22,6 +22,25 @@ func connect_to_route(_route: ConnectionRoute) -> Error: func disconnect_transport() -> void: if _peer != null: + # Give ENet one poll cycle to emit its graceful disconnect packets before + # closing the socket. This keeps a host from retaining a departed player + # until the extended generated-world liveness timeout expires. + if ( + _peer is ENetMultiplayerPeer + and _peer.get_connection_status() + == MultiplayerPeer.CONNECTION_CONNECTED + ): + var enet_peer := _peer as ENetMultiplayerPeer + # A host explicitly notifies each still-live client before closing. + # Clients rely on ENetMultiplayerPeer.close(); their cached SceneTree + # peer list can briefly outlive the underlying ENet peer after a remote + # disconnect, making disconnect_peer() race and report an engine error. + if enet_peer.get_unique_id() == 1: + for peer_id: int in multiplayer.get_peers(): + if enet_peer.get_peer(peer_id) != null: + enet_peer.disconnect_peer(peer_id, false) + if enet_peer.host != null: + enet_peer.host.flush() _peer.close() _peer = null _route_description = "" diff --git a/network/network_world_spawn_protocol.gd b/network/network_world_spawn_protocol.gd index 4d0a55d..4bd15b0 100644 --- a/network/network_world_spawn_protocol.gd +++ b/network/network_world_spawn_protocol.gd @@ -3,8 +3,8 @@ extends RefCounted const CAPABILITY: StringName = &"world_spawn_envelope_v1" const ENVELOPE_VERSION: int = 1 -const RELIABLE_CHANNEL: int = NetworkProtocol.ITEM_RELIABLE_CHANNEL -const SNAPSHOT_CHANNEL: int = 4 +const RELIABLE_CHANNEL: int = NetworkProtocol.WORLD_SPAWN_RELIABLE_CHANNEL +const SNAPSHOT_CHANNEL: int = 15 const MAX_SESSION_ID_LENGTH: int = 96 const MAX_EVENT_ID_LENGTH: int = 48 const MAX_ENTITY_ID_LENGTH: int = 128 diff --git a/network/network_world_spawn_service.gd b/network/network_world_spawn_service.gd index db4afad..8981237 100644 --- a/network/network_world_spawn_service.gd +++ b/network/network_world_spawn_service.gd @@ -16,7 +16,9 @@ const CalendarSeasonType = preload("res://world/calendar_season.gd") signal local_capture_received(fish_catch: FishCatch) signal local_interaction_finished(accepted: bool, message: String) -const SNAPSHOT_INTERVAL_SECONDS: float = 0.2 +const SIMULATION_INTERVAL_SECONDS: float = 1.0 / 15.0 +const SNAPSHOT_INTERVAL_SECONDS: float = 0.1 +const PLAYER_SPATIAL_CELL_SIZE: float = 8.0 const CAPACITY_RESPONSE_TIMEOUT_SECONDS: float = 3.0 const MAX_REQUEST_ID_LENGTH: int = 128 const MAX_LEDGER_ENTRIES: int = 96 @@ -41,6 +43,7 @@ var _entity_revisions: Dictionary = {} var _surface_triangles: Dictionary = {} var _surface_areas: Dictionary = {} var _surface_total_areas: Dictionary = {} +var _surface_height_ranges: Dictionary = {} var _spawn_anchor_positions: Dictionary = {} var _respawns: Array[Dictionary] = [] var _next_respawn_by_type: Dictionary[StringName, float] = {} @@ -49,8 +52,16 @@ var _pending_captures: Dictionary = {} var _received_results: Dictionary = {} var _showcase_deadlines: Dictionary = {} var _envelope_sequence: int = 0 +var _simulation_elapsed: float = 0.0 var _snapshot_elapsed: float = 0.0 var _population_session_id: String = "" +var _dirty_entity_ids: Dictionary[String, bool] = {} +var _moving_players_by_cell: Dictionary[Vector2i, Array] = {} +var _presentation_enabled: bool = true +var _spawn_events_sent: int = 0 +var _despawn_events_sent: int = 0 +var _snapshot_packets_sent: int = 0 +var _snapshot_states_sent: int = 0 var _rng := RandomNumberGenerator.new() @@ -68,6 +79,7 @@ func setup( save_manager: PlayerSaveManager, item_use: NetworkItemUseService, world_time: WorldTimeService = null, + presentation_enabled: bool = true, ) -> void: _session = session _spawn_service = spawn_service @@ -82,6 +94,7 @@ func setup( _save_manager = save_manager _item_use = item_use _world_time = world_time + _presentation_enabled = presentation_enabled _rng.randomize() _session.peer_authenticated.connect(_on_peer_authenticated) _session.peer_removed.connect(_on_peer_removed) @@ -136,6 +149,7 @@ func finish_local_interaction( "target_position": NetworkWorldSpawnProtocol.vector3_to_array( target_position ), + "movement_sequence": _session.get_latest_movement_input_sequence(), } if _session.is_host(): _handle_interaction_finish(_session.get_local_peer_id(), data) @@ -217,6 +231,13 @@ func get_entry_for_entity(entity_id: String) -> GatherableDataType: return state.get("data") as GatherableDataType +func refresh_world_context() -> void: + _clear_world() + _population_session_id = "" + if _session != null and _session.is_gameplay_session_active(): + _begin_population_if_ready.call_deferred() + + func _physics_process(delta: float) -> void: if ( _session == null @@ -225,11 +246,27 @@ func _physics_process(delta: float) -> void: ): return _begin_population_if_ready() + # There is no gameplay state to advance while a dedicated server has no + # spawned players. Pausing the roaming/respawn loop also prevents idle + # gatherables from producing a continuous stream of snapshots to nobody. + if _spawn_service == null or _spawn_service.get_peer_ids().is_empty(): + _simulation_elapsed = 0.0 + _snapshot_elapsed = 0.0 + return + _simulation_elapsed += delta + _snapshot_elapsed += delta + if _simulation_elapsed < SIMULATION_INTERVAL_SECONDS: + return + var simulation_delta: float = minf(_simulation_elapsed, 0.2) + _simulation_elapsed = fmod( + _simulation_elapsed, + SIMULATION_INTERVAL_SECONDS, + ) _update_pending_capture_timeouts() _update_respawns() _update_showcase_deadlines() - _update_host_entities(delta) - _snapshot_elapsed += delta + _rebuild_moving_player_spatial_index() + _update_host_entities(simulation_delta) if _snapshot_elapsed >= SNAPSHOT_INTERVAL_SECONDS: _snapshot_elapsed = fmod( _snapshot_elapsed, @@ -246,6 +283,7 @@ func _begin_population_if_ready() -> void: or _catalog == null or _world == null or _world_root == null + or not _world.is_world_ready() ): return var session_id: String = _session.get_session_id() @@ -257,7 +295,7 @@ func _begin_population_if_ready() -> void: _current_season() ): _cache_spawn_surface(entry) - for _spawn_index: int in entry.population: + for _spawn_index: int in _target_population(entry): _spawn_entity(entry) @@ -273,7 +311,10 @@ func _cache_spawn_surface(entry: GatherableDataType) -> void: _world.get_gatherable_spawn_positions(entry.spawn_anchor_set_id) ) _spawn_anchor_positions[entry.type_id] = anchor_positions - if anchor_positions.is_empty(): + if ( + anchor_positions.is_empty() + and _world.get_world_layout() == WorldLayout.GENERATED + ): push_warning( "No gatherable spawn anchors were found for %s." % entry.type_id ) @@ -282,10 +323,14 @@ func _cache_spawn_surface(entry: GatherableDataType) -> void: if not entry.diggable_area_id.is_empty(): triangles = _world.get_diggable_area_triangles(entry.diggable_area_id) else: + var height_range := _resolved_surface_height_range(entry) triangles = _world.get_spawn_surface_triangles( entry.surface_materials, - entry.minimum_surface_y, + height_range.x, + 0.6, + height_range.y, ) + _surface_height_ranges[entry.type_id] = height_range var areas := PackedFloat32Array() var total_area: float = 0.0 for triangle: PackedVector3Array in triangles: @@ -299,7 +344,10 @@ func _cache_spawn_surface(entry: GatherableDataType) -> void: _surface_triangles[entry.type_id] = triangles _surface_areas[entry.type_id] = areas _surface_total_areas[entry.type_id] = total_area - if triangles.is_empty(): + if ( + triangles.is_empty() + and _world.get_world_layout() == WorldLayout.GENERATED + ): push_warning( "No valid spawn surface was found for %s." % entry.type_id ) @@ -341,6 +389,7 @@ func _spawn_entity(entry: GatherableDataType) -> void: ) _apply_envelope(envelope) receive_world_envelope.rpc(envelope) + _spawn_events_sent += 1 func _update_host_entities(delta: float) -> void: @@ -392,6 +441,8 @@ func _update_host_entities(delta: float) -> void: minf(step / maxf(horizontal_delta.length(), 0.001), 1.0), ) state["yaw"] = atan2(-direction.x, -direction.z) + state["revision"] = int(state["revision"]) + 1 + _dirty_entity_ids[entity_id] = true state["position"] = position _entities[entity_id] = state if entry.can_be_scared() and _should_scare(entry, position, quality): @@ -405,6 +456,34 @@ func _should_scare( ) -> bool: var scare_radius: float = entry.get_scare_radius_for_quality(quality) var radius_squared: float = scare_radius * scare_radius + var center_cell := _player_spatial_cell(position) + var cell_radius: int = ceili(scare_radius / PLAYER_SPATIAL_CELL_SIZE) + for cell_x: int in range( + center_cell.x - cell_radius, + center_cell.x + cell_radius + 1, + ): + for cell_y: int in range( + center_cell.y - cell_radius, + center_cell.y + cell_radius + 1, + ): + for value: Variant in _moving_players_by_cell.get( + Vector2i(cell_x, cell_y), + [], + ): + var avatar := value as Player + if avatar == null: + continue + var player_delta := Vector2( + avatar.global_position.x - position.x, + avatar.global_position.z - position.z, + ) + if player_delta.length_squared() <= radius_squared: + return true + return false + + +func _rebuild_moving_player_spatial_index() -> void: + _moving_players_by_cell.clear() for peer_id: int in _spawn_service.get_peer_ids(): var avatar: Player = _spawn_service.get_avatar(peer_id) if ( @@ -413,13 +492,17 @@ func _should_scare( or avatar.is_sneaking() ): continue - var delta := Vector2( - avatar.global_position.x - position.x, - avatar.global_position.z - position.z, - ) - if delta.length_squared() <= radius_squared: - return true - return false + var cell: Vector2i = _player_spatial_cell(avatar.global_position) + var players: Array = _moving_players_by_cell.get(cell, []) + players.append(avatar) + _moving_players_by_cell[cell] = players + + +static func _player_spatial_cell(position: Vector3) -> Vector2i: + return Vector2i( + floori(position.x / PLAYER_SPATIAL_CELL_SIZE), + floori(position.z / PLAYER_SPATIAL_CELL_SIZE), + ) func _sample_surface_position( @@ -440,7 +523,21 @@ func _sample_surface_position( ) if triangles.is_empty() or total_area <= 0.0: return Vector3(INF, INF, INF) - var attempts: int = 48 if is_finite(maximum_distance) else 1 + var validates_diggable_surface := not entry.diggable_area_id.is_empty() + var height_range: Vector2 = _surface_height_ranges.get( + entry.type_id, + Vector2(entry.minimum_surface_y, entry.maximum_surface_y), + ) + var validates_height_range := _surface_height_ranges.has(entry.type_id) + var attempts: int = ( + 48 + if ( + validates_diggable_surface + or validates_height_range + or is_finite(maximum_distance) + ) + else 1 + ) var fallback: Vector3 = Vector3(INF, INF, INF) for _attempt: int in attempts: var roll: float = _rng.randf() * total_area @@ -456,12 +553,33 @@ func _sample_surface_position( + triangle[2] * barycentric_c ) fallback = point - if ( + var within_requested_distance := ( not is_finite(maximum_distance) or Vector2(point.x - origin.x, point.z - origin.z).length() <= maximum_distance + ) + var valid_diggable_surface := ( + not validates_diggable_surface + or _world.is_diggable_surface_point_valid( + entry.diggable_area_id, + point, + ) + ) + var valid_height := ( + not validates_height_range + or ( + point.y > height_range.x + and point.y < height_range.y + ) + ) + if ( + within_requested_distance + and valid_diggable_surface + and valid_height ): return point + if validates_diggable_surface or validates_height_range: + return Vector3(INF, INF, INF) if origin.is_finite() and is_finite(maximum_distance): return origin return fallback @@ -506,28 +624,69 @@ func _anchor_is_occupied(type_id: StringName, anchor: Vector3) -> bool: func _broadcast_entity_snapshots() -> void: - if _entities.is_empty(): + if _dirty_entity_ids.is_empty() or not _can_broadcast_snapshots(): return + var has_remote_recipients: bool = _has_authenticated_remote_peers() var snapshots: Array[Dictionary] = [] - for entity_id: String in _entities: - var state: Dictionary = _entities[entity_id] - state["revision"] = int(state["revision"]) + 1 - _entities[entity_id] = state - snapshots.append(_state_to_network(state)) - while not snapshots.is_empty(): + for entity_id: String in _dirty_entity_ids: + var state: Dictionary = _entities.get(entity_id, {}) + if not state.is_empty(): + snapshots.append(_state_to_network(state)) + _dirty_entity_ids.clear() + var maximum_chunk_size: int = ( + NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE + ) + for start_index: int in range( + 0, + snapshots.size(), + maximum_chunk_size, + ): var chunk: Array[Dictionary] = [] - var chunk_size: int = mini( - NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE, - snapshots.size(), - ) - for _index: int in chunk_size: - chunk.append(snapshots.pop_front()) + for value: Dictionary in snapshots.slice( + start_index, + mini(start_index + maximum_chunk_size, snapshots.size()), + ): + chunk.append(value) var envelope: Dictionary = _make_envelope( &"snapshot", {"entities": chunk}, ) _apply_envelope(envelope) + if not has_remote_recipients: + continue + # A peer-disconnected callback can resume validation/gameplay code and + # close the host while this physics update is still unwinding. Never send + # through the replacement OfflineMultiplayerPeer in that narrow window. + if not _can_broadcast_snapshots(): + return receive_world_snapshot_envelope.rpc(envelope) + _snapshot_packets_sent += 1 + _snapshot_states_sent += chunk.size() + + +func _has_authenticated_remote_peers() -> bool: + if _session == null: + return false + var local_peer_id: int = _session.get_local_peer_id() + for peer_id: int in _session.get_authenticated_peer_ids(): + if peer_id != local_peer_id: + return true + return false + + +func _can_broadcast_snapshots() -> bool: + if ( + _session == null + or not _session.is_host() + or not _session.is_gameplay_session_active() + ): + return false + var peer: MultiplayerPeer = multiplayer.multiplayer_peer + return ( + peer != null + and peer.get_connection_status() + == MultiplayerPeer.CONNECTION_CONNECTED + ) func _despawn_entity( @@ -541,6 +700,7 @@ func _despawn_entity( return var entry := state.get("data") as GatherableDataType _entities.erase(entity_id) + _dirty_entity_ids.erase(entity_id) var envelope: Dictionary = _make_envelope( &"despawn", { @@ -551,6 +711,7 @@ func _despawn_entity( ) _apply_envelope(envelope) receive_world_envelope.rpc(envelope) + _despawn_events_sent += 1 if schedule_respawn and entry != null: _respawns.append({ "type_id": entry.type_id, @@ -633,6 +794,7 @@ func _handle_interaction_finish(peer_id: int, data: Dictionary) -> void: var state: Dictionary = _entities.get(entity_id, {}) var entry := state.get("data") as GatherableDataType var avatar: Player = _spawn_service.get_avatar(peer_id) + var movement_sequence_value: Variant = data.get("movement_sequence", null) var error: String = "" if ( str(data.get("session_id", "")) != _session.get_session_id() @@ -640,6 +802,9 @@ func _handle_interaction_finish(peer_id: int, data: Dictionary) -> void: or request_id.length() > MAX_REQUEST_ID_LENGTH or str(charge.get("request_id", "")) != request_id or not target_position.is_finite() + or typeof(movement_sequence_value) != TYPE_INT + or int(movement_sequence_value) < 0 + or int(movement_sequence_value) > 2147483647 ): error = "The catch attempt was invalid." elif state.is_empty() or entry == null or bool(state.get("locked", false)): @@ -650,14 +815,28 @@ func _handle_interaction_finish(peer_id: int, data: Dictionary) -> void: error = "Equip the correct gathering tool." elif avatar == null: error = "The player is unavailable." - elif entry.requires_sneaking and not avatar.is_sneaking(): - error = "Sneak closer before using the tool." else: + var movement_state: Dictionary = ( + avatar.get_lag_compensated_movement_state( + int(movement_sequence_value) + ) + ) + if entry.requires_sneaking and not bool( + movement_state.get("sneaking", avatar.is_sneaking()) + ): + error = "Sneak closer before using the tool." + if not error.is_empty(): + _send_interaction_result(peer_id, request_id, false, error) + return var entity_position: Vector3 = state["position"] var target_distance: float = entity_position.distance_to(target_position) + var compensated_position: Vector3 = movement_state.get( + "position", + avatar.global_position, + ) var player_distance: float = Vector2( - avatar.global_position.x - entity_position.x, - avatar.global_position.z - entity_position.z, + compensated_position.x - entity_position.x, + compensated_position.z - entity_position.z, ).length() if target_distance > entry.capture_radius: error = "The gathering tool missed." @@ -903,7 +1082,7 @@ func _apply_capture_result(data: Dictionary) -> void: _local_collection, ) _local_inventory.add_catch(fish_catch) - _local_collection.mark_quality_discovered( + _local_collection.record_catch( fish_catch.fish_id, fish_catch.quality, ) @@ -1078,6 +1257,9 @@ func _apply_entity_state(value: Variant, immediate: bool) -> void: var position: Vector3 = NetworkWorldSpawnProtocol.array_to_vector3( state["position"] ) + if not _presentation_enabled: + _entity_revisions[entity_id] = revision + return var presentation := _presentations.get(entity_id) as WorldGatherableType if presentation == null or not is_instance_valid(presentation): presentation = WorldGatherableType.new() @@ -1127,6 +1309,8 @@ func _remove_presentation(entity_id: String, with_dust: bool) -> void: func _apply_showcase(payload: Dictionary) -> void: + if not _presentation_enabled: + return if ( typeof(payload.get("owner_peer_id")) != TYPE_INT or typeof(payload.get("visible")) != TYPE_BOOL @@ -1239,11 +1423,45 @@ func _reconcile_seasonal_population() -> void: for entry: GatherableDataType in _catalog.get_available_entries(season): _cache_spawn_surface(entry) var current_population: int = _population_for_type(entry.type_id) - while current_population < entry.population: + var target_population := _target_population(entry) + while current_population < target_population: _spawn_entity(entry) current_population += 1 +func _target_population(entry: GatherableDataType) -> int: + if entry == null: + return 0 + if entry.spawn_anchor_set_id.is_empty(): + return entry.target_population_for_surface_area( + float(_surface_total_areas.get(entry.type_id, 0.0)) + ) + var anchors: PackedVector3Array = _spawn_anchor_positions.get( + entry.type_id, + PackedVector3Array(), + ) + return entry.target_population_for_anchor_count(anchors.size()) + + +func _resolved_surface_height_range(entry: GatherableDataType) -> Vector2: + var minimum_y := entry.minimum_surface_y + var maximum_y := entry.maximum_surface_y + var saltwater_height := _world.get_saltwater_surface_height() + if is_finite(saltwater_height): + match entry.surface_water_relation: + GatherableDataType.SurfaceWaterRelation.ABOVE_SALT_WATER: + minimum_y = maxf( + minimum_y, + saltwater_height + entry.waterline_margin, + ) + GatherableDataType.SurfaceWaterRelation.BELOW_SALT_WATER: + maximum_y = minf( + maximum_y, + saltwater_height - entry.waterline_margin, + ) + return Vector2(minimum_y, maximum_y) + + func _population_for_type(type_id: StringName) -> int: var count: int = 0 for state: Dictionary in _entities.values(): @@ -1268,20 +1486,36 @@ func _clear_world() -> void: if presentation != null and is_instance_valid(presentation): presentation.queue_free() _entities.clear() + _dirty_entity_ids.clear() + _moving_players_by_cell.clear() _presentations.clear() _entity_revisions.clear() _surface_triangles.clear() _surface_areas.clear() _surface_total_areas.clear() + _surface_height_ranges.clear() _spawn_anchor_positions.clear() _respawns.clear() _next_respawn_by_type.clear() _charge_requests.clear() _pending_captures.clear() _showcase_deadlines.clear() + _simulation_elapsed = 0.0 _snapshot_elapsed = 0.0 +func get_network_metrics() -> Dictionary: + return { + "entities": _entities.size(), + "presentations": _presentations.size(), + "dirty_entities": _dirty_entity_ids.size(), + "spawn_events_sent": _spawn_events_sent, + "despawn_events_sent": _despawn_events_sent, + "snapshot_packets_sent": _snapshot_packets_sent, + "snapshot_states_sent": _snapshot_states_sent, + } + + func _bound(values: Dictionary) -> void: while values.size() > MAX_LEDGER_ENTRIES: values.erase(values.keys().front()) diff --git a/network/player_data_root.gd b/network/player_data_root.gd index 998e380..e173577 100644 --- a/network/player_data_root.gd +++ b/network/player_data_root.gd @@ -9,12 +9,42 @@ const BOOTSTRAP_TEMP_PATH := "user://data_root_bootstrap.json.tmp" const BOOTSTRAP_VERSION := 1 const MANIFEST_VERSION := 1 const LAYOUT_VERSION := 1 -const MANIFEST_FILENAME := "netfishing_data.json" +const MANIFEST_FILENAME := "straywild_data.json" +const LEGACY_MANIFEST_FILENAME := "netfishing_data.json" const README_FILENAME := "README.txt" -const ENVIRONMENT_VARIABLE := "NETFISHING_DATA_DIR" -const CREATE_ENVIRONMENT_VARIABLE := "NETFISHING_CREATE_DATA_DIR" -const APPLICATION_ID := "netfishing" +const ENVIRONMENT_VARIABLE := "straywild_DATA_DIR" +const CREATE_ENVIRONMENT_VARIABLE := "straywild_CREATE_DATA_DIR" +const LEGACY_ENVIRONMENT_VARIABLE := "NETFISHING_DATA_DIR" +const LEGACY_CREATE_ENVIRONMENT_VARIABLE := "NETFISHING_CREATE_DATA_DIR" +const APPLICATION_ID := "straywild" +const LEGACY_APPLICATION_ID := "netfishing" const APP_DATA_PORTABLE_PATH := "user://portable-data" +const LEGACY_USER_DIRECTORY_NAME := "NETFISHING" +const LEGACY_USER_FILES := [ + "data_root_bootstrap.json", + "data_root_bootstrap.json.backup", + "network_discovery.cfg", + "player_settings.json", + "player_settings.json.backup", + "controller_mappings.json", + "controller_mappings.json.backup", + "keyboard_mouse_bindings.json", + "keyboard_mouse_bindings.json.backup", + "player_save.json", + "network_profile.json", + "player_appearance.json", + "saved_servers.json", + "known_players.json", + "player_relationships.json", + "server_trust.json", + "host_bans.json", + "player_identity.key", + "player_identity.pub", + "player_identity.json", + "host_identity.key", + "host_identity.pub", + "host_identity.json", +] const PATH_ALLOWED: StringName = &"allowed" const PATH_SOURCE_PROJECT: StringName = &"source_project" const PATH_INSTALLATION: StringName = &"installation" @@ -37,23 +67,29 @@ var override_active := false func resolve() -> bool: + prepare_legacy_user_data() _load_bootstrap_identity() var command_line: String = _command_line_override() if not command_line.is_empty(): override_active = true mode = Mode.COMMAND_LINE_OVERRIDE return _activate_existing(command_line, "", false) - if OS.has_environment(ENVIRONMENT_VARIABLE): + var environment_variable: String = _available_environment_variable( + ENVIRONMENT_VARIABLE, + LEGACY_ENVIRONMENT_VARIABLE, + ) + if not environment_variable.is_empty(): override_active = true mode = Mode.ENVIRONMENT_OVERRIDE - var environment_path: String = OS.get_environment(ENVIRONMENT_VARIABLE) + var environment_path: String = OS.get_environment(environment_variable) if not environment_path.is_absolute_path(): - return _fail("NETFISHING_DATA_DIR must be an absolute path.") + return _fail("straywild_DATA_DIR must be an absolute path.") if ( - OS.get_environment(CREATE_ENVIRONMENT_VARIABLE) == "1" - and not FileAccess.file_exists( - environment_path.path_join(MANIFEST_FILENAME) + _environment_flag( + CREATE_ENVIRONMENT_VARIABLE, + LEGACY_CREATE_ENVIRONMENT_VARIABLE, ) + and not has_data_manifest(environment_path) ): var created: Dictionary = create_unbound_root(environment_path) if not bool(created.get("ok", false)): @@ -80,11 +116,35 @@ func resolve() -> bool: return false +func prepare_legacy_user_data() -> void: + var current_root: String = _normalize( + ProjectSettings.globalize_path("user://") + ) + if current_root.is_empty(): + return + var legacy_root: String = _normalize( + current_root.get_base_dir().path_join(LEGACY_USER_DIRECTORY_NAME) + ) + if legacy_root == current_root or not DirAccess.dir_exists_absolute(legacy_root): + return + for filename: String in LEGACY_USER_FILES: + var destination: String = current_root.path_join(filename) + if FileAccess.file_exists(destination): + continue + var source: String = legacy_root.path_join(filename) + if FileAccess.file_exists(source): + _copy_legacy_user_file(source, destination) + + +func has_data_manifest(path: String) -> bool: + return not _existing_manifest_path(_normalize(path)).is_empty() + + func default_visible_path() -> String: var documents: String = OS.get_system_dir(OS.SYSTEM_DIR_DOCUMENTS) if documents.is_empty(): return "" - var candidate: String = _normalize(documents.path_join("NETFISHING")) + var candidate: String = _normalize(documents.path_join("straywild")) if not candidate.is_absolute_path(): return "" var classification: StringName = classify_candidate_path( @@ -105,20 +165,22 @@ func select_new_root(path: String, app_data: bool = false) -> bool: normalized = ProjectSettings.globalize_path(APP_DATA_PORTABLE_PATH) if not _validate_candidate(normalized, true): return false - var manifest_path: String = normalized.path_join(MANIFEST_FILENAME) - if FileAccess.file_exists(manifest_path): + var manifest_path: String = _existing_manifest_path(normalized) + if not manifest_path.is_empty(): var manifest: Dictionary = _read_json(manifest_path) if not _valid_manifest(manifest): - return _fail("The selected folder has a malformed NETfishing manifest.") + return _fail("The selected folder has a malformed straywild manifest.") root_id = str(manifest["root_id"]) + if not _upgrade_legacy_manifest(normalized, manifest, manifest_path): + return _fail("The legacy data-folder manifest could not be upgraded.") else: if not _directory_is_empty(normalized) and not app_data: return _fail( - "Choose an empty folder or an existing NETfishing data folder." + "Choose an empty folder or an existing straywild data folder." ) root_id = Crypto.new().generate_random_bytes(16).hex_encode() if not _create_layout(normalized, root_id): - return _fail("The NETfishing data folder could not be created.") + return _fail("The straywild data folder could not be created.") if not _write_bootstrap(normalized, root_id): return _fail("The data-folder pointer could not be saved.") root_path = normalized @@ -145,14 +207,14 @@ func create_app_data_layout_for_migration(path: String) -> Dictionary: var normalized: String = _normalize(path) if not _validate_candidate(normalized, false): return {"ok": false, "message": error_message} - var manifest_path: String = normalized.path_join(MANIFEST_FILENAME) - if FileAccess.file_exists(manifest_path): + var manifest_path: String = _existing_manifest_path(normalized) + if not manifest_path.is_empty(): var manifest: Dictionary = _read_json(manifest_path) - return ( - {"ok": true, "root_id": str(manifest.get("root_id", ""))} - if _valid_manifest(manifest) - else {"ok": false, "message": "The app-data manifest is malformed."} - ) + if not _valid_manifest(manifest): + return {"ok": false, "message": "The app-data manifest is malformed."} + if not _upgrade_legacy_manifest(normalized, manifest, manifest_path): + return {"ok": false, "message": "The app-data manifest could not be upgraded."} + return {"ok": true, "root_id": str(manifest.get("root_id", ""))} var id: String = Crypto.new().generate_random_bytes(16).hex_encode() if not _create_layout(normalized, id): return {"ok": false, "message": "The app-data layout could not be created."} @@ -189,6 +251,7 @@ func activate_process_root(path: String) -> bool: func path_for(store_owner: StringName) -> String: var relative: String = { &"player_save": "player/player_save.nfsave", + &"save_slots": "player/save_slots.json", &"network_profile": "player/network_profile.json", &"player_appearance": "player/player_appearance.json", &"saved_servers": "social/saved_servers.json", @@ -235,17 +298,19 @@ func _activate_existing(path: String, expected_id: String, permit_creation: bool var normalized: String = _normalize(path) if not _validate_candidate(normalized, permit_creation): return false - var manifest_path: String = normalized.path_join(MANIFEST_FILENAME) - if not FileAccess.file_exists(manifest_path): - return _fail("The selected folder is not a NETfishing data folder.") + var manifest_path: String = _existing_manifest_path(normalized) + if manifest_path.is_empty(): + return _fail("The selected folder is not a straywild data folder.") var manifest: Dictionary = _read_json(manifest_path) if not _valid_manifest(manifest): - return _fail("The NETfishing data-folder manifest is malformed.") + return _fail("The straywild data-folder manifest is malformed.") + if not _upgrade_legacy_manifest(normalized, manifest, manifest_path): + return _fail("The legacy data-folder manifest could not be upgraded.") var found_id: String = str(manifest["root_id"]) if not expected_id.is_empty() and expected_id != found_id: return _fail("The selected data folder does not match this device pointer.") if not _test_writable(normalized): - return _fail("The NETfishing data folder is unavailable or unwritable.") + return _fail("The straywild data folder is unavailable or unwritable.") root_path = normalized root_id = found_id requires_selection = false @@ -338,7 +403,7 @@ static func _is_same_or_child_path(candidate: String, reference: String) -> bool func _test_writable(path: String) -> bool: var probe: String = path.path_join( - ".netfishing-write-%s.tmp" % device_id.left(12) + ".straywild-write-%s.tmp" % device_id.left(12) ) var file: FileAccess = FileAccess.open(probe, FileAccess.WRITE) if file == null: @@ -350,7 +415,7 @@ func _test_writable(path: String) -> bool: func _create_layout(path: String, id: String) -> bool: for relative: String in [ - "player", "social", "backups/saves", "backups/migrations", + "player", "player/saves", "social", "backups/saves", "backups/migrations", "backups/conflicts", "identity-backups", "progression-backups", ]: if DirAccess.make_dir_recursive_absolute(path.path_join(relative)) != OK: @@ -369,7 +434,7 @@ func _create_layout(path: String, id: String) -> bool: ): return false var readme: String = ( - "NETfishing player data\n\n" + "straywild player data\n\n" + "This folder is safe to synchronize with tools such as Syncthing.\n" + "Active private identity keys remain device-local.\n" + "Encrypted identity backups require their passphrase.\n" @@ -421,12 +486,71 @@ func _valid_manifest(data: Dictionary) -> bool: return ( data.get("format_version") == MANIFEST_VERSION and data.get("layout_version") == LAYOUT_VERSION - and data.get("application") == APPLICATION_ID + and data.get("application") in [APPLICATION_ID, LEGACY_APPLICATION_ID] and typeof(data.get("root_id")) == TYPE_STRING and str(data["root_id"]).length() == 32 ) +func _existing_manifest_path(path: String) -> String: + var current: String = path.path_join(MANIFEST_FILENAME) + if FileAccess.file_exists(current): + return current + var legacy: String = path.path_join(LEGACY_MANIFEST_FILENAME) + return legacy if FileAccess.file_exists(legacy) else "" + + +func _upgrade_legacy_manifest( + path: String, + manifest: Dictionary, + manifest_path: String, +) -> bool: + if ( + manifest_path.get_file() == MANIFEST_FILENAME + and manifest.get("application") == APPLICATION_ID + ): + return true + var upgraded: Dictionary = manifest.duplicate(true) + upgraded["application"] = APPLICATION_ID + upgraded["last_opened_at_unix"] = int(Time.get_unix_time_from_system()) + return _write_text_atomic( + path.path_join(MANIFEST_FILENAME), + JSON.stringify(upgraded, "\t"), + ) + + +func _available_environment_variable(primary: String, legacy: String) -> String: + if OS.has_environment(primary): + return primary + return legacy if OS.has_environment(legacy) else "" + + +func _environment_flag(primary: String, legacy: String) -> bool: + var variable: String = _available_environment_variable(primary, legacy) + return not variable.is_empty() and OS.get_environment(variable) == "1" + + +func _copy_legacy_user_file(source: String, destination: String) -> bool: + var bytes: PackedByteArray = PortableFileGuard.read_bytes( + source, + 16 * 1024 * 1024, + ) + if bytes.is_empty() and FileAccess.get_open_error() != OK: + return false + if DirAccess.make_dir_recursive_absolute(destination.get_base_dir()) != OK: + return false + var file: FileAccess = FileAccess.open(destination, FileAccess.WRITE) + if file == null: + return false + file.store_buffer(bytes) + file.flush() + var copied: bool = file.get_error() == OK + file.close() + if copied and source.ends_with(".key"): + FileAccess.set_unix_permissions(destination, 384) + return copied + + func _directory_is_empty(path: String) -> bool: var access: DirAccess = DirAccess.open(path) if access == null: diff --git a/network/player_list_entry.gd b/network/player_list_entry.gd index 5aa9643..c75832a 100644 --- a/network/player_list_entry.gd +++ b/network/player_list_entry.gd @@ -12,6 +12,8 @@ var continuity_state := "" var ping_to_host_ms := -1 var muted := false var blocked := false +var is_friend := false +var can_request_friend := false var can_kick := false var can_ban := false var can_clear_art := false diff --git a/network/player_relationship_store.gd b/network/player_relationship_store.gd index 2ea4502..de04d49 100644 --- a/network/player_relationship_store.gd +++ b/network/player_relationship_store.gd @@ -3,8 +3,12 @@ extends Node signal relationship_changed(fingerprint: String) -const FORMAT_VERSION := 1 +const FORMAT_VERSION := 2 const MAX_RECORDS := 500 +const MAX_FRIENDS := 200 +const SOCIAL_TOKEN_LENGTH := 64 +const PRESENCE_CHANNEL_DOMAIN := "straywild_PRESENCE_V1:" +const INVITE_INBOX_DOMAIN := "straywild_INVITE_V1:" var _records: Dictionary = {} var _loaded := false @@ -17,6 +21,10 @@ var _data_root: PlayerDataRoot func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _store_path = path _data_root = data_root + _records.clear() + _loaded = false + _write_blocked = false + _expected_hash = "" func is_muted(fingerprint: String) -> bool: @@ -29,6 +37,11 @@ func is_blocked(fingerprint: String) -> bool: return bool(_records.get(fingerprint, {}).get("blocked", false)) +func is_friend(fingerprint: String) -> bool: + _ensure_loaded() + return bool(_records.get(fingerprint, {}).get("friend", false)) + + func set_muted(fingerprint: String, display_name: String, value: bool) -> bool: if not _valid_target(fingerprint, display_name): return false @@ -48,20 +61,101 @@ func set_blocked(fingerprint: String, display_name: String, value: bool) -> bool # fresh visibility boundary for future messages; already suppressed # messages retain their immutable local suppression flag. record["muted"] = value + if value: + _clear_friend_fields(record) return _commit(fingerprint, record) +func create_friend_capabilities() -> Dictionary: + var presence_write_token := NetworkIdentityCrypto.secure_id(32) + var invite_token := NetworkIdentityCrypto.secure_id(32) + if not _valid_social_token(presence_write_token) or not _valid_social_token(invite_token): + return {} + return { + "local_presence_write_token": presence_write_token, + "local_invite_token": invite_token, + "presence_channel": presence_channel_for_write_token( + presence_write_token + ), + "invite_token": invite_token, + } + + +func add_friend( + fingerprint: String, + display_name: String, + local_capabilities: Dictionary, + remote_capabilities: Dictionary, +) -> bool: + if ( + not _valid_target(fingerprint, display_name) + or is_blocked(fingerprint) + or not _valid_local_capabilities(local_capabilities) + or not _valid_public_capabilities(remote_capabilities) + ): + return false + _ensure_loaded() + if not is_friend(fingerprint) and get_friends().size() >= MAX_FRIENDS: + return false + var record := _record(fingerprint, display_name) + var now := int(Time.get_unix_time_from_system()) + record["friend"] = true + record["friend_since_unix"] = int(record.get("friend_since_unix", now)) + record["local_presence_write_token"] = str( + local_capabilities["local_presence_write_token"] + ) + record["local_invite_token"] = str( + local_capabilities["local_invite_token"] + ) + record["remote_presence_channel"] = str( + remote_capabilities["presence_channel"] + ) + record["remote_invite_token"] = str( + remote_capabilities["invite_token"] + ) + return _commit(fingerprint, record) + + +func remove_friend(fingerprint: String, display_name: String) -> bool: + if not _valid_target(fingerprint, display_name): + return false + _ensure_loaded() + var record := _record(fingerprint, display_name) + _clear_friend_fields(record) + return _commit(fingerprint, record) + + +func get_friend_record(fingerprint: String) -> Dictionary: + _ensure_loaded() + var record: Dictionary = _records.get(fingerprint, {}) + return record.duplicate(true) if bool(record.get("friend", false)) else {} + + +func get_friends() -> Array[Dictionary]: + _ensure_loaded() + var result: Array[Dictionary] = [] + for value: Dictionary in _records.values(): + if bool(value.get("friend", false)): + result.append(value.duplicate(true)) + _sort_records(result) + return result + + +static func presence_channel_for_write_token(write_token: String) -> String: + return (PRESENCE_CHANNEL_DOMAIN + write_token).sha256_text() + + +static func invite_inbox_id(invite_token: String) -> String: + return (INVITE_INBOX_DOMAIN + invite_token).sha256_text() + + func get_records() -> Array[Dictionary]: _ensure_loaded() var result: Array[Dictionary] = [] for value: Dictionary in _records.values(): if bool(value.get("muted", false)) or bool(value.get("blocked", false)): result.append(value.duplicate(true)) - result.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: - return str(a.get("last_known_display_name", "")).naturalnocasecmp_to( - str(b.get("last_known_display_name", "")) - ) < 0 - ) + _sort_records(result) return result @@ -72,6 +166,7 @@ func _record(fingerprint: String, display_name: String) -> Dictionary: "created_unix": now, "muted": false, "blocked": false, + "friend": false, }) record["last_known_display_name"] = display_name record["updated_unix"] = now @@ -82,7 +177,11 @@ func _commit(fingerprint: String, record: Dictionary) -> bool: if _write_blocked: return false var previous: Dictionary = _records.duplicate(true) - if not bool(record["muted"]) and not bool(record["blocked"]): + if ( + not bool(record.get("muted", false)) + and not bool(record.get("blocked", false)) + and not bool(record.get("friend", false)) + ): _records.erase(fingerprint) else: _records[fingerprint] = record @@ -115,7 +214,8 @@ func _ensure_loaded() -> void: if json.parse(file.get_as_text()) != OK or typeof(json.data) != TYPE_DICTIONARY: return var data: Dictionary = json.data - if data.get("format_version") != FORMAT_VERSION: + var format_version: int = int(data.get("format_version", 0)) + if format_version not in [1, FORMAT_VERSION]: _write_blocked = true return for value: Variant in data.get("records", []): @@ -127,6 +227,13 @@ func _ensure_loaded() -> void: continue record["blocked"] = bool(record.get("blocked", false)) record["muted"] = bool(record.get("muted", false)) or record["blocked"] + record["friend"] = ( + bool(record.get("friend", false)) + and not record["blocked"] + and _valid_stored_friend_capabilities(record) + ) + if not record["friend"]: + _clear_friend_fields(record) _records[fingerprint] = record.duplicate(true) _expected_hash = PortableFileGuard.hash_file(_store_path) @@ -145,3 +252,69 @@ func _save() -> bool: if bool(result.get("ok", false)): _expected_hash = str(result["hash"]) return bool(result.get("ok", false)) + + +func _clear_friend_fields(record: Dictionary) -> void: + record["friend"] = false + for key: String in [ + "friend_since_unix", + "local_presence_write_token", + "local_invite_token", + "remote_presence_channel", + "remote_invite_token", + ]: + record.erase(key) + + +func _valid_local_capabilities(value: Dictionary) -> bool: + var write_token := str(value.get("local_presence_write_token", "")) + var invite_token := str(value.get("local_invite_token", "")) + return ( + _valid_social_token(write_token) + and _valid_social_token(invite_token) + and str(value.get("presence_channel", "")) + == presence_channel_for_write_token(write_token) + and str(value.get("invite_token", "")) == invite_token + ) + + +func _valid_public_capabilities(value: Dictionary) -> bool: + return ( + _valid_social_token(str(value.get("presence_channel", ""))) + and _valid_social_token(str(value.get("invite_token", ""))) + ) + + +func _valid_stored_friend_capabilities(record: Dictionary) -> bool: + var local: Dictionary = { + "local_presence_write_token": str( + record.get("local_presence_write_token", "") + ), + "local_invite_token": str(record.get("local_invite_token", "")), + "presence_channel": presence_channel_for_write_token(str( + record.get("local_presence_write_token", "") + )), + "invite_token": str(record.get("local_invite_token", "")), + } + var remote: Dictionary = { + "presence_channel": str(record.get("remote_presence_channel", "")), + "invite_token": str(record.get("remote_invite_token", "")), + } + return _valid_local_capabilities(local) and _valid_public_capabilities(remote) + + +func _valid_social_token(value: String) -> bool: + if value.length() != SOCIAL_TOKEN_LENGTH: + return false + for character: String in value: + if character not in "0123456789abcdef": + return false + return true + + +func _sort_records(records: Array[Dictionary]) -> void: + records.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: + return str(a.get("last_known_display_name", "")).naturalnocasecmp_to( + str(b.get("last_known_display_name", "")) + ) < 0 + ) diff --git a/network/player_spawn_service.gd b/network/player_spawn_service.gd index 0b8179b..1d1c292 100644 --- a/network/player_spawn_service.gd +++ b/network/player_spawn_service.gd @@ -11,16 +11,19 @@ var _local_player: Player var _spawn_transform: Transform3D var _avatars: Dictionary[int, Player] = {} var _local_peer_id: int = 1 +var _dedicated_runtime: bool = false func setup( players_root: Node3D, local_player: Player, spawn_transform: Transform3D, + dedicated_runtime: bool = false, ) -> void: _players_root = players_root _local_player = local_player _spawn_transform = spawn_transform + _dedicated_runtime = dedicated_runtime func set_spawn_transform(spawn_transform: Transform3D) -> void: @@ -56,7 +59,10 @@ func spawn_remote_player( avatar.set_network_peer_id(peer_id) _players_root.add_child(avatar) avatar.global_transform = transform - avatar.configure_network_remote(authoritative_simulation) + avatar.configure_network_remote( + authoritative_simulation, + _dedicated_runtime and authoritative_simulation, + ) _avatars[peer_id] = avatar avatar_spawned.emit(peer_id, avatar) return avatar diff --git a/network/portable_data_migration.gd b/network/portable_data_migration.gd index a74db6d..2de0acb 100644 --- a/network/portable_data_migration.gd +++ b/network/portable_data_migration.gd @@ -26,19 +26,16 @@ static func migrate_legacy_to( ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") if DirAccess.dir_exists_absolute(normalized): - var existing_manifest: String = normalized.path_join( - PlayerDataRoot.MANIFEST_FILENAME - ) - if FileAccess.file_exists(existing_manifest): + if data_root.has_data_manifest(normalized): return { "ok": false, "requires_existing_root_decision": true, - "message": "The selected folder already contains NETfishing data.", + "message": "The selected folder already contains straywild data.", } if not _directory_empty(normalized): return { "ok": false, - "message": "Choose an empty folder or create a NETfishing subfolder.", + "message": "Choose an empty folder or create a straywild subfolder.", } var staging: String = "%s.migration-%s" % [ normalized, Crypto.new().generate_random_bytes(8).hex_encode() @@ -100,18 +97,22 @@ static func migrate_active_to( ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") if normalized == data_root.root_path: - return {"ok": true, "message": "This data folder is already active."} + return { + "ok": true, + "changed": false, + "message": "This data folder is already active.", + } if DirAccess.dir_exists_absolute(normalized) and not _directory_empty(normalized): - if FileAccess.file_exists(normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)): + if data_root.has_data_manifest(normalized): return { "ok": false, "requires_existing_root_decision": true, "message": ( - "The selected folder already contains NETfishing data. " + "The selected folder already contains straywild data. " + "Choose it through the existing-data recovery flow." ), } - return {"ok": false, "message": "Choose an empty folder or a NETfishing subfolder."} + return {"ok": false, "message": "Choose an empty folder or a straywild subfolder."} var staging: String = "%s.migration-%s" % [ normalized, Crypto.new().generate_random_bytes(8).hex_encode() ] @@ -124,6 +125,7 @@ static func migrate_active_to( for relative: String in [ "player/player_save.nfsave", "player/player_save.json", + "player/save_slots.json", "player/network_profile.json", "player/player_appearance.json", "social/saved_servers.json", @@ -142,6 +144,16 @@ static func migrate_active_to( ): _remove_tree(staging) return {"ok": false, "message": "Migration validation failed for %s." % relative} + var source_slots: String = data_root.root_path.path_join("player/saves") + if ( + DirAccess.dir_exists_absolute(source_slots) + and not _copy_progression_slots( + source_slots, + staging.path_join("player/saves"), + ) + ): + _remove_tree(staging) + return {"ok": false, "message": "Migration validation failed for save slots."} if DirAccess.dir_exists_absolute(normalized): DirAccess.remove_absolute(normalized) if DirAccess.rename_absolute(staging, normalized) != OK: @@ -152,6 +164,7 @@ static func migrate_active_to( return {"ok": false, "message": "Migration copied data but did not change the pointer."} return { "ok": true, + "changed": true, "message": "Data folder changed. Previous data was preserved.", "previous_root": old_root, } @@ -191,9 +204,8 @@ static func replace_existing_with_legacy( destination: String, ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") - var manifest: String = normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME) - if not FileAccess.file_exists(manifest): - return {"ok": false, "message": "The selected folder is not a NETfishing data root."} + if not data_root.has_data_manifest(normalized): + return {"ok": false, "message": "The selected folder is not a straywild data root."} var recovery: String = ProjectSettings.globalize_path( "user://migration-recovery" ).path_join( @@ -213,8 +225,8 @@ static func replace_existing_with_active( destination: String, ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") - if not FileAccess.file_exists(normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)): - return {"ok": false, "message": "The selected folder is not a NETfishing data root."} + if not data_root.has_data_manifest(normalized): + return {"ok": false, "message": "The selected folder is not a straywild data root."} var recovery: String = ProjectSettings.globalize_path( "user://migration-recovery" ).path_join( @@ -257,7 +269,7 @@ static func _copy_verified_owned_file( source: String, destination: String, ) -> Dictionary: - if source.get_file() != "player_save.nfsave": + if source.get_extension().to_lower() != "nfsave": return _copy_verified_json(source, destination) var decoded: Dictionary = ProgressionSaveCodec.read_local_save(source) if not bool(decoded.get("ok", false)): @@ -281,12 +293,42 @@ static func _valid_owned_data(filename: String, data: Dictionary) -> bool: if filename == "player_save.json": var version: int = int(data.get("save_version", -1)) return version >= 1 and version <= PlayerSaveManager.SAVE_VERSION + if filename == "save_slots.json": + return ( + int(data.get("format_version", -1)) == PlayerSaveSlotCatalog.FORMAT_VERSION + and typeof(data.get("active_slot_id")) == TYPE_STRING + and typeof(data.get("slots")) == TYPE_ARRAY + ) return ( filename not in LEGACY_FILES or int(data.get("format_version", -1)) == 1 ) +static func _copy_progression_slots(source: String, destination: String) -> bool: + if DirAccess.make_dir_recursive_absolute(destination) != OK: + return false + var access := DirAccess.open(source) + if access == null: + return false + access.list_dir_begin() + var filename: String = access.get_next() + while not filename.is_empty(): + if ( + not access.current_is_dir() + and filename.get_extension().to_lower() == "nfsave" + and not bool(_copy_verified_owned_file( + source.path_join(filename), + destination.path_join(filename), + ).get("ok", false)) + ): + access.list_dir_end() + return false + filename = access.get_next() + access.list_dir_end() + return true + + static func _copy_bytes(source: String, destination: String) -> bool: return _write_bytes(destination, PortableFileGuard.read_bytes(source)) diff --git a/network/saved_server_store.gd b/network/saved_server_store.gd index de48c2c..4e00259 100644 --- a/network/saved_server_store.gd +++ b/network/saved_server_store.gd @@ -22,6 +22,12 @@ var _data_root: PlayerDataRoot func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _store_path = path _data_root = data_root + _saved_entries.clear() + _recent_entries.clear() + _loaded = false + _recovery_warning = "" + _write_blocked = false + _expected_hash = "" func _temp_path() -> String: diff --git a/network/server_trust_store.gd b/network/server_trust_store.gd index fda774b..1d4dd29 100644 --- a/network/server_trust_store.gd +++ b/network/server_trust_store.gd @@ -19,6 +19,10 @@ var _data_root: PlayerDataRoot func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _store_path = path _data_root = data_root + _records.clear() + _loaded = false + _write_blocked = false + _expected_hash = "" func verify(endpoint: ConnectionEndpoint, fingerprint: String) -> Verification: diff --git a/player/net_attachment.gd b/player/net_attachment.gd index 8938a13..3c7843a 100644 --- a/player/net_attachment.gd +++ b/player/net_attachment.gd @@ -1,7 +1,88 @@ extends "res://player/tool_socket_attachment.gd" -@onready var _impact_marker: Marker3D = %ImpactMarker +const TextureSamplingPolicyScript := preload( + "res://main/texture_sampling_policy.gd" +) +const SPRING_ROOT_BONE: StringName = &"net_mid" +const SPRING_END_BONE: StringName = &"net_tip" +const IMPACT_BONE: StringName = &"net_rim" + +@export_range(0.0, 10.0, 0.05) var spring_stiffness: float = 1.8 +@export_range(0.0, 1.0, 0.01) var spring_drag: float = 0.68 +@export_range(0.0, 10.0, 0.05) var spring_gravity: float = 0.3 +@export_range(0.01, 0.5, 0.01) var spring_end_length: float = 0.1 + +@onready var _catching_net: Node3D = %CatchingNet +@onready var _net_model: Node3D = %NetModel + +var _spring: SpringBoneSimulator3D +var _spring_was_visible: bool = false +var _net_skeleton: Skeleton3D + + +func _ready() -> void: + super._ready() + TextureSamplingPolicyScript.enforce_subtree(_net_model) + _configure_spring() + _sync_spring_activity() + + +func _process(_delta: float) -> void: + _sync_spring_activity() + + +func _configure_spring() -> void: + _net_skeleton = _net_model.find_child( + "Skeleton3D", true, false + ) as Skeleton3D + if _net_skeleton == null: + push_error("Imported net model is missing its Skeleton3D.") + return + if _net_skeleton.find_bone(SPRING_ROOT_BONE) < 0: + push_error("Imported net model is missing bone %s." % SPRING_ROOT_BONE) + return + if _net_skeleton.find_bone(SPRING_END_BONE) < 0: + push_error("Imported net model is missing bone %s." % SPRING_END_BONE) + return + if _net_skeleton.find_bone(IMPACT_BONE) < 0: + push_error("Imported net model is missing bone %s." % IMPACT_BONE) + return + + _spring = SpringBoneSimulator3D.new() + _spring.name = "NetSpring" + _spring.set_setting_count(1) + _spring.set_root_bone_name(0, SPRING_ROOT_BONE) + _spring.set_end_bone_name(0, SPRING_END_BONE) + _spring.set_extend_end_bone(0, true) + _spring.set_end_bone_direction( + 0, SkeletonModifier3D.BONE_DIRECTION_FROM_PARENT + ) + _spring.set_end_bone_length(0, spring_end_length) + _spring.set_stiffness(0, spring_stiffness) + _spring.set_drag(0, spring_drag) + _spring.set_gravity(0, spring_gravity) + _spring.set_gravity_direction(0, Vector3.DOWN) + _net_skeleton.add_child(_spring) func get_impact_world_position() -> Vector3: - return _impact_marker.global_position + if _net_skeleton == null: + return _catching_net.global_position + var impact_bone_index := _net_skeleton.find_bone(IMPACT_BONE) + if impact_bone_index < 0: + return _catching_net.global_position + return _net_skeleton.global_transform * ( + _net_skeleton.get_bone_global_pose(impact_bone_index).origin + ) + + +func _sync_spring_activity() -> void: + if _spring == null: + return + var is_visible := _catching_net.is_visible_in_tree() + if is_visible and not _spring_was_visible: + _spring.active = true + _spring.reset() + elif not is_visible: + _spring.active = false + _spring_was_visible = is_visible diff --git a/player/net_attachment.tscn b/player/net_attachment.tscn index 246e71c..da49a88 100644 --- a/player/net_attachment.tscn +++ b/player/net_attachment.tscn @@ -1,42 +1,7 @@ -[gd_scene load_steps=8 format=3] +[gd_scene load_steps=3 format=3] [ext_resource type="Script" path="res://player/net_attachment.gd" id="1_script"] - -[sub_resource type="StandardMaterial3D" id="HandleMaterial"] -albedo_color = Color(0.25, 0.13, 0.055, 1) -roughness = 0.9 - -[sub_resource type="CylinderMesh" id="HandleMesh"] -material = SubResource("HandleMaterial") -top_radius = 0.025 -bottom_radius = 0.035 -height = 1.25 - -[sub_resource type="StandardMaterial3D" id="HoopMaterial"] -albedo_color = Color(0.34, 0.39, 0.4, 1) -metallic = 0.25 -roughness = 0.65 - -[sub_resource type="TorusMesh" id="HoopMesh"] -material = SubResource("HoopMaterial") -inner_radius = 0.24 -outer_radius = 0.29 -rings = 12 -ring_segments = 18 - -[sub_resource type="StandardMaterial3D" id="NetMaterial"] -transparency = 1 -albedo_color = Color(0.65, 0.78, 0.75, 0.42) -shading_mode = 0 -cull_mode = 2 - -[sub_resource type="CylinderMesh" id="NetMesh"] -material = SubResource("NetMaterial") -top_radius = 0.24 -bottom_radius = 0.08 -height = 0.34 -radial_segments = 12 -rings = 1 +[ext_resource type="PackedScene" path="res://art/exported/items/equipment/net.glb" id="2_model"] [node name="NetAttachment" type="BoneAttachment3D"] bone_name = "rod_socket" @@ -47,18 +12,9 @@ aligned_mount_path = NodePath("CatchingNet") unique_name_in_owner = true visible = false -[node name="Handle" type="MeshInstance3D" parent="CatchingNet"] -position = Vector3(0, 0.55, 0) -mesh = SubResource("HandleMesh") +[node name="ModelMount" type="Node3D" parent="CatchingNet"] +position = Vector3(-0.000217, -0.098636, -0.020218) +rotation = Vector3(0, 3.1415927, 0) -[node name="Hoop" type="MeshInstance3D" parent="CatchingNet"] -position = Vector3(0, 1.17, 0) -mesh = SubResource("HoopMesh") - -[node name="Bag" type="MeshInstance3D" parent="CatchingNet"] -position = Vector3(0, 1, 0) -mesh = SubResource("NetMesh") - -[node name="ImpactMarker" type="Marker3D" parent="CatchingNet"] +[node name="NetModel" parent="CatchingNet/ModelMount" unique_id=1627767240 instance=ExtResource("2_model")] unique_name_in_owner = true -position = Vector3(0, 1.17, 0) diff --git a/player/player.gd b/player/player.gd index 6d237bf..78dac3d 100644 --- a/player/player.gd +++ b/player/player.gd @@ -90,6 +90,7 @@ const CATCH_SHOWCASE_INPUT_OWNER: StringName = &"catch_showcase" # safe IDs so newer clients can extend it, but Player only presents actions # explicitly approved by this catalog. const NETWORK_ANIMATION_ACTION_IDS: Array[StringName] = [ + CHARACTER_WALKING_ANIMATION, CHARACTER_CASTING_ANIMATION, CHARACTER_NET_DRAW_ANIMATION, CHARACTER_NET_STRIKE_ANIMATION, @@ -139,11 +140,20 @@ const NETWORK_SNAPSHOT_JITTER_WEIGHT: float = 0.15 const NETWORK_REMOTE_SMOOTHING_RATE: float = 12.0 const NETWORK_REMOTE_JITTER_SMOOTHING_RATE: float = 6.0 const NETWORK_INPUT_STALE_TIMEOUT_SECONDS: float = 0.25 +const NETWORK_INPUT_STALE_TIMEOUT_MAX_SECONDS: float = 1.25 +const NETWORK_INPUT_STALE_RTT_MULTIPLIER: float = 1.5 +const NETWORK_MOVEMENT_HISTORY_SECONDS: float = 1.25 +const NETWORK_MAX_LAG_COMPENSATION_SECONDS: float = 0.75 const LOCAL_PREDICTION_EXTRAPOLATION_LIMIT_SECONDS: float = 0.25 const LOCAL_PREDICTION_FALLBACK_TRANSIT_RATIO: float = 0.5 -const LOCAL_PREDICTION_CORRECTION_THRESHOLD: float = 0.12 -const LOCAL_PREDICTION_SNAP_DISTANCE: float = 2.0 -const LOCAL_PREDICTION_CORRECTION_WEIGHT: float = 0.18 +const LOCAL_PREDICTION_CORRECTION_THRESHOLD: float = 1.5 +const LOCAL_PREDICTION_SNAP_DISTANCE: float = 6.0 +const LOCAL_PREDICTION_CORRECTION_DELAY_SECONDS: float = 0.35 +const LOCAL_PREDICTION_MIN_CORRECTION_AUDITS: int = 3 +const LOCAL_PREDICTION_SOFT_CORRECTION_RATE: float = 2.5 +const LOCAL_PREDICTION_MAX_SOFT_CORRECTION_STEP: float = 0.15 +const LOCAL_PREDICTION_MAX_AUDIT_DELTA_SECONDS: float = 0.15 +const LOCAL_RECONCILIATION_PRESENTATION_RECENTER_RATE: float = 5.0 # The target Android handheld exposes its physical right trigger through # Godot's left-trigger axis. Keep the role named here so the platform mapping # remains isolated from camera behavior. @@ -417,12 +427,21 @@ class ShowcaseCameraSnapshot: @export var controller_camera_speed: float = 2.5 @export_range(0.0, 1.0, 0.01) var controller_camera_deadzone: float = 0.2 @export var invert_camera_y: bool = false +var _swap_hotbar_camera_scroll: bool = false +var _rv_interior_camera_mode: bool = false +var _rv_interior_environment: Environment +var _rv_previous_camera_environment: Environment @export_range(-89.0, 0.0, 0.5) var minimum_pitch_degrees: float = -65.0 @export_range(0.0, 89.0, 0.5) var maximum_pitch_degrees: float = 45.0 @export var minimum_zoom: float = 2.0 @export var maximum_zoom: float = 8.0 @export var zoom_step: float = 0.75 @export var zoom_smoothing: float = 12.0 +@export_range(0.0, 1.0, 0.01) var fishing_reel_zoom_amount: float = 0.22 +@export_range(0.0, 1.5, 0.01) var fishing_barrier_break_zoom: float = 0.38 +@export_range(0.05, 1.0, 0.01) var fishing_break_zoom_decay: float = 0.34 +@export_range(0.0, 0.2, 0.005) var fishing_barrier_hit_shake: float = 0.018 +@export_range(0.0, 0.3, 0.005) var fishing_barrier_break_shake: float = 0.045 @export_range(0.1, 12.0, 0.1) var controller_zoom_speed: float = 4.0 @export_range(0.0, 1.0, 0.01) var controller_trigger_threshold: float = 0.55 @export_range(1.0, 40.0, 0.5) var free_camera_speed: float = 10.0 @@ -461,6 +480,8 @@ var _held_fish_attachment_offset: Vector3 = Vector3(0.0, 0.08, 0.04) var _held_fish_sprite: Sprite3D var _held_art_kit_display: Node3D var _held_art_kit_sprite: Sprite3D +var _held_decor_package_display: Node3D +var _held_decor_package_visible: bool = false var _catch_attachment_offset: Vector3 = Vector3(0.0, 0.08, 0.04) var _gravity: float = float(ProjectSettings.get_setting("physics/3d/default_gravity")) @@ -482,6 +503,12 @@ var _remote_recovery_presentation_active: bool = false var _remote_recovery_visual_origin: Vector3 var _remote_recovery_elapsed: float = 0.0 var _target_zoom: float = 5.0 +var _fishing_reel_camera_active: bool = false +var _fishing_break_zoom_offset: float = 0.0 +var _fishing_camera_shake_remaining: float = 0.0 +var _fishing_camera_shake_duration: float = 0.0 +var _fishing_camera_shake_strength: float = 0.0 +var _fishing_camera_shake_phase: float = 0.0 var _showcase_rod_visibility: bool = true var _showcase_net_visibility: bool = false var _showcase_shovel_visibility: bool = false @@ -506,6 +533,9 @@ var _network_slow_walk: bool = false var _last_network_input_sequence: int = 0 var _network_input_age: float = 0.0 var _network_input_stale: bool = false +var _network_input_stale_timeout_seconds: float = ( + NETWORK_INPUT_STALE_TIMEOUT_SECONDS +) var _network_jump_intent_active: bool = false var _network_target_position: Vector3 var _network_target_velocity: Vector3 @@ -519,6 +549,16 @@ var _network_target_animation_action_paused: bool = false var _network_snapshot_ready: bool = false var _network_snapshot_age: float = 0.0 var _network_snapshot_jitter: float = 0.0 +var _network_simulation_only: bool = false +var _local_reconciliation_visual_offset: Vector3 = Vector3.ZERO +var _local_reconciliation_camera_offset: Vector3 = Vector3.ZERO +var _local_prediction_error_seconds: float = 0.0 +var _local_prediction_error_audits: int = 0 +var _local_prediction_error_direction: Vector3 = Vector3.ZERO +var _local_prediction_soft_corrections: int = 0 +var _local_prediction_hard_corrections: int = 0 +var _local_prediction_largest_error: float = 0.0 +var _authoritative_movement_history: Array[Dictionary] = [] var _local_network_jump_intent_pending: bool = false var _local_network_jump_intent_sequence: int = -1 var _animation_action_id: StringName = &"" @@ -791,10 +831,16 @@ func _finish_successful_net_strike_pause() -> void: func _set_animation_action_paused(paused: bool) -> void: if _animation_action_id.is_empty() or _animation_action_paused == paused: return + var next_sequence: int = ( + 1 + if _animation_action_sequence + >= NetworkPlayerAnimationProtocol.MAX_ACTION_SEQUENCE + else _animation_action_sequence + 1 + ) _apply_animation_action_state( NetworkPlayerAnimationProtocol.make_action_state( _animation_action_id, - _animation_action_sequence, + next_sequence, _animation_action_elapsed, paused, ) @@ -963,6 +1009,7 @@ func _initialize_held_item_attachment() -> void: _held_art_kit_sprite = attachment.get_node( "HeldArtKitDisplay/HeldArtKitSprite" ) as Sprite3D + _held_decor_package_display = _build_decor_package_display(attachment) _catch_display = attachment.get_node("CatchDisplay") as Node3D _catch_attachment_offset = _catch_display.position _catch_sprite = attachment.get_node("CatchDisplay/CatchSprite") as Sprite3D @@ -972,6 +1019,12 @@ func _physics_process(delta: float) -> void: if _network_interpolation_enabled: _update_network_interpolation(delta) return + _simulate_movement_physics(delta) + if _network_authoritative_simulation: + _record_authoritative_movement_state() + + +func _simulate_movement_physics(delta: float) -> void: if _network_authoritative_simulation: _update_network_input_freshness(delta) if local_control_enabled and _free_camera_active: @@ -1001,7 +1054,15 @@ func _physics_process(delta: float) -> void: or (_network_authoritative_simulation and _network_jump_pending) ) ) - if _sit_after_landing and is_on_floor(): + if jump_requested: + _cancel_sitting_for_jump() + # Sitting deliberately stops movement processing, so never allow a stale + # grounded flag or a reconciled network state to leave an airborne avatar in + # that early-return path. Preserve the intent and sit once landing is real. + if _sitting and not _can_begin_sitting(): + _sit_after_landing = true + _set_sitting(false) + if _sit_after_landing and not jump_requested and _can_begin_sitting(): _sit_after_landing = false _set_sitting(true, local_control_enabled) if _sitting: @@ -1075,6 +1136,9 @@ func _physics_process(delta: float) -> void: func _process(delta: float) -> void: + if _network_simulation_only: + return + _update_local_reconciliation_visuals(delta) if not _animation_action_id.is_empty() and not _animation_action_paused: _animation_action_elapsed = minf( _animation_action_elapsed + delta, @@ -1110,6 +1174,7 @@ func _process(delta: float) -> void: ) if not local_control_enabled: return + _update_fishing_camera_effects(delta) if _free_camera_active: if _is_camera_input_enabled(): _rotate_free_camera( @@ -1138,13 +1203,68 @@ func _process(delta: float) -> void: ) var zoom_weight: float = 1.0 - exp(-zoom_smoothing * delta) + var fishing_zoom_offset: float = ( + fishing_reel_zoom_amount + if _fishing_reel_camera_active + else 0.0 + ) + _fishing_break_zoom_offset + var effective_target_zoom: float = clampf( + _target_zoom - fishing_zoom_offset, + 1.25 if _rv_interior_camera_mode else minimum_zoom, + 16.0 if _rv_interior_camera_mode else maximum_zoom, + ) _spring_arm.spring_length = lerpf( _spring_arm.spring_length, - _target_zoom, + effective_target_zoom, zoom_weight ) +func set_fishing_reel_camera_active(active: bool) -> void: + _fishing_reel_camera_active = active + + +func play_fishing_barrier_camera_feedback(barrier_broken: bool) -> void: + if not local_control_enabled or _free_camera_active: + return + _fishing_camera_shake_strength = ( + fishing_barrier_break_shake + if barrier_broken + else fishing_barrier_hit_shake + ) + _fishing_camera_shake_duration = 0.20 if barrier_broken else 0.10 + _fishing_camera_shake_remaining = _fishing_camera_shake_duration + if barrier_broken: + _fishing_break_zoom_offset = fishing_barrier_break_zoom + + +func _update_fishing_camera_effects(delta: float) -> void: + _fishing_break_zoom_offset = move_toward( + _fishing_break_zoom_offset, + 0.0, + ( + fishing_barrier_break_zoom + / maxf(fishing_break_zoom_decay, 0.05) + ) * delta, + ) + if _fishing_camera_shake_remaining <= 0.0: + _camera.h_offset = 0.0 + _camera.v_offset = 0.0 + return + _fishing_camera_shake_remaining = maxf( + _fishing_camera_shake_remaining - delta, + 0.0, + ) + _fishing_camera_shake_phase += delta * 92.0 + var decay: float = ( + _fishing_camera_shake_remaining + / maxf(_fishing_camera_shake_duration, 0.001) + ) + var strength: float = _fishing_camera_shake_strength * decay + _camera.h_offset = sin(_fishing_camera_shake_phase) * strength + _camera.v_offset = cos(_fishing_camera_shake_phase * 1.31) * strength * 0.7 + + func _update_blink(delta: float) -> void: if _fighting_visual_active: return @@ -1276,9 +1396,7 @@ func _update_character_animation() -> void: and supports_network_animation_action(animation_action_id) and _character_animation_player.has_animation(animation_action_id) ) - var held_show_item_visible: bool = ( - _held_fish_visible or _held_art_kit_visible - ) + var held_show_item_visible: bool = _has_held_show_item() var requested_animation: Array[StringName] = [] if _pocket_visual_active: requested_animation = [_pocket_visual_animation] @@ -1451,8 +1569,20 @@ func _update_character_animation() -> void: _presented_animation_action_id = &"" _presented_animation_action_sequence = -1 _presented_animation_action_paused = false - if _character_animation_name == next_animation and not action_changed: + if ( + _character_animation_playback_matches( + next_animation, + action_selected and animation_action_paused, + ) + and not action_changed + ): return + # The animation name is only a selection cache. A remote player's + # AnimationPlayer can occasionally stop or lose its assigned animation while + # its replicated locomotion state remains valid. Reassert the selected + # presentation here instead of waiting for another network state transition; + # movement simulation and replication remain untouched. + _character_animation_player.active = true _character_animation_player.play(next_animation) _character_animation_name = next_animation if action_selected: @@ -1475,6 +1605,26 @@ func _update_character_animation() -> void: _character_animation_player.pause() +func _character_animation_playback_matches( + animation_name: StringName, + paused_action_selected: bool, +) -> bool: + if ( + _character_animation_name != animation_name + or _character_animation_player.assigned_animation != animation_name + or not _character_animation_player.active + ): + return false + if paused_action_selected: + return true + var animation := _character_animation_player.get_animation(animation_name) + if animation == null or animation.loop_mode == Animation.LOOP_NONE: + # Completed one-shot actions deliberately keep their final pose until the + # authoritative action state advances; they must not be restarted here. + return true + return _character_animation_player.is_playing() + + func _on_character_animation_finished(animation_name: StringName) -> void: if animation_name == CHARACTER_NET_STRIKE_ANIMATION: if local_control_enabled: @@ -1559,6 +1709,7 @@ func _complete_retract_animation() -> void: func toggle_sitting() -> void: if _sit_after_landing: _sit_after_landing = false + _set_sitting(false, local_control_enabled) return var should_sit: bool = not _sitting if should_sit: @@ -1572,7 +1723,7 @@ func toggle_sitting() -> void: ]) ): return - if not is_on_floor(): + if not _can_begin_sitting(): _sit_after_landing = true return _set_sitting(should_sit, local_control_enabled) @@ -1591,12 +1742,12 @@ func _set_sitting( should_sit: bool, is_local_intent: bool = false, ) -> void: - if _sitting == should_sit: - return - _sitting = should_sit if is_local_intent: _sitting_intent_pending = true _sitting_intent_sequence = -1 + if _sitting == should_sit: + return + _sitting = should_sit if _sitting: velocity = Vector3.ZERO _character_animation_name = &"" @@ -1607,6 +1758,45 @@ func is_sitting() -> bool: return _sitting +func _can_begin_sitting() -> bool: + return is_on_floor() and velocity.y <= 0.0 + + +func _cancel_sitting_for_jump() -> void: + if not _sitting and not _sit_after_landing: + return + _sit_after_landing = false + _set_sitting(false, local_control_enabled) + + +func get_network_sitting_state() -> bool: + return _sitting + + +func get_network_sitting_intent() -> bool: + # Jumping is an explicit cancellation of both a current sit and a deferred + # sit. Input capture can run before the matching physics frame, so suppress + # the stale seated bit as soon as the reliable jump intent is queued. + if _local_network_jump_intent_pending: + return false + return _sitting or _sit_after_landing + + +func apply_network_sitting_state(should_sit: bool) -> void: + _set_sitting(should_sit) + + +func apply_authoritative_network_sitting_state(should_sit: bool) -> void: + if should_sit and ( + not _can_begin_sitting() or _network_jump_pending + ): + _sit_after_landing = true + _set_sitting(false) + return + _sit_after_landing = false + _set_sitting(should_sit) + + func _input(event: InputEvent) -> void: # Camera dragging must observe the complete mouse gesture before GUI controls # get a chance to consume one part of it. Do not claim the event here: the @@ -1648,7 +1838,11 @@ func _unhandled_input(event: InputEvent) -> void: var mouse_zoom_in: bool = ( event is InputEventMouseButton - and event.shift_pressed + and ( + (not event.shift_pressed) + if _rv_interior_camera_mode + else event.shift_pressed != _swap_hotbar_camera_scroll + ) and event.is_action_pressed("camera_zoom_in") ) var controller_zoom_in: bool = ( @@ -1657,7 +1851,11 @@ func _unhandled_input(event: InputEvent) -> void: ) var mouse_zoom_out: bool = ( event is InputEventMouseButton - and event.shift_pressed + and ( + (not event.shift_pressed) + if _rv_interior_camera_mode + else event.shift_pressed != _swap_hotbar_camera_scroll + ) and event.is_action_pressed("camera_zoom_out") ) var controller_zoom_out: bool = ( @@ -1845,7 +2043,11 @@ func get_active_gameplay_camera() -> Camera3D: func _set_target_zoom(value: float) -> void: - _target_zoom = clampf(value, minimum_zoom, maximum_zoom) + _target_zoom = clampf( + value, + 1.25 if _rv_interior_camera_mode else minimum_zoom, + 16.0 if _rv_interior_camera_mode else maximum_zoom, + ) func _apply_axis_deadzone(value: float) -> float: @@ -1878,10 +2080,14 @@ func get_network_peer_id() -> int: return _network_peer_id -func configure_network_remote(authoritative_simulation: bool) -> void: +func configure_network_remote( + authoritative_simulation: bool, + simulation_only: bool = false, +) -> void: set_local_control(false) _network_authoritative_simulation = authoritative_simulation _network_interpolation_enabled = not authoritative_simulation + set_network_simulation_only(simulation_only) _network_axis = Vector2.ZERO _network_jump_pending = false _network_sprint = false @@ -1889,6 +2095,7 @@ func configure_network_remote(authoritative_simulation: bool) -> void: _network_slow_walk = false _network_input_age = 0.0 _network_input_stale = false + _network_input_stale_timeout_seconds = NETWORK_INPUT_STALE_TIMEOUT_SECONDS _network_jump_intent_active = false _network_snapshot_ready = false _network_snapshot_age = 0.0 @@ -1900,10 +2107,43 @@ func configure_network_remote(authoritative_simulation: bool) -> void: _network_target_animation_action_elapsed = 0.0 _network_target_animation_action_paused = false _camera.current = false + _authoritative_movement_history.clear() + + +func set_network_simulation_only(enabled: bool) -> void: + _network_simulation_only = enabled + if not is_node_ready(): + return + set_process(not enabled) + for presentation_root: Node in [ + _visuals, + get_node_or_null("GroundShadow"), + get_node_or_null("SprintDust"), + _camera_yaw, + ]: + if presentation_root == null: + continue + presentation_root.process_mode = ( + Node.PROCESS_MODE_DISABLED + if enabled + else Node.PROCESS_MODE_INHERIT + ) + if presentation_root is Node3D: + (presentation_root as Node3D).visible = not enabled + + +func is_network_simulation_only() -> bool: + return _network_simulation_only func reset_network_movement_state() -> void: _clear_local_network_jump_intent() + if not _animation_action_id.is_empty(): + end_animation_action() + _sit_after_landing = false + _sitting_intent_pending = false + _sitting_intent_sequence = -1 + _set_sitting(false) _network_axis = Vector2.ZERO _network_jump_pending = false _network_sprint = false @@ -1911,8 +2151,45 @@ func reset_network_movement_state() -> void: _network_slow_walk = false _network_input_age = 0.0 _network_input_stale = false + _network_input_stale_timeout_seconds = NETWORK_INPUT_STALE_TIMEOUT_SECONDS _network_jump_intent_active = false _last_network_input_sequence = 0 + _reset_local_prediction_error() + _clear_local_reconciliation_offsets() + _local_prediction_soft_corrections = 0 + _local_prediction_hard_corrections = 0 + _local_prediction_largest_error = 0.0 + + +func apply_network_space_transition( + target_transform: Transform3D, + align_local_camera: bool, +) -> void: + if not target_transform.origin.is_finite(): + return + # A room transition is a discontinuity, not ordinary movement. Preserve the + # host's input acknowledgement while clearing every motion, animation, and + # reconciliation state that could pull the avatar toward the previous space. + var acknowledged_input: int = _last_network_input_sequence + reset_network_movement_state() + _last_network_input_sequence = acknowledged_input + _apply_network_casting(false) + velocity = Vector3.ZERO + global_transform = Transform3D(Basis.IDENTITY, target_transform.origin) + var target_yaw: float = target_transform.basis.get_euler().y + _visuals.rotation.y = target_yaw + _network_camera_yaw = target_yaw + _network_target_position = global_position + _network_target_velocity = Vector3.ZERO + _network_target_visual_yaw = target_yaw + _network_snapshot_age = 0.0 + _network_snapshot_ready = true + _authoritative_movement_history.clear() + if align_local_camera: + _set_camera_dragging(false) + if _free_camera_active: + _set_free_camera_active(false) + _camera_yaw.rotation.y = target_yaw func capture_network_input(sequence: int) -> Dictionary: @@ -1939,7 +2216,7 @@ func capture_network_input(sequence: int) -> Dictionary: "sprint": false, "sneak": false, "slow_walk": false, - "sitting": _sitting, + "sitting": get_network_sitting_intent(), "casting": ( _fishing_visual_phase == FishingVisualPhase.CASTING ), @@ -1964,13 +2241,66 @@ func capture_network_input(sequence: int) -> Dictionary: "sprint": Input.is_action_pressed("sprint"), "sneak": Input.is_action_pressed("sneak"), "slow_walk": Input.is_action_pressed("slow_walk"), - "sitting": _sitting, + "sitting": get_network_sitting_intent(), "casting": _fishing_visual_phase == FishingVisualPhase.CASTING, "animation_action": _make_animation_action_state(), } -func apply_authoritative_network_input(data: Dictionary) -> void: +func has_active_network_input() -> bool: + if not local_control_enabled: + return false + if _local_network_jump_intent_pending or _sitting_intent_pending: + return true + if not _is_movement_input_enabled() or _free_camera_active: + return false + return ( + not Input.get_vector( + "move_left", + "move_right", + "move_forward", + "move_backward", + ).is_zero_approx() + or Input.is_action_pressed("sprint") + or Input.is_action_pressed("sneak") + or Input.is_action_pressed("slow_walk") + or _fishing_visual_phase == FishingVisualPhase.CASTING + or not _animation_action_id.is_empty() + ) + + +func get_network_input_state_hash() -> int: + var axis: Vector2 = Vector2.ZERO + if ( + local_control_enabled + and _is_movement_input_enabled() + and not _free_camera_active + ): + axis = Input.get_vector( + "move_left", + "move_right", + "move_forward", + "move_backward", + ) + return hash([ + axis, + _camera_yaw.global_rotation.y, + _local_network_jump_intent_pending, + Input.is_action_pressed("sprint"), + Input.is_action_pressed("sneak"), + Input.is_action_pressed("slow_walk"), + get_network_sitting_intent(), + _fishing_visual_phase == FishingVisualPhase.CASTING, + _animation_action_id, + _animation_action_sequence, + _animation_action_paused, + ]) + + +func apply_authoritative_network_input( + data: Dictionary, + stale_timeout_seconds: float = NETWORK_INPUT_STALE_TIMEOUT_SECONDS, +) -> void: var sequence: int = int(data.get("sequence", 0)) if sequence <= _last_network_input_sequence: return @@ -1980,6 +2310,11 @@ func apply_authoritative_network_input(data: Dictionary) -> void: _last_network_input_sequence = sequence _network_input_age = 0.0 _network_input_stale = false + _network_input_stale_timeout_seconds = clampf( + stale_timeout_seconds, + NETWORK_INPUT_STALE_TIMEOUT_SECONDS, + NETWORK_INPUT_STALE_TIMEOUT_MAX_SECONDS, + ) _network_axis = Vector2(float(axis[0]), float(axis[1])).limit_length(1.0) _network_camera_yaw = float(data.get("camera_yaw", 0.0)) var jump_intent_active: bool = bool(data.get("jump", false)) @@ -1989,15 +2324,13 @@ func apply_authoritative_network_input(data: Dictionary) -> void: _network_sprint = bool(data.get("sprint", false)) _network_sneak = bool(data.get("sneak", false)) _network_slow_walk = bool(data.get("slow_walk", false)) - _apply_animation_action_state(data.get("animation_action", {})) + apply_authoritative_network_animation_action( + data.get("animation_action", {}) + ) _apply_network_casting(bool(data.get("casting", false))) - var sitting_requested: bool = bool(data.get("sitting", false)) - if sitting_requested and not is_on_floor(): - _sit_after_landing = true - _set_sitting(false) - else: - _sit_after_landing = false - _set_sitting(sitting_requested) + apply_authoritative_network_sitting_state( + bool(data.get("sitting", false)) + ) func make_network_snapshot(peer_id: int) -> Dictionary: @@ -2007,19 +2340,49 @@ func make_network_snapshot(peer_id: int) -> Dictionary: "position": [global_position.x, global_position.y, global_position.z], "velocity": [velocity.x, velocity.y, velocity.z], "visual_yaw": _visuals.rotation.y, - "animation_state": NetworkPlayerAnimationProtocol.make_state( - _get_authoritative_locomotion_id(), - is_on_floor(), - _animation_action_id, - _animation_action_sequence, - _animation_action_elapsed, - _animation_action_paused, - ), - "sitting": _sitting, + "animation_state": make_network_animation_state(), + "grounded": is_on_floor(), + "sitting": get_network_sitting_state(), "casting": _fishing_visual_phase == FishingVisualPhase.CASTING, } +func make_network_animation_state() -> Dictionary: + return NetworkPlayerAnimationProtocol.make_state( + _get_authoritative_locomotion_id(), + is_on_floor(), + _animation_action_id, + _animation_action_sequence, + _animation_action_elapsed, + _animation_action_paused, + ) + + +func apply_network_animation_state(state: Dictionary) -> void: + _apply_network_target_animation_state(state) + + +func apply_authoritative_network_animation_action( + action_state: Dictionary, +) -> void: + if not NetworkPlayerAnimationProtocol.validate_action_state(action_state): + return + var incoming_sequence: int = int(action_state["sequence"]) + var wrapped_sequence: bool = ( + _animation_action_sequence + == NetworkPlayerAnimationProtocol.MAX_ACTION_SEQUENCE + and incoming_sequence == 1 + ) + if incoming_sequence < _animation_action_sequence and not wrapped_sequence: + return + if ( + incoming_sequence == _animation_action_sequence + and StringName(str(action_state["id"])) != _animation_action_id + ): + return + _apply_animation_action_state(action_state) + + func push_network_snapshot( snapshot: Dictionary, estimated_transit_seconds: float = -1.0, @@ -2053,7 +2416,8 @@ func push_network_snapshot( ) _network_target_velocity = parsed["velocity"] _network_target_visual_yaw = parsed["visual_yaw"] - _apply_network_target_animation_state(parsed["animation_state"]) + if not Dictionary(parsed.get("animation_state", {})).is_empty(): + _apply_network_target_animation_state(parsed["animation_state"]) _network_snapshot_age = 0.0 _apply_network_casting(bool(parsed["casting"])) _set_sitting(bool(parsed["sitting"])) @@ -2069,6 +2433,7 @@ func apply_local_prediction_correction( latest_input_sequence: int = 0, input_interval_seconds: float = 0.0, estimated_transit_seconds: float = -1.0, + audit_delta_seconds: float = 0.0, ) -> void: var parsed: Dictionary = _parse_network_snapshot(snapshot) if parsed.is_empty(): @@ -2101,16 +2466,226 @@ func apply_local_prediction_correction( authoritative_position += ( (parsed["velocity"] as Vector3) * transit_seconds ) - var error_distance: float = global_position.distance_to( - authoritative_position + var error_offset: Vector3 = authoritative_position - global_position + var error_distance: float = error_offset.length() + _local_prediction_largest_error = maxf( + _local_prediction_largest_error, + error_distance, ) - if error_distance > LOCAL_PREDICTION_SNAP_DISTANCE: + if error_distance <= LOCAL_PREDICTION_CORRECTION_THRESHOLD: + _reset_local_prediction_error() + return + if error_distance >= LOCAL_PREDICTION_SNAP_DISTANCE: + _clear_local_reconciliation_offsets() global_position = authoritative_position - elif error_distance > LOCAL_PREDICTION_CORRECTION_THRESHOLD: - global_position = global_position.lerp( - authoritative_position, - LOCAL_PREDICTION_CORRECTION_WEIGHT, + velocity = parsed["velocity"] + _local_prediction_hard_corrections += 1 + _reset_local_prediction_error() + return + if _should_defer_local_prediction_correction(parsed): + # A host and its client do not reach the apex or landing on the same + # frame. Correcting that expected vertical disagreement while either + # side is airborne can pull the local body off narrow platforms. + _reset_local_prediction_error() + return + # Both simulations agree the player is standing. Let ordinary floor motion + # and gravity resolve the vertical component; a stale height sample must not + # press a locally controlled player down or turn a horizontal correction + # into an early floor collision. + error_offset.y = 0.0 + error_distance = error_offset.length() + if error_distance <= LOCAL_PREDICTION_CORRECTION_THRESHOLD: + _reset_local_prediction_error() + return + var error_direction: Vector3 = error_offset.normalized() + if ( + not _local_prediction_error_direction.is_zero_approx() + and _local_prediction_error_direction.dot(error_direction) < 0.5 + ): + _reset_local_prediction_error() + _local_prediction_error_direction = error_direction + _local_prediction_error_audits += 1 + _local_prediction_error_seconds += clampf( + audit_delta_seconds, + 0.0, + LOCAL_PREDICTION_MAX_AUDIT_DELTA_SECONDS, + ) + if ( + _local_prediction_error_audits + < LOCAL_PREDICTION_MIN_CORRECTION_AUDITS + or _local_prediction_error_seconds + < LOCAL_PREDICTION_CORRECTION_DELAY_SECONDS + ): + return + var correction_weight: float = 1.0 - exp( + -LOCAL_PREDICTION_SOFT_CORRECTION_RATE + * clampf( + audit_delta_seconds, + 0.0, + LOCAL_PREDICTION_MAX_AUDIT_DELTA_SECONDS, ) + ) + var correction: Vector3 = error_offset * correction_weight + if correction.length() > LOCAL_PREDICTION_MAX_SOFT_CORRECTION_STEP: + correction = ( + correction.normalized() + * LOCAL_PREDICTION_MAX_SOFT_CORRECTION_STEP + ) + if _apply_camera_safe_local_correction(correction): + _local_prediction_soft_corrections += 1 + + +func _should_defer_local_prediction_correction(parsed: Dictionary) -> bool: + if not bool(parsed.get("grounded", true)): + return true + return _local_network_jump_intent_pending or not is_on_floor() + + +func _apply_camera_safe_local_correction(correction: Vector3) -> bool: + if correction.is_zero_approx(): + return false + var previous_visual_position: Vector3 = _visuals.global_position + var previous_camera_position: Vector3 = _camera_yaw.global_position + var previous_body_position: Vector3 = global_position + var base_visual_local_position: Vector3 = ( + _visuals.position - _local_reconciliation_visual_offset + ) + var base_camera_local_position: Vector3 = ( + _camera_yaw.position - _local_reconciliation_camera_offset + ) + # Reconciliation is still physical movement. Going through the physics + # server prevents a delayed host audit from placing the capsule through a + # tree, cliff, or stepping stone on the way to the authoritative position. + move_and_collide(correction) + if global_position.is_equal_approx(previous_body_position): + return false + _visuals.global_position = previous_visual_position + _camera_yaw.global_position = previous_camera_position + _local_reconciliation_visual_offset = ( + _visuals.position - base_visual_local_position + ) + _local_reconciliation_camera_offset = ( + _camera_yaw.position - base_camera_local_position + ) + return true + + +func _reset_local_prediction_error() -> void: + _local_prediction_error_seconds = 0.0 + _local_prediction_error_audits = 0 + _local_prediction_error_direction = Vector3.ZERO + + +func _clear_local_reconciliation_offsets() -> void: + if not _local_reconciliation_visual_offset.is_zero_approx(): + _visuals.position -= _local_reconciliation_visual_offset + if not _local_reconciliation_camera_offset.is_zero_approx(): + _camera_yaw.position -= _local_reconciliation_camera_offset + _local_reconciliation_visual_offset = Vector3.ZERO + _local_reconciliation_camera_offset = Vector3.ZERO + + +func _update_local_reconciliation_visuals(delta: float) -> void: + if ( + _local_reconciliation_visual_offset.is_zero_approx() + and _local_reconciliation_camera_offset.is_zero_approx() + ): + _local_reconciliation_visual_offset = Vector3.ZERO + _local_reconciliation_camera_offset = Vector3.ZERO + return + var retained_ratio: float = exp( + -LOCAL_RECONCILIATION_PRESENTATION_RECENTER_RATE * delta + ) + var retained_visual_offset: Vector3 = ( + _local_reconciliation_visual_offset * retained_ratio + ) + var retained_camera_offset: Vector3 = ( + _local_reconciliation_camera_offset * retained_ratio + ) + _visuals.position += ( + retained_visual_offset - _local_reconciliation_visual_offset + ) + _camera_yaw.position += ( + retained_camera_offset - _local_reconciliation_camera_offset + ) + _local_reconciliation_visual_offset = retained_visual_offset + _local_reconciliation_camera_offset = retained_camera_offset + + +func get_local_prediction_metrics() -> Dictionary: + return { + "soft_corrections": _local_prediction_soft_corrections, + "hard_corrections": _local_prediction_hard_corrections, + "largest_error": _local_prediction_largest_error, + "out_of_bounds_audits": _local_prediction_error_audits, + "out_of_bounds_seconds": _local_prediction_error_seconds, + } + + +static func resolve_network_input_stale_timeout_seconds( + round_trip_msec: int, +) -> float: + if round_trip_msec < 0: + return NETWORK_INPUT_STALE_TIMEOUT_SECONDS + return clampf( + NETWORK_INPUT_STALE_TIMEOUT_SECONDS + + float(round_trip_msec) / 1000.0 + * NETWORK_INPUT_STALE_RTT_MULTIPLIER, + NETWORK_INPUT_STALE_TIMEOUT_SECONDS, + NETWORK_INPUT_STALE_TIMEOUT_MAX_SECONDS, + ) + + +func _record_authoritative_movement_state() -> void: + var now_seconds: float = Time.get_ticks_msec() / 1000.0 + _authoritative_movement_history.append({ + "sequence": _last_network_input_sequence, + "recorded_at": now_seconds, + "position": global_position, + "velocity": velocity, + "cast_origin": get_cast_origin_position(), + "facing": get_facing_direction(), + "sneaking": is_sneaking(), + }) + var oldest_allowed: float = now_seconds - NETWORK_MOVEMENT_HISTORY_SECONDS + while ( + not _authoritative_movement_history.is_empty() + and float( + _authoritative_movement_history[0].get("recorded_at", 0.0) + ) < oldest_allowed + ): + _authoritative_movement_history.pop_front() + + +func get_lag_compensated_movement_state( + input_sequence: int, + max_age_seconds: float = NETWORK_MAX_LAG_COMPENSATION_SECONDS, +) -> Dictionary: + var now_seconds: float = Time.get_ticks_msec() / 1000.0 + for index: int in range( + _authoritative_movement_history.size() - 1, + -1, + -1, + ): + var candidate: Dictionary = _authoritative_movement_history[index] + if now_seconds - float(candidate.get("recorded_at", 0.0)) > ( + max_age_seconds + ): + break + if ( + input_sequence <= 0 + or int(candidate.get("sequence", 0)) <= input_sequence + ): + return candidate.duplicate(true) + return { + "sequence": _last_network_input_sequence, + "recorded_at": now_seconds, + "position": global_position, + "velocity": velocity, + "cast_origin": get_cast_origin_position(), + "facing": get_facing_direction(), + "sneaking": is_sneaking(), + } static func resolve_local_prediction_transit_seconds( @@ -2154,7 +2729,8 @@ func apply_network_teleport(snapshot: Dictionary) -> void: _network_target_position = global_position _network_target_velocity = velocity _network_target_visual_yaw = _visuals.rotation.y - _apply_network_target_animation_state(parsed["animation_state"]) + if not Dictionary(parsed.get("animation_state", {})).is_empty(): + _apply_network_target_animation_state(parsed["animation_state"]) _network_snapshot_age = 0.0 _network_snapshot_ready = true @@ -2180,12 +2756,16 @@ func _parse_network_snapshot(snapshot: Dictionary) -> Dictionary: float(network_velocity[2]) ) var visual_yaw: float = float(snapshot.get("visual_yaw", 0.0)) - var animation_state_value: Variant = snapshot.get("animation_state") - if not NetworkPlayerAnimationProtocol.validate_state(animation_state_value): - return {} - var animation_state: Dictionary = ( - animation_state_value as Dictionary - ).duplicate(true) + var animation_state: Dictionary = {} + if snapshot.has("animation_state"): + var animation_state_value: Variant = snapshot.get("animation_state") + if not NetworkPlayerAnimationProtocol.validate_state( + animation_state_value + ): + return {} + animation_state = ( + animation_state_value as Dictionary + ).duplicate(true) if ( snapshot.has("acknowledged_input") and ( @@ -2203,6 +2783,9 @@ func _parse_network_snapshot(snapshot: Dictionary) -> Dictionary: if snapshot.has("casting") and typeof(snapshot.get("casting")) != TYPE_BOOL: return {} var casting: bool = bool(snapshot.get("casting", false)) + if snapshot.has("grounded") and typeof(snapshot.get("grounded")) != TYPE_BOOL: + return {} + var grounded: bool = bool(snapshot.get("grounded", true)) if ( not parsed_position.is_finite() or not parsed_velocity.is_finite() @@ -2214,6 +2797,7 @@ func _parse_network_snapshot(snapshot: Dictionary) -> Dictionary: "velocity": parsed_velocity, "visual_yaw": visual_yaw, "animation_state": animation_state, + "grounded": grounded, "acknowledged_input": acknowledged_input, "sitting": sitting, "casting": casting, @@ -2237,6 +2821,23 @@ func _apply_network_target_animation_state(state: Dictionary) -> void: StringName(str(state["locomotion_id"])) ) var action: Dictionary = state["action"] + var incoming_sequence: int = int(action["sequence"]) + var wrapped_sequence: bool = ( + _network_target_animation_action_sequence + == NetworkPlayerAnimationProtocol.MAX_ACTION_SEQUENCE + and incoming_sequence == 1 + ) + if ( + incoming_sequence < _network_target_animation_action_sequence + and not wrapped_sequence + ): + return + if ( + incoming_sequence == _network_target_animation_action_sequence + and StringName(str(action["id"])) + != _network_target_animation_action_id + ): + return _network_target_animation_action_id = StringName(str(action["id"])) _network_target_animation_action_sequence = int(action["sequence"]) _network_target_animation_action_elapsed = float(action["elapsed"]) @@ -2414,11 +3015,11 @@ func _update_network_interpolation(delta: float) -> void: func _update_network_input_freshness(delta: float) -> void: _network_input_age = minf( _network_input_age + delta, - NETWORK_INPUT_STALE_TIMEOUT_SECONDS + 1.0, + _network_input_stale_timeout_seconds + 1.0, ) if ( _network_input_stale - or _network_input_age <= NETWORK_INPUT_STALE_TIMEOUT_SECONDS + or _network_input_age <= _network_input_stale_timeout_seconds ): return _network_input_stale = true @@ -2519,10 +3120,24 @@ func set_camera_active(active: bool) -> void: _camera.current = active +func face_world_direction(direction: Vector3) -> void: + var horizontal_direction := Vector3(direction.x, 0.0, direction.z) + if horizontal_direction.is_zero_approx() or _visuals == null: + return + horizontal_direction = horizontal_direction.normalized() + var target_world_yaw: float = atan2( + -horizontal_direction.x, + -horizontal_direction.z, + ) + _visuals.rotation.y = target_world_yaw - global_rotation.y + _network_target_visual_yaw = _visuals.rotation.y + + func apply_camera_settings( new_mouse_sensitivity: float, new_controller_sensitivity: float, invert_vertical: bool, + swap_hotbar_camera_scroll: bool = false, ) -> void: mouse_sensitivity = clampf(new_mouse_sensitivity, 0.001, 0.012) controller_camera_speed = clampf( @@ -2531,6 +3146,50 @@ func apply_camera_settings( 5.0 ) invert_camera_y = invert_vertical + _swap_hotbar_camera_scroll = swap_hotbar_camera_scroll + + +func set_rv_interior_camera_mode( + enabled: bool, + excluded_wall_rids: Array[RID] = [], +) -> void: + if enabled != _rv_interior_camera_mode: + if enabled: + _rv_previous_camera_environment = _camera.environment + _camera.environment = _get_rv_interior_environment() + if _free_camera != null: + _free_camera.environment = _camera.environment + else: + _camera.environment = _rv_previous_camera_environment + if _free_camera != null: + _free_camera.environment = _camera.environment + _rv_previous_camera_environment = null + _rv_interior_camera_mode = enabled + if _spring_arm == null: + return + _spring_arm.clear_excluded_objects() + if enabled: + for collider_rid: RID in excluded_wall_rids: + if collider_rid.is_valid(): + _spring_arm.add_excluded_object(collider_rid) + _set_target_zoom(_target_zoom) + + +func _get_rv_interior_environment() -> Environment: + if _rv_interior_environment != null: + return _rv_interior_environment + _rv_interior_environment = Environment.new() + _rv_interior_environment.background_mode = Environment.BG_COLOR + _rv_interior_environment.background_color = Color("020506") + _rv_interior_environment.ambient_light_source = ( + Environment.AMBIENT_SOURCE_COLOR + ) + _rv_interior_environment.ambient_light_color = Color("d6caaa") + _rv_interior_environment.ambient_light_energy = 1.0 + _rv_interior_environment.reflected_light_source = ( + Environment.REFLECTION_SOURCE_DISABLED + ) + return _rv_interior_environment func is_camera_input_enabled() -> bool: @@ -2659,6 +3318,23 @@ func set_active_shovel(should_show: bool) -> void: ) +func set_active_decor_package(should_show: bool) -> void: + var changed: bool = _held_decor_package_visible != should_show + _held_decor_package_visible = should_show + if _held_decor_package_display != null: + _held_decor_package_display.visible = should_show + if should_show: + _fishing_rod.visible = false + if _catching_net != null: + _catching_net.visible = false + if _shovel != null: + _shovel.visible = false + elif changed: + _apply_active_rod_visibility() + if changed: + _update_character_animation() + + func _apply_fishing_rod_model(rod: FishingRodDataType) -> void: var next_id: StringName = rod.item_id if rod != null else StringName() if next_id == _active_fishing_rod_id: @@ -2831,7 +3507,52 @@ func set_held_fish( func _has_held_show_item() -> bool: - return _held_fish_visible or _held_art_kit_visible + return ( + _held_fish_visible + or _held_art_kit_visible + or _held_decor_package_visible + ) + + +func _build_decor_package_display(parent: Node3D) -> Node3D: + var display := Node3D.new() + display.name = "HeldDecorPackageDisplay" + display.position = Vector3(0.0, 0.1, 0.04) + display.rotation = Vector3(0.15, 0.0, -0.55) + display.visible = false + parent.add_child(display) + + var sack := MeshInstance3D.new() + sack.name = "Sack" + var sack_mesh := SphereMesh.new() + sack_mesh.radius = 0.22 + sack_mesh.height = 0.48 + sack_mesh.radial_segments = 8 + sack_mesh.rings = 4 + sack_mesh.material = _decor_package_material(Color("a87843")) + sack.mesh = sack_mesh + display.add_child(sack) + + var tie := MeshInstance3D.new() + tie.name = "Tie" + var tie_mesh := CylinderMesh.new() + tie_mesh.top_radius = 0.1 + tie_mesh.bottom_radius = 0.12 + tie_mesh.height = 0.08 + tie_mesh.radial_segments = 8 + tie_mesh.material = _decor_package_material(Color("513829")) + tie.mesh = tie_mesh + tie.position = Vector3(0.0, 0.22, 0.0) + display.add_child(tie) + return display + + +func _decor_package_material(color: Color) -> StandardMaterial3D: + var material := StandardMaterial3D.new() + material.albedo_color = color + material.roughness = 1.0 + material.shading_mode = BaseMaterial3D.SHADING_MODE_PER_VERTEX + return material func _clear_held_fish() -> void: diff --git a/player/player.tscn b/player/player.tscn index 4a2d897..3288d2d 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -12,7 +12,7 @@ [ext_resource type="Script" path="res://progression/player_cooler_capacity.gd" id="10_capacity"] [ext_resource type="Script" path="res://player/player_ground_shadow.gd" id="11_ground_shadow"] [ext_resource type="Material" path="res://player/materials/player_blob_shadow.tres" id="12_blob_shadow"] -[ext_resource type="PackedScene" path="res://art/exported/characters/base/netfishing_base_character.glb" id="13_character"] +[ext_resource type="PackedScene" path="res://art/exported/characters/base/straywild_base_character.glb" id="13_character"] [ext_resource type="Script" path="res://progression/player_art_unlocks.gd" id="14_art_unlocks"] [ext_resource type="Script" path="res://progression/player_experience.gd" id="15_experience"] [ext_resource type="Script" path="res://player/sprint_dust_trail.gd" id="16_sprint_dust"] diff --git a/player/player_visual_presenter.gd b/player/player_visual_presenter.gd index 745fc3c..b071b2c 100644 --- a/player/player_visual_presenter.gd +++ b/player/player_visual_presenter.gd @@ -3,9 +3,9 @@ extends RefCounted const PlayerScene: PackedScene = preload("res://player/player.tscn") const FurPatternShader: Shader = preload("res://player/fur_pattern.gdshader") -const RUNTIME_MATERIAL_META: StringName = &"netfishing_runtime_material" +const RUNTIME_MATERIAL_META: StringName = &"straywild_runtime_material" const RUNTIME_FUR_PATTERN_MATERIAL_META: StringName = ( - &"netfishing_runtime_fur_pattern_material" + &"straywild_runtime_fur_pattern_material" ) const EAR_MESH_NAMES: Array[String] = [ "ears_antlers_round", diff --git a/progression/player_appearance_store.gd b/progression/player_appearance_store.gd index 7ac8767..febe43d 100644 --- a/progression/player_appearance_store.gd +++ b/progression/player_appearance_store.gd @@ -13,6 +13,10 @@ var _data_root: PlayerDataRoot func configure_storage(path: String, data_root: PlayerDataRoot) -> void: _profile_path = path _data_root = data_root + _snapshot = CharacterCustomizationCatalog.default_snapshot() + _loaded = false + _future_version = false + _expected_hash = "" func _temp_path() -> String: diff --git a/progression/player_cooler_capacity.gd b/progression/player_cooler_capacity.gd index b8c62be..bbd0b87 100644 --- a/progression/player_cooler_capacity.gd +++ b/progression/player_cooler_capacity.gd @@ -2,62 +2,77 @@ class_name PlayerCoolerCapacity extends Node const PlayerWalletType = preload("res://economy/player_wallet.gd") +const PlayerHomeStateType = preload("res://homes/player_home_state.gd") signal capacity_changed(level: int, capacity: int) -## Kept under the historical class name so existing saves and network product -## identifiers migrate without losing their purchased level. This progression -## now controls the player's private storage box rather than carried catches. +## Compatibility adapter for saves and systems that still refer to the old +## cooler-capacity object. Storage is now derived exclusively from the player's +## home tier; this object is not independently purchasable. const CAPACITIES: Array[int] = [9, 18, 27, 36, 45, 54, 63, 72] const EXPANSION_COSTS: Array[int] = [75, 175, 400, 850, 1500, 2500, 4000] const MAX_LEVEL: int = 7 const MAX_CAPACITY: int = 72 -var _capacity_level: int = 0 +var _home_state: PlayerHomeStateType +var _legacy_capacity_level: int = 0 + + +func bind_home_state(home_state: PlayerHomeStateType) -> void: + if _home_state == home_state: + return + if ( + _home_state != null + and _home_state.changed.is_connected(_on_home_changed) + ): + _home_state.changed.disconnect(_on_home_changed) + _home_state = home_state + if ( + _home_state != null + and not _home_state.changed.is_connected(_on_home_changed) + ): + _home_state.changed.connect(_on_home_changed) + _on_home_changed() func get_level() -> int: - return _capacity_level + return _legacy_capacity_level func get_capacity() -> int: - return CAPACITIES[_capacity_level] + if _home_state != null: + # A new home upgrade grants its authored capacity. Older saves retain any + # separately purchased storage level so reducing the first RV tier cannot + # hide or discard items that were already placed in later slots. + return maxi( + _home_state.get_storage_capacity(), + CAPACITIES[clampi(_legacy_capacity_level, 0, MAX_LEVEL)], + ) + return CAPACITIES[clampi(_legacy_capacity_level, 0, MAX_LEVEL)] func get_next_capacity() -> int: - if _capacity_level >= MAX_LEVEL: - return -1 - return CAPACITIES[_capacity_level + 1] + return -1 func get_next_cost() -> int: - if _capacity_level >= MAX_LEVEL: - return -1 - return EXPANSION_COSTS[_capacity_level] + return -1 -func can_purchase(wallet: PlayerWalletType) -> bool: - var cost: int = get_next_cost() - return wallet != null and cost >= 0 and wallet.can_afford(cost) +func can_purchase(_wallet: PlayerWalletType) -> bool: + return false -func purchase(wallet: PlayerWalletType) -> bool: - if not can_purchase(wallet): - return false - var cost: int = get_next_cost() - if not wallet.debit(cost): - return false - _capacity_level += 1 - capacity_changed.emit(_capacity_level, get_capacity()) - return true +func purchase(_wallet: PlayerWalletType) -> bool: + return false func restore_level(level: int) -> bool: var validated: int = clampi(level, 0, MAX_LEVEL) - var changed: bool = _capacity_level != validated - _capacity_level = validated + var changed: bool = _legacy_capacity_level != validated + _legacy_capacity_level = validated if changed: - capacity_changed.emit(_capacity_level, get_capacity()) + capacity_changed.emit(get_level(), get_capacity()) return true @@ -66,4 +81,8 @@ func reset_to_defaults() -> void: func to_save_data() -> Dictionary: - return {"capacity_level": _capacity_level} + return {"capacity_level": get_level()} + + +func _on_home_changed() -> void: + capacity_changed.emit(get_level(), get_capacity()) diff --git a/project.godot b/project.godot index 9794217..5bcbb4d 100644 --- a/project.godot +++ b/project.godot @@ -10,11 +10,11 @@ config_version=5 [application] -config/name="NETFISHING" -config/version="0.16.1-alpha" +config/name="straywild" +config/version="0.20.2-alpha" run/main_scene="res://main/main.tscn" config/features=PackedStringArray("4.7", "GL Compatibility") -config/icon="res://art/exported/system_icons/netfishing_256.png" +config/icon="res://art/exported/system_icons/straywild_256.png" [autoload] @@ -26,12 +26,12 @@ window/stretch/aspect="expand" [editor_plugins] -enabled=PackedStringArray("res://addons/netfishing_shoreline_baker/plugin.cfg") +enabled=PackedStringArray("res://addons/straywild_shoreline_baker/plugin.cfg") [gui] -theme/custom="res://ui/game_theme.tres" timers/tooltip_delay_sec=0.0 +theme/custom="res://ui/game_theme.tres" [input] @@ -260,7 +260,7 @@ alternate_fishing={ [network] -discovery/base_url="https://discovery.netfishing.org" +discovery/base_url="https://discovery.straywild.io/patron-test" [physics] diff --git a/save/player_save_inspection.gd b/save/player_save_inspection.gd index be5fd24..ff14de6 100644 --- a/save/player_save_inspection.gd +++ b/save/player_save_inspection.gd @@ -14,6 +14,10 @@ var detected_version: int = -1 var catch_count: int = 0 var wallet_balance: int = 0 var discovered_species_count: int = 0 +var total_experience: int = 0 +var player_level: int = 1 +var world_layout: StringName = &"generated_world" +var world_seed: int = 0 var has_primary_file: bool = false var message: String = "" diff --git a/save/player_save_manager.gd b/save/player_save_manager.gd index 1b4c1d2..c41f861 100644 --- a/save/player_save_manager.gd +++ b/save/player_save_manager.gd @@ -34,8 +34,9 @@ const WorldWeatherServiceType = preload( const WorldLayoutType = preload("res://world/world_layout.gd") const PlayerJobServiceType = preload("res://jobs/player_job_service.gd") const PlayerType = preload("res://player/player.gd") +const PlayerHomeStateType = preload("res://homes/player_home_state.gd") -const SAVE_VERSION: int = 10 +const SAVE_VERSION: int = 11 const LEGACY_SAVE_FILENAME := "player_save.json" const ARCHIVE_EXTENSION := ".nfsave" const BASIC_ROD_ID: StringName = &"basic_fishing_rod" @@ -49,6 +50,7 @@ class LoadSnapshot: var catches: Array[FishCatchType] = [] var discovered_ids: Array[StringName] = [] var discovered_quality_masks: Dictionary[StringName, int] = {} + var catch_counts: Dictionary[StringName, int] = {} var wallet_balance: int = 0 var next_catch_sequence: int = 1 var bag_items: Array[OwnedItemType] = [] @@ -75,6 +77,7 @@ class LoadSnapshot: WorldWeatherServiceType.SUNNY_DURATION_RANGE.x ) var jobs_data: Dictionary = PlayerJobServiceType.default_save_data() + var home_data: Dictionary = PlayerHomeStateType.default_save_data() @export_range(0.05, 5.0, 0.05) var autosave_delay: float = 0.5 @@ -95,6 +98,7 @@ var _world_time: WorldTimeServiceType var _world_weather: WorldWeatherServiceType var _jobs: PlayerJobServiceType var _player: PlayerType +var _home_state: PlayerHomeStateType var _autosave_timer: Timer var _is_configured: bool = false var _is_restoring: bool = false @@ -109,8 +113,22 @@ var _world_seed: int = DEFAULT_WORLD_SEED func configure_storage(path: String, data_root: PlayerDataRoot) -> void: + if not select_storage(path, data_root): + push_error("PlayerSaveManager could not configure progression storage.") + + +func select_storage(path: String, data_root: PlayerDataRoot) -> bool: + if path.is_empty() or data_root == null: + return false + if _autosave_enabled or _is_dirty: + return false + if _autosave_timer != null: + _autosave_timer.stop() _save_path = path _data_root = data_root + _expected_hash = "" + _automatic_saving_blocked = false + return true func _temp_path() -> String: @@ -160,6 +178,7 @@ func setup( world_weather: WorldWeatherServiceType, jobs: PlayerJobServiceType, player: PlayerType, + home_state: PlayerHomeStateType, ) -> void: _inventory = inventory _collection_log = collection_log @@ -177,6 +196,7 @@ func setup( _world_weather = world_weather _jobs = jobs _player = player + _home_state = home_state _is_configured = ( _inventory != null and _collection_log != null @@ -194,6 +214,7 @@ func setup( and _world_weather != null and _jobs != null and _player != null + and _home_state != null ) if not _is_configured: push_error("PlayerSaveManager setup is missing required references.") @@ -240,6 +261,8 @@ func setup( _player.active_bait_changed.connect(_on_active_tackle_changed) if not _player.active_lure_changed.is_connected(_on_active_tackle_changed): _player.active_lure_changed.connect(_on_active_tackle_changed) + if not _home_state.changed.is_connected(_mark_dirty): + _home_state.changed.connect(_mark_dirty) func load_player_data() -> bool: @@ -297,9 +320,10 @@ func load_player_data() -> bool: snapshot.next_catch_sequence ) var collection_restored: bool = ( - _collection_log.replace_discovery_state( + _collection_log.replace_collection_state( snapshot.discovered_ids, snapshot.discovered_quality_masks, + snapshot.catch_counts, ) ) var wallet_restored: bool = _wallet.restore_balance( @@ -314,6 +338,11 @@ func load_player_data() -> bool: snapshot.reel_speed_level, snapshot.barrier_power_level ) + # Home tier is now the authority for private-storage capacity, so restore it + # before the compatibility capacity adapter and inventory layout. + var home_restored: bool = _home_state.restore_from_save_data( + snapshot.home_data + ) var cooler_restored: bool = _cooler_capacity.restore_level( snapshot.cooler_capacity_level ) @@ -360,13 +389,14 @@ func load_player_data() -> bool: or not world_time_restored or not world_weather_restored or not jobs_restored + or not home_restored ): push_error( ( "Validated player save could not be restored: " + "inventory=%s collection=%s wallet=%s bag=%s tackle=%s hotbar=%s " + "upgrades=%s cooler=%s layout=%s art=%s experience=%s " - + "time=%s weather=%s jobs=%s" + + "time=%s weather=%s jobs=%s home=%s" ) % [ inventory_restored, @@ -383,6 +413,7 @@ func load_player_data() -> bool: world_time_restored, world_weather_restored, jobs_restored, + home_restored, ] ) return false @@ -398,17 +429,30 @@ func load_player_data() -> bool: func inspect_save() -> SaveInspectionType: - var result := SaveInspectionType.new() _recover_interrupted_write() var read_path: String = _read_path() - result.has_primary_file = not read_path.is_empty() + return inspect_progression_at_path( + read_path, + read_path == _legacy_save_path(), + ) + + +func inspect_progression_at_path( + path: String, + allow_legacy_plaintext: bool = false, +) -> SaveInspectionType: + var result := SaveInspectionType.new() + if not path.is_empty(): + _remove_if_present(path + ".codec.tmp") + _recover_path_write(path) + result.has_primary_file = not path.is_empty() and FileAccess.file_exists(path) if not result.has_primary_file: result.status = SaveInspectionType.Status.MISSING result.message = "no save found." return result var decoded: Dictionary = ProgressionSaveCodec.read_local_save( - read_path, - read_path == _legacy_save_path(), + path, + allow_legacy_plaintext, ) if not bool(decoded.get("ok", false)): result.status = SaveInspectionType.Status.IO_ERROR @@ -439,6 +483,12 @@ func inspect_save() -> SaveInspectionType: result.catch_count = snapshot.catches.size() result.wallet_balance = snapshot.wallet_balance result.discovered_species_count = snapshot.discovered_ids.size() + result.total_experience = snapshot.total_experience + result.player_level = PlayerExperienceType.level_for_total_experience( + snapshot.total_experience + ) + result.world_layout = snapshot.world_layout + result.world_seed = snapshot.world_seed result.message = "save ready." return result @@ -451,31 +501,45 @@ func export_progression_archive(path: String) -> Dictionary: var source_path: String = _read_path() if source_path.is_empty(): return {"ok": false, "message": "there is no progression to export."} - var decoded: Dictionary = ProgressionSaveCodec.read_local_save( + return export_progression_archive_from_path( source_path, + path, source_path == _legacy_save_path(), ) + + +func export_progression_archive_from_path( + source_path: String, + destination_path: String, + allow_legacy_plaintext: bool = false, +) -> Dictionary: + if source_path.is_empty() or destination_path.is_empty(): + return {"ok": false, "message": "progression export is unavailable."} + var decoded: Dictionary = ProgressionSaveCodec.read_local_save( + source_path, + allow_legacy_plaintext, + ) if not bool(decoded.get("ok", false)): - return {"ok": false, "message": "the active progression could not be read."} + return {"ok": false, "message": "the selected progression could not be read."} var prepared: Dictionary = _prepare_external_save_data(decoded["data"]) if not bool(prepared.get("ok", false)): return prepared var bytes: PackedByteArray = ProgressionSaveCodec.encode_archive( prepared["data"], - path + ".codec.tmp", + destination_path + ".codec.tmp", ) if bytes.is_empty(): return {"ok": false, "message": "the progression archive could not be encoded."} var result: Dictionary = PortableFileGuard.write_guarded( - path, + destination_path, bytes, - PortableFileGuard.hash_file(path), + PortableFileGuard.hash_file(destination_path), _data_root.conflict_directory(), _data_root.device_id, ) if not bool(result.get("ok", false)): return {"ok": false, "message": "the progression archive could not be written."} - var verified: Dictionary = inspect_progression_archive(path) + var verified: Dictionary = inspect_progression_archive(destination_path) if not bool(verified.get("ok", false)): return {"ok": false, "message": "the progression archive could not be verified."} verified["message"] = "progression archive created." @@ -525,6 +589,83 @@ func import_progression_archive(path: String) -> Dictionary: } +func install_progression_archive_at_path( + archive_path: String, + destination_path: String, +) -> Dictionary: + if not _is_configured or destination_path.is_empty(): + return {"ok": false, "message": "progression import is unavailable."} + var inspected: Dictionary = inspect_progression_archive(archive_path) + if not bool(inspected.get("ok", false)): + return inspected + var result: Dictionary = _write_save_data_at_path( + inspected["data"], + destination_path, + PortableFileGuard.hash_file(destination_path), + ) + if not bool(result.get("ok", false)): + return {"ok": false, "message": "the imported progression could not be installed."} + return { + "ok": true, + "message": "progression imported as a new save slot.", + "catch_count": inspected["catch_count"], + "wallet_balance": inspected["wallet_balance"], + "discovered_species_count": inspected["discovered_species_count"], + "world_layout": inspected["world_layout"], + "world_seed": inspected["world_seed"], + } + + +func copy_progression_to_path( + source_path: String, + destination_path: String, + allow_legacy_plaintext: bool, + world_layout: StringName, + world_seed: int, +) -> Dictionary: + if ( + not _is_configured + or source_path.is_empty() + or destination_path.is_empty() + or not WorldLayoutType.is_valid(world_layout) + or world_seed <= 0 + or world_seed > MAX_WORLD_SEED + ): + return {"ok": false, "message": "progression duplication is unavailable."} + var decoded: Dictionary = ProgressionSaveCodec.read_local_save( + source_path, + allow_legacy_plaintext, + ) + if not bool(decoded.get("ok", false)): + return {"ok": false, "message": "the selected progression could not be read."} + var prepared: Dictionary = _prepare_external_save_data(decoded["data"]) + if not bool(prepared.get("ok", false)): + return prepared + var save_data: Dictionary = (prepared["data"] as Dictionary).duplicate(true) + var world_data: Dictionary = {} + if typeof(save_data.get("world")) == TYPE_DICTIONARY: + world_data = (save_data["world"] as Dictionary).duplicate(true) + world_data["layout"] = String(world_layout) + world_data["seed"] = world_seed + save_data["world"] = world_data + prepared = _prepare_external_save_data(save_data) + if not bool(prepared.get("ok", false)): + return prepared + var result: Dictionary = _write_save_data_at_path( + prepared["data"], + destination_path, + PortableFileGuard.hash_file(destination_path), + ) + if not bool(result.get("ok", false)): + return {"ok": false, "message": "the duplicated progression could not be written."} + return { + "ok": true, + "message": "save slot duplicated.", + "world_layout": String(world_layout), + "world_seed": world_seed, + } + + func initialize_new_game( world_seed: int = DEFAULT_WORLD_SEED, world_layout: StringName = WorldLayoutType.GENERATED, @@ -678,6 +819,20 @@ func _build_save_dictionary() -> Dictionary: ): return {} serialized_quality_masks[String(fish_id)] = quality_mask + var serialized_catch_counts: Dictionary = {} + var catch_counts: Dictionary[StringName, int] = ( + _collection_log.get_catch_counts() + ) + for fish_id: StringName in catch_counts: + var catch_count: int = catch_counts[fish_id] + if ( + fish_id.is_empty() + or catch_count <= 0 + or catch_count > CollectionLogType.MAX_CATCH_COUNT + or not _collection_log.has_discovered(fish_id) + ): + return {} + serialized_catch_counts[String(fish_id)] = catch_count var serialized_items: Array[Dictionary] = [] for owned: OwnedItemType in _bag.get_all_items(): if owned == null or not owned.is_valid(): @@ -725,6 +880,7 @@ func _build_save_dictionary() -> Dictionary: "collection": { "discovered_fish_ids": discovered_strings, "discovered_quality_masks": serialized_quality_masks, + "catch_counts": serialized_catch_counts, }, "inventory": { "next_catch_sequence": _inventory.get_next_catch_sequence(), @@ -758,6 +914,7 @@ func _build_save_dictionary() -> Dictionary: ), }, "jobs": _jobs.to_save_data(), + "home": _home_state.to_save_data(), } @@ -772,6 +929,7 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: or typeof(save_data.get("inventory_layout")) != TYPE_DICTIONARY or typeof(save_data.get("experience")) != TYPE_DICTIONARY or typeof(save_data.get("jobs")) != TYPE_DICTIONARY + or typeof(save_data.get("home")) != TYPE_DICTIONARY ): return null var wallet_data: Dictionary = save_data["wallet"] @@ -783,6 +941,7 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: var inventory_layout_data: Dictionary = save_data["inventory_layout"] var experience_data: Dictionary = save_data["experience"] var jobs_data: Dictionary = save_data["jobs"] + var home_data: Dictionary = save_data["home"] var world_data: Dictionary = {} if typeof(save_data.get("world")) == TYPE_DICTIONARY: world_data = save_data["world"] @@ -865,6 +1024,12 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: if not PlayerJobServiceType.validate_save_data(jobs_data): return null snapshot.jobs_data = jobs_data.duplicate(true) + var sanitized_home: Dictionary = PlayerHomeStateType.sanitize_save_data( + home_data + ) + if sanitized_home.is_empty(): + return null + snapshot.home_data = sanitized_home if world_data.has("time_hours"): snapshot.world_time_hours = _read_world_time_hours( world_data["time_hours"] @@ -926,6 +1091,30 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: ): return null snapshot.discovered_quality_masks[fish_id] = mask + var has_saved_catch_counts: bool = collection_data.has("catch_counts") + if ( + has_saved_catch_counts + and typeof(collection_data.get("catch_counts")) != TYPE_DICTIONARY + ): + return null + if has_saved_catch_counts: + var saved_catch_counts: Dictionary = collection_data["catch_counts"] + for key: Variant in saved_catch_counts: + if typeof(key) not in [TYPE_STRING, TYPE_STRING_NAME]: + return null + var fish_id := StringName(str(key)) + var catch_count: int = _read_integer( + saved_catch_counts[key], + -1, + CollectionLogType.MAX_CATCH_COUNT, + ) + if ( + fish_id.is_empty() + or not seen_discoveries.has(fish_id) + or catch_count <= 0 + ): + return null + snapshot.catch_counts[fish_id] = catch_count var seen_ids: Dictionary[StringName, bool] = {} var seen_sequences: Dictionary[int, bool] = {} @@ -976,6 +1165,13 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: fish_catch.catch_sequence ) snapshot.catches.append(fish_catch) + if ( + not has_saved_catch_counts + and seen_discoveries.has(fish_catch.fish_id) + ): + snapshot.catch_counts[fish_catch.fish_id] = ( + int(snapshot.catch_counts.get(fish_catch.fish_id, 0)) + 1 + ) snapshot.next_catch_sequence = maxi( requested_next_sequence, @@ -1130,6 +1326,26 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: PlayerCoolerCapacityType.MAX_LEVEL, "cooler.capacity_level" ) + # Before homes had upgrade tiers, storage was purchased separately. Preserve + # those saves by granting the starter RV to anybody who owned at least one + # legacy expansion. PlayerCoolerCapacity also retains the purchased legacy + # capacity so entries beyond the new RV's first 18 slots remain accessible. + if ( + snapshot.cooler_capacity_level > 0 + and int(snapshot.home_data.get("tier", 0)) + == PlayerHomeStateType.STARTER_TIER + ): + var migrated_home: Dictionary = home_data.duplicate(true) + migrated_home["tier"] = PlayerHomeStateType.STARTER_RV_TIER + migrated_home["exterior_id"] = String( + PlayerHomeStateType.STARTER_RV_EXTERIOR_ID + ) + var sanitized_migrated_home := ( + PlayerHomeStateType.sanitize_save_data(migrated_home) + ) + if sanitized_migrated_home.is_empty(): + return null + snapshot.home_data = sanitized_migrated_home snapshot.art_unlock_mask = _read_integer( art_data.get("unlock_mask"), 0, @@ -1168,6 +1384,8 @@ func _migrate_save( migrated = _migrate_version_8_to_9(migrated) 9: migrated = _migrate_version_9_to_10(migrated) + 10: + migrated = _migrate_version_10_to_11(migrated) _: return {} if migrated.is_empty(): @@ -1425,6 +1643,13 @@ func _migrate_version_9_to_10(data: Dictionary) -> Dictionary: return migrated +func _migrate_version_10_to_11(data: Dictionary) -> Dictionary: + var migrated: Dictionary = data.duplicate(true) + migrated["home"] = PlayerHomeStateType.default_save_data() + migrated["save_version"] = 11 + return migrated + + func _mark_dirty() -> void: if ( _is_restoring @@ -1504,15 +1729,23 @@ func _recover_path_write(path: String) -> void: func _write_current_save_data( save_data: Dictionary, expected_hash: String, +) -> Dictionary: + return _write_save_data_at_path(save_data, _save_path, expected_hash) + + +func _write_save_data_at_path( + save_data: Dictionary, + destination_path: String, + expected_hash: String, ) -> Dictionary: var bytes: PackedByteArray = ProgressionSaveCodec.encode_local_save( save_data, - _codec_scratch_path(), + destination_path + ".codec.tmp", ) if bytes.is_empty(): return {"ok": false} return PortableFileGuard.write_guarded( - _save_path, + destination_path, bytes, expected_hash, _data_root.conflict_directory(), @@ -1651,6 +1884,7 @@ func _restore_defaults() -> void: var empty_catches: Array[FishCatchType] = [] var empty_discoveries: Array[StringName] = [] var empty_quality_masks: Dictionary[StringName, int] = {} + var empty_catch_counts: Dictionary[StringName, int] = {} var default_items: Array[OwnedItemType] = [] var basic_rod := OwnedItemType.new() basic_rod.item_id = BASIC_ROD_ID @@ -1661,9 +1895,10 @@ func _restore_defaults() -> void: default_slots.fill(StringName()) default_slots[0] = BASIC_ROD_ID _inventory.replace_all_catches(empty_catches, 1) - _collection_log.replace_discovery_state( + _collection_log.replace_collection_state( empty_discoveries, empty_quality_masks, + empty_catch_counts, ) _wallet.restore_balance(0) _bag.replace_all_items(default_items) @@ -1684,6 +1919,7 @@ func _restore_defaults() -> void: _world_layout = WorldLayoutType.GENERATED _world_seed = DEFAULT_WORLD_SEED _jobs.reset_to_defaults() + _home_state.reset_to_defaults() _is_restoring = false _is_dirty = false diff --git a/save/player_save_slot_catalog.gd b/save/player_save_slot_catalog.gd new file mode 100644 index 0000000..d3b9d23 --- /dev/null +++ b/save/player_save_slot_catalog.gd @@ -0,0 +1,591 @@ +class_name PlayerSaveSlotCatalog +extends RefCounted + +const FORMAT_VERSION: int = 1 +const MAX_SLOTS: int = 32 +const MAX_NAME_LENGTH: int = 32 +const LEGACY_SAVE_ID: StringName = &"player_save" + +signal slots_changed + +var _data_root: PlayerDataRoot +var _save_manager: PlayerSaveManager +var _manifest_path := "" +var _slots_directory := "" +var _slots: Array[Dictionary] = [] +var _active_slot_id := "" +var _expected_hash := "" +var _error_message := "" + + +func configure( + data_root: PlayerDataRoot, + save_manager: PlayerSaveManager, +) -> bool: + if data_root == null or save_manager == null or data_root.root_path.is_empty(): + return false + _data_root = data_root + _save_manager = save_manager + _manifest_path = data_root.path_for(&"save_slots") + _slots_directory = data_root.root_path.path_join("player/saves") + _slots.clear() + _active_slot_id = "" + _expected_hash = "" + _error_message = "" + if DirAccess.make_dir_recursive_absolute(_slots_directory) != OK: + _error_message = "the save-slot directory could not be created." + return false + _recover_interrupted_manifest_write() + var loaded: bool = _load_manifest() + if not loaded and FileAccess.file_exists(_manifest_path): + if not _preserve_invalid_manifest(): + _error_message = "the invalid save-slot catalog could not be preserved." + return false + var slot_count_before_discovery: int = _slots.size() + var active_before_discovery: String = _active_slot_id + _discover_untracked_saves() + if _active_slot_id.is_empty() and not _slots.is_empty(): + _active_slot_id = str(_slots.front().get("slot_id", "")) + if ( + not loaded + or _slots.size() != slot_count_before_discovery + or _active_slot_id != active_before_discovery + ): + if not _save_manifest(): + return false + return _select_configured_storage() + + +func get_error_message() -> String: + return _error_message + + +func list_slots() -> Array[Dictionary]: + var result: Array[Dictionary] = [] + for entry: Dictionary in _slots: + result.append(_build_slot_summary(entry)) + result.sort_custom( + func(a: Dictionary, b: Dictionary) -> bool: + var a_played: int = int(a.get("last_played_at_unix", 0)) + var b_played: int = int(b.get("last_played_at_unix", 0)) + if a_played == b_played: + return int(a.get("created_at_unix", 0)) > int( + b.get("created_at_unix", 0) + ) + return a_played > b_played + ) + return result + + +func get_slot(slot_id: String) -> Dictionary: + var entry: Dictionary = _find_slot(slot_id) + return _build_slot_summary(entry) if not entry.is_empty() else {} + + +func get_active_slot_id() -> String: + return _active_slot_id + + +func has_slots() -> bool: + return not _slots.is_empty() + + +func ensure_active_slot() -> Dictionary: + if not _active_slot_id.is_empty() and not _find_slot(_active_slot_id).is_empty(): + return {"ok": true, "slot_id": _active_slot_id} + var created: Dictionary = create_empty_slot(_next_default_name()) + if not bool(created.get("ok", false)): + return created + var slot_id: String = str(created.get("slot_id", "")) + if not activate_slot(slot_id): + return {"ok": false, "message": "the new save slot could not be selected."} + return {"ok": true, "slot_id": slot_id} + + +func create_empty_slot(display_name: String) -> Dictionary: + if _slots.size() >= MAX_SLOTS: + return {"ok": false, "message": "the maximum number of save slots has been reached."} + var clean_name: String = normalized_name(display_name) + if clean_name.is_empty(): + return {"ok": false, "message": "enter a name for this save slot."} + var slot_id: String = _generate_slot_id() + var now: int = int(Time.get_unix_time_from_system()) + _slots.append({ + "slot_id": slot_id, + "display_name": clean_name, + "created_at_unix": now, + "last_played_at_unix": 0, + "legacy": false, + }) + if not _save_manifest(): + _slots.pop_back() + return {"ok": false, "message": "the save-slot catalog could not be updated."} + slots_changed.emit() + return {"ok": true, "slot_id": slot_id} + + +func duplicate_slot( + source_slot_id: String, + display_name: String, + world_layout: StringName, + world_seed: int, +) -> Dictionary: + if _slots.size() >= MAX_SLOTS: + return {"ok": false, "message": "the maximum number of save slots has been reached."} + var source: Dictionary = _find_slot(source_slot_id) + var clean_name: String = normalized_name(display_name) + if source.is_empty() or clean_name.is_empty(): + return {"ok": false, "message": "the selected save slot cannot be duplicated."} + var source_path: String = _existing_slot_path(source) + if source_path.is_empty(): + return {"ok": false, "message": "the selected save slot has no progression to duplicate."} + var slot_id: String = _generate_slot_id() + var destination: String = _slots_directory.path_join(slot_id + ".nfsave") + var copied: Dictionary = _save_manager.copy_progression_to_path( + source_path, + destination, + source_path.ends_with(".json"), + world_layout, + world_seed, + ) + if not bool(copied.get("ok", false)): + return copied + var now: int = int(Time.get_unix_time_from_system()) + _slots.append({ + "slot_id": slot_id, + "display_name": clean_name, + "created_at_unix": now, + "last_played_at_unix": 0, + "legacy": false, + }) + if not _save_manifest(): + _slots.pop_back() + _remove_if_present(destination) + return {"ok": false, "message": "the duplicated slot could not be recorded."} + slots_changed.emit() + return {"ok": true, "slot_id": slot_id} + + +func import_slot(archive_path: String, display_name: String) -> Dictionary: + if _slots.size() >= MAX_SLOTS: + return {"ok": false, "message": "the maximum number of save slots has been reached."} + var clean_name: String = normalized_name(display_name) + if clean_name.is_empty(): + return {"ok": false, "message": "the imported save needs a slot name."} + var slot_id: String = _generate_slot_id() + var destination: String = _slots_directory.path_join(slot_id + ".nfsave") + var installed: Dictionary = _save_manager.install_progression_archive_at_path( + archive_path, + destination, + ) + if not bool(installed.get("ok", false)): + return installed + var now: int = int(Time.get_unix_time_from_system()) + _slots.append({ + "slot_id": slot_id, + "display_name": clean_name, + "created_at_unix": now, + "last_played_at_unix": 0, + "legacy": false, + }) + if not _save_manifest(): + _slots.pop_back() + _remove_if_present(destination) + return {"ok": false, "message": "the imported slot could not be recorded."} + slots_changed.emit() + installed["slot_id"] = slot_id + return installed + + +func export_slot(slot_id: String, destination_path: String) -> Dictionary: + var entry: Dictionary = _find_slot(slot_id) + var source_path: String = _existing_slot_path(entry) + if entry.is_empty() or source_path.is_empty(): + return {"ok": false, "message": "the selected save slot cannot be exported."} + return _save_manager.export_progression_archive_from_path( + source_path, + destination_path, + source_path.ends_with(".json"), + ) + + +func activate_slot(slot_id: String) -> bool: + var entry: Dictionary = _find_slot(slot_id) + if entry.is_empty(): + return false + var previous_id: String = _active_slot_id + var previous_path: String = _configured_storage_path(previous_id) + var next_path: String = _slot_primary_path(entry) + if not _save_manager.select_storage(next_path, _data_root): + return false + _active_slot_id = slot_id + if _save_manifest(): + slots_changed.emit() + return true + _active_slot_id = previous_id + _save_manager.select_storage(previous_path, _data_root) + return false + + +func mark_played(slot_id: String) -> bool: + var index: int = _find_slot_index(slot_id) + if index < 0: + return false + var previous_played_at: int = int( + _slots[index].get("last_played_at_unix", 0) + ) + var previous_active: String = _active_slot_id + _slots[index]["last_played_at_unix"] = int(Time.get_unix_time_from_system()) + _active_slot_id = slot_id + if not _save_manifest(): + _slots[index]["last_played_at_unix"] = previous_played_at + _active_slot_id = previous_active + return false + slots_changed.emit() + return true + + +func rename_slot(slot_id: String, display_name: String) -> bool: + var index: int = _find_slot_index(slot_id) + var clean_name: String = normalized_name(display_name) + if index < 0 or clean_name.is_empty(): + return false + var previous: String = str(_slots[index].get("display_name", "")) + _slots[index]["display_name"] = clean_name + if not _save_manifest(): + _slots[index]["display_name"] = previous + return false + slots_changed.emit() + return true + + +func delete_slot(slot_id: String) -> bool: + var index: int = _find_slot_index(slot_id) + if index < 0: + return false + var previous_slots: Array[Dictionary] = [] + for previous_entry: Dictionary in _slots: + previous_slots.append(previous_entry.duplicate(true)) + var previous_active: String = _active_slot_id + var entry: Dictionary = _slots[index] + var source_path: String = _existing_slot_path(entry) + var preserved_path := "" + if not source_path.is_empty(): + preserved_path = _deleted_backup_path(entry, source_path) + if not _rename_file(source_path, preserved_path): + return false + _slots.remove_at(index) + if _active_slot_id == slot_id: + _active_slot_id = ( + str(_slots.front().get("slot_id", "")) + if not _slots.is_empty() + else "" + ) + if not _select_configured_storage() or not _save_manifest(): + _slots = previous_slots + _active_slot_id = previous_active + _select_configured_storage() + if not preserved_path.is_empty(): + _rename_file(preserved_path, source_path) + return false + for auxiliary: String in _slot_auxiliary_paths(entry): + _remove_if_present(auxiliary) + slots_changed.emit() + return true + + +static func normalized_name(value: String) -> String: + var clean_name: String = value.strip_edges().left(MAX_NAME_LENGTH) + if clean_name.is_empty(): + return "" + for index: int in clean_name.length(): + var codepoint: int = clean_name.unicode_at(index) + if codepoint < 32 or codepoint == 127: + return "" + return clean_name + + +func _build_slot_summary(entry: Dictionary) -> Dictionary: + if entry.is_empty(): + return {} + var summary: Dictionary = entry.duplicate(true) + var path: String = _existing_slot_path(entry) + var inspection: PlayerSaveInspection = _save_manager.inspect_progression_at_path( + path, + path.ends_with(".json"), + ) + summary["active"] = str(entry.get("slot_id", "")) == _active_slot_id + summary["has_save"] = inspection.can_continue() + summary["save_status"] = inspection.status + summary["status_message"] = inspection.message + summary["catch_count"] = inspection.catch_count + summary["wallet_balance"] = inspection.wallet_balance + summary["discovered_species_count"] = inspection.discovered_species_count + summary["player_level"] = inspection.player_level + summary["world_layout"] = String(inspection.world_layout) + summary["world_seed"] = inspection.world_seed + return summary + + +func _load_manifest() -> bool: + if not FileAccess.file_exists(_manifest_path): + return false + var file := FileAccess.open(_manifest_path, FileAccess.READ) + if file == null: + return false + var parser := JSON.new() + var error: Error = parser.parse(file.get_as_text()) + file.close() + if error != OK or typeof(parser.data) != TYPE_DICTIONARY: + return false + var data: Dictionary = parser.data + if int(data.get("format_version", -1)) != FORMAT_VERSION: + return false + if typeof(data.get("slots")) != TYPE_ARRAY: + return false + var loaded_slots: Array[Dictionary] = [] + var seen_ids: Dictionary[String, bool] = {} + for value: Variant in data["slots"]: + if typeof(value) != TYPE_DICTIONARY: + return false + var entry: Dictionary = (value as Dictionary).duplicate(true) + if not _valid_slot_entry(entry): + return false + var slot_id: String = str(entry["slot_id"]) + if seen_ids.has(slot_id): + return false + seen_ids[slot_id] = true + loaded_slots.append(entry) + _slots = loaded_slots + _active_slot_id = str(data.get("active_slot_id", "")) + if not _active_slot_id.is_empty() and not seen_ids.has(_active_slot_id): + _active_slot_id = "" + _expected_hash = PortableFileGuard.hash_file(_manifest_path) + return true + + +func _save_manifest() -> bool: + var data: Dictionary = { + "format_version": FORMAT_VERSION, + "active_slot_id": _active_slot_id, + "slots": _slots, + } + var result: Dictionary = PortableFileGuard.write_guarded( + _manifest_path, + JSON.stringify(data, "\t").to_utf8_buffer(), + _expected_hash, + _data_root.conflict_directory(), + _data_root.device_id, + ) + if bool(result.get("conflict", false)): + _data_root.report_conflict( + str(result.get("message", "")), + str(result.get("conflict_path", "")), + ) + if bool(result.get("ok", false)): + _expected_hash = str(result.get("hash", "")) + return true + _error_message = "the save-slot catalog could not be written safely." + return false + + +func _discover_untracked_saves() -> void: + var known_ids: Dictionary[String, bool] = {} + var has_legacy: bool = false + for entry: Dictionary in _slots: + known_ids[str(entry.get("slot_id", ""))] = true + has_legacy = has_legacy or bool(entry.get("legacy", false)) + var legacy_primary: String = _data_root.path_for(LEGACY_SAVE_ID) + var legacy_plaintext: String = legacy_primary.get_base_dir().path_join( + PlayerSaveManager.LEGACY_SAVE_FILENAME + ) + if ( + not has_legacy + and ( + FileAccess.file_exists(legacy_primary) + or FileAccess.file_exists(legacy_plaintext) + ) + ): + var legacy_id: String = _generate_slot_id() + _slots.append({ + "slot_id": legacy_id, + "display_name": _next_default_name(), + "created_at_unix": int(Time.get_unix_time_from_system()), + "last_played_at_unix": 0, + "legacy": true, + }) + known_ids[legacy_id] = true + var directory := DirAccess.open(_slots_directory) + if directory == null: + return + directory.list_dir_begin() + var filename: String = directory.get_next() + while not filename.is_empty(): + if not directory.current_is_dir() and filename.ends_with(".nfsave"): + var slot_id: String = filename.trim_suffix(".nfsave") + if _valid_slot_id(slot_id) and not known_ids.has(slot_id): + _slots.append({ + "slot_id": slot_id, + "display_name": _next_default_name(), + "created_at_unix": int(Time.get_unix_time_from_system()), + "last_played_at_unix": 0, + "legacy": false, + }) + known_ids[slot_id] = true + filename = directory.get_next() + directory.list_dir_end() + + +func _select_configured_storage() -> bool: + return _save_manager.select_storage( + _configured_storage_path(_active_slot_id), + _data_root, + ) + + +func _configured_storage_path(slot_id: String) -> String: + var entry: Dictionary = _find_slot(slot_id) + if not entry.is_empty(): + return _slot_primary_path(entry) + return _data_root.path_for(LEGACY_SAVE_ID) + + +func _slot_primary_path(entry: Dictionary) -> String: + if bool(entry.get("legacy", false)): + return _data_root.path_for(LEGACY_SAVE_ID) + return _slots_directory.path_join(str(entry.get("slot_id", "")) + ".nfsave") + + +func _existing_slot_path(entry: Dictionary) -> String: + if entry.is_empty(): + return "" + var primary: String = _slot_primary_path(entry) + if FileAccess.file_exists(primary): + return primary + if bool(entry.get("legacy", false)): + var plaintext: String = primary.get_base_dir().path_join( + PlayerSaveManager.LEGACY_SAVE_FILENAME + ) + if FileAccess.file_exists(plaintext): + return plaintext + return "" + + +func _slot_auxiliary_paths(entry: Dictionary) -> Array[String]: + var primary: String = _slot_primary_path(entry) + var paths: Array[String] = [ + primary + ".tmp", + primary + ".backup", + primary + ".codec.tmp", + ] + if bool(entry.get("legacy", false)): + var plaintext: String = primary.get_base_dir().path_join( + PlayerSaveManager.LEGACY_SAVE_FILENAME + ) + paths.append_array([ + plaintext + ".tmp", + plaintext + ".backup", + ]) + return paths + + +func _deleted_backup_path(entry: Dictionary, source_path: String) -> String: + var timestamp: String = Time.get_datetime_string_from_system().replace(":", "-") + var extension: String = ".json" if source_path.ends_with(".json") else ".nfsave" + var destination: String = _data_root.root_path.path_join( + "backups/saves/deleted-slot-%s-%s%s" + % [str(entry.get("slot_id", "")).left(8), timestamp, extension] + ) + if FileAccess.file_exists(destination): + destination = destination.trim_suffix(extension) + ( + "-%d%s" % [Time.get_ticks_usec(), extension] + ) + return destination + + +func _find_slot(slot_id: String) -> Dictionary: + var index: int = _find_slot_index(slot_id) + return _slots[index] if index >= 0 else {} + + +func _find_slot_index(slot_id: String) -> int: + for index: int in _slots.size(): + if str(_slots[index].get("slot_id", "")) == slot_id: + return index + return -1 + + +func _next_default_name() -> String: + var used: Dictionary[String, bool] = {} + for entry: Dictionary in _slots: + used[str(entry.get("display_name", "")).to_lower()] = true + var number: int = 1 + while used.has("save %d" % number): + number += 1 + return "save %d" % number + + +func _generate_slot_id() -> String: + var slot_id: String = Crypto.new().generate_random_bytes(16).hex_encode() + while _find_slot_index(slot_id) >= 0: + slot_id = Crypto.new().generate_random_bytes(16).hex_encode() + return slot_id + + +func _valid_slot_entry(entry: Dictionary) -> bool: + var display_name: String = str(entry.get("display_name", "")) + return ( + _valid_slot_id(str(entry.get("slot_id", ""))) + and display_name.length() <= MAX_NAME_LENGTH + and not normalized_name(display_name).is_empty() + and typeof(entry.get("created_at_unix")) in [TYPE_INT, TYPE_FLOAT] + and typeof(entry.get("last_played_at_unix")) in [TYPE_INT, TYPE_FLOAT] + and typeof(entry.get("legacy")) == TYPE_BOOL + ) + + +func _valid_slot_id(slot_id: String) -> bool: + if slot_id.length() != 32: + return false + for index: int in slot_id.length(): + var character: String = slot_id.substr(index, 1).to_lower() + if character not in "0123456789abcdef": + return false + return true + + +func _recover_interrupted_manifest_write() -> void: + var temporary: String = _manifest_path + ".tmp" + var backup: String = _manifest_path + ".backup" + if FileAccess.file_exists(_manifest_path): + _remove_if_present(temporary) + _remove_if_present(backup) + return + if FileAccess.file_exists(backup): + _rename_file(backup, _manifest_path) + _remove_if_present(temporary) + + +func _preserve_invalid_manifest() -> bool: + var destination: String = _data_root.migration_backup_directory().path_join( + "invalid-save-slots-%s.json" + % Time.get_datetime_string_from_system().replace(":", "-") + ) + if not _rename_file(_manifest_path, destination): + return false + _expected_hash = "" + _slots.clear() + _active_slot_id = "" + return true + + +func _rename_file(source: String, destination: String) -> bool: + if source.is_empty() or destination.is_empty(): + return false + if DirAccess.make_dir_recursive_absolute(destination.get_base_dir()) != OK: + return false + return DirAccess.rename_absolute(source, destination) == OK + + +func _remove_if_present(path: String) -> bool: + return not FileAccess.file_exists(path) or DirAccess.remove_absolute(path) == OK diff --git a/save/player_save_slot_catalog.gd.uid b/save/player_save_slot_catalog.gd.uid new file mode 100644 index 0000000..8906f5a --- /dev/null +++ b/save/player_save_slot_catalog.gd.uid @@ -0,0 +1 @@ +uid://djfeifv7xrqdt diff --git a/save/progression_save_codec.gd b/save/progression_save_codec.gd index 7844e16..4d0ba33 100644 --- a/save/progression_save_codec.gd +++ b/save/progression_save_codec.gd @@ -1,7 +1,8 @@ class_name ProgressionSaveCodec extends RefCounted -const MAGIC := "NETFISHING_PROGRESSION_CONTAINER" +const MAGIC := "straywild_PROGRESSION_CONTAINER" +const LEGACY_MAGIC := "NETFISHING_PROGRESSION_CONTAINER" const FORMAT_VERSION := 1 const LOCAL_KIND := "local_save" const ARCHIVE_KIND := "portable_archive" @@ -9,6 +10,8 @@ const MAX_CONTAINER_BYTES := 16 * 1024 * 1024 # This key keeps routine progression files opaque to casual editing. Since the # client is open source, it is intentionally not treated as a security secret. +# Its original value is a stable file-format detail so released saves remain +# readable after the Straywild rebrand. const CONTAINER_PASSPHRASE := ( "NETfishing progression container v1 / not an identity credential" ) @@ -102,15 +105,9 @@ static func _read_container(path: String, expected_kind: String) -> Dictionary: or FileAccess.get_size(path) > MAX_CONTAINER_BYTES ): return {"ok": false, "message": "progression file is unavailable."} - var file: FileAccess = FileAccess.open_encrypted_with_pass( - path, - FileAccess.READ, - CONTAINER_PASSPHRASE, - ) - if file == null: + var envelope_text: String = _read_encrypted_text(path) + if envelope_text.is_empty(): return {"ok": false, "message": "progression file could not be opened."} - var envelope_text: String = file.get_as_text() - file.close() var envelope_json := JSON.new() if ( envelope_json.parse(envelope_text) != OK @@ -118,8 +115,9 @@ static func _read_container(path: String, expected_kind: String) -> Dictionary: ): return {"ok": false, "message": "progression container is malformed."} var envelope: Dictionary = envelope_json.data + var legacy_container: bool = envelope.get("magic") == LEGACY_MAGIC if ( - envelope.get("magic") != MAGIC + envelope.get("magic") not in [MAGIC, LEGACY_MAGIC] or int(envelope.get("format_version", -1)) != FORMAT_VERSION or str(envelope.get("kind", "")) != expected_kind ): @@ -144,9 +142,23 @@ static func _read_container(path: String, expected_kind: String) -> Dictionary: "game_version": str(envelope.get("game_version", "")), "created_at_unix": int(envelope.get("created_at_unix", 0)), "legacy_plaintext": false, + "legacy_container": legacy_container, } +static func _read_encrypted_text(path: String) -> String: + var file: FileAccess = FileAccess.open_encrypted_with_pass( + path, + FileAccess.READ, + CONTAINER_PASSPHRASE, + ) + if file == null: + return "" + var text: String = file.get_as_text() + file.close() + return text + + static func _read_plaintext_dictionary(path: String) -> Dictionary: var bytes: PackedByteArray = PortableFileGuard.read_bytes( path, diff --git a/scripts/build_android_debug.sh b/scripts/build_android_debug.sh index 8f856f8..f68eb32 100755 --- a/scripts/build_android_debug.sh +++ b/scripts/build_android_debug.sh @@ -4,7 +4,7 @@ set -euo pipefail readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" readonly PROJECT_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" -readonly OUTPUT_PATH="${PROJECT_ROOT}/builds/android/NETfishing-debug.apk" +readonly OUTPUT_PATH="${PROJECT_ROOT}/builds/android/straywild-debug.apk" readonly GODOT_BIN="${GODOT_BIN:-godot}" mkdir -p -- "$(dirname -- "${OUTPUT_PATH}")" diff --git a/scripts/build_playtest.sh b/scripts/build_playtest.sh index dae3d29..d54ba70 100755 --- a/scripts/build_playtest.sh +++ b/scripts/build_playtest.sh @@ -4,14 +4,14 @@ set -euo pipefail readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" readonly PROJECT_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" -readonly BUILD_ROOT="${PROJECT_ROOT}/builds/v0.16.1-alpha" +readonly BUILD_ROOT="${PROJECT_ROOT}/builds/v0.20.2-alpha" readonly WINDOWS_DIR="${BUILD_ROOT}/windows-x86_64" readonly LINUX_DIR="${BUILD_ROOT}/linux-x86_64" readonly README_SOURCE="${PROJECT_ROOT}/docs/README-PLAYTEST.txt" readonly SOURCE_COMMIT="$(git -C "${PROJECT_ROOT}" rev-parse HEAD)" -readonly SOURCE_URL="https://forge.makearmy.io/woofmeow/netfishing" -readonly WINDOWS_ZIP="${BUILD_ROOT}/NETfishing-v0.16.1-alpha-windows-x86_64.zip" -readonly LINUX_ZIP="${BUILD_ROOT}/NETfishing-v0.16.1-alpha-linux-x86_64.zip" +readonly SOURCE_URL="https://forge.makearmy.io/woofmeow/straywild" +readonly WINDOWS_ZIP="${BUILD_ROOT}/straywild-v0.20.2-alpha-windows-x86_64.zip" +readonly LINUX_ZIP="${BUILD_ROOT}/straywild-v0.20.2-alpha-linux-x86_64.zip" readonly GODOT_BIN="${GODOT_BIN:-godot}" if [[ ! -f "${PROJECT_ROOT}/project.godot" ]]; then @@ -31,26 +31,26 @@ mkdir -p -- "${WINDOWS_DIR}" "${LINUX_DIR}" --headless \ --path "${PROJECT_ROOT}" \ --export-release "Windows Desktop" \ - "${WINDOWS_DIR}/NETfishing.exe" + "${WINDOWS_DIR}/straywild.exe" "${GODOT_BIN}" \ --headless \ --path "${PROJECT_ROOT}" \ --export-release "Linux Desktop" \ - "${LINUX_DIR}/NETfishing.x86_64" + "${LINUX_DIR}/straywild.x86_64" for required_file in \ - "${WINDOWS_DIR}/NETfishing.exe" \ - "${WINDOWS_DIR}/NETfishing.pck" \ - "${LINUX_DIR}/NETfishing.x86_64" \ - "${LINUX_DIR}/NETfishing.pck"; do + "${WINDOWS_DIR}/straywild.exe" \ + "${WINDOWS_DIR}/straywild.pck" \ + "${LINUX_DIR}/straywild.x86_64" \ + "${LINUX_DIR}/straywild.pck"; do if [[ ! -s "${required_file}" ]]; then echo "error: expected export output is missing: ${required_file}" >&2 exit 1 fi done -chmod +x -- "${LINUX_DIR}/NETfishing.x86_64" +chmod +x -- "${LINUX_DIR}/straywild.x86_64" cp -- "${README_SOURCE}" "${WINDOWS_DIR}/README-PLAYTEST.txt" cp -- "${README_SOURCE}" "${LINUX_DIR}/README-PLAYTEST.txt" @@ -60,7 +60,7 @@ stage_licenses() { install -m 0644 "${PROJECT_ROOT}/LICENSE" \ "${destination}/GPL-3.0-or-later.txt" install -m 0644 "${PROJECT_ROOT}/ASSET-LICENSE.md" \ - "${destination}/NETFISHING-ASSET-LICENSE.md" + "${destination}/straywild-ASSET-LICENSE.md" install -m 0644 "${PROJECT_ROOT}/docs/ATTRIBUTION.md" \ "${destination}/ATTRIBUTION.md" install -m 0644 "${PROJECT_ROOT}/TRADEMARKS.md" \ @@ -72,11 +72,14 @@ stage_licenses() { cat >"${destination}/SOURCE-CODE.md" <&2 exit 1 fi -if [[ "${NETFISHING_ALLOW_DIRTY_RELEASE:-0}" != "1" ]]; then +if [[ "${straywild_ALLOW_DIRTY_RELEASE:-0}" != "1" ]]; then dirty_tree=0 git -C "${PROJECT_ROOT}" diff --quiet || dirty_tree=1 git -C "${PROJECT_ROOT}" diff --cached --quiet || dirty_tree=1 @@ -97,7 +97,7 @@ done mkdir -p -- "${ARM64_ROOT}" "${RELEASE_ROOT}" if [[ ${PACKAGE_ONLY} -eq 0 ]]; then readonly EXPORT_PROJECT_ROOT="$( - mktemp -d -t netfishing-portmaster-export.XXXXXX + mktemp -d -t straywild-portmaster-export.XXXXXX )" cleanup_export_project() { rm -rf -- "${EXPORT_PROJECT_ROOT}" @@ -108,9 +108,9 @@ if [[ ${PACKAGE_ONLY} -eq 0 ]]; then --exclude '/.git/' \ --exclude '/.godot/' \ --exclude '/art/source/' \ - --exclude '/art/exported/system_icons/netfishing.ico' \ - --exclude '/art/exported/system_icons/netfishing_1024.png' \ - --exclude '/art/exported/system_icons/netfishing_1024.png.import' \ + --exclude '/art/exported/system_icons/straywild.ico' \ + --exclude '/art/exported/system_icons/straywild_1024.png' \ + --exclude '/art/exported/system_icons/straywild_1024.png.import' \ --exclude '/audio/ambience/' \ --exclude '/builds/' \ --exclude '/docs/design/' \ @@ -141,14 +141,14 @@ rm -f -- \ "${OBSOLETE_LOWERCASE_ARCHIVE}" mkdir -p -- "${GAME_ROOT}/licenses" -install -m 0755 "${TEMPLATE_ROOT}/NETfishing.sh" "${STAGE_ROOT}/NETfishing.sh" +install -m 0755 "${TEMPLATE_ROOT}/straywild.sh" "${STAGE_ROOT}/straywild.sh" install -m 0644 "${TEMPLATE_ROOT}/port.json" "${GAME_ROOT}/port.json" -install -m 0644 "${TEMPLATE_ROOT}/netfishing.gptk" \ - "${GAME_ROOT}/netfishing.gptk" -install -m 0755 "${TEMPLATE_ROOT}/launch-netfishing.sh" \ - "${GAME_ROOT}/launch-netfishing.sh" -install -m 0755 "${ARM64_EXECUTABLE}" "${GAME_ROOT}/NETfishing.aarch64" -install -m 0644 "${ARM64_PCK}" "${GAME_ROOT}/NETfishing.pck" +install -m 0644 "${TEMPLATE_ROOT}/straywild.gptk" \ + "${GAME_ROOT}/straywild.gptk" +install -m 0755 "${TEMPLATE_ROOT}/launch-straywild.sh" \ + "${GAME_ROOT}/launch-straywild.sh" +install -m 0755 "${ARM64_EXECUTABLE}" "${GAME_ROOT}/straywild.aarch64" +install -m 0644 "${ARM64_PCK}" "${GAME_ROOT}/straywild.pck" install -m 0644 "${TEMPLATE_ROOT}/gameinfo.xml" "${GAME_ROOT}/gameinfo.xml" install -m 0644 "${TEMPLATE_ROOT}/screenshot.png" "${GAME_ROOT}/screenshot.png" install -m 0644 \ @@ -159,7 +159,7 @@ install -m 0644 \ "${GAME_ROOT}/licenses/GPL-3.0-or-later.txt" install -m 0644 \ "${PROJECT_ROOT}/ASSET-LICENSE.md" \ - "${GAME_ROOT}/licenses/NETFISHING-ASSET-LICENSE.md" + "${GAME_ROOT}/licenses/straywild-ASSET-LICENSE.md" install -m 0644 \ "${PROJECT_ROOT}/TRADEMARKS.md" \ "${GAME_ROOT}/licenses/TRADEMARKS.md" @@ -171,7 +171,7 @@ install -m 0644 \ "${GAME_ROOT}/licenses/Seattle-Avenue-LICENSE.txt" cat >"${GAME_ROOT}/BUILD-INFO.txt" <"${GAME_ROOT}/licenses/SOURCE-CODE.md" <"${GAME_ROOT}/README.md" </dev/null readonly TOP_LEVELS="$( unzip -Z1 "${ARCHIVE}" | cut -d/ -f1 | sort -u )" -readonly EXPECTED_TOP_LEVELS="$(printf '%s\n' NETfishing.sh netfishing)" +readonly EXPECTED_TOP_LEVELS="$(printf '%s\n' straywild straywild.sh)" if [[ "${TOP_LEVELS}" != "${EXPECTED_TOP_LEVELS}" ]]; then echo "Unexpected PortMaster archive roots:" >&2 printf '%s\n' "${TOP_LEVELS}" >&2 exit 1 fi grep -q '"version": 4' "${GAME_ROOT}/port.json" -grep -q '"name": "netfishing.zip"' "${GAME_ROOT}/port.json" +grep -q '"name": "straywild.zip"' "${GAME_ROOT}/port.json" grep -q '"rtr": true' "${GAME_ROOT}/port.json" if unzip -Z1 "${ARCHIVE}" | grep -qx 'port.json'; then - echo "port.json must be inside netfishing/, not at the archive root." >&2 + echo "port.json must be inside straywild/, not at the archive root." >&2 exit 1 fi if grep -Eq '^[[:space:]]*#[[:space:]]*PORTMASTER:' \ - "${STAGE_ROOT}/NETfishing.sh"; then + "${STAGE_ROOT}/straywild.sh"; then echo "The distributable launcher contains an installed PortMaster signature." >&2 exit 1 fi grep -Fq 'PROFILE_PATH="$CONFDIR/performance_profile"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq 'NETFISHING_PERFORMANCE_PROFILE=light' \ - "${STAGE_ROOT}/NETfishing.sh" + "${STAGE_ROOT}/straywild.sh" +grep -Fq 'straywild_PERFORMANCE_PROFILE=light' \ + "${STAGE_ROOT}/straywild.sh" grep -Fq 'CONTROLLER_MAPPING_FILE="$CONFDIR/cache/controller_mapping.txt"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq 'SAVEDIR="$PORTS_ROOT/saves/netfishing"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq '"NETFISHING_DATA_DIR=$SAVEDIR"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq '"NETFISHING_CREATE_DATA_DIR=1"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq 'printf '\''%s\n'\'' "$netfishing_controllerconfig" > "$CONTROLLER_MAPPING_FILE"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq '"$GAME_LAUNCHER"' "${STAGE_ROOT}/NETfishing.sh" -grep -Fq '"$CONTROLLER_MAPPING_FILE"' "${STAGE_ROOT}/NETfishing.sh" -if grep -Fq 'SDL_GAMECONTROLLERCONFIG="$netfishing_controllerconfig"' \ - "${STAGE_ROOT}/NETfishing.sh"; then + "${STAGE_ROOT}/straywild.sh" +grep -Fq 'SAVEDIR="$PORTS_ROOT/saves/straywild"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq 'LEGACY_SAVEDIR="$PORTS_ROOT/saves/netfishing"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq 'cp -a "$LEGACY_CONFDIR/." "$CONFDIR/"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq '"straywild_DATA_DIR=$SAVEDIR"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq '"straywild_CREATE_DATA_DIR=1"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq 'printf '\''%s\n'\'' "$straywild_controllerconfig" > "$CONTROLLER_MAPPING_FILE"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq '"$GAME_LAUNCHER"' "${STAGE_ROOT}/straywild.sh" +grep -Fq '"$CONTROLLER_MAPPING_FILE"' "${STAGE_ROOT}/straywild.sh" +if grep -Fq 'SDL_GAMECONTROLLERCONFIG="$straywild_controllerconfig"' \ + "${STAGE_ROOT}/straywild.sh"; then echo "Raw controller mappings must not be passed through westonwrap.sh." >&2 exit 1 fi grep -Fq 'SDL_GAMECONTROLLERCONFIG="$(<"$CONTROLLER_MAPPING_FILE")"' \ - "${GAME_ROOT}/launch-netfishing.sh" + "${GAME_ROOT}/launch-straywild.sh" grep -Fq 'export SDL_GAMECONTROLLERCONFIG' \ - "${GAME_ROOT}/launch-netfishing.sh" -grep -Fq 'exec "$@"' "${GAME_ROOT}/launch-netfishing.sh" -grep -Fq 'GPTOKEYB_CONFIG="$GAMEDIR/netfishing.gptk"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq '$GPTOKEYB "NETfishing.aarch64" -c "$GPTOKEYB_CONFIG" &' \ - "${STAGE_ROOT}/NETfishing.sh" + "${GAME_ROOT}/launch-straywild.sh" +grep -Fq 'exec "$@"' "${GAME_ROOT}/launch-straywild.sh" +grep -Fq 'GPTOKEYB_CONFIG="$GAMEDIR/straywild.gptk"' \ + "${STAGE_ROOT}/straywild.sh" +grep -Fq '$GPTOKEYB "straywild.aarch64" -c "$GPTOKEYB_CONFIG" &' \ + "${STAGE_ROOT}/straywild.sh" grep -Fq 'pm_platform_helper "$GAME_EXECUTABLE"' \ - "${STAGE_ROOT}/NETfishing.sh" -grep -Fq 'pm_finish' "${STAGE_ROOT}/NETfishing.sh" + "${STAGE_ROOT}/straywild.sh" +grep -Fq 'pm_finish' "${STAGE_ROOT}/straywild.sh" if [[ "$(grep -Ec '^[[:space:]]*\$GPTOKEYB[[:space:]]' \ - "${STAGE_ROOT}/NETfishing.sh")" -ne 1 ]]; then - echo "NETfishing must start exactly one GPTOKEYB exit handler." >&2 + "${STAGE_ROOT}/straywild.sh")" -ne 1 ]]; then + echo "straywild must start exactly one GPTOKEYB exit handler." >&2 exit 1 fi readonly GPTOKEYB_NOOP_KEYS=( @@ -303,13 +307,13 @@ readonly GPTOKEYB_NOOP_KEYS=( for noop_key in "${GPTOKEYB_NOOP_KEYS[@]}"; do if ! grep -Eq \ "^[[:space:]]*${noop_key}[[:space:]]*=[[:space:]]*\\\\\"[[:space:]]*$" \ - "${GAME_ROOT}/netfishing.gptk"; then + "${GAME_ROOT}/straywild.gptk"; then echo "GPTOKEYB no-op mapping is missing: ${noop_key}" >&2 exit 1 fi done if [[ "$(grep -Ec '^[[:space:]]*[a-z0-9_]+[[:space:]]*=' \ - "${GAME_ROOT}/netfishing.gptk")" -ne "${#GPTOKEYB_NOOP_KEYS[@]}" ]]; then + "${GAME_ROOT}/straywild.gptk")" -ne "${#GPTOKEYB_NOOP_KEYS[@]}" ]]; then echo "GPTOKEYB no-op mapping contains an unexpected assignment." >&2 exit 1 fi diff --git a/scripts/import_animalese_voice.sh b/scripts/import_animalese_voice.sh index cb7eded..b9076ca 100755 --- a/scripts/import_animalese_voice.sh +++ b/scripts/import_animalese_voice.sh @@ -35,10 +35,10 @@ if [[ ! "$SAMPLE_SET_DIRECTORY" =~ ^[a-z0-9_-]+$ ]]; then fi readonly DESTINATION_DIRECTORY="$PROJECT_ROOT/sound/dialogue/animalese/$SAMPLE_SET_DIRECTORY" -readonly WORK_DIRECTORY="$(mktemp -d -t netfishing-animalese-import.XXXXXX)" +readonly WORK_DIRECTORY="$(mktemp -d -t straywild-animalese-import.XXXXXX)" cleanup() { - if [[ "$WORK_DIRECTORY" == /tmp/netfishing-animalese-import.* ]]; then + if [[ "$WORK_DIRECTORY" == /tmp/straywild-animalese-import.* ]]; then find "$WORK_DIRECTORY" -depth -delete fi } diff --git a/scripts/normalize_texture_imports.gd b/scripts/normalize_texture_imports.gd index 5b78ec1..e7b2406 100644 --- a/scripts/normalize_texture_imports.gd +++ b/scripts/normalize_texture_imports.gd @@ -31,6 +31,11 @@ const FACIAL_FEATURE_IMPORT_PATH: String = ( "art/exported/characters/faces/" ) const FACIAL_FEATURE_SIZE_LIMIT: int = 512 +const PROJECTED_TERRAIN_TEXTURE_IMPORTS: Array[String] = [ + "res://world/generation/chunks/assets/chunk_0000_grass_lite.png.import", + "res://world/generation/chunks/assets/chunk_0001_sand.png.import", + "res://world/generation/chunks/assets/chunk_0031_dirt.png.import", +] var apply_changes: bool = false var verbose: bool = false @@ -153,6 +158,8 @@ func _handle_import_file(import_path: String) -> void: var desired: Variant = section_data[section_key] if section_key == "process/size_limit": desired = _size_limit_for(import_path) + elif section_key == "mipmaps/generate": + desired = _generates_mipmaps(import_path) var existing: Variant = null if cfg.has_section(section_name) and cfg.has_section_key(section_name, section_key): existing = cfg.get_value(section_name, section_key) @@ -187,6 +194,11 @@ func _size_limit_for(import_path: String) -> int: return int(DEFAULT_PROFILE["params"]["process/size_limit"]) +func _generates_mipmaps(import_path: String) -> bool: + var normalized_path := import_path.replace("\\", "/") + return normalized_path in PROJECTED_TERRAIN_TEXTURE_IMPORTS + + func print_summary() -> void: if apply_changes: _print( diff --git a/scripts/normalize_texture_profiles.sh b/scripts/normalize_texture_profiles.sh index 1483a61..0551efd 100755 --- a/scripts/normalize_texture_profiles.sh +++ b/scripts/normalize_texture_profiles.sh @@ -13,7 +13,7 @@ fi readonly ROOT_PATH="$1" -readonly WORK_ROOT="$(mktemp -d -t netfishing-godot-data.XXXXXX)" +readonly WORK_ROOT="$(mktemp -d -t straywild-godot-data.XXXXXX)" trap 'rm -rf -- "${WORK_ROOT}"' EXIT cd "${PROJECT_ROOT}" diff --git a/scripts/portmaster/gameinfo.xml b/scripts/portmaster/gameinfo.xml index ef608bd..1b0a1c7 100755 --- a/scripts/portmaster/gameinfo.xml +++ b/scripts/portmaster/gameinfo.xml @@ -1,13 +1,13 @@ - ./NETfishing.sh - NETfishing + ./straywild.sh + straywild A relaxed multiplayer fishing game about exploring a small island, catching and collecting fish, customizing your character, and spending time by the water. 20260804T000000 - NETfishing project + straywild project Independent adventure, simulation - ./netfishing/screenshot.png + ./straywild/screenshot.png diff --git a/scripts/portmaster/launch-netfishing.sh b/scripts/portmaster/launch-straywild.sh similarity index 100% rename from scripts/portmaster/launch-netfishing.sh rename to scripts/portmaster/launch-straywild.sh diff --git a/scripts/portmaster/port.json b/scripts/portmaster/port.json index affc601..4c36648 100644 --- a/scripts/portmaster/port.json +++ b/scripts/portmaster/port.json @@ -1,13 +1,13 @@ { "version": 4, - "name": "netfishing.zip", + "name": "straywild.zip", "items": [ - "NETfishing.sh", - "netfishing/" + "straywild.sh", + "straywild/" ], "items_opt": null, "attr": { - "title": "NETfishing", + "title": "straywild", "porter": [ "Voyager" ], diff --git a/scripts/portmaster/netfishing.gptk b/scripts/portmaster/straywild.gptk similarity index 87% rename from scripts/portmaster/netfishing.gptk rename to scripts/portmaster/straywild.gptk index ff1ad36..2e8602e 100644 --- a/scripts/portmaster/netfishing.gptk +++ b/scripts/portmaster/straywild.gptk @@ -1,4 +1,4 @@ -# NETfishing reads the controller directly. GPTOKEYB is retained only for its +# straywild reads the controller directly. GPTOKEYB is retained only for its # device-specific force-quit chord, so every keyboard and mouse binding is # disabled to prevent duplicate input. diff --git a/scripts/portmaster/NETfishing.sh b/scripts/portmaster/straywild.sh similarity index 58% rename from scripts/portmaster/NETfishing.sh rename to scripts/portmaster/straywild.sh index 8e118da..d4e56a7 100755 --- a/scripts/portmaster/NETfishing.sh +++ b/scripts/portmaster/straywild.sh @@ -16,35 +16,56 @@ source "$controlfolder/control.txt" [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" get_controls -GAMEDIR="/${directory}/ports/netfishing" +GAMEDIR="/${directory}/ports/straywild" CONFDIR="$GAMEDIR/conf" -PORTS_ROOT="${GAMEDIR%/netfishing}" -SAVEDIR="$PORTS_ROOT/saves/netfishing" -DATA_BOOTSTRAP_DIR="$CONFDIR/data/godot/app_userdata/NETFISHING" -GAME_EXECUTABLE="$GAMEDIR/NETfishing.aarch64" -GAME_LAUNCHER="$GAMEDIR/launch-netfishing.sh" -GPTOKEYB_CONFIG="$GAMEDIR/netfishing.gptk" +PORTS_ROOT="${GAMEDIR%/straywild}" +SAVEDIR="$PORTS_ROOT/saves/straywild" +LEGACY_GAMEDIR="$PORTS_ROOT/netfishing" +LEGACY_CONFDIR="$LEGACY_GAMEDIR/conf" +LEGACY_SAVEDIR="$PORTS_ROOT/saves/netfishing" +DATA_BOOTSTRAP_DIR="$CONFDIR/data/godot/app_userdata/straywild" +LEGACY_DATA_BOOTSTRAP_DIR="$CONFDIR/data/godot/app_userdata/NETFISHING" +GAME_EXECUTABLE="$GAMEDIR/straywild.aarch64" +GAME_LAUNCHER="$GAMEDIR/launch-straywild.sh" +GPTOKEYB_CONFIG="$GAMEDIR/straywild.gptk" CONTROLLER_MAPPING_FILE="$CONFDIR/cache/controller_mapping.txt" -WESTON_DIR="/tmp/netfishing-weston" +WESTON_DIR="/tmp/straywild-weston" WESTON_RUNTIME="weston_pkg_0.2" HARBOURMASTER="$controlfolder/harbourmaster" mkdir -p "$CONFDIR/data" "$CONFDIR/config" "$CONFDIR/cache" "$WESTON_DIR" chmod +x "$GAME_EXECUTABLE" -# NETfishing uses a predictable save directory beside the port instead of +# A renamed PortMaster entry installs beside the former NETfishing port. Copy +# its device-local configuration once and continue using its established save +# root when present. New installations use straywild paths exclusively. +if [ -d "$LEGACY_CONFDIR" ] && [ ! -f "$CONFDIR/.netfishing-imported" ]; then + cp -a "$LEGACY_CONFDIR/." "$CONFDIR/" + touch "$CONFDIR/.netfishing-imported" +fi +if [ ! -f "$SAVEDIR/straywild_data.json" ] \ + && [ ! -f "$SAVEDIR/netfishing_data.json" ] \ + && { [ -f "$LEGACY_SAVEDIR/straywild_data.json" ] \ + || [ -f "$LEGACY_SAVEDIR/netfishing_data.json" ]; }; then + SAVEDIR="$LEGACY_SAVEDIR" +fi + +# straywild uses a predictable save directory beside the port instead of # presenting a folder picker on a small screen. Preserve an established # data-root choice when upgrading an existing installation. -NETFISHING_DATA_ENVIRONMENT=() -if [ -f "$SAVEDIR/netfishing_data.json" ] || { +straywild_DATA_ENVIRONMENT=() +if [ -f "$SAVEDIR/straywild_data.json" ] \ + || [ -f "$SAVEDIR/netfishing_data.json" ] || { [ ! -f "$DATA_BOOTSTRAP_DIR/data_root_bootstrap.json" ] && - [ ! -f "$DATA_BOOTSTRAP_DIR/data_root_bootstrap.json.backup" ] + [ ! -f "$DATA_BOOTSTRAP_DIR/data_root_bootstrap.json.backup" ] && + [ ! -f "$LEGACY_DATA_BOOTSTRAP_DIR/data_root_bootstrap.json" ] && + [ ! -f "$LEGACY_DATA_BOOTSTRAP_DIR/data_root_bootstrap.json.backup" ] }; then mkdir -p "$SAVEDIR" - NETFISHING_DATA_ENVIRONMENT+=( - "NETFISHING_DATA_DIR=$SAVEDIR" - "NETFISHING_CREATE_DATA_DIR=1" + straywild_DATA_ENVIRONMENT+=( + "straywild_DATA_DIR=$SAVEDIR" + "straywild_CREATE_DATA_DIR=1" ) fi @@ -52,7 +73,7 @@ fi if [ ! -f "$controlfolder/libs/${WESTON_RUNTIME}.squashfs" ]; then if [ ! -x "$HARBOURMASTER" ]; then - pm_message "NETfishing requires the latest PortMaster and WestonPack runtime." + pm_message "straywild requires the latest PortMaster and WestonPack runtime." sleep 5 exit 1 fi @@ -78,17 +99,17 @@ cd "$GAMEDIR" || exit 1 GODOT_MUOS_MAPPING="19004ca6010000000100000000010000,muOS-Keys,a:b0,b:b1,x:b3,y:b2,leftshoulder:b4,rightshoulder:b5,lefttrigger:b10,righttrigger:b11,guide:b8,start:b7,back:b6,dpup:h0.1,dpleft:h0.8,dpright:h0.2,dpdown:h0.4,leftx:a0,lefty:a1,leftstick:b9,rightx:a2,righty:a3,rightstick:b12,platform:Linux," MUOS_SDL2_GUID="19000000010000000100000000010000" if [[ "$sdl_controllerconfig" == "${MUOS_SDL2_GUID},"* ]]; then - netfishing_controllerconfig="$GODOT_MUOS_MAPPING" + straywild_controllerconfig="$GODOT_MUOS_MAPPING" elif [ -n "$sdl_controllerconfig" ]; then - netfishing_controllerconfig="$sdl_controllerconfig" + straywild_controllerconfig="$sdl_controllerconfig" else - netfishing_controllerconfig="$GODOT_MUOS_MAPPING" + straywild_controllerconfig="$GODOT_MUOS_MAPPING" fi -printf '%s\n' "$netfishing_controllerconfig" > "$CONTROLLER_MAPPING_FILE" +printf '%s\n' "$straywild_controllerconfig" > "$CONTROLLER_MAPPING_FILE" -NETFISHING_GODOT_OPTIONS=() -NETFISHING_GAME_ENVIRONMENT=() -PERFORMANCE_PROFILE="${NETFISHING_PERFORMANCE_PROFILE:-}" +straywild_GODOT_OPTIONS=() +straywild_GAME_ENVIRONMENT=() +PERFORMANCE_PROFILE="${straywild_PERFORMANCE_PROFILE:-}" PROFILE_PATH="$CONFDIR/performance_profile" if [[ -z "$PERFORMANCE_PROFILE" && -r "$PROFILE_PATH" ]]; then IFS= read -r PERFORMANCE_PROFILE < "$PROFILE_PATH" || true @@ -96,16 +117,16 @@ if [[ -z "$PERFORMANCE_PROFILE" && -r "$PROFILE_PATH" ]]; then fi case "$PERFORMANCE_PROFILE" in normal) - NETFISHING_GAME_ENVIRONMENT+=( - "NETFISHING_PERFORMANCE_PROFILE=normal" + straywild_GAME_ENVIRONMENT+=( + "straywild_PERFORMANCE_PROFILE=normal" ) ;; light|"") - NETFISHING_GAME_ENVIRONMENT+=( - "NETFISHING_PERFORMANCE_PROFILE=light" - "NETFISHING_LOW_END=1" + straywild_GAME_ENVIRONMENT+=( + "straywild_PERFORMANCE_PROFILE=light" + "straywild_LOW_END=1" ) - NETFISHING_GODOT_OPTIONS+=( + straywild_GODOT_OPTIONS+=( --single-window --disable-vsync --max-fps 30 @@ -114,11 +135,11 @@ case "$PERFORMANCE_PROFILE" in ;; *) echo "Unknown performance profile '$PERFORMANCE_PROFILE'; using light." >&2 - NETFISHING_GAME_ENVIRONMENT+=( - "NETFISHING_PERFORMANCE_PROFILE=light" - "NETFISHING_LOW_END=1" + straywild_GAME_ENVIRONMENT+=( + "straywild_PERFORMANCE_PROFILE=light" + "straywild_LOW_END=1" ) - NETFISHING_GODOT_OPTIONS+=( + straywild_GODOT_OPTIONS+=( --single-window --disable-vsync --max-fps 30 @@ -127,10 +148,10 @@ case "$PERFORMANCE_PROFILE" in ;; esac -# NETfishing reads gameplay input natively. The explicit no-op map prevents +# straywild reads gameplay input natively. The explicit no-op map prevents # GPTOKEYB from injecting duplicate keyboard or mouse input while retaining # its device-specific force-quit chord, including on ROCKNIX. -$GPTOKEYB "NETfishing.aarch64" -c "$GPTOKEYB_CONFIG" & +$GPTOKEYB "straywild.aarch64" -c "$GPTOKEYB_CONFIG" & pm_platform_helper "$GAME_EXECUTABLE" $ESUDO env CRUSTY_RESOLUTION="${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" \ @@ -139,12 +160,12 @@ $ESUDO env CRUSTY_RESOLUTION="${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" \ XDG_CONFIG_HOME="$CONFDIR/config" \ XDG_CACHE_HOME="$CONFDIR/cache" \ GODOT_SILENCE_ROOT_WARNING=1 \ - "${NETFISHING_DATA_ENVIRONMENT[@]}" \ - "${NETFISHING_GAME_ENVIRONMENT[@]}" \ + "${straywild_DATA_ENVIRONMENT[@]}" \ + "${straywild_GAME_ENVIRONMENT[@]}" \ "$GAME_LAUNCHER" \ "$CONTROLLER_MAPPING_FILE" \ "$GAME_EXECUTABLE" \ - "${NETFISHING_GODOT_OPTIONS[@]}" \ + "${straywild_GODOT_OPTIONS[@]}" \ --resolution "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" \ --fullscreen \ --rendering-driver opengl3_es \ diff --git a/scripts/run_validations.sh b/scripts/run_validations.sh index 64fbfc3..ff108a8 100755 --- a/scripts/run_validations.sh +++ b/scripts/run_validations.sh @@ -6,9 +6,9 @@ readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" readonly PROJECT_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" readonly GODOT_BIN="${GODOT_BIN:-godot}" readonly TEST_TIMEOUT_SECONDS="${TEST_TIMEOUT_SECONDS:-120}" -readonly RUN_ROOT="$(mktemp -d -t netfishing-validations.XXXXXX)" +readonly RUN_ROOT="$(mktemp -d -t straywild-validations.XXXXXX)" -export NETFISHING_ISOLATED_VALIDATION_STORAGE=1 +export straywild_ISOLATED_VALIDATION_STORAGE=1 readonly -a QUICK_TESTS=( "scripts/validate_animalese_samples.gd" @@ -31,6 +31,7 @@ readonly -a QUICK_TESTS=( "tests/fishing_shop_controller_validation.gd" "tests/fishing_audio_validation.gd" "tests/fishing_surface_validation.gd" + "tests/friend_relationship_validation.gd" "tests/fur_pattern_validation.gd" "tests/generated_world_runtime_validation.gd" "tests/gathering_marker_surface_validation.gd" @@ -84,7 +85,9 @@ readonly -a NETWORK_TESTS=( "tests/chat_privacy_multiplayer_validation.gd" "tests/economy_regression_validation.gd" "tests/fish_showcase_multiplayer_validation.gd" + "tests/friend_multiplayer_validation.gd" "tests/fishing_multiplayer_validation.gd" + "tests/home_spawn_multiplayer_validation.gd" "tests/job_multiplayer_validation.gd" "tests/movement_multiplayer_validation.gd" "tests/operator_multiplayer_validation.gd" @@ -96,6 +99,7 @@ readonly -a NETWORK_TESTS=( ) readonly SESSION_SWITCH_NETWORK_TEST="tests/session_switch_multiplayer_validation.gd" +readonly LATE_JOIN_NETWORK_TEST="tests/late_join_multiplayer_validation.gd" cleanup() { rm -rf -- "${RUN_ROOT}" @@ -104,7 +108,7 @@ trap cleanup EXIT INT TERM usage() { printf \ - 'Usage: %s {quick|full|host|network|session-switch|all|--list}\n' \ + 'Usage: %s {quick|full|host|network|session-switch|late-join|all|--list}\n' \ "$0" } @@ -290,6 +294,71 @@ run_session_switch_network_test() { fi } + +run_late_join_network_test() { + local script="${LATE_JOIN_NETWORK_TEST}" + local name="${script#tests/}" + name="${name%.gd}" + local host_root first_root late_root + local host_pid first_pid late_pid host_status first_status late_status + host_root="$(prepare_root "${name}-host")" + first_root="$(prepare_root "${name}-first")" + late_root="$(prepare_root "${name}-late")" + printf '\n==> %s (host + first client + late client)\n' "${script}" + XDG_DATA_HOME="${host_root}/data" \ + XDG_CONFIG_HOME="${host_root}/config" \ + XDG_CACHE_HOME="${host_root}/cache" \ + timeout "${TEST_TIMEOUT_SECONDS}s" "${GODOT_BIN}" \ + --headless --path "${PROJECT_ROOT}" --script "${script}" -- host \ + >"${host_root}/output.log" 2>&1 & + host_pid=$! + if ! wait_for_network_host "${script}" "${host_pid}"; then + set +e + wait "${host_pid}" + host_status=$? + set -e + printf '%s\n' '-- host output --' + sed -n '1,240p' "${host_root}/output.log" + printf 'error: host did not become ready (exit %d)\n' \ + "${host_status}" >&2 + return 1 + fi + XDG_DATA_HOME="${first_root}/data" \ + XDG_CONFIG_HOME="${first_root}/config" \ + XDG_CACHE_HOME="${first_root}/cache" \ + timeout "${TEST_TIMEOUT_SECONDS}s" "${GODOT_BIN}" \ + --headless --path "${PROJECT_ROOT}" --script "${script}" -- first \ + >"${first_root}/output.log" 2>&1 & + first_pid=$! + sleep 4 + XDG_DATA_HOME="${late_root}/data" \ + XDG_CONFIG_HOME="${late_root}/config" \ + XDG_CACHE_HOME="${late_root}/cache" \ + timeout "${TEST_TIMEOUT_SECONDS}s" "${GODOT_BIN}" \ + --headless --path "${PROJECT_ROOT}" --script "${script}" -- late \ + >"${late_root}/output.log" 2>&1 & + late_pid=$! + set +e + wait "${late_pid}" + late_status=$? + wait "${first_pid}" + first_status=$? + wait "${host_pid}" + host_status=$? + set -e + printf '%s\n' '-- host output --' + sed -n '1,240p' "${host_root}/output.log" + printf '%s\n' '-- first client output --' + sed -n '1,240p' "${first_root}/output.log" + printf '%s\n' '-- late client output --' + sed -n '1,240p' "${late_root}/output.log" + if ((host_status != 0 || first_status != 0 || late_status != 0)); then + printf 'error: host exited %d; clients exited %d/%d\n' \ + "${host_status}" "${first_status}" "${late_status}" >&2 + return 1 + fi +} + run_quick() { local test_script for test_script in "${QUICK_TESTS[@]}"; do @@ -317,6 +386,7 @@ run_network() { for test_script in "${NETWORK_TESTS[@]}"; do run_network_test "${test_script}" done + run_late_join_network_test run_session_switch_network_test } @@ -331,6 +401,8 @@ list_tests() { printf ' %s\n' "${NETWORK_TESTS[@]}" printf '%s\n' 'Two-host session-switch network test:' printf ' %s\n' "${SESSION_SWITCH_NETWORK_TEST}" + printf '%s\n' 'Three-peer late-join network test:' + printf ' %s\n' "${LATE_JOIN_NETWORK_TEST}" } case "${1:-}" in @@ -349,6 +421,9 @@ case "${1:-}" in session-switch) run_session_switch_network_test ;; + late-join) + run_late_join_network_test + ;; all) run_full run_host diff --git a/scripts/setup_android_build.sh b/scripts/setup_android_build.sh index c1cebdc..bc96083 100755 --- a/scripts/setup_android_build.sh +++ b/scripts/setup_android_build.sh @@ -336,8 +336,8 @@ check_editor_settings() { run_export_hint() { echo echo "Example export commands:" - echo " ${GODOT} --headless --path \"$PROJECT_ROOT\" --export-release \"Android\" builds/${PROJECT_VERSION}/android/NETfishing.apk" - echo " ${GODOT} --headless --path \"$PROJECT_ROOT\" --export-debug \"Android\" builds/android/NETfishing-debug.apk" + echo " ${GODOT} --headless --path \"$PROJECT_ROOT\" --export-release \"Android\" builds/${PROJECT_VERSION}/android/straywild.apk" + echo " ${GODOT} --headless --path \"$PROJECT_ROOT\" --export-debug \"Android\" builds/android/straywild-debug.apk" } print_status INFO "Starting Android dependency preflight..." diff --git a/scripts/test_player_data_root_paths.gd b/scripts/test_player_data_root_paths.gd index 69a2485..f357b9a 100644 --- a/scripts/test_player_data_root_paths.gd +++ b/scripts/test_player_data_root_paths.gd @@ -1,36 +1,36 @@ extends SceneTree -const PROJECT_PATH := "/tmp/netfishing" -const INSTALL_PATH := "/opt/NETfishing" +const PROJECT_PATH := "/tmp/straywild" +const INSTALL_PATH := "/opt/straywild" func _initialize() -> void: - var root_to_create: String = OS.get_environment("NETFISHING_TEST_CREATE_ROOT") + var root_to_create: String = OS.get_environment("straywild_TEST_CREATE_ROOT") if not root_to_create.is_empty(): _create_validation_root(root_to_create) return var failures: PackedStringArray = [] _expect( "external temporary directory", - "/tmp/NETfishing-test-data", + "/tmp/straywild-test-data", PlayerDataRoot.PATH_ALLOWED, failures, ) _expect( "external trailing slash", - "/tmp/NETfishing-test-data/", + "/tmp/straywild-test-data/", PlayerDataRoot.PATH_ALLOWED, failures, ) _expect( "similar project-name sibling", - "/tmp/netfishing-data", + "/tmp/straywild-data", PlayerDataRoot.PATH_ALLOWED, failures, ) _expect( "documents directory", - "/home/player/Documents/NETfishing", + "/home/player/Documents/straywild", PlayerDataRoot.PATH_ALLOWED, failures, ) @@ -55,7 +55,7 @@ func _initialize() -> void: ) _expect_with_references( "empty project reference", - "/tmp/NETfishing-test-data", + "/tmp/straywild-test-data", "", INSTALL_PATH, PlayerDataRoot.PATH_ALLOWED, @@ -63,7 +63,7 @@ func _initialize() -> void: ) _expect_with_references( "root project reference", - "/tmp/NETfishing-test-data", + "/tmp/straywild-test-data", "/", INSTALL_PATH, PlayerDataRoot.PATH_ALLOWED, @@ -71,9 +71,9 @@ func _initialize() -> void: ) _expect_with_references( "Windows component and case normalization", - "C:\\Games\\NETfishing Data", - "C:\\Games\\NETfishing", - "C:\\Program Files\\NETfishing", + "C:\\Games\\straywild Data", + "C:\\Games\\straywild", + "C:\\Program Files\\straywild", PlayerDataRoot.PATH_ALLOWED, failures, true, diff --git a/server/dedicated_server_config.gd b/server/dedicated_server_config.gd index 2f515c4..3370457 100644 --- a/server/dedicated_server_config.gd +++ b/server/dedicated_server_config.gd @@ -1,7 +1,7 @@ class_name DedicatedServerConfig extends RefCounted -const DEFAULT_NAME: String = "NETfishing Dedicated Server" +const DEFAULT_NAME: String = "straywild Dedicated Server" const DEFAULT_BIND_ADDRESS: String = "*" const DEFAULT_PORT: int = 7777 const DEFAULT_MAX_PLAYERS: int = 8 @@ -31,8 +31,10 @@ static func from_runtime() -> DedicatedServerConfig: result.discovery_url = str(ProjectSettings.get_setting( "network/discovery/base_url", "" )).strip_edges() - var config_path: String = OS.get_environment( - "NETFISHING_SERVER_CONFIG" + var config_path: String = _environment_string( + "straywild_SERVER_CONFIG", + "NETFISHING_SERVER_CONFIG", + "", ).strip_edges() for argument: String in OS.get_cmdline_user_args(): if argument.begins_with("--config="): @@ -87,36 +89,44 @@ func _load_file(path: String) -> bool: func _apply_environment() -> void: server_name = _environment_string( - "NETFISHING_SERVER_NAME", server_name + "straywild_SERVER_NAME", "NETFISHING_SERVER_NAME", server_name ) bind_address = _environment_string( - "NETFISHING_SERVER_BIND", bind_address + "straywild_SERVER_BIND", "NETFISHING_SERVER_BIND", bind_address + ) + port = _environment_int( + "straywild_SERVER_PORT", "NETFISHING_SERVER_PORT", port ) - port = _environment_int("NETFISHING_SERVER_PORT", port) max_players = _environment_int( - "NETFISHING_SERVER_MAX_PLAYERS", max_players + "straywild_SERVER_MAX_PLAYERS", + "NETFISHING_SERVER_MAX_PLAYERS", + max_players, ) world_seed = _environment_int( - "NETFISHING_WORLD_SEED", world_seed + "straywild_WORLD_SEED", "NETFISHING_WORLD_SEED", world_seed ) public_listing = _environment_bool( - "NETFISHING_SERVER_PUBLIC", public_listing + "straywild_SERVER_PUBLIC", "NETFISHING_SERVER_PUBLIC", public_listing ) discovery_url = _environment_string( - "NETFISHING_DISCOVERY_URL", discovery_url + "straywild_DISCOVERY_URL", "NETFISHING_DISCOVERY_URL", discovery_url ) data_directory = _environment_string( - "NETFISHING_DATA_DIR", data_directory + "straywild_DATA_DIR", "NETFISHING_DATA_DIR", data_directory ) chat_logging = _environment_bool( - "NETFISHING_CHAT_LOGGING", chat_logging + "straywild_CHAT_LOGGING", "NETFISHING_CHAT_LOGGING", chat_logging ) chat_log_path = _environment_string( - "NETFISHING_CHAT_LOG_PATH", chat_log_path + "straywild_CHAT_LOG_PATH", "NETFISHING_CHAT_LOG_PATH", chat_log_path ) - if OS.has_environment("NETFISHING_SERVER_OPERATORS"): + var operators_variable: String = _available_environment_variable( + "straywild_SERVER_OPERATORS", + "NETFISHING_SERVER_OPERATORS", + ) + if not operators_variable.is_empty(): operator_fingerprints = _parse_fingerprint_list( - OS.get_environment("NETFISHING_SERVER_OPERATORS") + OS.get_environment(operators_variable) ) @@ -211,21 +221,45 @@ static func _safe_text(value: String) -> bool: return true -static func _environment_string(name: String, fallback: String) -> String: - return OS.get_environment(name) if OS.has_environment(name) else fallback +static func _available_environment_variable( + name: String, + legacy_name: String, +) -> String: + if OS.has_environment(name): + return name + return legacy_name if OS.has_environment(legacy_name) else "" -static func _environment_int(name: String, fallback: int) -> int: +static func _environment_string( + name: String, + legacy_name: String, + fallback: String, +) -> String: + var variable: String = _available_environment_variable(name, legacy_name) + return OS.get_environment(variable) if not variable.is_empty() else fallback + + +static func _environment_int( + name: String, + legacy_name: String, + fallback: int, +) -> int: + var variable: String = _available_environment_variable(name, legacy_name) return ( - _parse_int(OS.get_environment(name), fallback) - if OS.has_environment(name) else fallback + _parse_int(OS.get_environment(variable), fallback) + if not variable.is_empty() else fallback ) -static func _environment_bool(name: String, fallback: bool) -> bool: - if not OS.has_environment(name): +static func _environment_bool( + name: String, + legacy_name: String, + fallback: bool, +) -> bool: + var variable: String = _available_environment_variable(name, legacy_name) + if variable.is_empty(): return fallback - var value: String = OS.get_environment(name).strip_edges().to_lower() + var value: String = OS.get_environment(variable).strip_edges().to_lower() return value in ["1", "true", "yes", "on"] diff --git a/settings/controller_mapping_manager.gd b/settings/controller_mapping_manager.gd index 8c17e7f..278022e 100644 --- a/settings/controller_mapping_manager.gd +++ b/settings/controller_mapping_manager.gd @@ -84,7 +84,7 @@ const ROLE_LABELS: Dictionary = { ROLE_LB: "focus chat or world", ROLE_RB: "primary action", ROLE_POINTER_MODIFIER: "virtual mouse modifier", - ROLE_CAMERA_ZOOM: "camera zoom", + ROLE_CAMERA_ZOOM: "zoom modifier (+RT)", ROLE_SELECT: "chat", ROLE_START: "pause", ROLE_LEFT_STICK_CLICK: "sprint", @@ -96,7 +96,7 @@ const ROLE_LABELS: Dictionary = { ROLE_LEFT_STICK_X: "move left / right", ROLE_LEFT_STICK_Y: "move up / down", ROLE_RIGHT_STICK_X: "camera left / right", - ROLE_RIGHT_STICK_Y: "camera up / down", + ROLE_RIGHT_STICK_Y: "camera up / down (+RT to zoom)", } const ROLE_PROMPTS: Dictionary = { diff --git a/settings/keyboard_mouse_mapping_manager.gd b/settings/keyboard_mouse_mapping_manager.gd index d9cb03d..54dacc8 100644 --- a/settings/keyboard_mouse_mapping_manager.gd +++ b/settings/keyboard_mouse_mapping_manager.gd @@ -86,8 +86,8 @@ const ROLE_LABELS: Dictionary = { ROLE_PRIMARY_ACTION: "primary action", ROLE_ALTERNATE_REEL: "alternate reel", ROLE_CAMERA_DRAG: "rotate camera", - ROLE_CAMERA_ZOOM_IN: "camera zoom in", - ROLE_CAMERA_ZOOM_OUT: "camera zoom out", + ROLE_CAMERA_ZOOM_IN: "hotbar select (+SHIFT to zoom)", + ROLE_CAMERA_ZOOM_OUT: "hotbar select (+SHIFT to zoom)", ROLE_PLAYER_MENU: "player menu", ROLE_TACKLE_BOX: "tackle box", ROLE_PROP_BOOK: "prop book", @@ -177,6 +177,17 @@ func get_active_bindings() -> Dictionary: return _default_bindings.duplicate(true) +func get_binding(role: StringName) -> Dictionary: + var binding: Variant = get_active_bindings().get(str(role), {}) + if typeof(binding) != TYPE_DICTIONARY: + return {} + return (binding as Dictionary).duplicate(true) + + +func get_binding_label(role: StringName) -> String: + return binding_label(get_binding(role)) + + func get_role_label(role: StringName) -> String: return str(ROLE_LABELS.get(role, str(role).replace("_", " "))) diff --git a/settings/player_settings.gd b/settings/player_settings.gd index 4ea3cfa..59099fc 100644 --- a/settings/player_settings.gd +++ b/settings/player_settings.gd @@ -32,6 +32,7 @@ const UI_COMPACT_RENDER_HEIGHTS: Array[int] = [0, 408, 336, 264, 192] @export_range(0.001, 0.012, 0.0005) var mouse_camera_sensitivity: float = 0.005 @export_range(0.5, 5.0, 0.1) var controller_camera_sensitivity: float = 2.5 @export var invert_camera_y: bool = false +@export var swap_hotbar_camera_scroll: bool = false @export var on_screen_keyboard_enabled: bool = false @export var chat_draft: String = "" @export var chat_collapsed: bool = false @@ -79,6 +80,7 @@ func copy() -> PlayerSettings: result.mouse_camera_sensitivity = mouse_camera_sensitivity result.controller_camera_sensitivity = controller_camera_sensitivity result.invert_camera_y = invert_camera_y + result.swap_hotbar_camera_scroll = swap_hotbar_camera_scroll result.on_screen_keyboard_enabled = on_screen_keyboard_enabled result.chat_draft = chat_draft result.chat_collapsed = chat_collapsed diff --git a/settings/player_settings_manager.gd b/settings/player_settings_manager.gd index 6c8cf4f..362abc9 100644 --- a/settings/player_settings_manager.gd +++ b/settings/player_settings_manager.gd @@ -7,7 +7,7 @@ const TEMP_PATH: String = "user://player_settings.json.tmp" const BACKUP_PATH: String = "user://player_settings.json.backup" const SILENT_VOLUME_DB: float = -80.0 const HEADLESS_WRITE_ENVIRONMENT: String = ( - "NETFISHING_ISOLATED_VALIDATION_STORAGE" + "straywild_ISOLATED_VALIDATION_STORAGE" ) signal settings_changed(settings: PlayerSettings) @@ -54,6 +54,10 @@ func load_settings() -> bool: if ( typeof(accessibility.get("auto_click_enabled")) != TYPE_BOOL or typeof(camera.get("invert_vertical")) != TYPE_BOOL + or ( + camera.has("swap_hotbar_camera_scroll") + and typeof(camera["swap_hotbar_camera_scroll"]) != TYPE_BOOL + ) or ( accessibility.has("on_screen_keyboard_enabled") and typeof(accessibility["on_screen_keyboard_enabled"]) != TYPE_BOOL @@ -109,6 +113,9 @@ func load_settings() -> bool: -1.0 ) loaded.invert_camera_y = camera["invert_vertical"] + loaded.swap_hotbar_camera_scroll = bool( + camera.get("swap_hotbar_camera_scroll", false) + ) loaded.on_screen_keyboard_enabled = bool( accessibility.get("on_screen_keyboard_enabled", false) ) @@ -237,6 +244,9 @@ func save_now() -> bool: "mouse_sensitivity": current_settings.mouse_camera_sensitivity, "controller_sensitivity": current_settings.controller_camera_sensitivity, "invert_vertical": current_settings.invert_camera_y, + "swap_hotbar_camera_scroll": ( + current_settings.swap_hotbar_camera_scroll + ), }, "audio": { "master": current_settings.master_volume, diff --git a/tests/art_tools_validation.gd b/tests/art_tools_validation.gd index f370605..146fb4e 100644 --- a/tests/art_tools_validation.gd +++ b/tests/art_tools_validation.gd @@ -19,9 +19,15 @@ func _run() -> void: for _frame: int in 8: await process_frame assert(bool(main.get("_application_initialized"))) + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(bool(main.call( + "_prepare_host_world", WorldLayout.STARTER_ISLAND, 1 + ))) assert(bool(main.call("_prepare_private_host"))) var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game()) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -81,12 +87,31 @@ func _run() -> void: "%NetworkSurfaceDrawingService" ) as NetworkSurfaceDrawingService var game_ui := main.get_node("%GameUI") as GameUI + var keyboard_mapping := main.get_node( + "%KeyboardMouseMappingManager" + ) as KeyboardMouseMappingManager var toolbar := game_ui.get_node( "%SurfaceDrawingToolbar" ) as SurfaceDrawingToolbar var chat_ui := game_ui.get_node("%ChatUI") as ChatUI assert(player != null and service != null and toolbar != null) assert(chat_ui != null) + assert(keyboard_mapping != null) + assert(keyboard_mapping.reset_mapping()) + await process_frame + var shop_prompt_key := game_ui.get_node("%ShopPromptKey") as Label + assert(shop_prompt_key.text == "E") + var remapped_interact := InputEventKey.new() + remapped_interact.physical_keycode = KEY_F + remapped_interact.pressed = true + assert(keyboard_mapping.set_binding( + KeyboardMouseMappingManager.ROLE_INTERACT, + keyboard_mapping.binding_from_event(remapped_interact), + )) + await process_frame + assert(shop_prompt_key.text == "F") + assert(keyboard_mapping.reset_mapping()) + await process_frame assert(toolbar.get_parent() == chat_ui.get_parent()) assert( toolbar.get_index() > chat_ui.get_index(), @@ -252,8 +277,46 @@ func _run() -> void: else: assert(not typed_chat_entry.virtual_keyboard_enabled) assert(on_screen_keyboard.is_open()) + + # A bite temporarily owns gameplay input without discarding an in-progress + # message. The draft and insertion point return only after fishing releases + # that ownership, and any controller keyboard follows the restored field. + var chat_fishing_spot := main.get_node("%FishingSpot") as FishingSpot + assert(chat_fishing_spot != null) + var interrupted_draft := "finish this message after fishing" + var interrupted_caret: int = 12 + typed_chat_entry.text = interrupted_draft + typed_chat_entry.caret_column = interrupted_caret + chat_fishing_spot.call("_set_fishing_input_priority", true) + await process_frame + assert(not chat_ui.is_open()) + assert(not bool(chat_ui.get("_input_lock_applied"))) + assert(chat_ui.has_fishing_resume_pending()) + assert(not on_screen_keyboard.is_open()) + chat_ui.open_chat() + assert(not chat_ui.is_open()) + chat_fishing_spot.call("_set_fishing_input_priority", false) + for _frame: int in 4: + await process_frame + assert(chat_ui.is_open()) + assert(typed_chat_entry.text == interrupted_draft) + assert(typed_chat_entry.caret_column == interrupted_caret) + assert(bool(chat_ui.get("_input_lock_applied"))) + if not DisplayServer.has_feature(DisplayServer.FEATURE_VIRTUAL_KEYBOARD): + assert(on_screen_keyboard.is_open()) on_screen_keyboard.call("_close_keyboard", true) assert(typed_chat_entry.has_focus()) + + # A deferred Standby bite has not started the fishing minigame yet. It must + # release fishing's input ownership so chat remains available until the + # player confirms the bite. + chat_fishing_spot.call("_set_fishing_input_priority", true) + chat_fishing_spot.call("_set_bite_confirmation_pending", true) + for _frame: int in 4: + await process_frame + assert(not chat_fishing_spot.is_fishing_input_priority_active()) + assert(chat_ui.is_open()) + chat_fishing_spot.call("_set_bite_confirmation_pending", false) var left_bumper := InputEventJoypadButton.new() left_bumper.button_index = JOY_BUTTON_LEFT_SHOULDER left_bumper.pressed = true @@ -354,6 +417,12 @@ func _run() -> void: ) assert(normal_camera.is_position_behind(chat_anchor)) assert(not free_camera.is_position_behind(chat_anchor)) + var shop_prompt := game_ui.get_node("%ShopPrompt") as Control + var storage_prompt := game_ui.get_node("%StoragePrompt") as Control + game_ui.set_shop_prompt_visible(true, chat_anchor) + game_ui.set_storage_prompt_visible(true, chat_anchor) + assert(shop_prompt.visible) + assert(storage_prompt.visible) chat_ui.show_local_speech("hello there friend") await process_frame assert(bool(player.get("_speech_mouth_active"))) @@ -507,7 +576,7 @@ func _run() -> void: and stamp_button != null ) assert(export_button.text == "png") - assert(export_button.tooltip_text == "export aimed artwork as PNG") + assert(export_button.tooltip_text == "aim at artwork, then click to export PNG") assert(stamp_button.text == "stamp") assert(stamp_button.disabled) assert(toolbar.get_node_or_null("%CloseButton") == null) @@ -830,6 +899,18 @@ func _run() -> void: await process_frame assert(player.hotbar.get_selected_slot() == 1) assert(not service.is_active() and not toolbar.visible) + hotbar_ui.set_swap_hotbar_camera_scroll(true) + hotbar_ui._unhandled_input(wheel_down) + await process_frame + assert(player.hotbar.get_selected_slot() == 1) + var shifted_wheel_down := InputEventMouseButton.new() + shifted_wheel_down.button_index = MOUSE_BUTTON_WHEEL_DOWN + shifted_wheel_down.pressed = true + shifted_wheel_down.shift_pressed = true + hotbar_ui._unhandled_input(shifted_wheel_down) + await process_frame + assert(player.hotbar.get_selected_slot() == 2) + hotbar_ui.set_swap_hotbar_camera_scroll(false) var number_one := InputEventKey.new() number_one.physical_keycode = KEY_1 diff --git a/tests/camera_drag_validation.gd b/tests/camera_drag_validation.gd index 0299492..a2dd410 100644 --- a/tests/camera_drag_validation.gd +++ b/tests/camera_drag_validation.gd @@ -54,6 +54,26 @@ func _run() -> void: player.notification(NOTIFICATION_APPLICATION_FOCUS_OUT) assert(not bool(player.get("_camera_dragging"))) + var plain_wheel_down := InputEventMouseButton.new() + plain_wheel_down.button_index = MOUSE_BUTTON_WHEEL_DOWN + plain_wheel_down.pressed = true + var shifted_wheel_down := InputEventMouseButton.new() + shifted_wheel_down.button_index = MOUSE_BUTTON_WHEEL_DOWN + shifted_wheel_down.pressed = true + shifted_wheel_down.shift_pressed = true + player.apply_camera_settings(0.005, 2.5, false, false) + var default_zoom: float = float(player.get("_target_zoom")) + player._unhandled_input(plain_wheel_down) + assert(is_equal_approx(float(player.get("_target_zoom")), default_zoom)) + player._unhandled_input(shifted_wheel_down) + assert(float(player.get("_target_zoom")) > default_zoom) + player.apply_camera_settings(0.005, 2.5, false, true) + var swapped_zoom: float = float(player.get("_target_zoom")) + player._unhandled_input(shifted_wheel_down) + assert(is_equal_approx(float(player.get("_target_zoom")), swapped_zoom)) + player._unhandled_input(plain_wheel_down) + assert(float(player.get("_target_zoom")) > swapped_zoom) + player.queue_free() await process_frame print("Camera drag validation: PASS") diff --git a/tests/character_rig_validation.gd b/tests/character_rig_validation.gd index c8fc57d..2aece2b 100644 --- a/tests/character_rig_validation.gd +++ b/tests/character_rig_validation.gd @@ -2,7 +2,7 @@ extends SceneTree const CHARACTER_SCENE: PackedScene = preload( - "res://art/exported/characters/base/netfishing_base_character.glb" + "res://art/exported/characters/base/straywild_base_character.glb" ) const EXPECTED_ANIMATIONS: Array[StringName] = [ diff --git a/tests/chat_privacy_multiplayer_validation.gd b/tests/chat_privacy_multiplayer_validation.gd index 5d38b08..e1d6f87 100644 --- a/tests/chat_privacy_multiplayer_validation.gd +++ b/tests/chat_privacy_multiplayer_validation.gd @@ -26,6 +26,10 @@ func _run_host() -> void: var main: Node = await _create_initialized_main() var session := main.get_node("%NetworkSession") as NetworkSession var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") diff --git a/tests/controller_mapping_validation.gd b/tests/controller_mapping_validation.gd index b93d475..a5938d6 100644 --- a/tests/controller_mapping_validation.gd +++ b/tests/controller_mapping_validation.gd @@ -14,6 +14,22 @@ func _init() -> void: func _run() -> void: + if ( + ControllerMappingManagerType.ROLE_LABELS[ + ControllerMappingManagerType.ROLE_CAMERA_ZOOM + ] != "zoom modifier (+RT)" + ): + push_error("controller zoom modifier label is misleading") + quit(1) + return + if ( + ControllerMappingManagerType.ROLE_LABELS[ + ControllerMappingManagerType.ROLE_RIGHT_STICK_Y + ] != "camera up / down (+RT to zoom)" + ): + push_error("controller vertical camera label omits the RT zoom chord") + quit(1) + return var manager := ControllerMappingManagerType.new() root.add_child(manager) await process_frame @@ -262,7 +278,7 @@ func _validate_manager(manager: ControllerMappingManagerType) -> String: func _validate_portmaster_launcher() -> String: - const launcher_path: String = "res://scripts/portmaster/NETfishing.sh" + const launcher_path: String = "res://scripts/portmaster/straywild.sh" if not FileAccess.file_exists(launcher_path): return "PortMaster launcher template is missing" var launcher: String = FileAccess.get_file_as_string(launcher_path) @@ -275,9 +291,9 @@ func _validate_portmaster_launcher() -> String: "guide:b8,start:b7,back:b6", "leftstick:b9", "rightstick:b12", - "netfishing_controllerconfig=\"$GODOT_MUOS_MAPPING\"", - "GPTOKEYB_CONFIG=\"$GAMEDIR/netfishing.gptk\"", - "$GPTOKEYB \"NETfishing.aarch64\" -c \"$GPTOKEYB_CONFIG\" &", + "straywild_controllerconfig=\"$GODOT_MUOS_MAPPING\"", + "GPTOKEYB_CONFIG=\"$GAMEDIR/straywild.gptk\"", + "$GPTOKEYB \"straywild.aarch64\" -c \"$GPTOKEYB_CONFIG\" &", "pm_platform_helper \"$GAME_EXECUTABLE\"", "\"$GAME_LAUNCHER\"", "\"$CONTROLLER_MAPPING_FILE\"", @@ -288,7 +304,7 @@ func _validate_portmaster_launcher() -> String: if "$'\\n'" in launcher: return "PortMaster launcher appends mappings across a Weston-unsafe newline" const game_launcher_path: String = ( - "res://scripts/portmaster/launch-netfishing.sh" + "res://scripts/portmaster/launch-straywild.sh" ) if not FileAccess.file_exists(game_launcher_path): return "PortMaster game launcher wrapper is missing" diff --git a/tests/controller_menu_accessibility_validation.gd b/tests/controller_menu_accessibility_validation.gd index c2a58ee..37e43d5 100644 --- a/tests/controller_menu_accessibility_validation.gd +++ b/tests/controller_menu_accessibility_validation.gd @@ -6,6 +6,7 @@ const JoinGamePageScene = preload( const TitleScreenScene = preload("res://ui/title_screen.tscn") const PauseMenuScene = preload("res://ui/pause_menu.tscn") const SettingsPanelScene = preload("res://ui/settings_panel.tscn") +const SaveSlotsPageScene = preload("res://ui/save_slots_page.tscn") const BubbleConfirmationScene = preload( "res://ui/components/bubble_menu/bubble_confirmation_page.tscn" ) @@ -43,6 +44,7 @@ func _initialize() -> void: func _run() -> void: root.size = Vector2i(1280, 720) await _validate_primary_menu_navigation() + await _validate_save_slots_navigation() await _validate_join_game_navigation() await _validate_data_settings_navigation() await _validate_settings_adjustment_navigation() @@ -113,10 +115,78 @@ func _validate_primary_menu_navigation() -> void: (control as BaseButton).disabled = false title_controls.append(control) _expect( - title_controls.size() == 7, - "Title menu does not expose all seven primary actions.", + title_controls.size() == 5, + "Title menu does not expose its five primary actions.", ) - _assert_directionally_reachable(title_controls.front(), title_controls) + var play_button := title.get_node("%PlayButton") as Button + _expect( + play_button.icon != null + and play_button.icon.resource_path + == "res://ui/icons/new_menu/play.png" + and play_button.text.is_empty(), + "The Play action is not presented as the large square icon button.", + ) + _expect( + is_equal_approx(play_button.size.x, play_button.size.y), + "The Play action is not square.", + ) + var online_button := title.get_node("%JoinGameButton") as Button + var settings_button := title.get_node("%SettingsButton") as Button + var credits_button := title.get_node("%CreditsButton") as Button + var close_button := title.get_node("%QuitButton") as Button + for secondary_button: Button in [ + online_button, + settings_button, + credits_button, + close_button, + ]: + _expect( + is_equal_approx( + secondary_button.size.x, + secondary_button.size.y, + ), + "A secondary title action is not square.", + ) + _expect( + is_equal_approx( + close_button.position.y + close_button.size.y + - online_button.position.y, + play_button.size.y, + ), + "The secondary title-action stack does not match Play's height.", + ) + _expect( + not (title.get_node("%NewGameButton") as Control).visible + and not (title.get_node("%DeleteSaveButton") as Control).visible, + "Legacy New/Delete title bubbles are still visible.", + ) + _assert_neighbor( + play_button, + &"focus_neighbor_right", + title.get_node("%JoinGameButton") as Control, + ) + _assert_neighbor( + title.get_node("%JoinGameButton") as Control, + &"focus_neighbor_left", + play_button, + ) + _assert_neighbor( + title.get_node("%JoinGameButton") as Control, + &"focus_neighbor_bottom", + title.get_node("%SettingsButton") as Control, + ) + _assert_neighbor( + title.get_node("%SettingsButton") as Control, + &"focus_neighbor_bottom", + title.get_node("%CreditsButton") as Control, + ) + _assert_neighbor( + title.get_node("%CreditsButton") as Control, + &"focus_neighbor_bottom", + title.get_node("%QuitButton") as Control, + ) + for title_control: Control in title_controls: + _assert_directionally_reachable(title_control, title_controls) title.queue_free() await process_frame @@ -141,18 +211,106 @@ func _validate_primary_menu_navigation() -> void: await process_frame +func _validate_save_slots_navigation() -> void: + var page := SaveSlotsPageScene.instantiate() as SaveSlotsPage + root.add_child(page) + await process_frame + page.open_page() + for _frame: int in 2: + await process_frame + await create_timer(0.25).timeout + var saves_tab := page.get_node("%SavesTab") as Button + var new_tab := page.get_node("%NewSlotTab") as Button + var content_panel := page.get_node("%ContentPanel") as PanelContainer + var tab_overlap: float = ( + saves_tab.get_global_rect().end.y + - content_panel.get_global_rect().position.y + ) + _expect( + is_equal_approx(tab_overlap, saves_tab.size.y * 0.5), + "Save-slot content does not cover the lower half of its organizer tabs.", + ) + _expect( + page.get_active_page_id() == &"new", + "An empty save catalog does not open directly to New Slot.", + ) + _assert_neighbor(saves_tab, &"focus_neighbor_right", new_tab) + _assert_neighbor(new_tab, &"focus_neighbor_left", saves_tab) + var new_controls: Array[Control] = [ + saves_tab, + new_tab, + page.get_node("%NewSlotName") as Control, + page.get_node("%GeneratedButton") as Control, + page.get_node("%StarterButton") as Control, + page.get_node("%RandomSeedButton") as Control, + page.get_node("%CustomSeedButton") as Control, + page.get_node("%CreateSlotButton") as Control, + page.get_node("%BackButton") as Control, + ] + _assert_directionally_reachable(new_tab, new_controls) + page.call("_select_page", &"saves", false) + await process_frame + var import_button := page.get_node("%ImportSlotButton") as Button + var actions := page.get_node("%Actions") as VBoxContainer + var secondary_actions := page.get_node("%SecondaryActions") as GridContainer + var play_slot := page.get_node("%PlaySlotButton") as Button + var rename_slot := page.get_node("%RenameSlotButton") as Button + var duplicate_slot := page.get_node("%DuplicateSlotButton") as Button + var export_slot := page.get_node("%ExportSlotButton") as Button + var delete_slot := page.get_node("%DeleteSlotButton") as Button + _expect( + saves_tab.find_valid_focus_neighbor(SIDE_BOTTOM) == import_button, + "An empty Save Slots page does not lead from its tab to Import Save.", + ) + _expect( + import_button.find_valid_focus_neighbor(SIDE_BOTTOM) + == page.get_node("%BackButton"), + "An empty Save Slots page does not lead from Import Save to Back.", + ) + _expect( + is_equal_approx(play_slot.size.x, actions.size.x), + "Save-slot Play does not span the full action width.", + ) + _expect( + secondary_actions.columns == 2 + and is_equal_approx(rename_slot.size.x, duplicate_slot.size.x) + and is_equal_approx(export_slot.size.x, delete_slot.size.x) + and is_equal_approx(rename_slot.position.y, duplicate_slot.position.y) + and is_equal_approx(export_slot.position.y, delete_slot.position.y) + and export_slot.position.y > rename_slot.position.y, + "Save-slot secondary actions are not arranged as a 2 by 2 grid.", + ) + var play_style := play_slot.get_theme_stylebox("normal") as StyleBoxFlat + _expect( + play_style != null and play_style.bg_color == UtilityPageStyle.GREEN, + "Save-slot Play does not use the green primary-action style.", + ) + _assert_neighbor(play_slot, &"focus_neighbor_bottom", rename_slot) + _assert_neighbor(rename_slot, &"focus_neighbor_right", duplicate_slot) + _assert_neighbor(rename_slot, &"focus_neighbor_bottom", export_slot) + _assert_neighbor(duplicate_slot, &"focus_neighbor_bottom", delete_slot) + _assert_neighbor(export_slot, &"focus_neighbor_right", delete_slot) + page.queue_free() + await process_frame + + func _validate_join_game_navigation() -> void: var page := JoinGamePageScene.instantiate() as Control root.add_child(page) await process_frame page.show() + await process_frame var discover := page.get_node("%DiscoverButton") as Button + var friends := page.get_node("%FriendsButton") as Button var direct := page.get_node("%DirectButton") as Button var saved := page.get_node("%SavedButton") as Button var recent := page.get_node("%RecentButton") as Button var address := page.get_node("%Address") as LineEdit var name_edit := page.get_node("%NameEdit") as LineEdit var server_list := page.get_node("%ServerList") as ItemList + var presence := page.get_node("%PresenceButton") as Button + var room_open := page.get_node("%RoomOpenButton") as Button + var room_listing := page.get_node("%RoomListingButton") as Button var refresh := page.get_node("%RefreshButton") as Button var join := page.get_node("%JoinButton") as Button var save := page.get_node("%SaveButton") as Button @@ -161,8 +319,22 @@ func _validate_join_game_navigation() -> void: var delete := page.get_node("%DeleteButton") as Button var cancel := page.get_node("%CancelButton") as Button var back := page.get_node("%BackButton") as Button - var modes: Array[Control] = [discover, direct, saved, recent] + var direct_content := page.get_node("%DirectContent") as Control + var list_content := page.get_node("%ListContent") as Control + var content_panel := page.get_node("%ContentPanel") as PanelContainer + var actions := page.get_node("%Actions") as HBoxContainer + var modes: Array[Control] = [discover, friends, direct, saved, recent] + var tab_overlap: float = ( + discover.get_global_rect().end.y + - content_panel.get_global_rect().position.y + ) + _expect( + is_equal_approx(tab_overlap, discover.size.y * 0.5), + "Join-game content does not cover the lower half of its organizer tabs.", + ) + direct_content.hide() + list_content.show() address.hide() name_edit.hide() server_list.show() @@ -174,17 +346,45 @@ func _validate_join_game_navigation() -> void: _set_button_state(delete, false) _set_button_state(cancel, false) _set_button_state(back, true) - page.set("_mode", 0) + page.set("_mode", JoinGamePage.Mode.DISCOVER) page.call("_configure_controller_navigation") await process_frame _assert_neighbor(discover, &"focus_neighbor_bottom", server_list) _assert_neighbor(server_list, &"focus_neighbor_top", discover) _assert_neighbor(server_list, &"focus_neighbor_bottom", refresh) _assert_neighbor(refresh, &"focus_neighbor_right", join) - _assert_neighbor(back, &"focus_neighbor_left", join) + _assert_neighbor(join, &"focus_neighbor_bottom", back) + _assert_neighbor(back, &"focus_neighbor_top", join) + _expect( + is_equal_approx( + join.get_global_rect().end.x, + actions.get_global_rect().end.x, + ), + "Discover Refresh and Join are not right-justified.", + ) var discover_controls: Array[Control] = modes.duplicate() discover_controls.append_array([server_list, refresh, join, back]) _assert_directionally_reachable(discover, discover_controls) + room_open.show() + room_listing.show() + _set_button_state(room_open, true) + _set_button_state(room_listing, true) + page.call("_configure_controller_navigation") + await process_frame + _assert_neighbor(room_open, &"focus_neighbor_right", room_listing) + _assert_neighbor(room_open, &"focus_neighbor_left", room_open) + _assert_neighbor(room_listing, &"focus_neighbor_left", room_open) + _assert_neighbor(room_listing, &"focus_neighbor_bottom", server_list) + var hosted_discover_controls: Array[Control] = modes.duplicate() + hosted_discover_controls.append_array([ + room_open, + room_listing, + server_list, + refresh, + join, + back, + ]) + _assert_directionally_reachable(discover, hosted_discover_controls) var rooms: Array[Dictionary] = [ { "room_id": "controller-default-room", @@ -209,18 +409,51 @@ func _validate_join_game_navigation() -> void: "Discovery's visible cursor and selected room should agree immediately.", ) + page.set("_mode", JoinGamePage.Mode.FRIENDS) + (page.get_node("%OnlineControls") as Control).hide() + presence.show() + page.call("_configure_controller_navigation") + await process_frame + _assert_neighbor(friends, &"focus_neighbor_bottom", server_list) + _assert_neighbor(server_list, &"focus_neighbor_top", friends) + _assert_neighbor(server_list, &"focus_neighbor_bottom", presence) + _assert_neighbor(presence, &"focus_neighbor_right", refresh) + _assert_neighbor(refresh, &"focus_neighbor_right", join) + _expect( + is_equal_approx( + presence.get_global_rect().position.x, + actions.get_global_rect().position.x, + ), + "Friend presence is not left-justified in the action row.", + ) + _expect( + is_equal_approx( + join.get_global_rect().end.x, + actions.get_global_rect().end.x, + ), + "Friends Refresh and Join are not right-justified.", + ) + var friend_controls: Array[Control] = modes.duplicate() + friend_controls.append_array([server_list, presence, refresh, join, back]) + _assert_directionally_reachable(friends, friend_controls) + + list_content.hide() + direct_content.show() + presence.hide() address.show() address.editable = true server_list.hide() _set_button_state(refresh, false) _set_button_state(join, true) _set_button_state(save, true) - page.set("_mode", 1) + page.set("_mode", JoinGamePage.Mode.DIRECT) page.call("_configure_controller_navigation") await process_frame _assert_neighbor(direct, &"focus_neighbor_bottom", address) _assert_neighbor(address, &"focus_neighbor_top", direct) _assert_neighbor(address, &"focus_neighbor_bottom", join) + _assert_neighbor(save, &"focus_neighbor_bottom", back) + _assert_neighbor(back, &"focus_neighbor_top", save) var direct_controls: Array[Control] = modes.duplicate() direct_controls.append_array([address, join, save, back]) _assert_directionally_reachable(direct, direct_controls) @@ -251,8 +484,10 @@ func _validate_join_game_navigation() -> void: entry.display_name = "Saved server %d" % index saved_entries.append(entry) server_list.add_item(entry.display_name) - page.set("_mode", 2) + page.set("_mode", JoinGamePage.Mode.SAVED) page.set("_visible_entries", saved_entries) + direct_content.hide() + list_content.show() server_list.show() page.call("_configure_controller_navigation") page.call("_restore_entry_selection_and_focus", 1) @@ -387,8 +622,6 @@ func _validate_data_settings_navigation() -> void: "Open Data Folder left a controller-activatable dialog behind.", ) var change_data_folder := panel.get_node("%ChangeDataFolder") as Button - var export_progression := panel.get_node("%ExportProgression") as Button - var import_progression := panel.get_node("%ImportProgression") as Button var copy_fingerprint := panel.get_node("%CopyPlayerFingerprint") as Button var export_player := panel.get_node("%ExportPlayerIdentity") as Button var import_player := panel.get_node("%ImportPlayerIdentity") as Button @@ -398,8 +631,6 @@ func _validate_data_settings_navigation() -> void: data_tab, open_data_folder, change_data_folder, - export_progression, - import_progression, copy_fingerprint, export_player, import_player, @@ -423,7 +654,7 @@ func _validate_data_settings_navigation() -> void: _assert_neighbor( open_data_folder, &"focus_neighbor_bottom", - export_progression, + copy_fingerprint, ) _assert_neighbor( change_data_folder, @@ -433,43 +664,13 @@ func _validate_data_settings_navigation() -> void: _assert_neighbor( change_data_folder, &"focus_neighbor_bottom", - import_progression, + copy_fingerprint, ) _assert_neighbor( - export_progression, + copy_fingerprint, &"focus_neighbor_top", open_data_folder, ) - _assert_neighbor( - export_progression, - &"focus_neighbor_right", - import_progression, - ) - _assert_neighbor( - export_progression, - &"focus_neighbor_bottom", - copy_fingerprint, - ) - _assert_neighbor( - import_progression, - &"focus_neighbor_top", - change_data_folder, - ) - _assert_neighbor( - import_progression, - &"focus_neighbor_left", - export_progression, - ) - _assert_neighbor( - import_progression, - &"focus_neighbor_bottom", - copy_fingerprint, - ) - _assert_neighbor( - copy_fingerprint, - &"focus_neighbor_top", - export_progression, - ) _assert_neighbor( copy_fingerprint, &"focus_neighbor_bottom", @@ -582,6 +783,8 @@ func _validate_settings_adjustment_navigation() -> void: var on_screen_keyboard := panel.get_node( "%OnScreenKeyboardToggle" ) as Button + var swap_scroll := panel.get_node("%SwapScrollToggle") as Button + var invert_y := panel.get_node("%InvertYToggle") as Button var controller_binds := panel.get_node("%ControllerMapping") as Button var keyboard_binds := panel.get_node("%KeyboardMapping") as Button _expect( @@ -594,6 +797,26 @@ func _validate_settings_adjustment_navigation() -> void: and is_equal_approx(controller_slider.step, 0.1), "Sensitivity sliders do not retain their authored increments.", ) + _assert_neighbor( + invert_y, + &"focus_neighbor_bottom", + swap_scroll, + ) + _assert_neighbor( + swap_scroll, + &"focus_neighbor_top", + invert_y, + ) + _assert_neighbor( + swap_scroll, + &"focus_neighbor_bottom", + on_screen_keyboard, + ) + _assert_neighbor( + on_screen_keyboard, + &"focus_neighbor_top", + swap_scroll, + ) _assert_neighbor( on_screen_keyboard, &"focus_neighbor_bottom", @@ -623,7 +846,8 @@ func _validate_settings_adjustment_navigation() -> void: panel.get_node("%ControlsTab") as Control, mouse_slider, controller_slider, - panel.get_node("%InvertYToggle") as Control, + invert_y, + swap_scroll, on_screen_keyboard, controller_binds, keyboard_binds, @@ -1007,12 +1231,12 @@ func _validate_profile_voice_navigation() -> void: kat_down != null and pitch_grid.is_ancestor_of(kat_down), "Down from the voice-set row does not enter the pitch row.", ) - if OS.has_environment("NETFISHING_PROFILE_VOICE_CAPTURE"): + if OS.has_environment("straywild_PROFILE_VOICE_CAPTURE"): await RenderingServer.frame_post_draw var capture := root.get_viewport().get_texture().get_image() _expect( capture.save_png(OS.get_environment( - "NETFISHING_PROFILE_VOICE_CAPTURE" + "straywild_PROFILE_VOICE_CAPTURE" )) == OK, "The profile voice-page capture could not be saved.", ) @@ -1132,6 +1356,24 @@ func _validate_player_menu_nested_controller_back() -> void: == LogbookPageType.ControllerZone.ENTRIES, "Global player-menu Back did not return Logbook to creature selection.", ) + logbook_page.call("_set_index_open", true, false) + logbook_page.set( + "_controller_zone", + LogbookPageType.ControllerZone.INDEX, + ) + _expect( + bool(menu.call("consume_escape")), + "Global player-menu Back did not consume the Logbook index zone.", + ) + _expect( + menu.visible and not bool(logbook_page.get("_index_open")), + "Global player-menu Back did not return from the Logbook index page.", + ) + _expect( + int(logbook_page.get("_controller_zone")) + == LogbookPageType.ControllerZone.TABS, + "Global player-menu Back did not return Logbook index focus to tabs.", + ) var net_page := menu.get("_the_net_page") as Control net_page.set("_active", true) diff --git a/tests/controller_ui_navigation_validation.gd b/tests/controller_ui_navigation_validation.gd index e1169f9..24f39f9 100644 --- a/tests/controller_ui_navigation_validation.gd +++ b/tests/controller_ui_navigation_validation.gd @@ -266,22 +266,22 @@ func _validate_four_by_three_centering() -> void: func _validate_low_end_profile_contract() -> void: var launcher: String = FileAccess.get_file_as_string( - "res://scripts/portmaster/NETfishing.sh" + "res://scripts/portmaster/straywild.sh" ) - assert(launcher.contains("NETFISHING_PERFORMANCE_PROFILE:-")) + assert(launcher.contains("straywild_PERFORMANCE_PROFILE:-")) assert(launcher.contains("$CONFDIR/performance_profile")) assert(launcher.contains("normal)")) assert(launcher.contains("light|\"\")")) - assert(launcher.contains("NETFISHING_PERFORMANCE_PROFILE=normal")) - assert(launcher.contains("NETFISHING_PERFORMANCE_PROFILE=light")) - assert(launcher.contains("NETFISHING_LOW_END=1")) + assert(launcher.contains("straywild_PERFORMANCE_PROFILE=normal")) + assert(launcher.contains("straywild_PERFORMANCE_PROFILE=light")) + assert(launcher.contains("straywild_LOW_END=1")) assert(launcher.contains("--max-fps 30")) assert(launcher.contains("--audio-output-latency 40")) var builder: String = FileAccess.get_file_as_string( "res://scripts/build_portmaster.sh" ) assert(builder.contains("prepare_portmaster_assets.sh")) - assert(builder.contains("netfishing-portmaster-export")) + assert(builder.contains("straywild-portmaster-export")) var asset_profile: String = FileAccess.get_file_as_string( "res://scripts/prepare_portmaster_assets.sh" ) diff --git a/tests/controller_world_interaction_validation.gd b/tests/controller_world_interaction_validation.gd index d9e77a5..3d684cb 100644 --- a/tests/controller_world_interaction_validation.gd +++ b/tests/controller_world_interaction_validation.gd @@ -23,13 +23,24 @@ func _run() -> void: bool(main.get("_application_initialized")), "application initialization failed", ) + var save_manager := main.get("_save_manager") as PlayerSaveManager + var world_layout: StringName = WorldLayout.GENERATED + var world_seed: int = PlayerSaveManager.DEFAULT_WORLD_SEED + _expect( + bool(main.call("_apply_world", world_layout, world_seed, true)), + "generated-world preparation failed", + ) + _expect( + bool(main.call("_prepare_host_world", world_layout, world_seed)), + "host-world preparation failed", + ) _expect( bool(main.call("_prepare_private_host")), "private host preparation failed", ) - var save_manager := main.get("_save_manager") as PlayerSaveManager _expect( - save_manager != null and save_manager.initialize_new_game(), + save_manager != null + and save_manager.initialize_new_game(world_seed, world_layout), "new-game initialization failed", ) main.call("_enter_gameplay") diff --git a/tests/dedicated_server_config_validation.gd b/tests/dedicated_server_config_validation.gd index 02a881d..2125220 100644 --- a/tests/dedicated_server_config_validation.gd +++ b/tests/dedicated_server_config_validation.gd @@ -15,7 +15,7 @@ func _initialize() -> void: func _run() -> void: var defaults := ConfigType.new() - defaults.set("data_directory", "/tmp/netfishing-server") + defaults.set("data_directory", "/tmp/straywild-server") defaults.call("_validate") assert(defaults.is_valid()) assert(not bool(defaults.get("public_listing"))) @@ -37,7 +37,7 @@ func _run() -> void: file.set_value("world", "seed", 928374) file.set_value("server", "public", true) file.set_value("server", "data_directory", "/tmp/configured-server") - file.set_value("discovery", "url", "https://discovery.netfishing.org/") + file.set_value("discovery", "url", "https://discovery.straywild.io/") file.set_value("privacy", "chat_logging", true) file.set_value( "privacy", @@ -59,7 +59,7 @@ func _run() -> void: assert(int(configured.get("max_players")) == 12) assert(int(configured.get("world_seed")) == 928374) assert(bool(configured.get("public_listing"))) - assert(str(configured.get("discovery_url")) == "https://discovery.netfishing.org") + assert(str(configured.get("discovery_url")) == "https://discovery.straywild.io") assert(bool(configured.get("chat_logging"))) assert( str(configured.get("chat_log_path")) diff --git a/tests/digging_prototype_validation.gd b/tests/digging_prototype_validation.gd index c19bf0b..95917a0 100644 --- a/tests/digging_prototype_validation.gd +++ b/tests/digging_prototype_validation.gd @@ -11,6 +11,15 @@ const Gatherables: GatherableCatalog = preload( "res://gathering/catalog/gatherable_catalog.tres" ) +class PrimaryTerrainProvider: + extends Node3D + + var primary_meshes: Array[MeshInstance3D] = [] + + + func get_primary_terrain_meshes() -> Array[MeshInstance3D]: + return primary_meshes + func _initialize() -> void: call_deferred("_run") @@ -20,6 +29,7 @@ func _run() -> void: _validate_catalog_content() _validate_flat_shovel() await _validate_beach_authoring() + _validate_primary_terrain_provider() print("Digging prototype validation: PASS") quit() @@ -81,6 +91,66 @@ func _validate_beach_authoring() -> void: region.queue_free() +func _validate_primary_terrain_provider() -> void: + var fixture := Node3D.new() + fixture.name = "PrimaryTerrainFixture" + root.add_child(fixture) + var provider := PrimaryTerrainProvider.new() + provider.name = "Provider" + fixture.add_child(provider) + var clear_sand := _flat_surface_triangle(0.0, 0.0, &"sand") + var covered_sand := _flat_surface_triangle(10.0, 0.0, &"sand") + var covering_grass := _flat_surface_triangle(10.0, 0.01, &"grass_lite") + for mesh_instance: MeshInstance3D in [ + clear_sand, + covered_sand, + covering_grass, + ]: + provider.add_child(mesh_instance) + provider.primary_meshes.append(mesh_instance) + var buried_base := _flat_surface_triangle(20.0, 0.0, &"sand") + buried_base.name = "BuriedSandBase" + provider.add_child(buried_base) + var area := DiggableArea3D.new() + area.name = "DiggableArea" + area.area_id = &"provider_test" + area.terrain_source = NodePath("../Provider") + area.surface_materials = [&"sand"] + area.generation_bounds = Rect2(-20.0, -20.0, 40.0, 40.0) + fixture.add_child(area) + var triangles := area.get_surface_triangles() + assert(triangles.size() == 2) + var clear_center := Vector3(1.0 / 3.0, 0.0, 1.0 / 3.0) + var covered_center := Vector3(10.0 + 1.0 / 3.0, 0.0, 1.0 / 3.0) + assert(area.is_surface_point_valid(clear_center)) + assert(not area.is_surface_point_valid(covered_center)) + fixture.free() + + +func _flat_surface_triangle( + x_offset: float, + height: float, + material_name: StringName, +) -> MeshInstance3D: + var arrays: Array = [] + arrays.resize(Mesh.ARRAY_MAX) + arrays[Mesh.ARRAY_VERTEX] = PackedVector3Array([ + Vector3(x_offset, height, 0.0), + Vector3(x_offset, height, 1.0), + Vector3(x_offset + 1.0, height, 0.0), + ]) + arrays[Mesh.ARRAY_INDEX] = PackedInt32Array([0, 1, 2]) + var mesh := ArrayMesh.new() + mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) + var material := StandardMaterial3D.new() + material.resource_name = str(material_name) + mesh.surface_set_material(0, material) + var mesh_instance := MeshInstance3D.new() + mesh_instance.name = "Primary%s" % str(material_name).capitalize() + mesh_instance.mesh = mesh + return mesh_instance + + func _collect_meshes( root_node: Node, result: Array[MeshInstance3D], diff --git a/tests/economy_regression_validation.gd b/tests/economy_regression_validation.gd index 9a53975..0728d82 100644 --- a/tests/economy_regression_validation.gd +++ b/tests/economy_regression_validation.gd @@ -31,9 +31,14 @@ func _run() -> void: for _frame: int in 8: await process_frame assert(bool(main.get("_application_initialized"))) + var session := main.get_node("%NetworkSession") as NetworkSession + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(bool(main.call("_prepare_private_host"))) var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game()) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) main.call("_enter_gameplay") for _frame: int in 8: await process_frame @@ -42,14 +47,13 @@ func _run() -> void: var catalog := main.get("fish_catalog") as FishPool var sale_service := main.get_node("%NetworkSaleService") as NetworkSaleService var shop_service := main.get_node("%NetworkShopService") as NetworkShopService - var session := main.get_node("%NetworkSession") as NetworkSession var reservations := ( main.get_node("%PlayerAssetReservationService") as PlayerAssetReservationService ) assert(player != null) assert(catalog != null and catalog.candidates.size() == 316) - assert(LogbookCatalog.ordered_species(catalog.candidates).size() == 63) + assert(LogbookCatalog.ordered_species(catalog.candidates).size() == 314) assert(sale_service != null) assert(shop_service != null) assert(session != null and session.is_host()) @@ -78,7 +82,7 @@ func _run() -> void: main, player, catalog, sale_service, reservations ) _test_host_backpack_purchase(player, shop_service) - _test_host_storage_purchase(player, shop_service) + await _test_host_home_upgrade(main, player, shop_service) assert(not sale_service.is_local_sale_pending()) assert(not shop_service.is_local_purchase_pending()) @@ -94,11 +98,15 @@ func _run() -> void: func _run_multiplayer_host() -> void: root.size = Vector2i(1280, 720) var main: Node = await _create_initialized_main() + var session := main.get_node("%NetworkSession") as NetworkSession + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(bool(main.call("_prepare_private_host"))) var save_manager := main.get("_save_manager") as PlayerSaveManager assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") - var session := main.get_node("%NetworkSession") as NetworkSession assert(session.set_host_open(true)) var client_connected := false # Loading the full client world can take longer on a cold import. Keep the @@ -126,7 +134,10 @@ func _run_multiplayer_host() -> void: var interaction := main.get("_shop_interaction") as FishingShopInteraction assert(interaction != null) remote_avatar.global_position = interaction.global_position - var completion_deadline: int = Time.get_ticks_msec() + 30000 + # The client can finish loading its local presentation well after the host + # has authenticated it, especially during a cold import. Keep the authority + # alive until the client completes the transaction sequence or disconnects. + var completion_deadline: int = Time.get_ticks_msec() + 90000 while Time.get_ticks_msec() < completion_deadline: await process_frame if session.get_authenticated_peer_ids().size() < 2: @@ -164,7 +175,6 @@ func _run_multiplayer_client() -> void: assert(player.inventory_layout.restore_backpack_level( PlayerInventoryLayout.MAX_BACKPACK_LEVEL )) - assert(player.cooler_capacity.restore_level(PlayerCoolerCapacity.MAX_LEVEL)) player.inventory.set_inventory_layout(null) var catch_ids: Array[StringName] = [] for fish: FishData in catalog.candidates: @@ -173,6 +183,9 @@ func _run_multiplayer_client() -> void: var fish_catch := _make_catch(fish) assert(player.inventory.add_catch(fish_catch)) catch_ids.append(fish_catch.catch_id) + if catch_ids.size() == NetworkSaleProtocol.MAX_CATCHES_PER_REQUEST: + break + assert(catch_ids.size() == NetworkSaleProtocol.MAX_CATCHES_PER_REQUEST) player.inventory.set_inventory_layout(player.inventory_layout) await create_timer(1.0).timeout _sale_result.clear() @@ -188,7 +201,6 @@ func _run_multiplayer_client() -> void: assert(not player.inventory.contains_catch_id(catch_id)) assert(not sale_service.is_local_sale_pending()) assert(player.inventory_layout.restore_backpack_level(0)) - assert(player.cooler_capacity.restore_level(0)) var interaction := main.get("_shop_interaction") as FishingShopInteraction player.global_position = interaction.global_position @@ -544,30 +556,58 @@ func _test_host_backpack_purchase( for expected_capacity: int in [18, 27, 36]: _shop_result.clear() assert(not shop_service.request_backpack_capacity_upgrade().is_empty()) - assert(not _shop_result.is_empty() and bool(_shop_result[1])) + assert( + not _shop_result.is_empty() and bool(_shop_result[1]), + "Backpack purchase failed: %s" % [_shop_result], + ) assert(layout.get_inventory_capacity() == expected_capacity) assert(player.wallet.get_balance() == balance_before - total_cost) assert(layout.get_next_backpack_cost() == -1) -func _test_host_storage_purchase( +func _test_host_home_upgrade( + main: Node, player: Player, shop_service: NetworkShopService, ) -> void: + var interaction := main.get( + "_rv_upgrade_shop_interaction" + ) as RVUpgradeInteraction + var home_state := main.get("_home_state") as PlayerHomeState var capacity := player.cooler_capacity + assert(interaction != null and home_state != null) + player.global_position = interaction.global_position + for _frame: int in 4: + await physics_frame + assert(interaction.is_avatar_in_range(player)) + assert(home_state.get_tier() == PlayerHomeState.STARTER_TIER) + assert( + interaction.get_dialogue_text(home_state.get_tier()) + == RVUpgradeInteraction.TENT_DIALOGUE_TEXT + ) assert(capacity.get_capacity() == 9) - var total_cost: int = 0 - for cost: int in PlayerCoolerCapacity.EXPANSION_COSTS: - total_cost += cost - if player.wallet.get_balance() < total_cost: - assert(player.wallet.credit(total_cost - player.wallet.get_balance())) + var upgrade_cost: int = home_state.get_next_upgrade_cost() + assert(upgrade_cost == PlayerHomeState.HOME_UPGRADE_COSTS.front()) + assert(upgrade_cost == 50) + if player.wallet.get_balance() < upgrade_cost: + assert(player.wallet.credit( + upgrade_cost - player.wallet.get_balance() + )) var balance_before := player.wallet.get_balance() - for expected_capacity: int in [18, 27, 36, 45, 54, 63, 72]: - _shop_result.clear() - assert(not shop_service.request_cooler_capacity_upgrade().is_empty()) - assert(not _shop_result.is_empty() and bool(_shop_result[1])) - assert(capacity.get_capacity() == expected_capacity) - assert(player.wallet.get_balance() == balance_before - total_cost) + _shop_result.clear() + assert(not shop_service.request_home_upgrade().is_empty()) + assert( + not _shop_result.is_empty() and bool(_shop_result[1]), + "Home purchase failed: %s" % [_shop_result], + ) + assert(home_state.get_tier() == PlayerHomeState.STARTER_RV_TIER) + assert( + interaction.get_dialogue_text(home_state.get_tier()) + == RVUpgradeInteraction.RV_DIALOGUE_TEXT + ) + assert(capacity.get_capacity() == 18) + assert(player.wallet.get_balance() == balance_before - upgrade_cost) + assert(home_state.get_next_upgrade_cost() == -1) assert(capacity.get_next_cost() == -1) @@ -961,12 +1001,21 @@ func _test_fishing_shop_sale_ui( reserved_catch.catch_id, ) assert(staged.is_empty()) - sell_inventory.call( - "_stage", - PlayerInventoryLayout.EntryKind.CATCH, - fish_catch.catch_id, + var sell_button := sell_inventory.get("_sell_button") as Button + var all_button := sell_inventory.get("_all_button") as Button + assert(sell_button != null and sell_button.text == "sell") + assert(all_button != null and all_button.text == "all") + assert(sell_button.get_parent() == all_button.get_parent()) + assert( + sell_button.size_flags_horizontal == Control.SIZE_EXPAND_FILL + and all_button.size_flags_horizontal == Control.SIZE_EXPAND_FILL ) + sell_inventory.call("_stage_all_eligible") assert(staged.has(PlayerInventoryLayout.catch_key(fish_catch.catch_id))) + assert(not staged.has( + PlayerInventoryLayout.catch_key(reserved_catch.catch_id) + )) + assert(all_button.disabled) assert((sell_inventory.get("_feedback") as Label).text.is_empty()) var source_grid := sell_inventory.get("_inventory_grid") as GeneralInventoryGrid var staged_source_found := false @@ -975,17 +1024,19 @@ func _test_fishing_shop_sale_ui( staged_source_found = bool(source_slot.get("_staged")) break assert(staged_source_found) + var expected_all_payout := int(sell_inventory.call("_calculate_total")) + assert(expected_all_payout >= fish_catch.sale_value) var feedback := sell_inventory.get("_feedback") as Label var total_label := sell_inventory.get("_total_label") as Label - var sell_button := sell_inventory.get("_sell_button") as Button + var sale_buttons := sell_button.get_parent() as HBoxContainer assert(feedback.get_index() < total_label.get_parent().get_index()) - assert(total_label.get_parent().get_index() < sell_button.get_index()) + assert(total_label.get_parent().get_index() < sale_buttons.get_index()) _sale_result.clear() sell_inventory.call("_submit_sale") await process_frame assert(not _sale_result.is_empty() and bool(_sale_result[1])) assert(not player.inventory.contains_catch_id(fish_catch.catch_id)) - assert(player.wallet.get_balance() == balance_before + fish_catch.sale_value) + assert(player.wallet.get_balance() == balance_before + expected_all_payout) assert(not sale_service.is_local_sale_pending()) assert(reservations.release(reservation_id)) await _activate_pointer_control(shop_tabs[0] as Button, ui_viewport) diff --git a/tests/fish_catalog_content_validation.gd b/tests/fish_catalog_content_validation.gd index fb5f9e4..82f5604 100644 --- a/tests/fish_catalog_content_validation.gd +++ b/tests/fish_catalog_content_validation.gd @@ -37,6 +37,26 @@ const PelicanBuyer = preload("res://economy/buyers/pelicans.tres") const StarterRegionScene = preload( "res://world/regions/starter_island_region.tscn" ) +const SharedFishPlaceholder: Texture2D = preload( + "res://art/exported/creatures/fish_placeholder.png" +) +const FINAL_CREATURE_CATALOG_NUMBERS: Array[int] = [ + 101, 102, 103, 104, 105, 106, 107, 201, 403, 701, 704, 801, + 802, 805, 806, 808, 2502, 2504, 2505, 2508, 2601, 2801, 2802, + 2803, 2804, 2806, 2807, 3002, 3102, 3103, 3104, 3107, 3201, + 3401, 3902, 3906, 4101, 4401, 4701, 5001, 5702, 5901, 5902, + 5903, 5904, 6001, 6103, 6406, 6601, 6801, 6804, 6807, 6901, + 6902, 6904, 6905, 7101, 7403, 7506, 7508, +] + +const ACTIVE_CATALOG_COUNT: int = 314 +const INACTIVE_CATALOG_COUNT: int = 2 +const FISHING_SPECIES_COUNT: int = 310 +const GENERATED_POND_COUNT: int = 33 +const GENERATED_LAKE_COUNT: int = 20 +const GENERATED_RIVER_COUNT: int = 53 +const STARTER_POND_COUNT: int = 106 +const OCEAN_COUNT: int = 204 const ORIGINAL_IDS: Array[StringName] = [ &"bluegill", &"bass", &"carp", &"sunfish", @@ -82,23 +102,6 @@ const NEW_FRESH_WATER_IDS: Array[StringName] = [ &"bowfin", &"sturgeon_lake", &"gar_longnose", &"paddlefish", &"sturgeon_shovelnose", &"gar_spotted", &"lungfish_west_african", ] -const GENERATED_POND_IDS: Array[StringName] = [ - &"bowfin", &"gar_spotted", &"lungfish_west_african", - &"catfish_channel", &"catfish_white", &"carp", - &"goldfish_bubbleeye", &"goldfish", &"bluegill", -] -const GENERATED_LAKE_IDS: Array[StringName] = [ - &"sturgeon_lake", &"trout_golden", &"chub_lake", &"saugeye", - &"walleye", &"goby_round", -] -const GENERATED_RIVER_IDS: Array[StringName] = [ - &"gar_longnose", &"paddlefish", &"sturgeon_shovelnose", - &"trout_cutthroat", &"trout_rainbow", &"catfish_blue", - &"catfish_flathead", &"chub_european", &"chub_flame", &"sauger", - &"trout_steelhead", -] - - func _initialize() -> void: call_deferred("_run") @@ -115,21 +118,35 @@ func _run() -> void: func _validate_generated_habitat_pools() -> void: - var expected_by_pool: Dictionary = { - GeneratedPondPool: GENERATED_POND_IDS, - GeneratedLakePool: GENERATED_LAKE_IDS, - GeneratedRiverPool: GENERATED_RIVER_IDS, + var expected_counts: Dictionary = { + GeneratedPondPool: GENERATED_POND_COUNT, + GeneratedLakePool: GENERATED_LAKE_COUNT, + GeneratedRiverPool: GENERATED_RIVER_COUNT, } - for pool: FishPoolType in expected_by_pool: - var expected_ids: Array[StringName] = expected_by_pool[pool] - assert(pool.candidates.size() == expected_ids.size()) - for fish_id: StringName in expected_ids: - var fish: FishDataType = Catalog.get_fish_by_id(fish_id) + var freshwater_ids: Dictionary[StringName, bool] = {} + for pool: FishPoolType in expected_counts: + assert(pool.candidates.size() == int(expected_counts[pool])) + for fish: FishDataType in pool.candidates: assert(fish != null and fish.is_fishable()) - assert(pool.get_fish_by_id(fish_id) == fish) + assert(not freshwater_ids.has(fish.id)) + freshwater_ids[fish.id] = true assert(fish.is_allowed_in_water(WaterType.Type.FRESH_WATER)) - assert(GeneratedPondPool.get_fish_by_id(&"pomfret_white") == null) - assert(GeneratedPondPool.get_fish_by_id(&"mackerel_atlantic") == null) + assert(freshwater_ids.size() == STARTER_POND_COUNT) + assert(PondPool.candidates.size() == STARTER_POND_COUNT) + for fish: FishDataType in PondPool.candidates: + assert(freshwater_ids.has(fish.id)) + assert(OceanPool.candidates.size() == OCEAN_COUNT) + var ocean_ids: Dictionary[StringName, bool] = {} + for fish: FishDataType in OceanPool.candidates: + assert(fish != null and fish.is_fishable()) + assert(not ocean_ids.has(fish.id)) + ocean_ids[fish.id] = true + assert(fish.is_allowed_in_water(WaterType.Type.SALT_WATER)) + for fish: FishDataType in Catalog.candidates: + if not fish.is_fishable(): + continue + assert(freshwater_ids.has(fish.id) != ocean_ids.has(fish.id)) + assert(freshwater_ids.size() + ocean_ids.size() == FISHING_SPECIES_COUNT) assert(GeneratedPondPool.get_fish_by_id(&"gar_longnose") == null) assert(GeneratedRiverPool.get_fish_by_id(&"gar_longnose") != null) assert(GeneratedRiverPool.get_fish_by_id(&"goby_round") == null) @@ -143,7 +160,7 @@ func _validate_weight_based_display_scale() -> void: continue assert(fish.is_selectable()) assert(fish.weight_min_lb > 0.0) - assert(fish.weight_max_lb <= 1000.0) + assert(fish.weight_max_lb <= 500000.0) var minimum_scale: float = fish.get_display_scale_for_weight( fish.weight_min_lb ) @@ -172,10 +189,13 @@ func _validate_weight_based_display_scale() -> void: func _validate_catalog_and_pools() -> void: assert(Catalog.candidates.size() == 316) - assert(PondPool.candidates.size() == 26) - assert(OceanPool.candidates.size() == 34) + assert(PondPool.candidates.size() == STARTER_POND_COUNT) + assert(OceanPool.candidates.size() == OCEAN_COUNT) var active_count: int = 0 var inactive_count: int = 0 + var fishing_count: int = 0 + var final_art_count: int = 0 + var placeholder_fishing_count: int = 0 var catalog_numbers: Dictionary[int, bool] = {} for fish: FishDataType in Catalog.candidates: assert(fish != null and not fish.id.is_empty()) @@ -193,9 +213,30 @@ func _validate_catalog_and_pools() -> void: else: inactive_count += 1 assert(not fish.is_selectable()) - assert(fish.display_texture == null) - assert(active_count == 63) - assert(inactive_count == 253) + if fish.catalog_number not in FINAL_CREATURE_CATALOG_NUMBERS: + assert(fish.display_texture == null) + if fish.catalog_number in FINAL_CREATURE_CATALOG_NUMBERS: + var expected_path := ( + "res://art/exported/creatures/%d.png" + % fish.catalog_number + ) + var expected_texture: Texture2D = load( + expected_path + ) as Texture2D + assert(expected_texture != null) + assert(fish.display_texture == expected_texture) + final_art_count += 1 + if fish.collection_method == FishDataType.CollectionMethod.FISHING: + fishing_count += 1 + assert(fish.active) + if fish.catalog_number not in FINAL_CREATURE_CATALOG_NUMBERS: + assert(fish.display_texture == SharedFishPlaceholder) + placeholder_fishing_count += 1 + assert(active_count == ACTIVE_CATALOG_COUNT) + assert(inactive_count == INACTIVE_CATALOG_COUNT) + assert(fishing_count == FISHING_SPECIES_COUNT) + assert(final_art_count == FINAL_CREATURE_CATALOG_NUMBERS.size()) + assert(placeholder_fishing_count == 253) var chum: FishDataType = Catalog.get_fish_by_id(&"salmon_chum") assert(chum != null) assert(chum.get_season_text() == "fall") @@ -233,12 +274,12 @@ func _validate_catalog_and_pools() -> void: ) == chum ) seasonal_collection.free() - var inactive_fish: FishDataType = Catalog.get_fish_by_id(&"mudskipper_atlantic") + var inactive_fish: FishDataType = Catalog.get_fish_by_id(&"crab_dungeness") assert(inactive_fish != null and not inactive_fish.active) var inactive_pool := FishPoolType.new() inactive_pool.candidates = [inactive_fish] var inactive_context := FishingContextType.new() - inactive_context.water_type = WaterType.Type.FRESH_WATER + inactive_context.water_type = WaterType.Type.SALT_WATER var inactive_collection := CollectionLogType.new() var inactive_selector := FishSelectorType.new() inactive_selector.use_deterministic_test_seed = true @@ -424,11 +465,15 @@ func _validate_authoritative_water_filter() -> void: ocean_region.location_tags = [&"coast", &"ocean"] var stale_salt_pool_region := FishableWaterRegion.new() stale_salt_pool_region.water_type = WaterType.Type.FRESH_WATER - stale_salt_pool_region.fish_pool = OceanPool + var salt_only_pool := FishPoolType.new() + salt_only_pool.candidates = [Catalog.get_fish_by_id(&"bass")] + stale_salt_pool_region.fish_pool = salt_only_pool stale_salt_pool_region.location_tags = [&"starter_pond"] var stale_fresh_pool_region := FishableWaterRegion.new() stale_fresh_pool_region.water_type = WaterType.Type.SALT_WATER - stale_fresh_pool_region.fish_pool = PondPool + var fresh_only_pool := FishPoolType.new() + fresh_only_pool.candidates = [Catalog.get_fish_by_id(&"bluegill")] + stale_fresh_pool_region.fish_pool = fresh_only_pool stale_fresh_pool_region.location_tags = [&"coast", &"ocean"] var evidence := {"discovered_fish_ids": []} assert( diff --git a/tests/fish_hotbar_showcase_validation.gd b/tests/fish_hotbar_showcase_validation.gd index 9421816..af3644b 100644 --- a/tests/fish_hotbar_showcase_validation.gd +++ b/tests/fish_hotbar_showcase_validation.gd @@ -56,7 +56,7 @@ func _run() -> void: ) fish_catch.ensure_identity() player.inventory.add_catch(fish_catch) - player.collection_log.mark_quality_discovered( + player.collection_log.record_catch( fish_catch.fish_id, fish_catch.quality, ) @@ -104,7 +104,10 @@ func _run() -> void: var hotbar_data: Dictionary = parsed["hotbar"] assert(typeof(hotbar_data.get("fish_slots")) == TYPE_ARRAY) assert(str((hotbar_data["fish_slots"] as Array)[1]) == fish_catch.catch_id) - assert(int(parsed["save_version"]) == 10) + assert(int(parsed["save_version"]) == 11) + assert(not PlayerHomeState.sanitize_save_data( + parsed.get("home", {}) + ).is_empty()) assert( int(parsed["experience"]["total_experience"]) == 125 @@ -132,6 +135,19 @@ func _run() -> void: int(saved_masks[String(fish.id)]) == FishQuality.bit_for(FishQuality.Tier.EXCEPTIONAL) ) + var saved_catch_counts: Dictionary = ( + (parsed as Dictionary)["collection"]["catch_counts"] + ) + assert(int(saved_catch_counts[String(fish.id)]) == 1) + var legacy_without_counts: Dictionary = parsed.duplicate(true) + (legacy_without_counts["collection"] as Dictionary).erase("catch_counts") + var legacy_snapshot: RefCounted = save_manager.call( + "_build_load_snapshot", + legacy_without_counts, + ) + assert(legacy_snapshot != null) + var recovered_counts: Dictionary = legacy_snapshot.get("catch_counts") + assert(int(recovered_counts.get(fish.id, 0)) == 1) assert(player.hotbar.clear_slot(1)) assert(player.experience.restore_total_experience(0)) @@ -159,6 +175,7 @@ func _run() -> void: FishQuality.Tier.EXCEPTIONAL, ) ) + assert(player.collection_log.get_catch_count(fish.id) == 1) assert(service.is_local_showcase_visible()) await _wait_for_held_fish_visibility(player, true) assert(player.inventory.remove_catch_by_id(fish_catch.catch_id) != null) @@ -183,8 +200,8 @@ func _run() -> void: var invalid_state: Dictionary = valid_state.duplicate(true) invalid_state["display_scale"] = 1000.0 assert(not NetworkFishShowcaseProtocol.validate_state(invalid_state)) - assert(NetworkProtocol.PROTOCOL_VERSION == 9) - assert(NetworkProtocol.ENET_CHANNEL_COUNT == 10) + assert(NetworkProtocol.PROTOCOL_VERSION == 12) + assert(NetworkProtocol.ENET_CHANNEL_COUNT == 18) assert( NetworkProtocol.FISH_QUALITY_CAPABILITY == "fish_quality_v1" diff --git a/tests/fish_quality_validation.gd b/tests/fish_quality_validation.gd index 9c5d338..99a2169 100644 --- a/tests/fish_quality_validation.gd +++ b/tests/fish_quality_validation.gd @@ -25,13 +25,60 @@ func _run() -> void: _validate_mail_round_trip() _validate_collection_mastery() _validate_version_four_migration() - assert(NetworkProtocol.PROTOCOL_VERSION == 9) - assert(NetworkProtocol.ENET_CHANNEL_COUNT == 10) + _validate_fishing_protocol_v2() + assert(NetworkProtocol.PROTOCOL_VERSION == 12) + assert(NetworkProtocol.ENET_CHANNEL_COUNT == 18) + assert(NetworkProtocol.MOVEMENT_ANIMATION_CHANNEL == 11) + assert( + NetworkProtocol.MOVEMENT_RECONCILIATION_CAPABILITY + == "movement_reconciliation_v2" + ) + assert( + NetworkProtocol.FISHING_REPLICATION_CAPABILITY + == "fishing_replication_v2" + ) assert(NetworkProtocol.FISH_QUALITY_CAPABILITY == "fish_quality_v1") print("Fish quality validation: PASS") quit() +func _validate_fishing_protocol_v2() -> void: + var request: Dictionary = { + "request_id": "cast-1", + "session_id": "session-1", + "origin": [0.0, 1.0, 0.0], + "target": [0.0, 0.0, -4.0], + "charge": 0.5, + "rod_id": "basic_fishing_rod", + "reel_speed": 0.2, + "barrier_damage": 1, + "bite_multiplier": 1.0, + "rarity_multipliers": [], + "discovered_fish_ids": [], + "capacity_available": true, + "movement_sequence": 17, + } + assert(NetworkFishingProtocol.validate_cast_request(request).is_empty()) + var missing_sequence: Dictionary = request.duplicate(true) + missing_sequence.erase("movement_sequence") + assert( + NetworkFishingProtocol.validate_cast_request(missing_sequence) + == "Malformed fishing request." + ) + var invalid_sequence: Dictionary = request.duplicate(true) + invalid_sequence["movement_sequence"] = -1 + assert( + NetworkFishingProtocol.validate_cast_request(invalid_sequence) + == "Fishing request values are outside allowed limits." + ) + assert(NetworkFishingProtocol.OBSERVER_SNAPSHOT_CHANNEL == 10) + assert(NetworkWorldSpawnProtocol.SNAPSHOT_CHANNEL == 15) + assert( + NetworkWorldSpawnProtocol.SNAPSHOT_CHANNEL + != NetworkFishingProtocol.SNAPSHOT_CHANNEL + ) + + func _validate_tiers_and_distribution() -> void: assert(FishQualityType.TIER_COUNT == 5) assert(FishQualityType.display_name(0) == "boring") @@ -194,7 +241,7 @@ func _validate_barrier_challenge_curve() -> void: func _validate_fight_pacing_and_reel_upgrades() -> void: assert(is_equal_approx(CatchController.CHASE_SPEED, 0.07)) - assert(is_equal_approx(CatchController.CHASE_START_DELAY, 1.0)) + assert(is_equal_approx(CatchController.CHASE_START_DELAY, 1.5)) assert(is_equal_approx(CatchController.CHASE_START_OFFSET, 0.04)) assert(is_equal_approx(Player.BASE_REEL_SPEED, 0.16)) @@ -401,6 +448,11 @@ func _validate_collection_mastery() -> void: collection.get_quality_mask(&"bluegill") == FishQualityType.ALL_TIERS_MASK ) + assert(collection.get_catch_count(&"bluegill") == 0) + collection.record_catch(&"bluegill", FishQualityType.Tier.BORING) + collection.record_catch(&"bluegill", FishQualityType.Tier.SHINY) + assert(collection.get_catch_count(&"bluegill") == 2) + assert(int(collection.get_catch_counts()[&"bluegill"]) == 2) collection.queue_free() @@ -433,7 +485,7 @@ func _validate_version_four_migration() -> void: version_four, 4, ) - assert(int(migrated.get("save_version", -1)) == 10) + assert(int(migrated.get("save_version", -1)) == 11) assert(int((migrated["experience"] as Dictionary)["total_experience"]) == 0) assert( is_equal_approx( @@ -457,4 +509,7 @@ func _validate_version_four_migration() -> void: assert( PlayerJobService.validate_save_data(migrated.get("jobs", {})) ) + assert(not PlayerHomeState.sanitize_save_data( + migrated.get("home", {}) + ).is_empty()) manager.queue_free() diff --git a/tests/fish_showcase_multiplayer_validation.gd b/tests/fish_showcase_multiplayer_validation.gd index 72f4a59..5161377 100644 --- a/tests/fish_showcase_multiplayer_validation.gd +++ b/tests/fish_showcase_multiplayer_validation.gd @@ -24,6 +24,10 @@ func _run() -> void: func _run_host() -> void: var main: Node = await _create_initialized_main() var session := main.get_node("%NetworkSession") as NetworkSession + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) var save_manager := main.get("_save_manager") as PlayerSaveManager assert(save_manager.initialize_new_game()) diff --git a/tests/fishing_authority_validation.gd b/tests/fishing_authority_validation.gd index 1f40086..b3c17dd 100644 --- a/tests/fishing_authority_validation.gd +++ b/tests/fishing_authority_validation.gd @@ -19,6 +19,12 @@ func _run() -> void: for _frame: int in 8: await process_frame assert(bool(main.get("_application_initialized"))) + assert(bool(main.call( + "_apply_world", + WorldLayout.GENERATED, + PlayerSaveManager.DEFAULT_WORLD_SEED, + true, + ))) assert(bool(main.call("_prepare_private_host"))) var save_manager := main.get("_save_manager") as PlayerSaveManager assert(save_manager.initialize_new_game()) @@ -151,9 +157,16 @@ func _run() -> void: attempt = attempts.get(session.get_local_peer_id()) assert(attempt != null) assert(player.bag.get_quantity(&"worms") == bait_quantity_before) + var fishing_priority_transitions: Array[bool] = [] + fishing_spot.fishing_input_priority_changed.connect( + func(active: bool) -> void: + fishing_priority_transitions.append(active) + ) service.call("_start_bite", attempt) await process_frame assert(attempt.phase == NetworkFishingAttempt.Phase.FIGHTING) + assert(fishing_spot.is_fishing_input_priority_active()) + assert(fishing_priority_transitions == [true]) assert(player.bag.get_quantity(&"worms") == bait_quantity_before - 1) var catalog: FishPool = main.get("fish_catalog") as FishPool assert(catalog != null) @@ -200,6 +213,7 @@ func _run() -> void: service.call("_on_attempt_escaped", session.get_local_peer_id()) await process_frame assert(not service.has_local_attempt()) + assert(fishing_spot.is_fishing_input_priority_active()) assert(fishing_status.text.is_empty()) assert(not fishing_status.visible) assert(not fishing_panel.visible) @@ -210,6 +224,8 @@ func _run() -> void: ): await process_frame assert(fishing_spot.state == FishingSpotType.FishingState.READY) + assert(not fishing_spot.is_fishing_input_priority_active()) + assert(fishing_priority_transitions == [true, false]) # Leaving a session during the cast presentation must release every local # action and equipment lock. This is the same cleanup path used by an @@ -249,6 +265,15 @@ func _run() -> void: assert(bool(water_recovery.get("_prior_movement_enabled"))) assert(bool(water_recovery.get("_prior_camera_input_enabled"))) assert(not pause_menu.visible) + var test_world := main.get_node("TestWorld") as TestWorld + assert(test_world != null) + var recovery_entry := water_recovery.get("_entry_position") as Vector3 + var resolved_recovery := water_recovery.call( + "_resolve_recovery_position" + ) as Vector3 + assert(resolved_recovery.is_equal_approx( + test_world.get_water_recovery_position(recovery_entry) + )) water_recovery.call("_finish_recovery") assert(player.is_movement_enabled()) diff --git a/tests/fishing_multiplayer_validation.gd b/tests/fishing_multiplayer_validation.gd index 73de1bd..9d7ef7f 100644 --- a/tests/fishing_multiplayer_validation.gd +++ b/tests/fishing_multiplayer_validation.gd @@ -63,12 +63,38 @@ func _run_host() -> void: var spawn_service := main.get_node( "%PlayerSpawnService" ) as PlayerSpawnService + var network_home := main.get_node( + "%NetworkHomeService" + ) as NetworkHomeService + var home_world := main.get_node("%HomeWorldService") as HomeWorldService var remote_avatar: Player = spawn_service.get_avatar(remote_peer_id) assert(remote_avatar != null) assert(remote_avatar.bag.get_quantity(&"worms") == 0) - remote_avatar.global_position = Vector3(-0.5, 3.95, 2.1) - var remote_visuals := remote_avatar.get_node("Visuals") as Node3D - remote_visuals.rotation.y = PI * 0.5 + var remote_record := session.get_peer_record(remote_peer_id) + assert(remote_record != null) + assert(await _wait_for_home( + network_home, remote_record.identity_fingerprint + )) + var exterior_spawn: Transform3D = home_world.get_exterior_spawn_transform( + remote_record.identity_fingerprint + ) + var exterior_deadline: int = Time.get_ticks_msec() + 5000 + while ( + Time.get_ticks_msec() < exterior_deadline + and remote_avatar.global_position.distance_to(exterior_spawn.origin) > 0.25 + ): + await physics_frame + assert(remote_avatar.global_position.distance_to(exterior_spawn.origin) <= 0.25) + # Give the client enough local frames to observe the initial RV-door spawn + # before this test publishes its separate fishing-position teleport. + for _frame: int in 30: + await physics_frame + var cast_setup: Dictionary = await _find_clear_fishing_setup( + main, remote_avatar + ) + assert(not cast_setup.is_empty(), "no clear fishing setup was found") + var expected_position: Vector3 = cast_setup["position"] + var expected_direction: Vector3 = cast_setup["direction"] session.publish_authoritative_teleport(remote_peer_id) var aiming_deadline: int = Time.get_ticks_msec() + 15000 while ( @@ -82,7 +108,7 @@ func _run_host() -> void: == Player.FishingVisualPhase.CASTING ) var remote_position_error := ( - remote_avatar.global_position - Vector3(-0.5, 3.95, 2.1) + remote_avatar.global_position - expected_position ) remote_position_error.y = 0.0 assert( @@ -90,7 +116,7 @@ func _run_host() -> void: "remote casting position drifted: %s" % remote_avatar.global_position ) assert( - remote_avatar.get_facing_direction().dot(Vector3.LEFT) > 0.99, + remote_avatar.get_facing_direction().dot(expected_direction) > 0.99, "remote casting facing drifted: %s" % remote_avatar.get_facing_direction() ) @@ -196,6 +222,23 @@ func _run_client() -> void: joined = true break assert(joined) + var network_home := main.get_node( + "%NetworkHomeService" + ) as NetworkHomeService + var home_world := main.get_node("%HomeWorldService") as HomeWorldService + var local_fingerprint: String = session.get_local_identity_fingerprint() + assert(await _wait_for_home(network_home, local_fingerprint)) + var player := main.get("_player") as Player + var exterior_spawn: Transform3D = ( + home_world.get_exterior_spawn_transform(local_fingerprint) + ) + var home_spawn_deadline: int = Time.get_ticks_msec() + 5000 + while ( + Time.get_ticks_msec() < home_spawn_deadline + and player.global_position.distance_to(exterior_spawn.origin) > 0.25 + ): + await physics_frame + assert(player.global_position.distance_to(exterior_spawn.origin) <= 0.25) var service := main.get_node( "%NetworkFishingService" @@ -206,7 +249,6 @@ func _run_client() -> void: cast_rejections.append(message) ) var fishing_spot := main.get_node("%FishingSpot") as FishingSpotType - var player := main.get("_player") as Player var item_catalog := main.get("item_catalog") as ItemCatalog var worms: ItemData = item_catalog.get_item_by_id(&"worms") if player.bag.get_quantity(&"worms") == 0: @@ -217,15 +259,20 @@ func _run_client() -> void: "Visuals/CharacterRig/AnimationPlayer" ) as AnimationPlayer assert(character_animation_player.has_animation(&"retract_sit")) - var placement_deadline: int = Time.get_ticks_msec() + 5000 + # The host chooses and publishes a clear target after both RV manifests have + # settled. Waiting for that authoritative teleport also coordinates the + # animation-observation window between these two independent processes. + var placement_deadline: int = Time.get_ticks_msec() + 10000 while ( Time.get_ticks_msec() < placement_deadline - and player.global_position.distance_to(Vector3(-0.5, 3.95, 2.1)) - > 0.25 + and player.global_position.distance_to(exterior_spawn.origin) <= 1.0 ): await physics_frame - assert(player.global_position.distance_to(Vector3(-0.5, 3.95, 2.1)) <= 0.25) - assert(player.get_facing_direction().dot(Vector3.LEFT) > 0.99) + assert(player.global_position.distance_to(exterior_spawn.origin) > 1.0) + for _frame: int in 2: + await physics_frame + var expected_position: Vector3 = player.global_position + var expected_direction: Vector3 = player.get_facing_direction() player.set_casting_visual() assert( @@ -241,7 +288,10 @@ func _run_client() -> void: assert(player.is_sitting()) for _frame: int in 15: await physics_frame + assert(fishing_spot.state == FishingSpotType.FishingState.READY) + assert(fishing_spot.get("_active_player") == null) fishing_spot.call("_begin_aiming", player) + assert(fishing_spot.state == FishingSpotType.FishingState.AIMING_CAST) assert(player.is_movement_enabled()) assert( int(player.get("_fishing_visual_phase")) @@ -250,6 +300,7 @@ func _run_client() -> void: var cast_charge: float = 0.0 var target: Vector3 = Vector3.ZERO var cast_origin: Vector3 = fishing_spot.get("_cast_origin_position") + var target_diagnostics: Array[String] = [] for charge_step: int in range(1, 21): var candidate_charge := float(charge_step) / 20.0 fishing_spot.set("_cast_charge", candidate_charge) @@ -258,14 +309,33 @@ func _run_client() -> void: var candidate_surface := fishing_spot.get( "_aim_surface_sample" ) as FishingSurfaceSample + target_diagnostics.append( + "charge=%.2f surface=%s path=%s target=%s" % [ + candidate_charge, + candidate_surface.is_fishable(), + fishing_spot.get("_cast_path_is_clear"), + candidate_target, + ] + ) if ( candidate_surface.is_fishable() - and fishing_spot.is_cast_path_clear(cast_origin, candidate_target) + and bool(fishing_spot.get("_cast_path_is_clear")) ): cast_charge = candidate_charge target = candidate_target break - assert(cast_charge > 0.0, "no clear fishable test target was found") + assert( + cast_charge > 0.0, + ( + "no clear fishable test target was found; position=%s facing=%s " + + "expected=%s diagnostics=%s" + ) % [ + player.global_position, + player.get_facing_direction(), + expected_direction, + target_diagnostics, + ], + ) var evidence: Dictionary = fishing_spot.call("_build_network_evidence") fishing_spot.set("state", FishingSpotType.FishingState.CASTING) player.set_movement_enabled(false) @@ -388,3 +458,79 @@ func _create_initialized_main() -> Node: await process_frame assert(bool(main.get("_application_initialized"))) return main + + +func _wait_for_home( + network_home: NetworkHomeService, + fingerprint: String, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + var manifests: Dictionary = network_home.get( + "_manifests_by_fingerprint" + ) + if manifests.has(fingerprint): + return true + return false + + +func _find_clear_fishing_setup(main: Node, player: Player) -> Dictionary: + var world := main.get_node("TestWorld") as TestWorld + var fishing_spot := main.get_node("%FishingSpot") as FishingSpotType + var regions: Array[FishableWaterRegion] = world.get_fishable_water_regions() + for region: FishableWaterRegion in regions: + var body := region.get_parent() as WaterBodyAuthoring + if body == null or body.surface_size.x <= 0.0 or body.surface_size.y <= 0.0: + continue + var center: Vector3 = region.global_position + var half_size: Vector2 = body.surface_size * 0.5 + var candidate_offsets: Array[Vector3] = [ + Vector3(half_size.x + 0.8, 0.0, 0.0), + Vector3(-half_size.x - 0.8, 0.0, 0.0), + Vector3(0.0, 0.0, half_size.y + 0.8), + Vector3(0.0, 0.0, -half_size.y - 0.8), + ] + for offset: Vector3 in candidate_offsets: + var position := Vector3( + center.x + offset.x, + region.get_surface_height() + 1.44, + center.z + offset.z, + ) + var direction: Vector3 = center - position + direction.y = 0.0 + direction = direction.normalized() + player.global_position = position + var visuals := player.get_node("Visuals") as Node3D + visuals.global_rotation.y = atan2(-direction.x, -direction.z) + for _frame: int in 2: + await physics_frame + var cast_origin: Vector3 = player.get_cast_origin_position() + var launch_position: Vector3 = player.get_fishing_rod_tip().global_position + for charge_step: int in range(1, 21): + var cast_charge := float(charge_step) / 20.0 + var cast_distance := lerpf( + fishing_spot.minimum_cast_distance, + fishing_spot.maximum_cast_distance, + cast_charge, + ) + var query_position := cast_origin + direction * cast_distance + var sample: FishingSurfaceSample = ( + fishing_spot.resolve_fishing_surface( + query_position, cast_origin.y + ) + ) + var target: Vector3 = sample.get_bobber_position( + fishing_spot.solid_bobber_clearance + ) + if ( + sample.is_fishable() + and fishing_spot.is_cast_path_clear( + launch_position, target + ) + ): + return { + "position": player.global_position, + "direction": direction, + } + return {} diff --git a/tests/fishing_surface_validation.gd b/tests/fishing_surface_validation.gd index a6724a8..8248c36 100644 --- a/tests/fishing_surface_validation.gd +++ b/tests/fishing_surface_validation.gd @@ -156,6 +156,7 @@ func _validate_portable_water_body() -> void: PlayerWaterTrigger.EntryHeightReference.PLAYER_ORIGIN, ) water_body.set("recovery_entry_depth_threshold", 0.1) + water_body.set("recovery_entry_confirmation_seconds", 0.2) water_body.set("fish_pool", PondPool) root.add_child(water_body) await process_frame @@ -183,6 +184,34 @@ func _validate_portable_water_body() -> void: == PlayerWaterTrigger.EntryHeightReference.PLAYER_ORIGIN ) assert(is_equal_approx(recovery_region.entry_depth_threshold, 0.1)) + assert(is_equal_approx(recovery_region.entry_confirmation_seconds, 0.2)) + + var recovery_player := PlayerScene.instantiate() as Player + assert(recovery_player != null) + root.add_child(recovery_player) + recovery_player.set_process(false) + recovery_player.set_physics_process(false) + var recovery_requests: Array[float] = [] + recovery_region.recovery_requested.connect( + func(_player: Player, requested_surface_height: float) -> void: + recovery_requests.append(requested_surface_height) + ) + recovery_region.call("_on_body_entered", recovery_player) + recovery_player.global_position.y = 6.8 + recovery_region.call("_physics_process", 0.1) + assert(recovery_requests.is_empty()) + # Breaking the submersion resets confirmation rather than carrying a stale + # partial fall into a later jump. + recovery_player.global_position.y = 7.0 + recovery_region.call("_physics_process", 0.1) + recovery_player.global_position.y = 6.8 + recovery_region.call("_physics_process", 0.11) + assert(recovery_requests.is_empty()) + recovery_region.call("_physics_process", 0.1) + assert(recovery_requests == [7.0]) + recovery_region.call("_on_body_exited", recovery_player) + recovery_player.queue_free() + await process_frame water_body.queue_free() await process_frame @@ -490,7 +519,7 @@ func _validate_remote_presentation() -> void: await process_frame var origin: Vector3 = player.get_fishing_rod_tip().global_position var target: Vector3 = origin + Vector3(-4.0, -0.5, 0.0) - presentation.show_cast(origin, target) + presentation.show_cast(origin, target, "cast-attempt") var bobber := presentation.get("_bobber") as MeshInstance3D assert(bobber.visible) assert(presentation.get("_cast_tween") != null) @@ -500,6 +529,22 @@ func _validate_remote_presentation() -> void: await create_timer(0.2).timeout assert(not is_equal_approx(bobber.global_position.y, first_bob_y)) + # A client joining after the reliable cast event reconstructs the current + # remote fishing state from the observer summary instead of waiting for the + # next cast. This also covers a bite/fighting transition received by an + # already active observer. + presentation.cleanup() + presentation.synchronize_active("late-attempt", target, false) + assert(bobber.visible) + assert( + int(player.get("_fishing_visual_phase")) + == Player.FishingVisualPhase.FISHING + ) + presentation.synchronize_active("late-attempt", target, true) + assert(bool(player.get("_fighting_visual_active"))) + presentation.synchronize_active("late-attempt", target, false) + assert(not bool(player.get("_fighting_visual_active"))) + var fish_catch := FishCatchType.new() var fish: FishData = PondPool.candidates.front() fish_catch.fish = fish diff --git a/tests/friend_multiplayer_validation.gd b/tests/friend_multiplayer_validation.gd new file mode 100644 index 0000000..f8ef64d --- /dev/null +++ b/tests/friend_multiplayer_validation.gd @@ -0,0 +1,161 @@ +extends SceneTree + +const MainScene: PackedScene = preload("res://main/main.tscn") +const TEST_PORT: int = 18196 + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var arguments := OS.get_cmdline_user_args() + if arguments.has("host"): + await _run_host() + return + if arguments.has("client"): + await _run_client() + return + push_error("Friend multiplayer validation needs host or client mode.") + quit(1) + + +func _run_host() -> void: + var main := await _create_initialized_main() + var session := main.get_node("%NetworkSession") as NetworkSession + var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) + assert(session.start_private_host(TEST_PORT)) + assert(save_manager.initialize_new_game()) + main.call("_enter_gameplay") + for _frame: int in 4: + await physics_frame + assert(session.set_host_open(true)) + + var remote_peer_id := await _wait_for_remote_peer(session) + assert(remote_peer_id > 1) + assert(session.peer_supports_capability( + remote_peer_id, NetworkProtocol.FRIENDS_CAPABILITY + )) + var remote_record := session.get_peer_record(remote_peer_id) + assert(remote_record != null) + var game_ui := main.get_node("%GameUI") as GameUI + var prompt_deadline := Time.get_ticks_msec() + 8000 + while ( + Time.get_ticks_msec() < prompt_deadline + and not game_ui.is_social_prompt_open() + ): + await process_frame + assert(game_ui.is_social_prompt_open()) + await create_timer(0.15).timeout + game_ui.call("_accept_social_prompt") + + var relationships := main.get_node( + "%PlayerRelationshipStore" + ) as PlayerRelationshipStore + var accepted_deadline := Time.get_ticks_msec() + 8000 + while ( + Time.get_ticks_msec() < accepted_deadline + and not relationships.is_friend(remote_record.identity_fingerprint) + ): + await process_frame + assert(relationships.is_friend(remote_record.identity_fingerprint)) + var friend := relationships.get_friend_record( + remote_record.identity_fingerprint + ) + assert(not str(friend.get("remote_presence_channel", "")).is_empty()) + assert(not str(friend.get("remote_invite_token", "")).is_empty()) + + var disconnect_deadline := Time.get_ticks_msec() + 8000 + while ( + Time.get_ticks_msec() < disconnect_deadline + and session.is_authenticated_peer(remote_peer_id) + ): + await process_frame + assert(not session.is_authenticated_peer(remote_peer_id)) + print("Friend multiplayer host validation: PASS") + await _cleanup(main, session) + + +func _run_client() -> void: + var main := await _create_initialized_main() + main.call( + "_on_title_join_game_requested", + "127.0.0.1:%d" % TEST_PORT, + ) + var session := main.get_node("%NetworkSession") as NetworkSession + var join_deadline := Time.get_ticks_msec() + 20000 + while Time.get_ticks_msec() < join_deadline: + await process_frame + if session.state == NetworkSession.State.VERIFYING_SERVER_IDENTITY: + main.call("_confirm_server_trust") + if session.is_joined_client() and bool(main.get("_gameplay_started")): + break + assert(session.is_joined_client()) + assert(session.supports_server_capability( + NetworkProtocol.FRIENDS_CAPABILITY + )) + var host_record := session.get_peer_record(1) + assert(host_record != null) + var service := main.get_node( + "%NetworkPlayerListService" + ) as NetworkPlayerListService + assert(service.send_friend_request( + 1, + host_record.identity_fingerprint, + host_record.display_name, + )) + + var relationships := main.get_node( + "%PlayerRelationshipStore" + ) as PlayerRelationshipStore + var accepted_deadline := Time.get_ticks_msec() + 8000 + while ( + Time.get_ticks_msec() < accepted_deadline + and not relationships.is_friend(host_record.identity_fingerprint) + ): + await process_frame + assert(relationships.is_friend(host_record.identity_fingerprint)) + var friend := relationships.get_friend_record( + host_record.identity_fingerprint + ) + assert(not str(friend.get("remote_presence_channel", "")).is_empty()) + assert(not str(friend.get("remote_invite_token", "")).is_empty()) + print("Friend multiplayer client validation: PASS") + await _cleanup(main, session) + + +func _create_initialized_main() -> Node: + root.size = Vector2i(1280, 720) + var main := MainScene.instantiate() + root.add_child(main) + for _frame: int in 4: + await process_frame + if not bool(main.get("_application_initialized")): + main.call("_activate_selected_data_path", "", true) + for _frame: int in 8: + await process_frame + assert(bool(main.get("_application_initialized"))) + return main + + +func _wait_for_remote_peer(session: NetworkSession) -> int: + var deadline := Time.get_ticks_msec() + 20000 + while Time.get_ticks_msec() < deadline: + await process_frame + for peer_id: int in session.get_authenticated_peer_ids(): + if peer_id != session.get_local_peer_id(): + return peer_id + return 0 + + +func _cleanup(main: Node, session: NetworkSession) -> void: + session.disconnect_session("") + main.queue_free() + for _frame: int in 4: + await process_frame + await create_timer(0.1).timeout + quit() diff --git a/tests/friend_multiplayer_validation.gd.uid b/tests/friend_multiplayer_validation.gd.uid new file mode 100644 index 0000000..d243a6b --- /dev/null +++ b/tests/friend_multiplayer_validation.gd.uid @@ -0,0 +1 @@ +uid://cxltqyom4yt3j diff --git a/tests/friend_relationship_validation.gd b/tests/friend_relationship_validation.gd new file mode 100644 index 0000000..ce6bd90 --- /dev/null +++ b/tests/friend_relationship_validation.gd @@ -0,0 +1,76 @@ +extends SceneTree + +const FRIEND_FINGERPRINT := ( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +) + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var data_root := PlayerDataRoot.new() + root.add_child(data_root) + var portable_path := ProjectSettings.globalize_path( + "user://friend-relationship-validation" + ) + var created := data_root.create_unbound_root(portable_path) + assert(bool(created.get("ok", false))) + assert(data_root.activate_process_root(portable_path)) + + var store := PlayerRelationshipStore.new() + root.add_child(store) + store.configure_storage( + data_root.path_for(&"player_relationships"), data_root + ) + var local_capabilities := store.create_friend_capabilities() + var remote_capabilities := store.create_friend_capabilities() + assert(not local_capabilities.is_empty()) + assert(not remote_capabilities.is_empty()) + assert(store.add_friend( + FRIEND_FINGERPRINT, + "Pond Friend", + local_capabilities, + { + "presence_channel": remote_capabilities["presence_channel"], + "invite_token": remote_capabilities["invite_token"], + }, + )) + assert(store.is_friend(FRIEND_FINGERPRINT)) + + var reloaded := PlayerRelationshipStore.new() + root.add_child(reloaded) + reloaded.configure_storage( + data_root.path_for(&"player_relationships"), data_root + ) + assert(reloaded.is_friend(FRIEND_FINGERPRINT)) + var friend := reloaded.get_friend_record(FRIEND_FINGERPRINT) + assert( + str(friend["remote_presence_channel"]) + == str(remote_capabilities["presence_channel"]) + ) + assert( + str(friend["remote_invite_token"]) + == str(remote_capabilities["invite_token"]) + ) + assert(reloaded.set_blocked(FRIEND_FINGERPRINT, "Pond Friend", true)) + assert(reloaded.is_blocked(FRIEND_FINGERPRINT)) + assert(reloaded.is_muted(FRIEND_FINGERPRINT)) + assert(not reloaded.is_friend(FRIEND_FINGERPRINT)) + assert(reloaded.set_blocked(FRIEND_FINGERPRINT, "Pond Friend", false)) + assert(not reloaded.is_blocked(FRIEND_FINGERPRINT)) + assert(not reloaded.is_muted(FRIEND_FINGERPRINT)) + assert(not reloaded.is_friend(FRIEND_FINGERPRINT)) + + var hello := NetworkProtocol.make_client_hello( + "profile", + "Pond Friend", + "nonce", + ) + assert( + NetworkProtocol.FRIENDS_CAPABILITY + in PackedStringArray(hello.get("capability_flags", [])) + ) + print("Friend relationship validation: PASS") + quit() diff --git a/tests/friend_relationship_validation.gd.uid b/tests/friend_relationship_validation.gd.uid new file mode 100644 index 0000000..aa2acaf --- /dev/null +++ b/tests/friend_relationship_validation.gd.uid @@ -0,0 +1 @@ +uid://d3v4e1xtu8ytq diff --git a/tests/gathering_marker_surface_validation.gd b/tests/gathering_marker_surface_validation.gd index 8ce3b4a..72f15f0 100644 --- a/tests/gathering_marker_surface_validation.gd +++ b/tests/gathering_marker_surface_validation.gd @@ -44,6 +44,8 @@ func _run() -> void: assert(invalid_material.albedo_color == Color.WHITE) assert(is_equal_approx(invalid_material.albedo_color.a, 1.0)) assert(is_equal_approx(valid_material.albedo_color.a, 1.0)) + assert(invalid_material.no_depth_test) + assert(valid_material.no_depth_test) assert( invalid_material.shading_mode == BaseMaterial3D.SHADING_MODE_UNSHADED diff --git a/tests/gathering_showcase_validation.gd b/tests/gathering_showcase_validation.gd index 7099f7c..51d6f38 100644 --- a/tests/gathering_showcase_validation.gd +++ b/tests/gathering_showcase_validation.gd @@ -21,9 +21,13 @@ func _run() -> void: assert(bool(main.get("_application_initialized"))) var session := main.get_node("%NetworkSession") as NetworkSession + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game()) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) main.call("_enter_gameplay") for _frame: int in 8: await process_frame @@ -38,7 +42,7 @@ func _run() -> void: and game_ui != null and catalog != null ) - fishing_spot.minimum_showcase_duration = 0.15 + fishing_spot.minimum_showcase_duration = 1.0 assert(player.bag.add_item(&"crab_net")) assert(player.hotbar.assign_item(0, &"crab_net")) assert(player.hotbar.select_slot(0)) @@ -81,7 +85,7 @@ func _run() -> void: await process_frame assert(fishing_spot.get("_pending_catch") == crab_catch) Input.action_release("fish_primary") - await create_timer(0.2).timeout + fishing_spot.set("_showcase_input_lock_remaining", 0.0) await process_frame assert(bool(fishing_spot.get("_put_away_press_armed"))) Input.parse_input_event(pocket_event) diff --git a/tests/generated_world_runtime_validation.gd b/tests/generated_world_runtime_validation.gd index d97be79..076f1c9 100644 --- a/tests/generated_world_runtime_validation.gd +++ b/tests/generated_world_runtime_validation.gd @@ -12,6 +12,12 @@ const GeneratedLakePool: FishPool = preload( const GeneratedRiverPool: FishPool = preload( "res://fish/pools/generated_river_pool.tres" ) +const Gatherables: GatherableCatalog = preload( + "res://gathering/catalog/gatherable_catalog.tres" +) +const PrecipitationOcclusionType = preload( + "res://world/environment/precipitation_occlusion.gd" +) const FIRST_SEED := 13001 const SECOND_SEED := 13002 const RIVER_FALLBACK_SEED := 13012 @@ -68,6 +74,7 @@ func _run() -> void: configured_generator.elevated_cliff_double_third_tier_chance = 0.0 root.add_child(region) await process_frame + assert(region.generate_world(FIRST_SEED)) await physics_frame var generator := region.get_node( @@ -243,6 +250,7 @@ func _validate_generated_region( assert(_placement_count(placements, "chunk_0034") == 1) assert(_placement_count(placements, "chunk_0035") == 1) assert(_placement_count(placements, "chunk_0036") == 1) + assert(_placement_count(placements, "chunk_0038") == 2) assert( _placement_count(placements, "chunk_0014") == (2 if has_secondary_elevation else 0) @@ -281,10 +289,31 @@ func _validate_generated_region( var river_edge_count := ( _placement_count(placements, "chunk_0024") + _placement_count(placements, "chunk_0025") + + _placement_count(placements, "chunk_0038") ) assert(river_coordinate_count >= 12) assert(generator._river_feature_placements.size() == river_coordinate_count) assert(river_edge_count == river_coordinate_count - 8) + var stone_bridge_specs: Array[Dictionary] = [] + for spec: Dictionary in generator._river_feature_placements: + if spec.get("id", &"") == &"chunk_0038": + stone_bridge_specs.append(spec) + assert(stone_bridge_specs.size() == 2) + var first_bridge_coordinate := stone_bridge_specs[0].get( + "coordinate", + Vector2i(-1, -1), + ) as Vector2i + var second_bridge_coordinate := stone_bridge_specs[1].get( + "coordinate", + Vector2i(-1, -1), + ) as Vector2i + var bridge_delta := second_bridge_coordinate - first_bridge_coordinate + assert(absi(bridge_delta.x) + absi(bridge_delta.y) == 1) + assert(posmod( + int(stone_bridge_specs[1].get("turns", -1)) + - int(stone_bridge_specs[0].get("turns", -1)), + 4, + ) == 2) var river_source_coordinates := generator._river_source_coordinates( generator._river_feature_origin, generator._river_feature_footprint_size, @@ -348,6 +377,27 @@ func _validate_generated_region( generator.get_generated_chunks_root().get_child_count() == expected_chunk_count ) + var generated_root := generator.get_generated_chunks_root() + var terrain_collision_batches := generated_root.find_children( + "TerrainCollisionBatch_*", + "StaticBody3D", + true, + false, + ) + assert(not terrain_collision_batches.is_empty()) + assert( + terrain_collision_batches.size() + <= ceili(float(generator.grid_size.x) / generator.collision_batch_size) + * ceili(float(generator.grid_size.y) / generator.collision_batch_size) + ) + assert( + generated_root.find_children( + "TerrainCollision", + "StaticBody3D", + true, + false, + ).is_empty() + ) assert( generator.get_primary_terrain_meshes().size() == ( @@ -355,7 +405,7 @@ func _validate_generated_region( + generator.stacked_elevated_placement_keys().size() ) ) - _validate_elevated_cliff_feature(generator) + _validate_elevated_cliff_feature(region, generator) var shop := region.get_node("Interactables/FishingShopWorld") as Node3D var storage := region.get_node("Interactables/PlayerStorageBox") as Node3D @@ -421,6 +471,20 @@ func _validate_generated_region( assert(fresh.surface_size.x <= 10.0 and fresh.surface_size.y <= 10.0) assert(not fresh.visual_surface_enabled) assert(not (fresh.get_node("VisualWater") as MeshInstance3D).visible) + var generated_bed := fresh.get_node_or_null( + "GeneratedBed", + ) as MeshInstance3D + assert(generated_bed != null and generated_bed.mesh != null) + assert( + is_equal_approx( + generated_bed.global_position.y, + GeneratedWorldRegion.GENERATED_FRESH_WATER_BED_HEIGHT, + ) + ) + assert( + generated_bed.material_override != null + and generated_bed.material_override.resource_name == "dirt" + ) var fresh_recovery := ( fresh.get_node("RecoveryRegion") as PlayerWaterTrigger ) @@ -429,6 +493,10 @@ func _validate_generated_region( == PlayerWaterTrigger.EntryHeightReference.PLAYER_ORIGIN ) assert(is_equal_approx(fresh_recovery.entry_depth_threshold, 0.1)) + assert(is_equal_approx( + fresh_recovery.entry_confirmation_seconds, + 0.2, + )) var coordinate_tokens := child.name.trim_prefix("FreshWater_").split("_") assert(coordinate_tokens.size() == 2) var coordinate := Vector2i( @@ -456,8 +524,27 @@ func _validate_generated_region( assert(river_body_count == river_placement_count) _validate_authored_chunk_surfaces(region, generator) + _validate_projected_terrain_materials( + generator.get_generated_chunks_root() + ) var decorations := region.get_node("Decorations") as Node3D + var grass_prop_surface_triangles := region.get_spawn_surface_triangles( + [&"grass_lite"], + -INF, + 0.35, + ) + var sand_prop_surface_triangles := region.get_spawn_surface_triangles( + [&"sand"], + -INF, + 0.35, + ) + _validate_crab_spawn_surfaces(region) + _validate_water_recovery_positions( + region, + grass_prop_surface_triangles, + sand_prop_surface_triangles, + ) var anchors := region.get_node( "GatherableAnchors/ReachableTreeTrunks" ) as GatherableAnchorSet3D @@ -480,6 +567,12 @@ func _validate_generated_region( assert(PROCEDURAL_PROP_IDS.has(prop_id)) var definition := region.get_prop_catalog().definition_for_id(prop_id) assert(definition != null) + if definition.procedural_group in [&"grass_tree", &"sand_tree"]: + assert( + _has_precipitation_occlusion_layer(child), + "Precipitation occlusion layer missing from %s (%s)." + % [child.name, prop_id], + ) var biome_id := StringName( child.get_meta(&"terrain_biome_id", &"") ) @@ -506,6 +599,8 @@ func _validate_generated_region( region, child as Node3D, definition, + grass_prop_surface_triangles, + sand_prop_surface_triangles, ) if prop_id == &"prop_palm": var cluster_id := int( @@ -600,6 +695,7 @@ func _validate_generated_region( func _validate_elevated_cliff_feature( + region: GeneratedWorldRegion, generator: TerrainChunkGenerator, ) -> void: var elevated_coordinates: Dictionary[Vector2i, StringName] = {} @@ -733,6 +829,27 @@ func _validate_elevated_cliff_feature( or generator.placement_keys()[low_index].begins_with("chunk_spawn@") ) assert(found_primary_ramp == not primary_is_third_tier) + var primary_surface_height := ( + generator.elevated_cliff_level_height + * (2.0 if primary_is_third_tier else 1.0) + ) + var primary_surface_position := generator.to_global( + generator.chunk_position(feature_center) + + Vector3.UP * primary_surface_height + ) + assert( + region.is_home_exterior_position_accessible(primary_surface_position) + == not primary_is_third_tier + ) + assert(region.is_home_exterior_position_accessible(generator.to_global( + generator.chunk_position(feature_center) + ))) + # A higher surface sharing a ramp-accessible base cell is still invalid + # unless that elevation has its own authored ramp connection. + assert(not region.is_home_exterior_position_accessible(generator.to_global( + generator.chunk_position(feature_center) + + Vector3.UP * (generator.elevated_cliff_level_height * 2.0) + ))) var generated := generator.get_generated_chunks_root() assert(generated != null) @@ -769,7 +886,6 @@ func _validate_elevated_cliff_feature( stable_id, ) assert(source_mesh != null and source_mesh.mesh != null) - assert(source_mesh.has_node("TerrainCollision")) continue layered_count += 1 var base_layer := chunk_root.get_node_or_null("TerrainBaseLayer") @@ -787,7 +903,7 @@ func _validate_elevated_cliff_feature( var overlay_mesh := TerrainChunkAnalyzer.find_primary_mesh( overlay, ( - &"chunk_0015" + &"chunk_0010" if stable_id in [ &"chunk_9999", &"chunk_9998", @@ -799,8 +915,6 @@ func _validate_elevated_cliff_feature( ) assert(base_mesh != null and base_mesh.mesh != null) assert(overlay_mesh != null and overlay_mesh.mesh != null) - assert(base_mesh.has_node("TerrainBaseLayerCollision")) - assert(overlay_mesh.has_node("TerrainCollision")) assert(layered_count == (29 if has_coastal_feature else 23)) var stacked_keys := generator.stacked_elevated_placement_keys() assert(stacked_keys.size() in [0, 4]) @@ -837,7 +951,6 @@ func _validate_elevated_cliff_feature( stacked_id, ) assert(stacked_mesh != null and stacked_mesh.mesh != null) - assert(stacked_mesh.has_node("TerrainCollision")) assert(stacked_count == 4) @@ -925,6 +1038,10 @@ func _validate_prop_catalog(region: GeneratedWorldRegion) -> void: assert(instance.position.is_zero_approx()) assert(_find_mesh_instance(instance) != null) instance.free() + if definition.has_gatherable_surface(): + assert( + definition.gatherable_surface_clearance >= 0.12 + ) var mushroom := catalog.definition_for_id(&"prop_mushroom") assert(mushroom != null and mushroom.has_collision()) assert(mushroom.visual_offset.y < 0.0) @@ -945,10 +1062,12 @@ func _validate_prop_catalog(region: GeneratedWorldRegion) -> void: assert(pine != null) assert(pine.minimum_visual_scale < pine.maximum_visual_scale) assert(pine.material_variants.is_empty()) + assert(not pine.has_gatherable_surface()) var large_pine := catalog.definition_for_id(&"prop_pine_large") assert(large_pine != null) assert(large_pine.minimum_visual_scale < large_pine.maximum_visual_scale) assert(large_pine.material_variants.is_empty()) + assert(not large_pine.has_gatherable_surface()) var palm := catalog.definition_for_id(&"prop_palm") assert(palm != null) assert(is_equal_approx(palm.minimum_visual_scale, 0.5)) @@ -959,6 +1078,25 @@ func _validate_prop_catalog(region: GeneratedWorldRegion) -> void: assert(palm.maximum_cluster_radius > palm.minimum_cluster_radius) assert(palm.prefer_ocean_facing) assert(not palm.local_overhang_direction.is_zero_approx()) + var aligned_tree_collisions: Dictionary[StringName, Vector2] = { + &"prop_tree_1": Vector2(0.08, 0.01), + &"prop_tree_2": Vector2(0.1, 0.075), + &"prop_tree_3": Vector2(-0.1, 0.18), + &"prop_tree_large": Vector2(0.084, 0.504), + &"prop_pine": Vector2(-0.044, 0.083), + &"prop_pine_large": Vector2(-0.04, 0.075), + &"prop_palm": Vector2(0.15, -0.1), + } + for tree_id: StringName in aligned_tree_collisions: + var aligned_tree := catalog.definition_for_id(tree_id) + assert(aligned_tree != null and aligned_tree.has_cylinder_collision()) + var collision_center := Vector2( + aligned_tree.collision_offset.x, + aligned_tree.collision_offset.z, + ) + assert(collision_center.is_equal_approx( + aligned_tree_collisions[tree_id] + )) var forest := region.get_biome_catalog().definition_for_id(&"biome_forest") var forest_rule := forest.prop_rule_for_group(&"grass_tree") var large_tree := catalog.definition_for_id(&"prop_tree_large") @@ -1027,6 +1165,8 @@ func _validate_decoration_transform( region: GeneratedWorldRegion, prop: Node3D, definition: TerrainPropDefinition, + grass_surface_triangles: Array[PackedVector3Array], + sand_surface_triangles: Array[PackedVector3Array], ) -> void: assert(prop != null) assert(prop.scale.is_equal_approx(Vector3.ONE)) @@ -1053,10 +1193,28 @@ func _validate_decoration_transform( or collision.shape is BoxShape3D ) assert(collision.global_basis.get_scale().is_equal_approx(Vector3.ONE)) + if collision.shape is CylinderShape3D: + var cylinder := collision.shape as CylinderShape3D + assert(is_equal_approx( + cylinder.radius, + definition.collision_radius * visual_scale, + )) + assert(is_equal_approx( + cylinder.height, + definition.collision_height * visual_scale, + )) + assert(collision.position.is_equal_approx( + definition.collision_offset * visual_scale + + Vector3.UP * cylinder.height * 0.5 + )) else: assert(collision == null) var query := PhysicsRayQueryParameters3D.create( - prop.global_position + Vector3.UP * 8.0, + # Stay below neighboring cliff overhangs while still beginning above the + # authored walkable surface. Regional collision batches intentionally + # keep every original shape on one body, so excluding an overhang body + # would also exclude the ground beneath the prop. + prop.global_position + Vector3.UP * 0.1, prop.global_position + Vector3.DOWN * 8.0, 1, ) @@ -1102,6 +1260,165 @@ func _validate_decoration_transform( ], ], ) + var required_surface_triangles: Array[PackedVector3Array] = ( + sand_surface_triangles + if definition.procedural_group == &"sand_tree" + else grass_surface_triangles + ) + var required_surface_height := _triangle_surface_height_at( + prop.global_position, + required_surface_triangles, + ) + assert( + required_surface_height > -INF + and absf(required_surface_height - prop.global_position.y) <= 0.01, + "%s (%s) is not rooted on its required terrain material at %s." + % [prop.name, definition.stable_id, prop.global_position], + ) + + +func _validate_crab_spawn_surfaces(region: GeneratedWorldRegion) -> void: + var brown := Gatherables.get_entry(&"crab_brown") + var blue := Gatherables.get_entry(&"crab_blue") + assert(brown != null and blue != null) + assert(is_equal_approx( + region.get_saltwater_surface_height(), + GeneratedWorldRegion.WATER_HEIGHT, + )) + var brown_minimum := maxf( + brown.minimum_surface_y, + GeneratedWorldRegion.WATER_HEIGHT + brown.waterline_margin, + ) + var blue_maximum := minf( + blue.maximum_surface_y, + GeneratedWorldRegion.WATER_HEIGHT - blue.waterline_margin, + ) + assert(brown_minimum > blue_maximum) + var brown_triangles := region.get_spawn_surface_triangles( + brown.surface_materials, + brown_minimum, + 0.6, + brown.maximum_surface_y, + ) + var blue_triangles := region.get_spawn_surface_triangles( + blue.surface_materials, + blue.minimum_surface_y, + 0.6, + blue_maximum, + ) + assert(not brown_triangles.is_empty()) + assert(not blue_triangles.is_empty()) + assert( + brown.target_population_for_surface_area( + _surface_triangle_area(brown_triangles) + ) > brown.population + ) + assert( + blue.target_population_for_surface_area( + _surface_triangle_area(blue_triangles) + ) > blue.population + ) + + +func _surface_triangle_area(triangles: Array[PackedVector3Array]) -> float: + var area := 0.0 + for triangle: PackedVector3Array in triangles: + area += (triangle[1] - triangle[0]).cross( + triangle[2] - triangle[0] + ).length() * 0.5 + return area + + +func _triangle_surface_height_at( + position: Vector3, + triangles: Array[PackedVector3Array], +) -> float: + var highest := -INF + var segment_start := position + Vector3.UP * 100.0 + var segment_end := position + Vector3.DOWN * 100.0 + for triangle: PackedVector3Array in triangles: + if triangle.size() != 3: + continue + var hit: Variant = Geometry3D.segment_intersects_triangle( + segment_start, + segment_end, + triangle[0], + triangle[1], + triangle[2], + ) + if hit is Vector3: + highest = maxf(highest, (hit as Vector3).y) + return highest + + +func _validate_water_recovery_positions( + region: GeneratedWorldRegion, + grass_triangles: Array[PackedVector3Array], + sand_triangles: Array[PackedVector3Array], +) -> void: + var fresh_water_root := region.get_node( + "WaterBodies/FreshWaterBodies" + ) as Node3D + assert(fresh_water_root != null and fresh_water_root.get_child_count() > 0) + var fresh_water := fresh_water_root.get_child(0) as WaterBodyAuthoring + assert(fresh_water != null) + var entry_position := fresh_water.global_position + var fallback_position := region.get_player_spawn_transform().origin + var recovery_position := region.get_water_recovery_position( + entry_position, + fallback_position, + ) + assert(recovery_position.is_finite()) + assert( + _horizontal_distance_squared(entry_position, recovery_position) + < _horizontal_distance_squared(entry_position, fallback_position), + "Fresh-water recovery returned the distant generated-world spawn.", + ) + assert( + recovery_position.y + > GeneratedWorldRegion.WATER_HEIGHT + + GeneratedWorldRegion.WATER_RECOVERY_MINIMUM_GROUND_CLEARANCE + ) + var recovery_triangles: Array[PackedVector3Array] = [] + recovery_triangles.append_array(grass_triangles) + recovery_triangles.append_array(sand_triangles) + var center_height := _triangle_surface_height_at( + recovery_position, + recovery_triangles, + ) + assert(center_height > -INF) + assert(absf(center_height - recovery_position.y) <= 0.01) + for direction: Vector2 in GeneratedWorldRegion.PROP_SURFACE_SAMPLE_DIRECTIONS: + var footprint_position := recovery_position + Vector3( + direction.x * GeneratedWorldRegion.WATER_RECOVERY_FOOTPRINT_RADIUS, + 0.0, + direction.y * GeneratedWorldRegion.WATER_RECOVERY_FOOTPRINT_RADIUS, + ) + var footprint_height := _triangle_surface_height_at( + footprint_position, + recovery_triangles, + ) + assert(footprint_height > -INF) + assert( + absf(footprint_height - recovery_position.y) + <= GeneratedWorldRegion.PROP_MAXIMUM_SUPPORT_HEIGHT_DIFFERENCE + ) + assert( + region.get_water_recovery_position( + entry_position, + fallback_position, + ).is_equal_approx(recovery_position) + ) + assert( + region.get_water_recovery_position( + Vector3(INF, 0.0, 0.0), + fallback_position, + ).is_equal_approx(fallback_position) + ) + + +func _horizontal_distance_squared(a: Vector3, b: Vector3) -> float: + return Vector2(a.x - b.x, a.z - b.z).length_squared() func _validate_tree_gatherable_anchors( @@ -1109,50 +1426,47 @@ func _validate_tree_gatherable_anchors( decorations: Node3D, anchors: GatherableAnchorSet3D, ) -> void: - var eligible_props: Array[Node3D] = [] + var eligible_props: Dictionary[StringName, Node3D] = {} + var expected_anchor_count := 0 for child: Node in decorations.get_children(): var prop := child as Node3D if prop == null: continue var prop_id := StringName(prop.get_meta(&"terrain_prop_id", &"")) var definition := region.get_prop_catalog().definition_for_id(prop_id) - if definition != null and definition.gatherable_anchor_height > 0.0: - eligible_props.append(prop) + var socket_count := _count_authored_beetle_sockets(prop) + if ( + definition != null + and definition.has_gatherable_surface() + and socket_count > 0 + ): + eligible_props[prop.name] = prop + expected_anchor_count += socket_count var positions := anchors.get_spawn_positions() - assert(positions.size() == eligible_props.size()) - for prop: Node3D in eligible_props: + assert(positions.size() == expected_anchor_count) + assert(positions.size() >= 12) + for child: Node in anchors.get_children(): + var anchor := child as Marker3D + assert(anchor != null) + assert(bool(anchor.get_meta(&"authored_beetle_socket", false))) + var prop_name := StringName(anchor.get_meta(&"terrain_prop_name", &"")) + assert(eligible_props.has(prop_name)) + var prop: Node3D = eligible_props[prop_name] var prop_id := StringName(prop.get_meta(&"terrain_prop_id", &"")) var definition := region.get_prop_catalog().definition_for_id(prop_id) - var visual_scale := float( - prop.get_meta(&"terrain_prop_visual_scale", 1.0) - ) - var nearest_anchor := Vector3(INF, INF, INF) - var nearest_distance_squared := INF - for position: Vector3 in positions: - var distance_squared := position.distance_squared_to( - prop.global_position - ) - if distance_squared < nearest_distance_squared: - nearest_distance_squared = distance_squared - nearest_anchor = position - assert(nearest_anchor.is_finite()) - var horizontal_distance := Vector2( - nearest_anchor.x - prop.global_position.x, - nearest_anchor.z - prop.global_position.z, - ).length() - assert( - horizontal_distance - >= definition.gatherable_anchor_surface_radius() * visual_scale - ) - assert( - absf( - nearest_anchor.y - - ( - prop.global_position.y - + definition.gatherable_anchor_height * visual_scale - ) - ) <= 0.001 - ) + assert(definition != null and definition.has_gatherable_surface()) + var local_anchor := prop.to_local(anchor.global_position) + assert(prop_id != &"prop_palm") + assert(local_anchor.y >= 0.25 and local_anchor.y <= 2.0) + + +func _count_authored_beetle_sockets(root_node: Node) -> int: + var result := 0 + if String(root_node.name).to_lower().contains("beetle_socket"): + result += 1 + for child: Node in root_node.get_children(): + result += _count_authored_beetle_sockets(child) + return result func _find_mesh_instance(root_node: Node) -> MeshInstance3D: @@ -1167,6 +1481,21 @@ func _find_mesh_instance(root_node: Node) -> MeshInstance3D: return null +func _has_precipitation_occlusion_layer(root_node: Node) -> bool: + var mesh_instance := root_node as MeshInstance3D + if ( + mesh_instance != null + and mesh_instance.get_layer_mask_value( + PrecipitationOcclusionType.RENDER_LAYER_NUMBER + ) + ): + return true + for child: Node in root_node.get_children(): + if _has_precipitation_occlusion_layer(child): + return true + return false + + func _has_material_variant_override( root_node: Node, variants: Array[Material], @@ -1318,6 +1647,56 @@ func _material_names(mesh_instance: MeshInstance3D) -> PackedStringArray: return result +func _validate_projected_terrain_materials(root: Node) -> void: + var expected_sizes := { + "grass_lite": 1.75, + "sand": 2.6, + "dirt": 2.5, + } + var surface_counts := { + "grass_lite": 0, + "sand": 0, + "dirt": 0, + } + _validate_projected_material_node(root, expected_sizes, surface_counts) + for material_name: String in expected_sizes: + assert(surface_counts[material_name] > 0) + + +func _validate_projected_material_node( + root: Node, + expected_sizes: Dictionary, + surface_counts: Dictionary, +) -> void: + var mesh_instance := root as MeshInstance3D + if mesh_instance != null and mesh_instance.mesh != null: + for surface_index: int in mesh_instance.mesh.get_surface_count(): + var material := mesh_instance.get_active_material(surface_index) + if material == null or not expected_sizes.has(material.resource_name): + continue + var shader_material := material as ShaderMaterial + assert(shader_material != null and shader_material.shader != null) + assert( + shader_material.shader.resource_path + == "res://world/materials/terrain_surface_projection.gdshader" + ) + assert( + is_equal_approx( + float(shader_material.get_shader_parameter( + &"tile_world_size" + )), + float(expected_sizes[material.resource_name]), + ) + ) + surface_counts[material.resource_name] += 1 + for child: Node in root.get_children(): + _validate_projected_material_node( + child, + expected_sizes, + surface_counts, + ) + + func _validate_pond_collision( region: GeneratedWorldRegion, pond: MeshInstance3D, @@ -1361,7 +1740,10 @@ func _validate_pond_collision( var hit := region.get_world_3d().direct_space_state.intersect_ray(query) assert(not hit.is_empty()) var collider := hit.get("collider") as Node - assert(collider != null and collider.get_parent() == pond) + assert( + collider != null + and collider.has_meta(&"terrain_collision_batch") + ) func _decoration_group_count( diff --git a/tests/home_spawn_multiplayer_validation.gd b/tests/home_spawn_multiplayer_validation.gd new file mode 100644 index 0000000..2855eb2 --- /dev/null +++ b/tests/home_spawn_multiplayer_validation.gd @@ -0,0 +1,201 @@ +extends SceneTree + +const MainScene: PackedScene = preload("res://main/main.tscn") +const TEST_PORT: int = 18222 + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var arguments: PackedStringArray = OS.get_cmdline_user_args() + if arguments.has("host"): + await _run_host() + return + if arguments.has("client"): + await _run_client() + return + push_error("Home spawn validation needs host or client mode.") + quit(1) + + +func _run_host() -> void: + var main: Node = await _create_initialized_main() + var session := main.get_node("%NetworkSession") as NetworkSession + var network_home := main.get_node( + "%NetworkHomeService" + ) as NetworkHomeService + var home_world := main.get_node("%HomeWorldService") as HomeWorldService + var spawn_service := main.get_node( + "%PlayerSpawnService" + ) as PlayerSpawnService + var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(bool(main.call( + "_prepare_host_world", WorldLayout.STARTER_ISLAND, 1 + ))) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) + assert(session.start_private_host(TEST_PORT)) + main.call("_enter_gameplay") + assert(session.set_host_open(true)) + + var host_fingerprint: String = session.get_local_identity_fingerprint() + assert(await _wait_for_home(network_home, host_fingerprint)) + var host_avatar: Player = spawn_service.get_avatar(1) + var host_spawn: Transform3D = home_world.get_exterior_spawn_transform( + host_fingerprint + ) + assert(_same_door_position(host_avatar.global_position, host_spawn.origin)) + assert(_faces_away_from_home(host_avatar, home_world, host_fingerprint)) + assert(network_home.request_enter(host_fingerprint)) + await physics_frame + host_avatar.global_position = home_world.get_interior_exit_position( + host_fingerprint + ) + assert(network_home.request_exit()) + await physics_frame + assert(_same_door_position(host_avatar.global_position, host_spawn.origin)) + assert(_faces_away_from_home(host_avatar, home_world, host_fingerprint)) + + var remote_peer_id: int = await _wait_for_remote_peer(session) + assert(remote_peer_id > 1) + var remote_record := session.get_peer_record(remote_peer_id) + var remote_fingerprint: String = remote_record.identity_fingerprint + assert(await _wait_for_home(network_home, remote_fingerprint)) + var remote_avatar: Player = spawn_service.get_avatar(remote_peer_id) + var remote_spawn: Transform3D = home_world.get_exterior_spawn_transform( + remote_fingerprint + ) + assert(_same_door_position( + remote_avatar.global_position, remote_spawn.origin + )) + assert(_faces_away_from_home( + remote_avatar, home_world, remote_fingerprint + )) + + var disconnect_deadline: int = Time.get_ticks_msec() + 12000 + while ( + Time.get_ticks_msec() < disconnect_deadline + and session.is_authenticated_peer(remote_peer_id) + ): + await process_frame + assert(not session.is_authenticated_peer(remote_peer_id)) + print("Home spawn multiplayer host validation: PASS") + await _cleanup(main, session) + + +func _run_client() -> void: + var main: Node = await _create_initialized_main() + main.call( + "_on_title_join_game_requested", + "127.0.0.1:%d" % TEST_PORT, + ) + var session := main.get_node("%NetworkSession") as NetworkSession + var network_home := main.get_node( + "%NetworkHomeService" + ) as NetworkHomeService + var home_world := main.get_node("%HomeWorldService") as HomeWorldService + var deadline: int = Time.get_ticks_msec() + 20000 + while Time.get_ticks_msec() < deadline: + await process_frame + if session.state == NetworkSession.State.VERIFYING_SERVER_IDENTITY: + main.call("_confirm_server_trust") + if session.is_joined_client() and bool(main.get("_gameplay_started")): + break + assert(session.is_joined_client()) + var fingerprint: String = session.get_local_identity_fingerprint() + assert(await _wait_for_home(network_home, fingerprint)) + var player := main.get("_player") as Player + var exterior_spawn: Transform3D = ( + home_world.get_exterior_spawn_transform(fingerprint) + ) + deadline = Time.get_ticks_msec() + 5000 + while ( + Time.get_ticks_msec() < deadline + and not _same_door_position( + player.global_position, exterior_spawn.origin + ) + ): + await physics_frame + assert(_same_door_position( + player.global_position, exterior_spawn.origin + )) + assert(_faces_away_from_home(player, home_world, fingerprint)) + print("Home spawn multiplayer client validation: PASS") + await _cleanup(main, session) + + +func _create_initialized_main() -> Node: + root.size = Vector2i(1280, 720) + var main: Node = MainScene.instantiate() + root.add_child(main) + for _frame: int in 4: + await process_frame + if not bool(main.get("_application_initialized")): + main.call("_activate_selected_data_path", "", true) + for _frame: int in 8: + await process_frame + assert(bool(main.get("_application_initialized"))) + return main + + +func _wait_for_home( + network_home: NetworkHomeService, + fingerprint: String, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + var manifests: Dictionary = network_home.get( + "_manifests_by_fingerprint" + ) + if manifests.has(fingerprint): + return true + return false + + +func _faces_away_from_home( + avatar: Player, + home_world: HomeWorldService, + fingerprint: String, +) -> bool: + var exterior_basis: Basis = home_world.get_exterior_transform( + fingerprint + ).basis + var outward_direction := exterior_basis.z + outward_direction.y = 0.0 + if outward_direction.is_zero_approx(): + return false + return avatar.get_facing_direction().dot( + outward_direction.normalized() + ) >= 0.99 + + +func _wait_for_remote_peer(session: NetworkSession) -> int: + var deadline: int = Time.get_ticks_msec() + 20000 + while Time.get_ticks_msec() < deadline: + await process_frame + for peer_id: int in session.get_authenticated_peer_ids(): + if peer_id != session.get_local_peer_id(): + return peer_id + return 0 + + +func _same_door_position(first: Vector3, second: Vector3) -> bool: + return ( + Vector2(first.x, first.z).distance_to(Vector2(second.x, second.z)) + < 0.08 + and absf(first.y - second.y) < 0.3 + ) + + +func _cleanup(main: Node, session: NetworkSession) -> void: + session.disconnect_session("") + main.queue_free() + for _frame: int in 4: + await process_frame + await create_timer(0.1).timeout + quit() diff --git a/tests/home_spawn_multiplayer_validation.gd.uid b/tests/home_spawn_multiplayer_validation.gd.uid new file mode 100644 index 0000000..06150f2 --- /dev/null +++ b/tests/home_spawn_multiplayer_validation.gd.uid @@ -0,0 +1 @@ +uid://bndtkip5p6xma diff --git a/tests/inventory_notepad_art_validation.gd b/tests/inventory_notepad_art_validation.gd index c42883c..d871b49 100644 --- a/tests/inventory_notepad_art_validation.gd +++ b/tests/inventory_notepad_art_validation.gd @@ -666,7 +666,7 @@ func _to_screen_rect( func _capture_inventory_pages(player_menu: PlayerMenu) -> void: - if not OS.has_environment("NETFISHING_NOTEPAD_CAPTURE"): + if not OS.has_environment("straywild_NOTEPAD_CAPTURE"): return player_menu.visible = true var sections: Array[PlayerMenu.Section] = [ @@ -700,7 +700,7 @@ func _capture_inventory_pages(player_menu: PlayerMenu) -> void: func _save_capture(suffix: String) -> void: var image: Image = root.get_texture().get_image() var path: String = "%s-%s.png" % [ - OS.get_environment("NETFISHING_NOTEPAD_CAPTURE"), + OS.get_environment("straywild_NOTEPAD_CAPTURE"), suffix, ] assert(image.save_png(path) == OK) diff --git a/tests/job_multiplayer_validation.gd b/tests/job_multiplayer_validation.gd index c31d392..6c0fa5b 100644 --- a/tests/job_multiplayer_validation.gd +++ b/tests/job_multiplayer_validation.gd @@ -24,6 +24,10 @@ func _run_host() -> void: var main: Node = await _create_initialized_main() var session := main.get_node("%NetworkSession") as NetworkSession var jobs := main.get_node("%PlayerJobService") as PlayerJobService + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_dedicated_host(TEST_PORT, 8, "127.0.0.1")) jobs.begin_progression_session() await process_frame diff --git a/tests/job_system_validation.gd b/tests/job_system_validation.gd index 8ffc633..65b7164 100644 --- a/tests/job_system_validation.gd +++ b/tests/job_system_validation.gd @@ -21,13 +21,17 @@ func _run() -> void: assert(bool(main.get("_application_initialized"))) var session := main.get_node("%NetworkSession") as NetworkSession assert(session != null) + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) var occupied_port := PacketPeerUDP.new() assert(occupied_port.bind(18137, "127.0.0.1") == OK) assert(session.start_private_host(18137, 3)) assert(session.get_host_port() == 18138) occupied_port.close() var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game()) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -89,6 +93,7 @@ func _run() -> void: net_page.call("_select_view", TheNetPage.View.LIFETIME) await process_frame _validate_fishnet_bounds(net_page) + await _validate_compact_value_tooltips(net_page) await _validate_unavailable_fishnet_layout() var wallet_before: int = player.wallet.get_balance() @@ -204,8 +209,11 @@ func _run() -> void: ) assert(bool(decoded.get("ok", false))) var save_data: Dictionary = decoded["data"] - assert(int(save_data.get("save_version", -1)) == 10) + assert(int(save_data.get("save_version", -1)) == 11) assert(PlayerJobService.validate_save_data(save_data.get("jobs", {}))) + assert(not PlayerHomeState.sanitize_save_data( + save_data.get("home", {}) + ).is_empty()) _validate_pause_session_switch(main, session) main.queue_free() @@ -287,6 +295,53 @@ func _validate_fishnet_bounds(page: TheNetPage) -> void: assert(row.size.x <= jobs_scroll.size.x + 0.5) +func _validate_compact_value_tooltips(page: TheNetPage) -> void: + assert(str(page.call("_compact_integer", 2400)) == "2.4k") + assert(str(page.call("_compact_integer", 2500)) == "2.5k") + var list := page.get("_list") as VBoxContainer + assert(list != null) + var jobs: Array[Dictionary] = [{ + "title": "compact tooltip check", + "description": "compact values keep their exact values on hover", + "target": 2500, + "progress": 2400, + "fish_coin": 1200, + "experience": 3400, + }] + page.call("_build_job_rows", jobs, "") + await process_frame + var row := list.get_child(list.get_child_count() - 1) as PanelContainer + assert(row != null) + var progress_bar: ProgressBar + var progress_count: Label + var reward: VBoxContainer + for child: Node in row.find_children("*", "ProgressBar", true, false): + progress_bar = child as ProgressBar + break + for child: Node in row.find_children("*", "Label", true, false): + var label := child as Label + if label != null and label.text == "2.4k / 2.5k": + progress_count = label + break + for child: Node in row.find_children("*", "VBoxContainer", true, false): + var candidate := child as VBoxContainer + if candidate != null and candidate.tooltip_text == ( + "1200 fish coins · 3400 xp" + ): + reward = candidate + break + assert(progress_bar != null) + assert(progress_bar.tooltip_text == "2400 / 2500") + assert(progress_bar.mouse_filter == Control.MOUSE_FILTER_STOP) + assert(progress_count != null) + assert(progress_count.tooltip_text == "2400 / 2500") + assert(progress_count.mouse_filter == Control.MOUSE_FILTER_STOP) + assert(reward != null) + assert(reward.mouse_filter == Control.MOUSE_FILTER_STOP) + row.queue_free() + await process_frame + + func _validate_creature_jobs(jobs: PlayerJobService) -> void: var fish_count: int = 0 var insect_count: int = 0 diff --git a/tests/keyboard_mouse_mapping_validation.gd b/tests/keyboard_mouse_mapping_validation.gd index d8e9a88..1b95e01 100644 --- a/tests/keyboard_mouse_mapping_validation.gd +++ b/tests/keyboard_mouse_mapping_validation.gd @@ -28,6 +28,26 @@ func _run() -> void: defaults.size() == KeyboardMouseMappingManagerType.ROLE_ORDER.size() ) + assert( + not manager.get_binding( + KeyboardMouseMappingManagerType.ROLE_INTERACT + ).is_empty() + ) + assert( + manager.get_binding_label( + KeyboardMouseMappingManagerType.ROLE_INTERACT + ) == "e" + ) + assert( + KeyboardMouseMappingManagerType.ROLE_LABELS[ + KeyboardMouseMappingManagerType.ROLE_CAMERA_ZOOM_IN + ] == "hotbar select (+SHIFT to zoom)" + ) + assert( + KeyboardMouseMappingManagerType.ROLE_LABELS[ + KeyboardMouseMappingManagerType.ROLE_CAMERA_ZOOM_OUT + ] == "hotbar select (+SHIFT to zoom)" + ) assert( str(defaults[ str(KeyboardMouseMappingManagerType.ROLE_PRIMARY_ACTION) @@ -120,6 +140,11 @@ func _run() -> void: interact_key.pressed = true panel._input(interact_key) assert(_has_physical_key(&"interact", KEY_F)) + assert( + manager.get_binding_label( + KeyboardMouseMappingManagerType.ROLE_INTERACT + ) == "f" + ) assert(not panel.is_capturing()) var settings_panel := SettingsPanelScene.instantiate() as SettingsPanel diff --git a/tests/late_join_multiplayer_validation.gd b/tests/late_join_multiplayer_validation.gd new file mode 100644 index 0000000..6ea544f --- /dev/null +++ b/tests/late_join_multiplayer_validation.gd @@ -0,0 +1,369 @@ +extends SceneTree + +const MainScene: PackedScene = preload("res://main/main.tscn") +const TEST_PORT: int = 18194 +const LATE_MESSAGE: String = "late join visibility check" +const CLEAR_MESSAGE: String = "late join animation clear check" +const ACTIVE_ACTION: StringName = &"draw" + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var arguments: PackedStringArray = OS.get_cmdline_user_args() + if arguments.has("host"): + await _run_host() + elif arguments.has("first"): + await _run_first_client() + elif arguments.has("late"): + await _run_late_client() + else: + push_error("Late-join validation needs host, first, or late mode.") + quit(1) + + +func _run_host() -> void: + var main: Node = await _create_initialized_main() + var session := main.get_node("%NetworkSession") as NetworkSession + var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(bool(main.call( + "_apply_world", + WorldLayout.STARTER_ISLAND, + NetworkProtocol.DEFAULT_WORLD_SEED, + true, + ))) + assert(session.set_host_world( + WorldLayout.STARTER_ISLAND, + NetworkProtocol.DEFAULT_WORLD_SEED, + )) + assert(session.start_private_host(TEST_PORT)) + assert(save_manager.initialize_new_game( + NetworkProtocol.DEFAULT_WORLD_SEED, + WorldLayout.STARTER_ISLAND, + )) + main.call("_enter_gameplay") + for _frame: int in 4: + await physics_frame + assert(session.set_host_open(true)) + assert(await _wait_for_registry_size(session, 3)) + var spawn := main.get_node("%PlayerSpawnService") as PlayerSpawnService + assert(spawn.get_peer_ids().size() == 3) + var action_peer_id: int = await _wait_for_remote_action( + spawn, + ACTIVE_ACTION, + ) + assert(action_peer_id > 1) + assert(await _wait_for_avatar_bool( + spawn, + action_peer_id, + &"_active_item_is_net", + true, + )) + assert(await _wait_for_avatar_sitting(spawn, action_peer_id, true)) + assert(await _wait_for_avatar_action( + spawn, + action_peer_id, + &"", + )) + assert(await _wait_for_avatar_sitting(spawn, action_peer_id, false)) + var chat := main.get_node("%NetworkChatService") as NetworkChatService + assert(await _wait_for_history_message(chat, CLEAR_MESSAGE)) + print("Late-join multiplayer host validation: PASS") + await _cleanup(main, session) + + +func _run_first_client() -> void: + var main: Node = await _create_initialized_main() + var session := await _join(main) + var profile := main.get_node("%NetworkProfileService") as NetworkProfileService + var preview: Dictionary = profile.get_persisted_appearance().duplicate(true) + preview["scale"] = 0.9 + assert(profile.preview_appearance(preview)) + var player := main.get("_player") as Player + assert(player != null) + var floor_deadline: int = Time.get_ticks_msec() + 5000 + while Time.get_ticks_msec() < floor_deadline and not player.is_on_floor(): + await physics_frame + assert(player.is_on_floor()) + player.toggle_sitting() + assert(player.is_sitting()) + assert(player.bag.add_item(&"crab_net")) + # Slot zero begins selected with the starter rod. Replacing that slot does + # not emit a selection change, so use the next slot to exercise the same + # equipped-item path a player uses in normal gameplay. + assert(player.hotbar.assign_item(1, &"crab_net")) + assert(player.hotbar.select_slot(1)) + assert(await _wait_for_local_net(main, player)) + assert(player.begin_animation_action(ACTIVE_ACTION)) + await create_timer(0.5).timeout + assert(StringName(str(player.get("_animation_action_id"))) == ACTIVE_ACTION) + var chat := main.get_node("%NetworkChatService") as NetworkChatService + var deadline: int = Time.get_ticks_msec() + 15000 + while Time.get_ticks_msec() < deadline: + await process_frame + if ( + session.get_authenticated_peer_ids().size() == 3 + and _history_contains(chat, LATE_MESSAGE) + ): + break + assert(session.get_authenticated_peer_ids().size() == 3) + assert(_history_contains(chat, LATE_MESSAGE)) + var spawn := main.get_node("%PlayerSpawnService") as PlayerSpawnService + assert(spawn.get_peer_ids().size() == 3) + # Keep the action active until the late peer has joined and announced that + # it has received the lifecycle snapshot. This exercises client -> host -> + # existing client/late client replication, including the join-in-progress + # state carried by the spawn envelope. + await create_timer(1.0).timeout + player.end_animation_action() + player.toggle_sitting() + assert(not player.is_sitting()) + assert(await _wait_for_history_message(chat, CLEAR_MESSAGE)) + print("Late-join first-client validation: PASS") + await _cleanup(main, session) + + +func _run_late_client() -> void: + var main: Node = await _create_initialized_main() + var session := await _join(main) + var deadline: int = Time.get_ticks_msec() + 8000 + while ( + Time.get_ticks_msec() < deadline + and session.get_authenticated_peer_ids().size() < 3 + ): + await process_frame + assert(session.get_authenticated_peer_ids().size() == 3) + var spawn := main.get_node("%PlayerSpawnService") as PlayerSpawnService + assert(spawn.get_peer_ids().size() == 3) + var action_peer_id: int = await _wait_for_remote_action( + spawn, + ACTIVE_ACTION, + ) + assert(action_peer_id > 1) + assert(await _wait_for_avatar_bool( + spawn, + action_peer_id, + &"_active_item_is_net", + true, + )) + assert(await _wait_for_avatar_sitting(spawn, action_peer_id, true)) + var chat := main.get_node("%NetworkChatService") as NetworkChatService + assert(chat.send_local_message(LATE_MESSAGE)) + assert(await _wait_for_avatar_action( + spawn, + action_peer_id, + &"", + )) + assert(await _wait_for_avatar_sitting(spawn, action_peer_id, false)) + assert(chat.send_local_message(CLEAR_MESSAGE)) + await create_timer(0.5).timeout + print("Late-join late-client validation: PASS") + await _cleanup(main, session) + + +func _join(main: Node) -> NetworkSession: + main.call("_on_title_join_game_requested", "127.0.0.1:%d" % TEST_PORT) + var session := main.get_node("%NetworkSession") as NetworkSession + var deadline: int = Time.get_ticks_msec() + 20000 + while Time.get_ticks_msec() < deadline: + await process_frame + if session.state == NetworkSession.State.VERIFYING_SERVER_IDENTITY: + main.call("_confirm_server_trust") + if session.is_joined_client() and bool(main.get("_gameplay_started")): + return session + assert(false, "Client did not join in time.") + return session + + +func _wait_for_registry_size(session: NetworkSession, expected: int) -> bool: + var deadline: int = Time.get_ticks_msec() + 25000 + while Time.get_ticks_msec() < deadline: + await process_frame + if session.get_authenticated_peer_ids().size() == expected: + return true + return false + + +func _wait_for_local_net(main: Node, player: Player) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + # A joined client can finish its world transition one frame after the + # hotbar selection signal. Refresh through the production path until the + # ready fishing state accepts the equipped item. + main.call("_refresh_active_hotbar_item") + await process_frame + if bool(player.get("_active_item_is_net")): + return true + var fishing_spot: Node = main.get_node("%FishingSpot") + print( + "net equip wait timed out: ", + { + "fishing_state": int(fishing_spot.get("state")), + "selected_slot": player.hotbar.get_selected_slot(), + "selected_item": String(player.hotbar.get_selected_item_id()), + "owns_net": player.bag.owns_item(&"crab_net"), + }, + ) + return false + + +func _history_contains(service: NetworkChatService, body: String) -> bool: + return service.get_history().any( + func(message: Dictionary) -> bool: + return str(message.get("body", "")) == body + ) + + +func _wait_for_history_message( + service: NetworkChatService, + body: String, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + if _history_contains(service, body): + return true + return false + + +func _wait_for_remote_action( + spawn_service: PlayerSpawnService, + action_id: StringName, +) -> int: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + for peer_id: int in spawn_service.get_peer_ids(): + var avatar: Player = spawn_service.get_avatar(peer_id) + if ( + avatar != null + and _observed_action_id(avatar) == action_id + ): + return peer_id + print( + "animation wait timed out: ", + _action_debug_snapshot(spawn_service), + ) + return 0 + + +func _wait_for_avatar_action( + spawn_service: PlayerSpawnService, + peer_id: int, + action_id: StringName, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + var avatar: Player = spawn_service.get_avatar(peer_id) + if ( + avatar != null + and _observed_action_id(avatar) == action_id + ): + return true + print( + "animation clear wait timed out: ", + _action_debug_snapshot(spawn_service), + ) + return false + + +func _wait_for_avatar_bool( + spawn_service: PlayerSpawnService, + peer_id: int, + property_name: StringName, + expected: bool, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + var avatar: Player = spawn_service.get_avatar(peer_id) + if avatar != null and bool(avatar.get(property_name)) == expected: + return true + return false + + +func _wait_for_avatar_sitting( + spawn_service: PlayerSpawnService, + peer_id: int, + expected: bool, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + var avatar: Player = spawn_service.get_avatar(peer_id) + if avatar != null and avatar.is_sitting() == expected: + return true + var avatar: Player = spawn_service.get_avatar(peer_id) + if avatar != null: + print( + "sitting wait timed out: ", + { + "peer_id": peer_id, + "expected": expected, + "sitting": avatar.is_sitting(), + "sit_after_landing": bool(avatar.get("_sit_after_landing")), + "on_floor": avatar.is_on_floor(), + "position": avatar.global_position, + "velocity": avatar.velocity, + "authoritative": bool(avatar.get( + "_network_authoritative_simulation" + )), + "last_input": int(avatar.get( + "_last_network_input_sequence" + )), + }, + ) + return false + + +func _observed_action_id(avatar: Player) -> StringName: + return StringName(str(avatar.get( + "_animation_action_id" + if bool(avatar.get("_network_authoritative_simulation")) + else "_network_target_animation_action_id" + ))) + + +func _action_debug_snapshot(spawn_service: PlayerSpawnService) -> Dictionary: + var result: Dictionary = {} + for peer_id: int in spawn_service.get_peer_ids(): + var avatar: Player = spawn_service.get_avatar(peer_id) + if avatar == null: + continue + result[peer_id] = { + "authoritative": bool(avatar.get( + "_network_authoritative_simulation" + )), + "source": str(avatar.get("_animation_action_id")), + "target": str(avatar.get( + "_network_target_animation_action_id" + )), + "last_input": int(avatar.get("_last_network_input_sequence")), + } + return result + + +func _create_initialized_main() -> Node: + root.size = Vector2i(1280, 720) + var main: Node = MainScene.instantiate() + root.add_child(main) + for _frame: int in 4: + await process_frame + if not bool(main.get("_application_initialized")): + main.call("_activate_selected_data_path", "", true) + for _frame: int in 8: + await process_frame + assert(bool(main.get("_application_initialized"))) + return main + + +func _cleanup(main: Node, session: NetworkSession) -> void: + session.disconnect_session("") + main.queue_free() + for _frame: int in 4: + await process_frame + await create_timer(0.1).timeout + quit() diff --git a/tests/late_join_multiplayer_validation.gd.uid b/tests/late_join_multiplayer_validation.gd.uid new file mode 100644 index 0000000..5d33548 --- /dev/null +++ b/tests/late_join_multiplayer_validation.gd.uid @@ -0,0 +1 @@ +uid://dnuwxkoeeykt3 diff --git a/tests/light_performance_profile_validation.gd b/tests/light_performance_profile_validation.gd index 4533abb..6a654f1 100644 --- a/tests/light_performance_profile_validation.gd +++ b/tests/light_performance_profile_validation.gd @@ -24,6 +24,12 @@ func _run() -> void: for _frame: int in 8: await process_frame assert(bool(main.get("_application_initialized"))) + assert(bool(main.call( + "_apply_world", + WorldLayout.GENERATED, + PlayerSaveManager.DEFAULT_WORLD_SEED, + true, + ))) _validate_main_profile(main) _validate_minimal_weather(main) _stop_audio_players(main) @@ -42,6 +48,12 @@ func _run() -> void: for _frame: int in 8: await process_frame assert(bool(normal_main.get("_application_initialized"))) + assert(bool(normal_main.call( + "_apply_world", + WorldLayout.GENERATED, + PlayerSaveManager.DEFAULT_WORLD_SEED, + true, + ))) _validate_normal_profile(normal_main) _validate_new_game_music_transition(normal_main) _stop_audio_players(normal_main) @@ -111,7 +123,6 @@ func _validate_main_profile(main: Node) -> void: var game_ui := main.get_node("%GameUI") as GameUI var title_screen := game_ui.get_title_screen() assert(title_screen != null) - assert(not title_screen.is_decorative_presentation_active()) var player_menu := game_ui.get("_player_menu") as PlayerMenu assert(player_menu != null) assert(not player_menu.is_cooler_water_effect_enabled()) @@ -147,8 +158,6 @@ func _validate_normal_profile(main: Node) -> void: var game_ui := main.get_node("%GameUI") as GameUI var title_screen := game_ui.get_title_screen() assert(title_screen != null) - assert(title_screen.is_decorative_presentation_active()) - assert(title_screen.is_decorative_bubble_scheduler_active()) var player_menu := game_ui.get("_player_menu") as PlayerMenu assert(player_menu != null) assert(player_menu.is_cooler_water_effect_enabled()) diff --git a/tests/logbook_runtime_validation.gd b/tests/logbook_runtime_validation.gd index e411fef..e33e551 100644 --- a/tests/logbook_runtime_validation.gd +++ b/tests/logbook_runtime_validation.gd @@ -2,6 +2,7 @@ extends SceneTree const MainScene = preload("res://main/main.tscn") const FishCatchType = preload("res://fish/fish_catch.gd") +const MENU_TRANSITION_SETTLE_SECONDS := 3.0 func _initialize() -> void: @@ -36,12 +37,16 @@ func _run() -> void: var logbook := player_menu.get_node("%CatalogLogbook") as LogbookPage var backdrop := main.get_node("%PlayerMenuBackdrop") as ColorRect var hotbar := game_ui.get_node("%Hotbar") as Control + var fishing_spot := main.get("_fishing_spot") as FishingSpot + assert(logbook.get("_fishing_spot") == fishing_spot) + assert(logbook.get("_world_time") == main.get("_world_time")) + assert(logbook.get("_world_weather") == main.get("_world_weather")) var shortcut := InputEventKey.new() shortcut.pressed = true shortcut.physical_keycode = KEY_L assert(bool(player_menu.call("_handle_direct_page_shortcut", shortcut))) - await create_timer(2.2).timeout + await create_timer(MENU_TRANSITION_SETTLE_SECONDS).timeout assert(player_menu.visible) assert(logbook.visible) assert(backdrop.visible) @@ -49,32 +54,60 @@ func _run() -> void: assert(not hotbar.visible) var entry_buttons: Dictionary = logbook.get("_entry_buttons") - assert(entry_buttons.size() == 26) + assert(entry_buttons.size() == 108) await _capture_if_requested("-unknown") + logbook.call("_set_index_open", true, false) + await process_frame + assert(bool(logbook.get("_index_open"))) + assert((logbook.get("_index_body") as Control).visible) + await _capture_if_requested("-index") + logbook.set_compact_presentation(true) + await process_frame + await _capture_if_requested("-index-compact") + logbook.set_compact_presentation(false) + await process_frame + logbook.call("_set_index_open", false, false) + await process_frame logbook.call( "_select_category", WaterType.Type.FRESH_WATER ) await create_timer(0.25).timeout - assert((logbook.get("_entry_buttons") as Dictionary).size() == 26) + assert((logbook.get("_entry_buttons") as Dictionary).size() == 108) await _capture_if_requested("-fresh") logbook.call("_select_category", WaterType.Type.SALT_WATER) await create_timer(0.25).timeout - assert((logbook.get("_entry_buttons") as Dictionary).size() == 34) + assert((logbook.get("_entry_buttons") as Dictionary).size() == 202) logbook.call("_select_category", WaterType.Type.FRESH_WATER) await create_timer(0.25).timeout - assert((logbook.get("_entry_buttons") as Dictionary).size() == 26) + assert((logbook.get("_entry_buttons") as Dictionary).size() == 108) player.collection_log.mark_discovered(&"bluegill") await process_frame logbook.call("_select_entry", &"bluegill", &"bluegill") await create_timer(0.2).timeout await _capture_if_requested("-known") + var bluegill := ( + main.get("fish_catalog") as FishPool + ).get_fish_by_id(&"bluegill") + var bluegill_available_now := fishing_spot.is_species_available_now(bluegill) + var index_options := logbook.get("_index_options") as Dictionary + index_options["availability"] = ( + LogbookCatalog.AvailabilityFilter.AVAILABLE_NOW + ) + logbook.notify_availability_context_changed() + await process_frame + assert( + (logbook.get("_entry_buttons") as Dictionary).has(&"bluegill") + == bluegill_available_now + ) + logbook.call("_reset_index") + await process_frame assert(bool(player_menu.call("_handle_direct_page_shortcut", shortcut))) - await create_timer(2.2).timeout + await create_timer(MENU_TRANSITION_SETTLE_SECONDS).timeout assert(not player_menu.visible) assert(bool(player_menu.call("_handle_direct_page_shortcut", shortcut))) - await create_timer(2.2).timeout + await create_timer(MENU_TRANSITION_SETTLE_SECONDS).timeout player_menu.call( "_show_section_immediate", PlayerMenu.Section.PROFILE ) @@ -110,23 +143,38 @@ func _validate_save_round_trip( assert(catalog != null) assert(catalog.candidates.size() == 316) var active_species := LogbookCatalog.ordered_species(catalog.candidates) - assert(active_species.size() == 63) - # This test intentionally round-trips one catch for every active species. - # Give the fixture enough combined capacity, then bypass per-catch carried - # inventory admission while constructing it. The inventory layout still - # reconciles and persists the resulting placements. + assert(active_species.size() == 314) + # Keep this runtime save fixture within maximum player capacity while the + # focused catalog validation exercises every active species individually. + var round_trip_species: Array[FishData] = [] + for fish: FishData in active_species: + if round_trip_species.size() >= 59: + break + round_trip_species.append(fish) + for fish_id: StringName in [ + &"catfish_blue", + &"catfish_channel", + &"catfish_flathead", + &"catfish_white", + ]: + var catfish: FishData = catalog.get_fish_by_id(fish_id) + if catfish not in round_trip_species: + round_trip_species.append(catfish) + assert(round_trip_species.size() == 63) player.inventory_layout.restore_backpack_level( PlayerInventoryLayout.MAX_BACKPACK_LEVEL ) - player.cooler_capacity.restore_level(PlayerCoolerCapacity.MAX_LEVEL) + var home_state := main.get("_home_state") as PlayerHomeState + assert(home_state != null) + assert(home_state.upgrade_to_next_tier()) assert( player.inventory_layout.get_backpack_level() == PlayerInventoryLayout.MAX_BACKPACK_LEVEL ) - assert(player.cooler_capacity.get_level() == PlayerCoolerCapacity.MAX_LEVEL) + assert(player.cooler_capacity.get_capacity() == 18) player.inventory.set_inventory_layout(null) for index: int in 4: - _add_test_catch(player, active_species[index]) + _add_test_catch(player, round_trip_species[index]) assert(save_manager.save_now()) var no_catches: Array[FishCatch] = [] var no_discoveries: Array[StringName] = [] @@ -135,18 +183,21 @@ func _validate_save_round_trip( assert(save_manager.load_player_data()) assert(player.inventory.get_all_catches().size() == 4) for index: int in 4: - var original_fish: FishData = active_species[index] + var original_fish: FishData = round_trip_species[index] assert(player.inventory.get_count(original_fish.id) == 1) assert(player.collection_log.has_discovered(original_fish.id)) - for index: int in range(4, active_species.size()): - _add_test_catch(player, active_species[index]) + for index: int in range(4, round_trip_species.size()): + _add_test_catch(player, round_trip_species[index]) assert(save_manager.save_now()) assert(player.inventory.replace_all_catches(no_catches, 1)) assert(player.collection_log.replace_discovered_ids(no_discoveries)) assert(save_manager.load_player_data()) - assert(player.inventory.get_all_catches().size() == 63) - for fish: FishData in active_species: + assert( + player.inventory.get_all_catches().size() + == round_trip_species.size() + ) + for fish: FishData in round_trip_species: assert(player.inventory.get_count(fish.id) == 1) assert(player.collection_log.has_discovered(fish.id)) for fish_id: StringName in [ @@ -185,13 +236,13 @@ func _add_test_catch(player: Player, fish: FishData) -> void: func _capture_if_requested(suffix: String) -> void: - if not OS.has_environment("NETFISHING_LOGBOOK_CAPTURE"): + if not OS.has_environment("straywild_LOGBOOK_CAPTURE"): return await process_frame await process_frame var image: Image = root.get_texture().get_image() var path: String = ( - OS.get_environment("NETFISHING_LOGBOOK_CAPTURE") + OS.get_environment("straywild_LOGBOOK_CAPTURE") + suffix + ".png" ) diff --git a/tests/logbook_validation.gd b/tests/logbook_validation.gd index 1645096..67747a5 100644 --- a/tests/logbook_validation.gd +++ b/tests/logbook_validation.gd @@ -17,17 +17,19 @@ const CatalogResource: FishPoolType = preload( "res://fish/pools/fish_catalog.tres" ) +var _query_available_id: StringName + func _initialize() -> void: call_deferred("_run") func _run() -> void: - if OS.has_environment("NETFISHING_TEST_CREATE_ROOT"): + if OS.has_environment("straywild_TEST_CREATE_ROOT"): var data_root := PlayerDataRoot.new() root.add_child(data_root) var result: Dictionary = data_root.create_unbound_root( - OS.get_environment("NETFISHING_TEST_CREATE_ROOT") + OS.get_environment("straywild_TEST_CREATE_ROOT") ) assert(bool(result.get("ok", false))) data_root.queue_free() @@ -35,6 +37,7 @@ func _run() -> void: quit() return _validate_catalog() + _validate_catalog_query() await _validate_page() print("Logbook validation: PASS") quit() @@ -43,7 +46,7 @@ func _run() -> void: func _validate_catalog() -> void: assert(CatalogResource.candidates.size() == 316) var ordered := LogbookCatalog.ordered_species(CatalogResource.candidates) - assert(ordered.size() == 63) + assert(ordered.size() == 314) var previous_number: int = 0 var catalog_numbers: Dictionary[int, bool] = {} for fish: FishDataType in CatalogResource.candidates: @@ -68,6 +71,348 @@ func _validate_catalog() -> void: ) +func _validate_catalog_query() -> void: + var collection := CollectionLogType.new() + var inventory := FishInventoryType.new() + var fresh_species: Array[FishDataType] = [] + for fish: FishDataType in LogbookCatalog.ordered_species( + CatalogResource.candidates + ): + if LogbookCatalog.category_for(fish) == LogbookCatalog.Category.FRESH_WATER: + fresh_species.append(fish) + assert(fresh_species.size() == 108) + var first := fresh_species[0] + var second := fresh_species[1] + var unknown := fresh_species[2] + for quality: int in FishQualityType.TIER_COUNT: + collection.record_catch(first.id, quality) + collection.record_catch(second.id, FishQualityType.Tier.BORING) + var held := _make_test_catch(first, true) + assert(inventory.add_catch(held)) + + var options := _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + var filtered := LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered.size() == 2) + assert(first in filtered and second in filtered) + + options["show"] = LogbookCatalog.DiscoveryFilter.MISSING + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered.size() == fresh_species.size() - 2) + options["sort"] = LogbookCatalog.SortMode.CATALOG_NUMBER + options["descending"] = true + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered.front() == fresh_species.back()) + assert(filtered.back() == unknown) + + options["show"] = LogbookCatalog.DiscoveryFilter.INCOMPLETE + options["descending"] = false + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered == [second]) + + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["sort"] = LogbookCatalog.SortMode.CATCH_COUNT + options["descending"] = true + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered == [first, second]) + + options = _default_query_options() + options["search"] = unknown.display_name + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered.is_empty()) + options["search"] = str(unknown.catalog_number) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered == [unknown]) + + options = _default_query_options() + options["holding"] = LogbookCatalog.HoldingFilter.FAVORITED + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered == [first]) + options["holding"] = LogbookCatalog.HoldingFilter.IN_COOLER + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered == [first]) + + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["group"] = String(first.collection_group) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(first in filtered) + for fish: FishDataType in filtered: + assert(fish.collection_group == first.collection_group) + + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["rarity"] = ( + int(first.rarity) + LogbookCatalog.RarityFilter.COMMON + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(first in filtered) + for fish: FishDataType in filtered: + assert(fish.rarity == first.rarity) + + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["method"] = ( + int(first.collection_method) + LogbookCatalog.MethodFilter.FISHING + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(first in filtered) + for fish: FishDataType in filtered: + assert(fish.collection_method == first.collection_method) + + var first_season := -1 + for season: int in 4: + if first.is_available_in_season(season): + first_season = season + break + assert(first_season >= 0) + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["season"] = ( + first_season + LogbookCatalog.SeasonFilter.SPRING + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(first in filtered) + for fish: FishDataType in filtered: + assert(fish.is_available_in_season(first_season)) + + var first_is_available_by_day := ( + first.availability == null or first.availability.allow_day + ) + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["time"] = ( + LogbookCatalog.TimeFilter.DAY + if first_is_available_by_day + else LogbookCatalog.TimeFilter.NIGHT + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(first in filtered) + + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.CAUGHT + options["sort"] = LogbookCatalog.SortMode.QUALITY_PROGRESS + options["descending"] = true + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered == [first, second]) + for sort_mode: LogbookCatalog.SortMode in [ + LogbookCatalog.SortMode.NAME, + LogbookCatalog.SortMode.RARITY, + LogbookCatalog.SortMode.VALUE, + LogbookCatalog.SortMode.WEIGHT, + ]: + options = _default_query_options() + options["sort"] = sort_mode + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(filtered[0] in [first, second]) + assert(filtered[1] in [first, second]) + assert(filtered[0] != filtered[1]) + assert(filtered[2] == unknown) + + _query_available_id = second.id + options = _default_query_options() + options["availability"] = ( + LogbookCatalog.AvailabilityFilter.AVAILABLE_NOW + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + Callable(self, "_query_species_available_now"), + ) + assert(filtered == [second]) + + _query_available_id = unknown.id + options["show"] = LogbookCatalog.DiscoveryFilter.MISSING + options["rarity"] = ( + int(unknown.rarity) + LogbookCatalog.RarityFilter.COMMON + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + Callable(self, "_query_species_available_now"), + ) + assert(filtered == [unknown]) + + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.MISSING + options["group"] = String(unknown.collection_group) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(unknown in filtered) + assert( + String(unknown.collection_group) + in LogbookCatalog.available_groups( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + ) + ) + + var unknown_is_available_by_day := ( + unknown.availability == null or unknown.availability.allow_day + ) + options = _default_query_options() + options["show"] = LogbookCatalog.DiscoveryFilter.MISSING + options["time"] = ( + LogbookCatalog.TimeFilter.DAY + if unknown_is_available_by_day + else LogbookCatalog.TimeFilter.NIGHT + ) + filtered = LogbookCatalog.filtered_species( + CatalogResource.candidates, + LogbookCatalog.Category.FRESH_WATER, + collection, + inventory, + options, + ) + assert(unknown in filtered) + inventory.free() + collection.free() + + +func _default_query_options() -> Dictionary: + return { + "search": "", + "show": LogbookCatalog.DiscoveryFilter.ALL, + "sort": LogbookCatalog.SortMode.CATALOG_NUMBER, + "descending": false, + "availability": LogbookCatalog.AvailabilityFilter.ANY, + "season": LogbookCatalog.SeasonFilter.ANY, + "time": LogbookCatalog.TimeFilter.ANY, + "rarity": LogbookCatalog.RarityFilter.ANY, + "method": LogbookCatalog.MethodFilter.ANY, + "holding": LogbookCatalog.HoldingFilter.ANY, + "group": "", + } + + +func _make_test_catch(fish: FishDataType, favorited: bool) -> FishCatchType: + var fish_catch := FishCatchType.new() + fish_catch.fish = fish + fish_catch.fish_id = fish.id + fish_catch.weight_lb = fish.get_minimum_weight() + fish_catch.display_scale = fish.get_display_scale_for_weight( + fish_catch.weight_lb + ) + fish_catch.quality = FishQualityType.Tier.BORING + fish_catch.sale_value = fish.get_sale_value_for_weight(fish_catch.weight_lb) + fish_catch.is_favorited = favorited + fish_catch.ensure_identity() + return fish_catch + + +func _query_species_available_now(fish: FishDataType) -> bool: + return fish != null and fish.id == _query_available_id + + func _validate_page() -> void: var collection := CollectionLogType.new() var inventory := FishInventoryType.new() @@ -91,6 +436,10 @@ func _validate_page() -> void: assert(outer_margin.get_theme_constant("margin_right") == 160) assert(outer_margin.get_theme_constant("margin_bottom") == 106) assert(is_equal_approx(book.offset_top, 65.0)) + page.call("_set_index_open", true, false) + await process_frame + _validate_index_content_bounds(page) + page.call("_set_index_open", false, false) page.set_compact_presentation(false) await process_frame assert(outer_margin.get_theme_constant("margin_left") == 52) @@ -103,6 +452,9 @@ func _validate_page() -> void: assert((page.get("_catalog_grid") as GridContainer).columns == 4) var catalog_scroll := page.get("_catalog_scroll") as ScrollContainer assert(catalog_scroll != null and catalog_scroll.follow_focus) + catalog_scroll.scroll_vertical = 37 + await create_timer(0.2).timeout + assert(catalog_scroll.scroll_vertical == 37) page.call( "_set_controller_zone", LogbookPage.ControllerZone.ENTRIES, @@ -155,6 +507,39 @@ func _validate_page() -> void: ) var initial_detail_body := page.get("_detail_body") as VBoxContainer assert(not initial_detail_body.get_parent() is ScrollContainer) + var index_tab := page.get("_index_tab") as Button + var index_body := page.get("_index_body") as VBoxContainer + assert(index_tab != null and index_body != null) + assert(index_tab.size == LogbookPage.INDEX_TAB_SIZE) + assert( + not index_tab.get_global_rect().intersects( + (category_tabs.back() as Button).get_global_rect() + ) + ) + page.call("_set_index_open", true, false) + await process_frame + assert(index_body.visible) + assert(not initial_detail_body.visible) + assert((page.get("_index_option_buttons") as Dictionary).size() == 10) + _validate_index_content_bounds(page) + page.call( + "_cycle_index_option", + &"show", + 1, + ) + await process_frame + assert((page.get("_entry_buttons") as Dictionary).is_empty()) + assert( + (page.get("_empty_state") as Label).text + == "No entries match this index." + ) + page.call("_reset_index") + await process_frame + assert((page.get("_entry_buttons") as Dictionary).size() == 108) + page.call("_set_index_open", false, false) + await process_frame + assert(not index_body.visible) + assert(initial_detail_body.visible) assert( page.call("_entry_label_text", "flathead catfish") == "flathead\ncatfish" @@ -162,6 +547,11 @@ func _validate_page() -> void: var shared_material: Material var silhouette_count: int = 0 + var target_silhouette_area: float = ( + LogbookPage.CATALOG_PORTRAIT_SIZE.x + * LogbookPage.CATALOG_PORTRAIT_SIZE.y + * LogbookPortraitType.UNIFORM_FOOTPRINT_AREA_RATIO + ) for category: LogbookCatalog.Category in [ LogbookCatalog.Category.FRESH_WATER, LogbookCatalog.Category.SALT_WATER, @@ -171,7 +561,7 @@ func _validate_page() -> void: var entries: Dictionary = page.get("_entry_buttons") assert( entries.size() - == (26 if category == LogbookCatalog.Category.FRESH_WATER else 34) + == (108 if category == LogbookCatalog.Category.FRESH_WATER else 202) ) for fish: FishDataType in LogbookCatalog.ordered_species( CatalogResource.candidates @@ -192,8 +582,15 @@ func _validate_page() -> void: assert(portrait != null) assert(portrait.source_texture == fish.display_texture) assert( - portrait.custom_minimum_size - == LogbookPage.CATALOG_PORTRAIT_SIZE + portrait.custom_minimum_size.x + <= LogbookPage.CATALOG_PORTRAIT_SIZE.x + and portrait.custom_minimum_size.y + <= LogbookPage.CATALOG_PORTRAIT_SIZE.y + ) + assert(portrait.get_parent() is CenterContainer) + assert( + (portrait.get_parent() as CenterContainer).custom_minimum_size + == LogbookPage.CATALOG_PORTRAIT_SIZE ) assert( portrait.expand_mode @@ -209,6 +606,23 @@ func _validate_page() -> void: else: assert(portrait.material == shared_material) assert(_texture_has_transparency(portrait.texture)) + var silhouette_area: float = ( + portrait.custom_minimum_size.x + * portrait.custom_minimum_size.y + ) + assert(silhouette_area > 0.0) + assert(silhouette_area <= target_silhouette_area * 1.05) + assert( + silhouette_area >= target_silhouette_area * 0.9 + or is_equal_approx( + portrait.custom_minimum_size.x, + LogbookPage.CATALOG_PORTRAIT_SIZE.x, + ) + or is_equal_approx( + portrait.custom_minimum_size.y, + LogbookPage.CATALOG_PORTRAIT_SIZE.y, + ) + ) silhouette_count += 1 for candidate: FishDataType in CatalogResource.candidates: assert(not entry.text.contains(candidate.display_name)) @@ -222,11 +636,14 @@ func _validate_page() -> void: candidate.display_name ) ) - assert(silhouette_count == 60) + assert(silhouette_count == 310) page.call("_select_category", LogbookCatalog.Category.SHELLFISH) await create_timer(0.25).timeout - assert((page.get("_entry_buttons") as Dictionary).size() == 2) + assert((page.get("_entry_buttons") as Dictionary).size() == 3) + assert( + (page.get("_entry_buttons") as Dictionary).has(&"unknown_3902") + ) assert( (page.get("_entry_buttons") as Dictionary).has(&"unknown_3906") ) @@ -269,6 +686,11 @@ func _validate_page() -> void: assert(known_portrait != null) assert(known_portrait.source_texture == bluegill.display_texture) assert(known_portrait.material == null) + assert(known_portrait.get_parent() is CenterContainer) + assert( + (known_portrait.get_parent() as CenterContainer).custom_minimum_size + == LogbookPage.CATALOG_PORTRAIT_SIZE + ) assert(known.button_pressed) _validate_handwritten_logbook_font(page) @@ -284,10 +706,11 @@ func _validate_page() -> void: ) fish_catch.ensure_identity() inventory.add_catch(fish_catch) + collection.record_catch(fish_catch.fish_id, fish_catch.quality) page.call("_select_entry", &"bluegill", &"bluegill") await process_frame assert(not _detail_text(page).contains("number owned")) - assert(_detail_text(page).contains("number caught\nunknown")) + assert(_detail_text(page).contains("number caught\n1")) assert(_detail_text(page).contains("body of water\nfresh water")) assert( _detail_text(page).contains( @@ -412,14 +835,27 @@ func _validate_page() -> void: assert(stats_view.visible) var stats_text: String = _descendant_label_text(stats_view) assert(stats_text.contains("catalog number")) + assert(stats_text.contains("number caught")) + assert(stats_text.contains("1")) assert(stats_text.contains("seasons")) assert(not stats_text.contains("number owned")) _validate_overlay_fonts(stats_view) (page.get("_portrait_overlay_backdrop") as Button).pressed.emit() await process_frame + var live_index_options := page.get("_index_options") as Dictionary + live_index_options["holding"] = LogbookCatalog.HoldingFilter.IN_COOLER + page.call("_refresh_catalog") + await process_frame + assert( + (page.get("_entry_buttons") as Dictionary).keys() + == [&"bluegill"] + ) inventory.remove_catch_by_id(fish_catch.catch_id) await process_frame + assert((page.get("_entry_buttons") as Dictionary).is_empty()) + page.call("_reset_index") + await process_frame assert(not _detail_text(page).contains("number owned")) page.queue_free() collection.queue_free() @@ -434,6 +870,54 @@ func _detail_text(page: LogbookPage) -> String: return "\n".join(values) +func _validate_index_content_bounds(page: LogbookPage) -> void: + var body := page.get("_index_body") as VBoxContainer + assert(body != null and body.visible) + var right_page := body.get_parent() as Control + assert(right_page != null) + var page_rect := right_page.get_global_rect() + var body_rect := body.get_global_rect() + var protected_rect := Rect2( + page_rect.position + Vector2( + LogbookPage.INDEX_CONTENT_LEFT_INSET, + LogbookPage.INDEX_CONTENT_TOP_INSET, + ), + page_rect.size - Vector2( + LogbookPage.INDEX_CONTENT_LEFT_INSET + + LogbookPage.INDEX_CONTENT_RIGHT_INSET, + LogbookPage.INDEX_CONTENT_TOP_INSET + + LogbookPage.INDEX_CONTENT_BOTTOM_INSET, + ), + ) + assert( + body_rect.position.x + >= page_rect.position.x + LogbookPage.INDEX_CONTENT_LEFT_INSET - 1.0 + ) + assert( + body_rect.end.x + <= page_rect.end.x - LogbookPage.INDEX_CONTENT_RIGHT_INSET + 1.0 + ) + assert( + body_rect.position.y >= page_rect.position.y, + "Index starts above the authored page: body=%s page=%s" + % [body_rect, page_rect], + ) + assert( + body_rect.end.y <= page_rect.end.y, + "Index extends below the authored page: body=%s page=%s" + % [body_rect, page_rect], + ) + var controls: Array = page.get("_index_controls") as Array + for value: Variant in controls: + var control := value as Control + if control != null and control.visible: + assert( + protected_rect.grow(2.0).encloses(control.get_global_rect()), + "Index control crossed the authored right-page boundary: %s" + % control.name, + ) + + func _descendant_label_text(parent: Node) -> String: var values: PackedStringArray = [] for node: Node in parent.find_children("*", "Label", true, false): diff --git a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn b/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn index df3a835..5c1e046 100644 --- a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn +++ b/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn @@ -4,7 +4,7 @@ [ext_resource type="Script" path="res://world/generation/terrain_chunk_generator.gd" id="2_generator"] [ext_resource type="Resource" path="res://world/generation/chunks/terrain_chunk_catalog.tres" id="3_catalog"] [ext_resource type="PackedScene" path="res://player/player.tscn" id="4_player"] -[ext_resource type="Environment" path="res://world/environment/netfishing_environment.tres" id="5_environment"] +[ext_resource type="Environment" path="res://world/environment/straywild_environment.tres" id="5_environment"] [node name="TerrainChunkGeneratorTest" type="Node3D"] script = ExtResource("1_test") diff --git a/tests/movement_multiplayer_validation.gd b/tests/movement_multiplayer_validation.gd index bbd9efd..05a668d 100644 --- a/tests/movement_multiplayer_validation.gd +++ b/tests/movement_multiplayer_validation.gd @@ -32,15 +32,40 @@ func _validate_latency_smoothing() -> void: await process_frame avatar.set_process(false) avatar.set_physics_process(false) + _validate_compact_input_encoding() _validate_compact_snapshot_encoding() + _validate_compact_animation_encoding() + _validate_animation_action_ordering(avatar) _validate_transit_estimation() - _validate_remote_snapshot_smoothing(avatar) + await _validate_remote_snapshot_smoothing(avatar) + _validate_remote_locomotion_playback_recovery(avatar) _validate_reliable_jump_intent(avatar) + _validate_airborne_sitting(avatar) _validate_stale_input_expiry(avatar) avatar.queue_free() await process_frame +func _validate_compact_input_encoding() -> void: + var input: Dictionary = _movement_input( + 12, + true, + true, + true, + &"strike", + 4, + true, + ) + var encoded: Array = NetworkSession._encode_movement_input(input) + assert(encoded.size() == NetworkSession.MOVEMENT_INPUT_FIELD_COUNT) + assert(var_to_bytes(encoded).size() < var_to_bytes(input).size()) + assert(NetworkSession._decode_movement_input(encoded) == input) + assert(NetworkSession._decode_movement_input(encoded.slice(0, 3)).is_empty()) + var unknown_flags: Array = encoded.duplicate() + unknown_flags[3] = 1 << 12 + assert(NetworkSession._decode_movement_input(unknown_flags).is_empty()) + + func _validate_compact_snapshot_encoding() -> void: var moving_snapshot: Dictionary = _network_snapshot( Vector3.ZERO, @@ -48,37 +73,169 @@ func _validate_compact_snapshot_encoding() -> void: 1, ) assert(NetworkSession.MOVEMENT_SNAPSHOT_BATCH_SIZE == 8) + assert(NetworkSession.OWNER_SNAPSHOT_DIVISOR == 3) var encoded_snapshots: Array = [] for _peer: int in NetworkSession.MOVEMENT_SNAPSHOT_BATCH_SIZE: encoded_snapshots.append( NetworkSession._encode_movement_snapshot(moving_snapshot) ) assert(var_to_bytes(encoded_snapshots).size() < 1200) + var expected_snapshot: Dictionary = moving_snapshot.duplicate(true) + expected_snapshot.erase("animation_state") + assert( + NetworkSession._decode_movement_snapshot(encoded_snapshots[0]) + == expected_snapshot + ) assert( NetworkSession._decode_movement_snapshot( - encoded_snapshots[0] - ) == moving_snapshot + encoded_snapshots[0].slice(0, 4) + ).is_empty() ) - var paused_snapshot: Dictionary = moving_snapshot.duplicate(true) - paused_snapshot["animation_state"] = ( + var invalid_snapshot_flags: Array = encoded_snapshots[0].duplicate() + invalid_snapshot_flags[5] = 1 << 12 + assert( + NetworkSession._decode_movement_snapshot( + invalid_snapshot_flags + ).is_empty() + ) + + +func _validate_compact_animation_encoding() -> void: + var paused_state := NetworkPlayerAnimationProtocol.make_state( + NetworkPlayerAnimationProtocol.LOCOMOTION_IDLE, + true, + &"strike", + 7, + 0.5, + true, + ) + var encoded: Array = NetworkSession._encode_movement_animation( + 2, + paused_state, + ) + assert(encoded.size() == NetworkSession.MOVEMENT_ANIMATION_FIELD_COUNT) + var decoded: Dictionary = NetworkSession._decode_movement_animation(encoded) + assert(int(decoded.get("peer_id", 0)) == 2) + assert(Dictionary(decoded.get("state", {})) == paused_state) + var advanced_state: Dictionary = paused_state.duplicate(true) + advanced_state["action"]["elapsed"] = 0.75 + assert( + NetworkSession._movement_animation_signature(advanced_state) + == NetworkSession._movement_animation_signature(paused_state) + ) + var action: Dictionary = paused_state["action"] + var encoded_action: Array = ( + NetworkSession._encode_movement_animation_action(action, true) + ) + assert( + encoded_action.size() + == NetworkSession.MOVEMENT_ANIMATION_ACTION_FIELD_COUNT + ) + var decoded_action: Dictionary = ( + NetworkSession._decode_movement_animation_action(encoded_action) + ) + assert(Dictionary(decoded_action.get("action", {})) == action) + assert(bool(decoded_action.get("sitting", false))) + assert( + NetworkSession._decode_movement_animation_action( + encoded_action.slice(0, 2) + ).is_empty() + ) + + +func _validate_airborne_sitting(avatar: Player) -> void: + avatar.reset_network_movement_state() + avatar.set_local_control(true) + avatar.set("_sit_after_landing", true) + assert(avatar.get_network_sitting_intent()) + assert(not avatar.get_network_sitting_state()) + assert(not bool(avatar.make_network_snapshot(2)["sitting"])) + assert(bool(avatar.capture_network_input(1)["sitting"])) + avatar.call("_queue_local_network_jump_intent") + var jumping_input: Dictionary = avatar.capture_network_input(2) + assert(bool(jumping_input["jump"])) + assert(not bool(jumping_input["sitting"])) + avatar.call("_cancel_sitting_for_jump") + assert(not bool(avatar.get("_sit_after_landing"))) + assert(bool(avatar.get("_sitting_intent_pending"))) + avatar.reset_network_movement_state() + + # Even a malformed or stale reconciliation that marks an airborne avatar as + # seated must not bypass gravity and freeze it in place. + avatar.set("_sit_after_landing", false) + avatar.call("_set_sitting", true) + avatar.velocity = Vector3(0.0, 4.0, 0.0) + avatar.call("_simulate_movement_physics", 0.1) + assert(not avatar.is_sitting()) + assert(bool(avatar.get("_sit_after_landing"))) + assert(avatar.velocity.y < 4.0) + avatar.reset_network_movement_state() + + +func _validate_animation_action_ordering(avatar: Player) -> void: + var draw := NetworkPlayerAnimationProtocol.make_action_state( + &"draw", 5, 0.2 + ) + avatar.apply_authoritative_network_animation_action(draw) + assert(StringName(str(avatar.get("_animation_action_id"))) == &"draw") + var cleared := NetworkPlayerAnimationProtocol.make_action_state( + &"", 6, 0.0 + ) + avatar.apply_authoritative_network_animation_action(cleared) + assert(StringName(str(avatar.get("_animation_action_id"))).is_empty()) + avatar.apply_authoritative_network_animation_action(draw) + assert(StringName(str(avatar.get("_animation_action_id"))).is_empty()) + avatar.apply_authoritative_network_animation_action( + NetworkPlayerAnimationProtocol.make_action_state(&"strike", 6, 0.0) + ) + assert(StringName(str(avatar.get("_animation_action_id"))).is_empty()) + var strike := NetworkPlayerAnimationProtocol.make_action_state( + &"strike", 7, 0.2 + ) + avatar.apply_authoritative_network_animation_action(strike) + avatar.apply_authoritative_network_animation_action( + NetworkPlayerAnimationProtocol.make_action_state( + &"strike", 8, 0.4, true + ) + ) + avatar.apply_authoritative_network_animation_action(strike) + assert(bool(avatar.get("_animation_action_paused"))) + avatar.apply_authoritative_network_animation_action( + NetworkPlayerAnimationProtocol.make_action_state(&"", 9, 0.0) + ) + + avatar.configure_network_remote(false) + avatar.apply_network_animation_state( NetworkPlayerAnimationProtocol.make_state( NetworkPlayerAnimationProtocol.LOCOMOTION_IDLE, true, &"strike", - 7, - 0.5, + 9, + 0.4, true, ) ) - var paused_encoded: Array = NetworkSession._encode_movement_snapshot( - paused_snapshot + avatar.apply_network_animation_state( + NetworkPlayerAnimationProtocol.make_state( + NetworkPlayerAnimationProtocol.LOCOMOTION_WALKING, + true, + &"draw", + 8, + 0.1, + ) ) - assert(paused_encoded.size() == NetworkSession.MOVEMENT_SNAPSHOT_FIELD_COUNT) - var paused_decoded: Dictionary = ( - NetworkSession._decode_movement_snapshot(paused_encoded) + assert( + StringName(str(avatar.get("_network_target_animation_action_id"))) + == &"strike" + ) + avatar.apply_network_animation_state( + NetworkPlayerAnimationProtocol.make_state( + NetworkPlayerAnimationProtocol.LOCOMOTION_IDLE, + true, + &"", + 10, + ) ) - assert(not paused_decoded.is_empty()) - assert(bool(paused_decoded["animation_state"]["action"]["paused"])) func _validate_transit_estimation() -> void: @@ -156,16 +313,191 @@ func _validate_remote_snapshot_smoothing(avatar: Player) -> void: ) assert(avatar.global_position.x <= maximum_extrapolated_x + 0.1) + # Reconciliation only applies after both simulations report a grounded body. + # Give the unit avatar a real floor so this exercises the production path. + var floor := StaticBody3D.new() + floor.collision_layer = 1 + floor.collision_mask = 0 + floor.position = Vector3(0.0, -0.1, 0.0) + var floor_shape := CollisionShape3D.new() + var floor_box := BoxShape3D.new() + floor_box.size = Vector3(100.0, 0.2, 100.0) + floor_shape.shape = floor_box + floor.add_child(floor_shape) + root.add_child(floor) + await physics_frame avatar.set_local_control(true) avatar.global_position = Vector3(0.8, 0.0, 0.0) + avatar.velocity = Vector3.DOWN + avatar.move_and_slide() + assert(avatar.is_on_floor()) avatar.apply_local_prediction_correction( moving_snapshot, - 10, + 2, 1.0 / 30.0, 0.1, + 0.1, ) - assert(avatar.global_position.x < 0.8) - assert(avatar.global_position.x > 0.7) + # Ordinary host/client disagreement is expected while a packet is in flight. + # It must never tug the locally controlled body or camera around. + assert(is_equal_approx(avatar.global_position.x, 0.8)) + assert( + int(avatar.get("_local_prediction_soft_corrections")) == 0 + ) + assert( + int(avatar.get("_local_prediction_hard_corrections")) == 0 + ) + + # A larger but still plausible mismatch must persist across multiple audits + # before a small correction is allowed. Preserve both visible character and + # camera positions while the collision body catches up. + avatar.global_position = Vector3(3.0, 0.0, 0.0) + var visual_position: Vector3 = avatar.get_node("Visuals").global_position + var camera_position: Vector3 = avatar.get_node("CameraYaw").global_position + var drift_snapshot: Dictionary = _network_snapshot( + Vector3.ZERO, + Vector3.ZERO, + 20, + ) + for _audit: int in 3: + avatar.apply_local_prediction_correction( + drift_snapshot, + 20, + 1.0 / 30.0, + 0.0, + 0.1, + ) + assert(is_equal_approx(avatar.global_position.x, 3.0)) + avatar.apply_local_prediction_correction( + drift_snapshot, + 20, + 1.0 / 30.0, + 0.0, + 0.1, + ) + assert(avatar.global_position.x < 3.0) + assert(avatar.global_position.x >= 2.85 - 0.001) + assert(avatar.get_node("Visuals").global_position == visual_position) + assert(avatar.get_node("CameraYaw").global_position == camera_position) + assert( + int(avatar.get("_local_prediction_soft_corrections")) == 1 + ) + + # Host and client jump timing naturally differs. An airborne authoritative + # snapshot must not drag the local capsule sideways or down before landing. + avatar.global_position = Vector3(3.0, 0.0, 0.0) + avatar.velocity = Vector3(0.0, 1.0, 0.0) + var airborne_snapshot: Dictionary = drift_snapshot.duplicate(true) + airborne_snapshot["grounded"] = false + for _audit: int in 6: + avatar.apply_local_prediction_correction( + airborne_snapshot, + 20, + 1.0 / 30.0, + 0.0, + 0.1, + ) + assert(avatar.global_position.is_equal_approx(Vector3(3.0, 0.0, 0.0))) + assert(int(avatar.get("_local_prediction_soft_corrections")) == 1) + avatar.velocity = Vector3.ZERO + + # The local body may reach its apex after the host has already landed. The + # local airborne state still owns presentation and must not be pulled toward + # the host until it has landed too. + avatar.global_position = Vector3(3.0, 2.0, 0.0) + avatar.velocity = Vector3.ZERO + avatar.move_and_slide() + assert(not avatar.is_on_floor()) + for _audit: int in 6: + avatar.apply_local_prediction_correction( + drift_snapshot, + 20, + 1.0 / 30.0, + 0.0, + 0.1, + ) + assert(avatar.global_position.is_equal_approx(Vector3(3.0, 2.0, 0.0))) + assert(int(avatar.get("_local_prediction_soft_corrections")) == 1) + + # Genuine divergence still recovers immediately, as do the separate reliable + # teleport and water-recovery paths used by gameplay transitions. + avatar.global_position = Vector3(10.0, 0.0, 0.0) + avatar.apply_local_prediction_correction( + drift_snapshot, + 20, + 1.0 / 30.0, + 0.0, + 0.1, + ) + assert(avatar.global_position == Vector3.ZERO) + assert( + int(avatar.get("_local_prediction_hard_corrections")) == 1 + ) + + # Soft reconciliation must respect the same terrain collision as ordinary + # player movement instead of phasing the capsule through a solid obstacle. + var blocker := StaticBody3D.new() + blocker.collision_layer = 1 + blocker.collision_mask = 0 + blocker.position = Vector3(1.0, 1.0, 0.0) + var blocker_shape := CollisionShape3D.new() + var blocker_box := BoxShape3D.new() + blocker_box.size = Vector3(0.2, 4.0, 4.0) + blocker_shape.shape = blocker_box + blocker.add_child(blocker_shape) + root.add_child(blocker) + await physics_frame + avatar.global_position = Vector3.ZERO + avatar.velocity = Vector3.ZERO + avatar.call("_clear_local_reconciliation_offsets") + var blocked_visual_position: Vector3 = ( + avatar.get_node("Visuals") as Node3D + ).global_position + var blocked_camera_position: Vector3 = ( + avatar.get_node("CameraYaw") as Node3D + ).global_position + assert(bool(avatar.call( + "_apply_camera_safe_local_correction", + Vector3(2.0, 0.0, 0.0), + ))) + assert(avatar.global_position.x > 0.0 and avatar.global_position.x < 0.6) + assert( + (avatar.get_node("Visuals") as Node3D).global_position + == blocked_visual_position + ) + assert( + (avatar.get_node("CameraYaw") as Node3D).global_position + == blocked_camera_position + ) + blocker.queue_free() + floor.queue_free() + await physics_frame + + +func _validate_remote_locomotion_playback_recovery(avatar: Player) -> void: + avatar.configure_network_remote(false) + avatar.push_network_snapshot( + _network_snapshot(Vector3.ZERO, Vector3(4.5, 0.0, 0.0), 21) + ) + avatar.call("_update_character_animation") + var animation_player := avatar.get_node( + "Visuals/CharacterRig/AnimationPlayer" + ) as AnimationPlayer + assert(animation_player.assigned_animation == &"running") + assert(animation_player.is_playing()) + + # Reproduce issue #111: locomotion replication still says RUNNING (and the + # dust therefore still emits), but the rig playback has fallen idle. The + # local presentation pass must repair that state without another packet. + animation_player.stop() + assert(not animation_player.is_playing()) + assert( + int(avatar.get("_network_target_locomotion_state")) + == Player.LocomotionState.RUNNING + ) + avatar.call("_update_character_animation") + assert(animation_player.assigned_animation == &"running") + assert(animation_player.is_playing()) func _validate_reliable_jump_intent(avatar: Player) -> void: @@ -178,9 +510,10 @@ func _validate_reliable_jump_intent(avatar: Player) -> void: assert(int(avatar.get("_local_network_jump_intent_sequence")) == 20) avatar.apply_local_prediction_correction( _network_snapshot(avatar.global_position, Vector3.ZERO, 20), - 21, + 20, 1.0 / 30.0, 0.0, + 0.1, ) assert(not bool(avatar.capture_network_input(22)["jump"])) @@ -209,12 +542,24 @@ func _validate_reliable_jump_intent(avatar: Player) -> void: func _validate_stale_input_expiry(avatar: Player) -> void: avatar.configure_network_remote(true) - avatar.apply_authoritative_network_input(_movement_input(40, true)) + var high_latency_timeout := ( + Player.resolve_network_input_stale_timeout_seconds(400) + ) + assert(high_latency_timeout > Player.NETWORK_INPUT_STALE_TIMEOUT_SECONDS) + avatar.apply_authoritative_network_input( + _movement_input(40, true), + high_latency_timeout, + ) assert((avatar.get("_network_axis") as Vector2).length_squared() > 0.0) avatar.call( "_update_network_input_freshness", Player.NETWORK_INPUT_STALE_TIMEOUT_SECONDS + 0.01, ) + assert(not bool(avatar.get("_network_input_stale"))) + avatar.call( + "_update_network_input_freshness", + high_latency_timeout, + ) assert((avatar.get("_network_axis") as Vector2) == Vector2.ZERO) assert(not bool(avatar.get("_network_sprint"))) assert(bool(avatar.get("_network_input_stale"))) @@ -234,6 +579,7 @@ func _network_snapshot( "position": [position.x, position.y, position.z], "velocity": [velocity.x, velocity.y, velocity.z], "visual_yaw": 0.0, + "grounded": true, "animation_state": NetworkPlayerAnimationProtocol.make_state( NetworkPlayerAnimationProtocol.LOCOMOTION_RUNNING, true, @@ -247,8 +593,22 @@ func _run_host() -> void: var main: Node = await _create_initialized_main() var session := main.get_node("%NetworkSession") as NetworkSession var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(bool(main.call( + "_apply_world", + WorldLayout.STARTER_ISLAND, + NetworkProtocol.DEFAULT_WORLD_SEED, + true, + ))) + assert(bool(main.call( + "_prepare_host_world", + WorldLayout.STARTER_ISLAND, + NetworkProtocol.DEFAULT_WORLD_SEED, + ))) + assert(save_manager.initialize_new_game( + NetworkProtocol.DEFAULT_WORLD_SEED, + WorldLayout.STARTER_ISLAND, + )) assert(session.start_private_host(TEST_PORT)) - assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") for _frame: int in 4: await physics_frame @@ -260,31 +620,40 @@ func _run_host() -> void: # to settle before emitting the one-shot locomotion/action sequence. await create_timer(3.0).timeout var player := main.get("_player") as Player + var world := main.get_node("TestWorld") as TestWorld player.configure_network_remote(true) - player.apply_authoritative_network_input(_movement_input(1, true)) - await create_timer(2.5).timeout - player.apply_authoritative_network_input(_movement_input(2, false)) - await create_timer(2.5).timeout - player.apply_authoritative_network_input( - _movement_input(3, false, true, true) + await _reset_locomotion_test_position(player, session, world) + var input_sequence: int = 1 + input_sequence = await _sustain_locomotion_input( + player, input_sequence, 1.5, true ) - await create_timer(2.0).timeout - player.apply_authoritative_network_input( - _movement_input(4, false, false, true) + await _reset_locomotion_test_position(player, session, world) + input_sequence = await _sustain_locomotion_input( + player, input_sequence, 1.5, false ) - await create_timer(2.0).timeout - player.apply_authoritative_network_input( - _movement_input(5, false, false, true, &"draw", 1) + await _reset_locomotion_test_position(player, session, world) + input_sequence = await _sustain_locomotion_input( + player, input_sequence, 1.5, false, true, true ) + input_sequence = await _sustain_locomotion_input( + player, input_sequence, 1.5, false, false, true + ) + player.apply_authoritative_network_input( + _movement_input(input_sequence, false, false, true, &"draw", 1) + ) + input_sequence += 1 await create_timer(1.0).timeout player.apply_authoritative_network_input( - _movement_input(6, false, false, true, &"strike", 2, true) + _movement_input( + input_sequence, false, false, true, &"strike", 2, true + ) ) + input_sequence += 1 await create_timer(2.0).timeout player.apply_authoritative_network_input( - _movement_input(7, false, false, false, &"", 3) + _movement_input(input_sequence, false, false, false, &"", 3) ) - var disconnect_deadline: int = Time.get_ticks_msec() + 8000 + var disconnect_deadline: int = Time.get_ticks_msec() + 15000 while ( Time.get_ticks_msec() < disconnect_deadline and session.is_authenticated_peer(remote_peer_id) @@ -333,12 +702,27 @@ func _run_client() -> void: var saw_net_strike_paused: bool = false var saw_animation_advance: bool = false var saw_dust: bool = false + var observed_animations: Dictionary = {} + var observed_locomotion_states: Dictionary = {} + var maximum_sneak_speed: float = 0.0 var previous_animation: StringName = &"" var previous_animation_position: float = -1.0 - var observation_deadline: int = Time.get_ticks_msec() + 18000 + var observation_deadline: int = Time.get_ticks_msec() + 22000 while Time.get_ticks_msec() < observation_deadline: await process_frame var current_animation: StringName = animation_player.current_animation + observed_animations[current_animation] = true + var target_locomotion_state: int = int(host_avatar.get( + "_network_target_locomotion_state" + )) + observed_locomotion_states[target_locomotion_state] = true + if target_locomotion_state == Player.LocomotionState.SNEAKING: + maximum_sneak_speed = maxf( + maximum_sneak_speed, + Vector2( + host_avatar.velocity.x, host_avatar.velocity.z + ).length(), + ) saw_running = saw_running or current_animation.begins_with("running") saw_walking = saw_walking or current_animation.begins_with("walking") saw_sneaking = saw_sneaking or current_animation == &"sneaking" @@ -379,15 +763,44 @@ func _run_client() -> void: and saw_dust ): break - assert(saw_running) - assert(saw_walking) - assert(saw_sneaking) - assert(saw_idle_sneak) - assert(saw_net_draw) - assert(saw_net_strike) - assert(saw_net_strike_paused) - assert(saw_animation_advance) - assert(saw_dust) + var missing_observations: Array[String] = [] + if not saw_running: + missing_observations.append("running") + if not saw_walking: + missing_observations.append("walking") + if not saw_sneaking: + missing_observations.append("sneaking") + if not saw_idle_sneak: + missing_observations.append("idle_sneak") + if not saw_net_draw: + missing_observations.append("net_draw") + if not saw_net_strike: + missing_observations.append("net_strike") + if not saw_net_strike_paused: + missing_observations.append("net_strike_paused") + if not saw_animation_advance: + missing_observations.append("animation_advance") + if not saw_dust: + missing_observations.append("sprint_dust") + if not missing_observations.is_empty(): + push_error( + ( + "Missing movement observations %s; observed animations: %s; " + + "locomotion states: %s; maximum sneak speed: %.3f" + ) % [ + missing_observations, + observed_animations.keys(), + observed_locomotion_states.keys(), + maximum_sneak_speed, + ] + ) + session.disconnect_session("") + main.queue_free() + for _frame: int in 4: + await process_frame + await create_timer(0.1).timeout + quit(1) + return print("Movement multiplayer client validation: PASS") session.disconnect_session("") main.queue_free() @@ -425,6 +838,39 @@ func _movement_input( } +func _sustain_locomotion_input( + player: Player, + starting_sequence: int, + duration_seconds: float, + sprinting: bool, + moving: bool = true, + sneaking: bool = false, +) -> int: + var sequence: int = starting_sequence + var deadline: int = ( + Time.get_ticks_msec() + roundi(duration_seconds * 1000.0) + ) + while Time.get_ticks_msec() < deadline: + player.apply_authoritative_network_input( + _movement_input(sequence, sprinting, moving, sneaking) + ) + sequence += 1 + await create_timer(0.1).timeout + return sequence + + +func _reset_locomotion_test_position( + player: Player, + session: NetworkSession, + world: TestWorld, +) -> void: + player.velocity = Vector3.ZERO + player.global_transform = world.get_player_spawn_transform() + session.publish_authoritative_teleport(1) + for _frame: int in 4: + await physics_frame + + func _create_initialized_main() -> Node: root.size = Vector2i(1280, 720) var main: Node = MainScene.instantiate() diff --git a/tests/net_attachment_validation.gd b/tests/net_attachment_validation.gd index 15b8b7d..6b53c08 100644 --- a/tests/net_attachment_validation.gd +++ b/tests/net_attachment_validation.gd @@ -57,23 +57,73 @@ func _run() -> void: "Net rear face did not follow the socket direction guide.", ) - var handle := catching_net.get_node_or_null("Handle") as MeshInstance3D - var hoop := catching_net.get_node_or_null("Hoop") as MeshInstance3D - var bag := catching_net.get_node_or_null("Bag") as MeshInstance3D - var impact_marker := ( - catching_net.get_node_or_null("ImpactMarker") as Marker3D + var model := catching_net.get_node_or_null("ModelMount/NetModel") as Node3D + _check(model != null, "Imported net model is missing.") + if model == null: + _finish(host_skeleton) + return + var skeleton := model.find_child("Skeleton3D", true, false) as Skeleton3D + _check(skeleton != null, "Imported net Skeleton3D is missing.") + if skeleton == null: + _finish(host_skeleton) + return + _check( + skeleton.find_bone("net_root") >= 0, + "Imported net_root bone is missing.", ) - _check(handle != null and handle.mesh != null, "Placeholder handle is missing.") - _check(hoop != null and hoop.mesh != null, "Placeholder hoop is missing.") - _check(bag != null and bag.mesh != null, "Placeholder net bag is missing.") - _check(impact_marker != null, "Net impact marker is missing.") - if impact_marker != null: + _check( + skeleton.find_bone("net_rim") >= 0, + "Imported net_rim bone is missing.", + ) + _check( + skeleton.find_bone("net_mid") >= 0, + "Imported net_mid bone is missing.", + ) + _check( + skeleton.find_bone("net_tip") >= 0, + "Imported net_tip bone is missing.", + ) + + var spring := skeleton.get_node_or_null("NetSpring") as SpringBoneSimulator3D + _check(spring != null, "Net spring simulator was not created.") + if spring != null: + _check(spring.get_setting_count() == 1, "Net spring settings changed.") _check( - attachment.get_impact_world_position().is_equal_approx( - impact_marker.global_position - ), - "Net impact position moved away from its marker.", + spring.get_root_bone_name(0) == &"net_mid", + "Net spring root must remain net_mid.", ) + _check( + spring.get_end_bone_name(0) == &"net_tip", + "Net spring end must remain net_tip.", + ) + _check(not spring.active, "Hidden net spring must be suspended.") + catching_net.visible = true + await process_frame + await process_frame + _check(spring.active, "Visible net spring must be active.") + _check(spring.get_joint_count(0) == 2, "Net spring chain is incomplete.") + _check( + not attachment.get_impact_world_position().is_equal_approx( + catching_net.global_position + ), + "Net impact position did not follow the authored rim bone.", + ) + catching_net.visible = false + await process_frame + _check(not spring.active, "Hidden net spring did not suspend.") + + for child: Node in model.find_children("*", "MeshInstance3D", true, false): + var mesh_instance := child as MeshInstance3D + if mesh_instance.mesh == null: + continue + for surface_index: int in mesh_instance.mesh.get_surface_count(): + var material := mesh_instance.mesh.surface_get_material(surface_index) + if material is BaseMaterial3D: + _check( + (material as BaseMaterial3D).texture_filter + == BaseMaterial3D.TEXTURE_FILTER_NEAREST, + "Net material does not use nearest texture sampling.", + ) var rod_attachment := ( FishingRodAttachmentScene.instantiate() as BoneAttachment3D diff --git a/tests/on_screen_keyboard_validation.gd b/tests/on_screen_keyboard_validation.gd index 1c324a2..a685c65 100644 --- a/tests/on_screen_keyboard_validation.gd +++ b/tests/on_screen_keyboard_validation.gd @@ -55,6 +55,7 @@ func _run() -> void: func _validate_default_and_persistence() -> void: var defaults := PlayerSettings.new() assert(not defaults.on_screen_keyboard_enabled) + assert(not defaults.swap_hotbar_camera_scroll) assert( KeyboardType.should_enable_for_controller(false, false, "Linux") ) @@ -87,11 +88,13 @@ func _validate_default_and_persistence() -> void: assert(manager.load_settings()) var edited: PlayerSettings = manager.current_settings.copy() edited.on_screen_keyboard_enabled = true + edited.swap_hotbar_camera_scroll = true assert(manager.apply_settings(edited)) var reloaded := SettingsManagerType.new() root.add_child(reloaded) assert(reloaded.load_settings()) assert(reloaded.current_settings.on_screen_keyboard_enabled) + assert(reloaded.current_settings.swap_hotbar_camera_scroll) manager.queue_free() reloaded.queue_free() diff --git a/tests/operator_multiplayer_validation.gd b/tests/operator_multiplayer_validation.gd index 059ced1..05f8ee9 100644 --- a/tests/operator_multiplayer_validation.gd +++ b/tests/operator_multiplayer_validation.gd @@ -36,6 +36,10 @@ func _run_host() -> void: as NetworkPlayerListService ) var bans := main.get_node("%HostBanStore") as HostBanStore + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) assert(session.set_host_open(true)) @@ -65,7 +69,7 @@ func _run_host() -> void: assert(players_page != null) players_page.call("_refresh") assert(_has_button_text(players_page, "deop")) - assert(_has_button_text(players_page, "clear art")) + assert(_has_button_tooltip(players_page, "scrub art")) var unban_deadline: int = Time.get_ticks_msec() + 12000 while ( @@ -149,9 +153,9 @@ func _run_client() -> void: assert(players_page != null) players_page.call("_refresh") var tabs := players_page.get("_tabs") as HBoxContainer - assert((tabs.get_child(2) as Button).visible) - players_page.call("_select_tab", 2) - assert(int(players_page.get("_current_tab")) == 2) + assert((tabs.get_child(3) as Button).visible) + players_page.call("_select_tab", 3) + assert(int(players_page.get("_current_tab")) == 3) var local_entry: PlayerListEntry = _entry_for_peer( service, session.get_local_peer_id() ) @@ -176,7 +180,7 @@ func _run_client() -> void: await process_frame assert(not session.is_local_operator()) assert(not service.is_local_moderator()) - assert(not (tabs.get_child(2) as Button).visible) + assert(not (tabs.get_child(3) as Button).visible) assert(int(players_page.get("_current_tab")) == 0) service.request_unban.rpc_id(1, SECOND_BANNED_FINGERPRINT) var disconnect_deadline: int = Time.get_ticks_msec() + 10000 @@ -252,3 +256,11 @@ func _has_button_text(root_node: Node, text: String) -> bool: if button != null and button.text == text: return true return false + + +func _has_button_tooltip(root_node: Node, tooltip: String) -> bool: + for node: Node in root_node.find_children("*", "Button", true, false): + var button := node as Button + if button != null and button.tooltip_text == tooltip: + return true + return false diff --git a/tests/player_experience_validation.gd b/tests/player_experience_validation.gd index 5e9dbef..a76a3dd 100644 --- a/tests/player_experience_validation.gd +++ b/tests/player_experience_validation.gd @@ -143,7 +143,7 @@ func _validate_save_migration() -> void: version_five, 5, ) - assert(int(migrated.get("save_version", -1)) == 10) + assert(int(migrated.get("save_version", -1)) == 11) var experience_data: Dictionary = migrated.get("experience", {}) assert(int(experience_data.get("total_experience", -1)) == 0) var world_data: Dictionary = migrated.get("world", {}) @@ -155,6 +155,9 @@ func _validate_save_migration() -> void: assert( PlayerJobService.validate_save_data(migrated.get("jobs", {})) ) + assert(not PlayerHomeState.sanitize_save_data( + migrated.get("home", {}) + ).is_empty()) manager.queue_free() diff --git a/tests/player_gathering_animation_validation.gd b/tests/player_gathering_animation_validation.gd index 16e52c3..42f97ca 100644 --- a/tests/player_gathering_animation_validation.gd +++ b/tests/player_gathering_animation_validation.gd @@ -23,7 +23,7 @@ func _run() -> void: await process_frame assert(is_equal_approx( Player.get_catch_texture_resolution_scale(CrabBrown.display_texture), - 1.0, + 20.0, )) assert(is_equal_approx( Player.get_catch_texture_resolution_scale(ClamManila.display_texture), diff --git a/tests/profile_multiplayer_validation.gd b/tests/profile_multiplayer_validation.gd index ec7a669..4d2bd70 100644 --- a/tests/profile_multiplayer_validation.gd +++ b/tests/profile_multiplayer_validation.gd @@ -56,6 +56,10 @@ func _run_host() -> void: "kim", )) var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) var local_avatar := main.get_node("%PlayerSpawnService").get_avatar( 1 diff --git a/tests/progression_archive_validation.gd b/tests/progression_archive_validation.gd index 11fc51c..30f0df6 100644 --- a/tests/progression_archive_validation.gd +++ b/tests/progression_archive_validation.gd @@ -22,11 +22,24 @@ func _run() -> void: var save_manager := main.get("_save_manager") as PlayerSaveManager var player := main.get("_player") as Player var data_root := main.get("_data_root") as PlayerDataRoot - assert(save_manager != null and player != null and data_root != null) + var home_state := main.get("_home_state") as PlayerHomeState + assert( + save_manager != null + and player != null + and data_root != null + and home_state != null + ) assert(save_manager.initialize_new_game(864209)) save_manager.set_autosave_enabled(true) assert(player.wallet.restore_balance(4321)) assert(player.bag.add_item(&"coffee")) + assert(home_state.add_owned_decor(&"basic_cube")) + assert(not home_state.place_decor( + &"basic_cube", + Vector3.ZERO, + 0.0, + PlayerHomeState.PlacementMode.GRID, + ).is_empty()) assert(save_manager.save_now()) var save_path: String = str(save_manager.get("_save_path")) @@ -38,7 +51,23 @@ func _run() -> void: _assert_opaque(save_path) var decoded: Dictionary = ProgressionSaveCodec.read_local_save(save_path) assert(bool(decoded.get("ok", false))) - assert(int((decoded["data"] as Dictionary)["save_version"]) == 10) + assert(int((decoded["data"] as Dictionary)["save_version"]) == 11) + assert(not PlayerHomeState.sanitize_save_data( + (decoded["data"] as Dictionary).get("home", {}) + ).is_empty()) + assert( + ((decoded["data"] as Dictionary)["home"] as Dictionary) + .get("placements", []).size() == 1 + ) + var legacy_container_path: String = data_root.progression_backup_directory().path_join( + "netfishing-container.nfsave" + ) + _assert_legacy_progression_container( + legacy_container_path, + decoded["data"] as Dictionary, + ) + _assert_legacy_data_manifest(data_root.root_path.get_base_dir()) + _assert_legacy_identity_backup(main, data_root) var archive_path: String = data_root.progression_backup_directory().path_join( "progression-test.nfsave" @@ -65,6 +94,8 @@ func _run() -> void: assert(save_manager.load_player_data()) assert(player.wallet.get_balance() == 4321) assert(save_manager.get_world_seed() == 864209) + assert(home_state.get_owned_count(&"basic_cube") == 1) + assert(home_state.get_placed_count(&"basic_cube") == 1) var legacy_data: Dictionary = ( ProgressionSaveCodec.read_local_save(save_path)["data"] @@ -82,35 +113,104 @@ func _run() -> void: assert(not FileAccess.file_exists(legacy_path)) _assert_opaque(save_path) + save_manager.set_autosave_enabled(false) + var save_slots := main.get("_save_slots") as PlayerSaveSlotCatalog + assert(save_slots != null) + assert(save_slots.configure(data_root, save_manager)) + var adopted_slots: Array[Dictionary] = save_slots.list_slots() + assert(adopted_slots.size() == 1) + var adopted_slot_id: String = str(adopted_slots.front().get("slot_id", "")) + assert(bool(adopted_slots.front().get("legacy", false))) + assert(bool(adopted_slots.front().get("has_save", false))) + + var duplicated: Dictionary = save_slots.duplicate_slot( + adopted_slot_id, + "another island", + WorldLayout.GENERATED, + 97531, + ) + assert(bool(duplicated.get("ok", false))) + var duplicated_slot_id: String = str(duplicated.get("slot_id", "")) + var duplicate_summary: Dictionary = save_slots.get_slot(duplicated_slot_id) + assert(int(duplicate_summary.get("wallet_balance", -1)) == 4321) + assert(int(duplicate_summary.get("world_seed", -1)) == 97531) + assert(save_slots.activate_slot(duplicated_slot_id)) + assert(save_manager.load_player_data()) + assert(player.wallet.get_balance() == 4321) + assert(save_manager.get_world_seed() == 97531) + assert(save_slots.rename_slot(duplicated_slot_id, "renamed island")) + + var slot_archive: String = data_root.progression_backup_directory().path_join( + "save-slot-export.nfsave" + ) + assert(bool(save_slots.export_slot( + duplicated_slot_id, + slot_archive, + ).get("ok", false))) + var imported_slot: Dictionary = save_slots.import_slot( + slot_archive, + "imported island", + ) + assert(bool(imported_slot.get("ok", false))) + var imported_slot_id: String = str(imported_slot.get("slot_id", "")) + assert(not save_slots.get_slot(imported_slot_id).is_empty()) + assert(save_slots.delete_slot(duplicated_slot_id)) + assert(save_slots.get_slot(duplicated_slot_id).is_empty()) + assert(save_slots.list_slots().size() == 2) + var settings_panels: Array[Node] = main.find_children( "*", "SettingsPanel", true, false ) assert(settings_panels.size() == 2) for settings_panel: SettingsPanel in settings_panels: - var export_button := settings_panel.get_node( - "%ExportProgression" - ) as Button - var import_button := settings_panel.get_node( - "%ImportProgression" - ) as Button - assert(export_button != null and import_button != null) - assert(not export_button.disabled and not import_button.disabled) - assert( - export_button.get_node(export_button.focus_neighbor_right) - == import_button - ) - assert( - import_button.get_node(import_button.focus_neighbor_left) - == export_button + assert(settings_panel.get_node_or_null("%ExportProgression") == null) + assert(settings_panel.get_node_or_null("%ImportProgression") == null) + var settings_panel: SettingsPanel = settings_panels.front() as SettingsPanel + settings_panel.set( + "_presentation_mode", SettingsPanel.PresentationMode.TITLE_EMBEDDED + ) + var unchanged_root: String = data_root.root_path + settings_panel.call("_choose_data_folder") + var data_folder_dialog := ( + settings_panel.get("_data_folder_dialog") as FileDialog + ) + assert(data_folder_dialog != null) + assert(data_folder_dialog.current_dir == unchanged_root) + data_folder_dialog.hide() + settings_panel.call("_change_data_folder", unchanged_root + "/") + await process_frame + assert(data_root.root_path == unchanged_root) + assert( + (settings_panel.get_node("%SettingsFeedback") as Label).text + == "this data folder is already active." + ) + var save_slots_page := main.find_child( + "SaveSlotsPage", true, false + ) as SaveSlotsPage + assert(save_slots_page != null) + assert(save_slots_page.get_node("%ExportSlotButton") is Button) + assert(save_slots_page.get_node("%ImportSlotButton") is Button) + + var unchanged_migration: Dictionary = ( + PortableDataMigration.migrate_active_to( + data_root, unchanged_root + "/" ) + ) + assert(bool(unchanged_migration.get("ok", false))) + assert(not bool(unchanged_migration.get("changed", true))) + assert(data_root.root_path == unchanged_root) var migrated_root: String = data_root.root_path.get_base_dir().path_join( "progression-migrated-data" ) - var data_migration: Dictionary = PortableDataMigration.migrate_active_to( - data_root, migrated_root + settings_panel.call("_change_data_folder", migrated_root) + for _frame: int in 4: + await process_frame + assert(data_root.root_path == migrated_root) + assert( + (settings_panel.get_node("%SettingsFeedback") as Label).text + == "data folder changed." ) - assert(bool(data_migration.get("ok", false))) var migrated_save: String = migrated_root.path_join( "player/player_save.nfsave" ) @@ -118,6 +218,30 @@ func _run() -> void: assert(bool( ProgressionSaveCodec.read_local_save(migrated_save).get("ok", false) )) + assert(FileAccess.file_exists(migrated_root.path_join( + "player/save_slots.json" + ))) + var migrated_imported_slot: String = migrated_root.path_join( + "player/saves/%s.nfsave" % imported_slot_id + ) + assert(FileAccess.file_exists(migrated_imported_slot)) + assert(bool( + ProgressionSaveCodec.read_local_save(migrated_imported_slot).get( + "ok", false + ) + )) + var live_slots: Array[Dictionary] = save_slots.list_slots() + assert(live_slots.size() == 2) + var live_created: Dictionary = save_slots.create_empty_slot( + "live root switch" + ) + assert(bool(live_created.get("ok", false))) + var live_slot_id: String = str(live_created.get("slot_id", "")) + assert(save_slots.rename_slot(live_slot_id, "live root ready")) + assert( + str(save_slots.get_slot(live_slot_id).get("display_name", "")) + == "live root ready" + ) main.queue_free() for _frame: int in 4: @@ -127,6 +251,124 @@ func _run() -> void: quit() +func _assert_legacy_progression_container( + path: String, + payload: Dictionary, +) -> void: + var payload_json: String = JSON.stringify(payload) + var envelope: Dictionary = { + "magic": ProgressionSaveCodec.LEGACY_MAGIC, + "format_version": ProgressionSaveCodec.FORMAT_VERSION, + "kind": ProgressionSaveCodec.LOCAL_KIND, + "game_version": "0.18.1-alpha", + "created_at_unix": 1, + "payload_sha256": PortableFileGuard.hash_bytes( + payload_json.to_utf8_buffer() + ), + "payload_json": payload_json, + } + var file: FileAccess = FileAccess.open_encrypted_with_pass( + path, + FileAccess.WRITE, + ProgressionSaveCodec.CONTAINER_PASSPHRASE, + ) + assert(file != null) + file.store_string(JSON.stringify(envelope)) + file.close() + var decoded: Dictionary = ProgressionSaveCodec.read_local_save(path) + assert(bool(decoded.get("ok", false))) + assert(bool(decoded.get("legacy_container", false))) + + +func _assert_legacy_data_manifest(parent: String) -> void: + var legacy_root: String = parent.path_join("netfishing-manifest-root") + assert(DirAccess.make_dir_recursive_absolute(legacy_root) == OK) + var legacy_id: String = "0123456789abcdef0123456789abcdef" + var legacy_manifest: Dictionary = { + "format_version": PlayerDataRoot.MANIFEST_VERSION, + "layout_version": PlayerDataRoot.LAYOUT_VERSION, + "application": PlayerDataRoot.LEGACY_APPLICATION_ID, + "root_id": legacy_id, + "created_at_unix": 1, + "last_opened_at_unix": 1, + } + var legacy_path: String = legacy_root.path_join( + PlayerDataRoot.LEGACY_MANIFEST_FILENAME + ) + var file := FileAccess.open(legacy_path, FileAccess.WRITE) + assert(file != null) + file.store_string(JSON.stringify(legacy_manifest, "\t")) + file.close() + var legacy_data_root := PlayerDataRoot.new() + root.add_child(legacy_data_root) + assert(legacy_data_root.use_existing_root(legacy_root)) + assert(legacy_data_root.root_id == legacy_id) + assert(FileAccess.file_exists(legacy_path)) + var canonical_path: String = legacy_root.path_join( + PlayerDataRoot.MANIFEST_FILENAME + ) + assert(FileAccess.file_exists(canonical_path)) + var parser := JSON.new() + assert(parser.parse(FileAccess.get_file_as_string(canonical_path)) == OK) + assert((parser.data as Dictionary).get("application") == PlayerDataRoot.APPLICATION_ID) + legacy_data_root.queue_free() + + +func _assert_legacy_identity_backup(main: Node, data_root: PlayerDataRoot) -> void: + var player_identity := main.get("_player_identity") as PlayerIdentityStore + var identity_backups := main.get("_identity_backups") as IdentityBackupService + assert(player_identity != null and player_identity.is_ready()) + assert(identity_backups != null) + var material: Dictionary = player_identity.export_identity_material() + var fingerprint: String = str(material.get("fingerprint", "")) + var private_key := CryptoKey.new() + assert(private_key.load_from_string(str(material.get("private_pem", ""))) == OK) + var canonical: PackedByteArray = NetworkIdentityCrypto.canonical_bytes_for_prefix( + NetworkIdentityCrypto.LEGACY_DOMAIN_PREFIX, + "identity_backup_self_test", + ["player", fingerprint], + ) + var context := HashingContext.new() + assert(context.start(HashingContext.HASH_SHA256) == OK) + context.update(canonical) + var signature: PackedByteArray = Crypto.new().sign( + HashingContext.HASH_SHA256, + context.finish(), + private_key, + ) + var envelope: Dictionary = { + "magic": IdentityBackupService.LEGACY_MAGIC, + "format_version": IdentityBackupService.FORMAT_VERSION, + "identity_type": "player", + "algorithm": NetworkIdentityCrypto.ALGORITHM, + "private_pem": material.get("private_pem", ""), + "public_pem": material.get("public_pem", ""), + "fingerprint": fingerprint, + "created_at_unix": 1, + "source_device_id": data_root.device_id, + "self_signature": Marshalls.raw_to_base64(signature), + } + var backup_path: String = data_root.identity_backup_directory().path_join( + "netfishing-player.nfidentity" + ) + var passphrase := "legacy-test-passphrase" + var file: FileAccess = FileAccess.open_encrypted_with_pass( + backup_path, + FileAccess.WRITE, + passphrase, + ) + assert(file != null) + file.store_string(JSON.stringify(envelope)) + file.close() + var inspected: Dictionary = identity_backups.inspect_backup( + backup_path, + passphrase, + "player", + ) + assert(bool(inspected.get("ok", false))) + assert(str(inspected.get("fingerprint", "")) == fingerprint) + + func _assert_opaque(path: String) -> void: var bytes: PackedByteArray = PortableFileGuard.read_bytes(path) assert(not bytes.is_empty()) diff --git a/tests/session_switch_multiplayer_validation.gd b/tests/session_switch_multiplayer_validation.gd index 68cfcc7..86c9a84 100644 --- a/tests/session_switch_multiplayer_validation.gd +++ b/tests/session_switch_multiplayer_validation.gd @@ -31,6 +31,10 @@ func _run() -> void: func _run_host(port: int, label: String) -> void: var main: Node = await _create_initialized_main() var session := main.get_node("%NetworkSession") as NetworkSession + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_dedicated_host(port, 8, "127.0.0.1")) assert(session.set_host_open(true)) var remote_peer_id: int = await _wait_for_remote_peer(session) diff --git a/tests/surface_drawing_multiplayer_validation.gd b/tests/surface_drawing_multiplayer_validation.gd index ebba510..f79700e 100644 --- a/tests/surface_drawing_multiplayer_validation.gd +++ b/tests/surface_drawing_multiplayer_validation.gd @@ -24,9 +24,15 @@ func _run() -> void: func _run_host() -> void: var main: Node = await _create_initialized_main() var session := main.get_node("%NetworkSession") as NetworkSession - assert(session.start_private_host(TEST_PORT)) + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(bool(main.call( + "_prepare_host_world", WorldLayout.STARTER_ISLAND, 1 + ))) var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game()) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) + assert(session.start_private_host(TEST_PORT)) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -58,6 +64,40 @@ func _run_host() -> void: remote_peer_id ) assert(remote_record != null) + var network_home := main.get_node( + "%NetworkHomeService" + ) as NetworkHomeService + var home_world := main.get_node("%HomeWorldService") as HomeWorldService + var spawn_service := main.get_node( + "%PlayerSpawnService" + ) as PlayerSpawnService + assert(await _wait_for_home( + network_home, remote_record.identity_fingerprint + )) + var remote_avatar: Player = spawn_service.get_avatar(remote_peer_id) + assert(remote_avatar != null) + var exterior_spawn: Transform3D = home_world.get_exterior_spawn_transform( + remote_record.identity_fingerprint + ) + var exterior_deadline: int = Time.get_ticks_msec() + 5000 + while ( + Time.get_ticks_msec() < exterior_deadline + and remote_avatar.global_position.distance_to(exterior_spawn.origin) > 0.25 + ): + await physics_frame + assert(remote_avatar.global_position.distance_to(exterior_spawn.origin) <= 0.25) + var canvas_state: Dictionary = service.get_canvas_state(canvas_id) + var canvas_origin: Vector3 = SurfaceDrawingProtocol.array_to_vector( + canvas_state["origin"] + ) + remote_avatar.global_position = Vector3( + canvas_origin.x + 1.0, + player.global_position.y, + canvas_origin.z, + ) + session.publish_authoritative_teleport(remote_peer_id) + for _frame: int in 4: + await physics_frame assert(session.peer_supports_capability( remote_peer_id, SurfaceDrawingProtocol.CAPABILITY )) @@ -148,6 +188,9 @@ func _run_host() -> void: ): await process_frame assert(service.get_canvas_ids().size() == 1) + # Keep the second stamp observable on the client before the ban removes all + # artwork carrying that participant fingerprint. + await create_timer(1.0).timeout var player_list := main.get_node( "%NetworkPlayerListService" ) as NetworkPlayerListService @@ -217,6 +260,20 @@ func _run_client() -> void: var canvas_id: String = service.get_canvas_ids()[0] var snapshot: Dictionary = service.get_canvas_state(canvas_id) assert(str(_find_cell(snapshot, 7, 7).get("color_id", "")) == "coral") + var canvas_origin: Vector3 = SurfaceDrawingProtocol.array_to_vector( + snapshot["origin"] + ) + var placement_deadline: int = Time.get_ticks_msec() + 10000 + while ( + Time.get_ticks_msec() < placement_deadline + and player.global_position.distance_to(canvas_origin) + > NetworkSurfaceDrawingService.MAX_DRAW_DISTANCE + 2.0 + ): + await physics_frame + assert( + player.global_position.distance_to(canvas_origin) + <= NetworkSurfaceDrawingService.MAX_DRAW_DISTANCE + 2.0 + ) assert(service.request_cell_edits(canvas_id, [{ "x": 7, "y": 7, @@ -377,3 +434,18 @@ func _create_initialized_main() -> Node: await process_frame assert(bool(main.get("_application_initialized"))) return main + + +func _wait_for_home( + network_home: NetworkHomeService, + fingerprint: String, +) -> bool: + var deadline: int = Time.get_ticks_msec() + 10000 + while Time.get_ticks_msec() < deadline: + await process_frame + var manifests: Dictionary = network_home.get( + "_manifests_by_fingerprint" + ) + if manifests.has(fingerprint): + return true + return false diff --git a/tests/surface_drawing_runtime_validation.gd b/tests/surface_drawing_runtime_validation.gd index 6fa7a9e..85110cd 100644 --- a/tests/surface_drawing_runtime_validation.gd +++ b/tests/surface_drawing_runtime_validation.gd @@ -20,9 +20,13 @@ func _run() -> void: await process_frame assert(bool(main.get("_application_initialized"))) var session := main.get_node("%NetworkSession") as NetworkSession + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game()) + assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND)) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -67,11 +71,23 @@ func _run() -> void: state["cells"][0]["author_fingerprint"] == session.get_local_identity_fingerprint() ) - var export_path: String = service.export_canvas_png(canvas_id) + service.set("_last_hovered_canvas_id", canvas_id) + service.set("_hovered_canvas_id", "") + var game_ui := main.get_node("%GameUI") as GameUI + var toolbar := game_ui.get_node( + "%SurfaceDrawingToolbar" + ) as SurfaceDrawingToolbar + var export_button := toolbar.get_node("%ExportButton") as Button + export_button.pressed.emit() + var exported_entries: Array[Dictionary] = service.get_saved_stamp_entries() + assert(exported_entries.size() == 1) + var export_path: String = str(exported_entries[0]["path"]) assert(not export_path.is_empty()) var data_root := main.get("_data_root") as PlayerDataRoot assert(export_path.begins_with(data_root.root_path.path_join("artwork"))) assert(FileAccess.file_exists(export_path)) + var status_label := game_ui.get_node("%StatusLabel") as Label + assert(status_label.text == "artwork exported to the data folder • artwork") var exported_image: Image = Image.load_from_file(export_path) assert(exported_image.get_size() == Vector2i(16, 16)) assert(exported_image.get_pixel(8, 7).is_equal_approx( diff --git a/tests/terrain_chunk_generator_validation.gd b/tests/terrain_chunk_generator_validation.gd index b8d24cf..ec736d9 100644 --- a/tests/terrain_chunk_generator_validation.gd +++ b/tests/terrain_chunk_generator_validation.gd @@ -42,6 +42,7 @@ const EXPECTED_IDS: Array[String] = [ "chunk_0035", "chunk_0036", "chunk_0037", + "chunk_0038", "chunk_9999", "chunk_9998", "chunk_9997", @@ -98,6 +99,7 @@ const EXPECTED_VARIANT_COUNTS: Dictionary[StringName, int] = { &"chunk_0035": 4, &"chunk_0036": 4, &"chunk_0037": 4, + &"chunk_0038": 4, &"chunk_9999": 4, &"chunk_9998": 4, &"chunk_9997": 4, @@ -163,6 +165,7 @@ func _validate_catalog() -> void: var lake_narrow_to_regular := CATALOG.definition_for_id(&"chunk_0023") var river_edge := CATALOG.definition_for_id(&"chunk_0024") var river_edge_variant := CATALOG.definition_for_id(&"chunk_0025") + var river_stone_bridge := CATALOG.definition_for_id(&"chunk_0038") var river_source_right := CATALOG.definition_for_id(&"chunk_0029") var river_source_left := CATALOG.definition_for_id(&"chunk_0030") var river_outlet_right := CATALOG.definition_for_id(&"chunk_0031") @@ -208,6 +211,7 @@ func _validate_catalog() -> void: and lake_narrow_to_regular != null and river_edge != null and river_edge_variant != null + and river_stone_bridge != null and river_source_right != null and river_source_left != null and river_outlet_right != null @@ -255,6 +259,7 @@ func _validate_catalog() -> void: and lake_narrow_to_regular != null and river_edge != null and river_edge_variant != null + and river_stone_bridge != null and river_source_right != null and river_source_left != null and river_outlet_right != null @@ -509,6 +514,8 @@ func _validate_catalog() -> void: ( not river_edge.participates_in_base_solver and not river_edge_variant.participates_in_base_solver + and not river_stone_bridge.participates_in_base_solver + and river_stone_bridge.maximum_placements == 2 and not river_source_right.participates_in_base_solver and not river_source_left.participates_in_base_solver and not river_outlet_right.participates_in_base_solver @@ -522,6 +529,8 @@ func _validate_catalog() -> void: and river_edge.water_outlet_edges == 14 and river_edge_variant.water_inlet_edges == 14 and river_edge_variant.water_outlet_edges == 14 + and river_stone_bridge.water_inlet_edges == 14 + and river_stone_bridge.water_outlet_edges == 14 and river_source_right.water_inlet_edges == 6 and river_source_right.water_outlet_edges == 6 and river_source_left.water_inlet_edges == 3 @@ -544,6 +553,7 @@ func _validate_catalog() -> void: and river_cap.water_outlet_edges == 6 and river_edge.water_surface_polygon.size() == 13 and river_edge_variant.water_surface_polygon.size() == 13 + and river_stone_bridge.water_surface_polygon.size() == 13 and river_source_right.water_surface_polygon.size() == 13 and river_source_left.water_surface_polygon.size() == 13 and river_outlet_right.water_surface_polygon.size() == 19 @@ -554,6 +564,8 @@ func _validate_catalog() -> void: and river_cap.primary_mesh_name == &"chunk_0020" and "river" in river_edge.tags and "river" in river_edge_variant.tags + and "river_bridge" in river_stone_bridge.tags + and "stepping_stones" in river_stone_bridge.tags and "river_source_right" in river_source_right.tags and "river_source_left" in river_source_left.tags and "river_outlet_right" in river_outlet_right.tags @@ -617,13 +629,14 @@ func _validate_catalog() -> void: ]: _check( transition.overlay_only + and transition.primary_mesh_name == &"chunk_0010" and transition.base_layer_scene != null and transition.base_layer_mesh_name == &"chunk_0007" and not transition.must_be_interior and transition.prefers_map_boundary and "transition" in transition.tags, ( - "Each raised-coast endpoint must layer the deep corner " + "Each raised-coast endpoint must layer the inland corner " + "over an authored level-one coastline." ), ) @@ -645,6 +658,7 @@ func _validate_catalog() -> void: ]: _check( transition.overlay_only + and transition.primary_mesh_name == &"chunk_0010" and transition.base_layer_scene != null and transition.base_layer_mesh_name == &"chunk_0008" and not transition.must_be_interior @@ -1461,6 +1475,10 @@ func _validate_authored_rotations(generator: TerrainChunkGenerator) -> void: var river_edge_variant_bottom := _find_variant(generator, &"chunk_0025", 2) var river_edge_vertical_left := _find_variant(generator, &"chunk_0024", 1) var river_edge_vertical_right := _find_variant(generator, &"chunk_0025", 3) + var river_stones_top := _find_variant(generator, &"chunk_0038", 0) + var river_stones_bottom := _find_variant(generator, &"chunk_0038", 2) + var river_stones_left := _find_variant(generator, &"chunk_0038", 1) + var river_stones_right := _find_variant(generator, &"chunk_0038", 3) var river_source_right := _find_variant(generator, &"chunk_0029", 0) var river_source_left := _find_variant(generator, &"chunk_0030", 0) var river_outlet_right := _find_variant(generator, &"chunk_0031", 0) @@ -1500,6 +1518,10 @@ func _validate_authored_rotations(generator: TerrainChunkGenerator) -> void: and river_edge_variant_bottom != null and river_edge_vertical_left != null and river_edge_vertical_right != null + and river_stones_top != null + and river_stones_bottom != null + and river_stones_left != null + and river_stones_right != null and river_source_right != null and river_source_left != null and river_outlet_right != null @@ -1525,6 +1547,10 @@ func _validate_authored_rotations(generator: TerrainChunkGenerator) -> void: and river_edge_variant_bottom != null and river_edge_vertical_left != null and river_edge_vertical_right != null + and river_stones_top != null + and river_stones_bottom != null + and river_stones_left != null + and river_stones_right != null and river_source_right != null and river_source_left != null and river_outlet_right != null @@ -1535,6 +1561,30 @@ func _validate_authored_rotations(generator: TerrainChunkGenerator) -> void: and river_bend_d != null and beach_east != null ): + _check( + generator._edges_are_compatible( + river_edge_top, + TerrainChunkTopology.Edge.EAST, + river_stones_top, + TerrainChunkTopology.Edge.WEST, + ) + and generator._edges_are_compatible( + river_stones_top, + TerrainChunkTopology.Edge.SOUTH, + river_stones_bottom, + TerrainChunkTopology.Edge.NORTH, + ) + and generator._edges_are_compatible( + river_stones_left, + TerrainChunkTopology.Edge.EAST, + river_stones_right, + TerrainChunkTopology.Edge.WEST, + ), + ( + "The stepping-stone banks must replace one paired straight river " + + "station in either orientation." + ), + ) _check( generator._edges_are_compatible( river_source_right, @@ -1750,8 +1800,8 @@ func _validate_authored_rotations(generator: TerrainChunkGenerator) -> void: func _validate_generation_summary(generator: TerrainChunkGenerator) -> void: var summary := generator._build_summary() _check( - int(summary.get("variant_count", 0)) == 170, - "The current catalog must expose all 170 authored rotations.", + int(summary.get("variant_count", 0)) == 174, + "The current catalog must expose all 174 authored rotations.", ) _check( int(summary.get("solver_variant_count", 0)) diff --git a/tests/texture_sampling_validation.gd b/tests/texture_sampling_validation.gd index deeabce..dcccc38 100644 --- a/tests/texture_sampling_validation.gd +++ b/tests/texture_sampling_validation.gd @@ -1,6 +1,11 @@ extends SceneTree const POLICY := preload("res://main/texture_sampling_policy.gd") +const PROJECTED_TERRAIN_TEXTURE_IMPORTS: Array[String] = [ + "res://world/generation/chunks/assets/chunk_0000_grass_lite.png.import", + "res://world/generation/chunks/assets/chunk_0001_sand.png.import", + "res://world/generation/chunks/assets/chunk_0031_dirt.png.import", +] var failures: Array[String] = [] @@ -83,9 +88,14 @@ func _validate_repository_files(path: String) -> void: func _validate_import_file(path: String) -> void: var source := FileAccess.get_file_as_string(path) + var expects_mipmaps := path in PROJECTED_TERRAIN_TEXTURE_IMPORTS _check( - "mipmaps/generate=true" not in source, - "Texture import generates mipmaps: %s" % path, + ("mipmaps/generate=true" in source) == expects_mipmaps, + ( + "Projected terrain mipmap policy mismatch: %s" + if expects_mipmaps + else "Texture import generates unapproved mipmaps: %s" + ) % path, ) diff --git a/tests/title_credits_validation.gd b/tests/title_credits_validation.gd index 5bbf632..e5ac4cc 100644 --- a/tests/title_credits_validation.gd +++ b/tests/title_credits_validation.gd @@ -21,6 +21,10 @@ func _run() -> void: var credits_button := title_screen.get_node( "%CreditsButton" ) as BubbleButton + var play_button := title_screen.get_node("%PlayButton") as BubbleButton + var continue_stats_drawer := title_screen.get_node( + "%ContinueStatsDrawer" + ) as RichTextLabel var credits_page := title_screen.get_node( "%CreditsPage" ) as TitleCreditsPageType @@ -34,9 +38,32 @@ func _run() -> void: await process_frame _expect(credits_button != null, "title menu exposes a credits button") + _expect(play_button != null, "title menu exposes the play button") + _expect( + continue_stats_drawer != null, + "play button owns a dedicated save-preview drawer", + ) + if play_button != null and continue_stats_drawer != null: + _expect( + continue_stats_drawer.get_parent() == play_button, + "save preview extends directly from the play button", + ) + _expect( + continue_stats_drawer.position.y < play_button.size.y + and ( + continue_stats_drawer.position.y + + continue_stats_drawer.size.y + ) > play_button.size.y, + "save preview overlaps the play edge and extends below it", + ) + _expect( + continue_stats_drawer.mouse_filter + == Control.MOUSE_FILTER_IGNORE, + "save preview drawer cannot intercept menu input", + ) _expect( credits_button.icon != null and credits_button.text.is_empty(), - "credits bubble uses its authored icon", + "credits action uses its icon in the square-button presentation", ) _expect(credits_page != null, "title screen contains the credits page") _expect(not credits_page.visible, "credits page starts closed") @@ -44,29 +71,39 @@ func _run() -> void: Rect2(Vector2.ZERO, bubble_field.size).encloses( Rect2(credits_button.position, credits_button.size) ), - "credits bubble stays inside the authored title field", + "credits button stays inside the authored title field", ) _expect( credits_button.mouse_filter == Control.MOUSE_FILTER_STOP, - "credits bubble accepts pointer input", + "credits button accepts pointer input", ) - if OS.has_environment("NETFISHING_TITLE_MENU_CAPTURE"): + if OS.has_environment("straywild_TITLE_MENU_CAPTURE"): (title_screen.get_node("%StartPromptCenter") as Control).hide() title_screen.set_process(true) await create_timer(0.5).timeout _expect( _save_capture( - OS.get_environment("NETFISHING_TITLE_MENU_CAPTURE") + OS.get_environment("straywild_TITLE_MENU_CAPTURE") ) == OK, "title menu validation capture saves successfully", ) title_screen.set_process(false) title_screen.set("_navigation_focus_active", false) + credits_button.call("_set_hovered", true) + credits_button.advance_emphasis(1.0) + _expect( + (credits_button.get_node("HoverDrawer") as Control).visible, + "pointer hover reveals the credits drawer before activation", + ) credits_button.pressed.emit() await process_frame _expect(credits_page.visible, "pointer activation opens credits") _expect(not presentation.visible, "credits replace the primary title menu") + _expect( + not (credits_button.get_node("HoverDrawer") as Control).visible, + "opening a title page collapses its hover drawer", + ) _expect( root.gui_get_focus_owner() != back_button, "pointer activation does not pseudo-select back", @@ -80,11 +117,11 @@ func _run() -> void: back_button.mouse_filter == Control.MOUSE_FILTER_STOP, "credits back button accepts pointer clicks", ) - if OS.has_environment("NETFISHING_CREDITS_CAPTURE"): + if OS.has_environment("straywild_CREDITS_CAPTURE"): await process_frame _expect( _save_capture( - OS.get_environment("NETFISHING_CREDITS_CAPTURE") + OS.get_environment("straywild_CREDITS_CAPTURE") ) == OK, "credits validation capture saves successfully", ) @@ -97,6 +134,30 @@ func _run() -> void: "pointer return leaves the title menu unfocused", ) + var online_button := title_screen.get_node( + "%JoinGameButton" + ) as BubbleButton + var join_game_page := title_screen.get_node("%JoinGamePage") as Control + online_button.call("_set_hovered", true) + online_button.advance_emphasis(1.0) + _expect( + (online_button.get_node("HoverDrawer") as Control).visible, + "pointer hover reveals the online drawer before activation", + ) + online_button.pressed.emit() + await process_frame + _expect(join_game_page.visible, "online activation opens the join page") + _expect( + not (online_button.get_node("HoverDrawer") as Control).visible, + "opening the join page collapses the online drawer", + ) + title_screen.call("_close_join_game") + await process_frame + _expect( + not (online_button.get_node("HoverDrawer") as Control).visible, + "returning from the join page does not restore stale pointer hover", + ) + title_screen.set("_navigation_focus_active", true) credits_button.grab_focus() credits_button.pressed.emit() @@ -134,7 +195,7 @@ func _run() -> void: _expect(not credits_page.visible, "ui cancel closes credits") _expect( root.gui_get_focus_owner() == credits_button, - "navigation return restores focus to the credits bubble", + "navigation return restores focus to the credits button", ) var chillnfill_name := credits_page.get_node( diff --git a/tests/tree_gathering_prototype_validation.gd b/tests/tree_gathering_prototype_validation.gd index d97f67e..2814e19 100644 --- a/tests/tree_gathering_prototype_validation.gd +++ b/tests/tree_gathering_prototype_validation.gd @@ -7,6 +7,9 @@ const Gatherables: GatherableCatalog = preload( "res://gathering/catalog/gatherable_catalog.tres" ) const FishCatalog: FishPool = preload("res://fish/pools/fish_catalog.tres") +const MeshSurfaceAnchorSamplerType = preload( + "res://world/generation/mesh_surface_anchor_sampler.gd" +) func _initialize() -> void: @@ -15,6 +18,7 @@ func _initialize() -> void: func _run() -> void: _validate_beetle_data() + await _validate_mesh_surface_sampler() await _validate_tree_anchors() _validate_anchored_presentation() _validate_three_dimensional_targeting() @@ -32,11 +36,74 @@ func _validate_beetle_data() -> void: assert(beetle.required_tool_id == &"crab_net") assert(beetle.spawn_anchor_set_id == &"starter_reachable_tree_trunks") assert(beetle.population == 3) - assert(is_equal_approx(beetle.sprite_pixel_size, 0.005)) + assert(is_equal_approx(beetle.spawn_anchor_occupancy_ratio, 0.35)) + assert(beetle.maximum_anchor_population == 64) + assert(beetle.target_population_for_anchor_count(8) == 3) + assert(beetle.target_population_for_anchor_count(40) == 14) + assert(beetle.target_population_for_anchor_count(400) == 64) + assert(is_equal_approx(beetle.sprite_pixel_size, 0.0075)) assert(beetle.is_stationary_spawn()) assert(not beetle.can_be_scared()) +func _validate_mesh_surface_sampler() -> void: + var prop := Node3D.new() + # The accessibility band is local to the planted prop, so the same tree on + # a raised cliff remains reachable from that cliff's walkable surface. + prop.position = Vector3(3.0, 12.0, -4.0) + root.add_child(prop) + var visual := MeshInstance3D.new() + var box := BoxMesh.new() + box.size = Vector3(2.0, 4.0, 2.0) + var wood := StandardMaterial3D.new() + wood.resource_name = "wood" + box.material = wood + visual.mesh = box + visual.position.y = 2.0 + prop.add_child(visual) + await process_frame + var random := RandomNumberGenerator.new() + random.seed = 115 + var sample: Dictionary = MeshSurfaceAnchorSamplerType.sample_vertical_surface( + prop, + prop, + PackedStringArray(["wood"]), + 0.7, + 1.5, + 0.35, + 0.025, + random, + ) + assert(not sample.is_empty()) + var surface_position: Vector3 = sample["surface_position"] + var anchor_position: Vector3 = sample["position"] + assert(surface_position.y >= 0.7 and surface_position.y <= 1.5) + var world_anchor_position := prop.to_global(anchor_position) + assert( + world_anchor_position.y >= 12.7 + and world_anchor_position.y <= 13.5 + ) + assert(is_equal_approx( + maxf(absf(surface_position.x), absf(surface_position.z)), + 1.0, + )) + assert(is_equal_approx( + anchor_position.distance_to(surface_position), + 0.025, + )) + assert(MeshSurfaceAnchorSamplerType.sample_vertical_surface( + prop, + prop, + PackedStringArray(["leaf"]), + 0.7, + 1.5, + 0.35, + 0.025, + random, + ).is_empty()) + prop.queue_free() + + func _validate_tree_anchors() -> void: var region := StarterIslandScene.instantiate() as WorldRegion root.add_child(region) @@ -61,7 +128,7 @@ func _validate_anchored_presentation() -> void: var sprite := presentation.get_node("GatherableSprite") as Sprite3D assert(sprite != null) assert(is_zero_approx(sprite.position.y)) - assert(is_equal_approx(sprite.pixel_size, 0.005)) + assert(is_equal_approx(sprite.pixel_size, 0.0075)) assert(not sprite.shaded) assert(sprite.billboard == BaseMaterial3D.BILLBOARD_ENABLED) assert(sprite.texture_filter == BaseMaterial3D.TEXTURE_FILTER_NEAREST) diff --git a/tests/ui_scaling_runtime_validation.gd b/tests/ui_scaling_runtime_validation.gd index b9e8bce..6e6182a 100644 --- a/tests/ui_scaling_runtime_validation.gd +++ b/tests/ui_scaling_runtime_validation.gd @@ -66,12 +66,6 @@ func _run() -> void: var pause_profile_stage := pause_menu.get_node( "ResponsivePauseStage" ) as Control - var decorative_fish_layer := title_screen.get_node( - "DecorativeFishLayer" - ) as Control - var decorative_bubble_layer := title_screen.get_node( - "DecorativeBubbleLayer" - ) as Control ui_viewport.add_child(game_ui) presenter.add_child(ui_viewport) root.add_child(presenter) @@ -165,26 +159,6 @@ func _run() -> void: assert(pause_profile_stage.position.is_equal_approx( expected_profile_position )) - assert(decorative_fish_layer.size.is_equal_approx( - expected_visible_size - )) - assert(decorative_bubble_layer.size.is_equal_approx( - expected_visible_size - )) - var left_to_right_bounds: Vector2 = ( - TitleScreen.get_decorative_fish_crossing_bounds( - expected_visible_size.x, 160.0, 1.0 - ) - ) - var right_to_left_bounds: Vector2 = ( - TitleScreen.get_decorative_fish_crossing_bounds( - expected_visible_size.x, 160.0, -1.0 - ) - ) - assert(left_to_right_bounds.x < -160.0) - assert(left_to_right_bounds.y > expected_visible_size.x) - assert(right_to_left_bounds.x > expected_visible_size.x) - assert(right_to_left_bounds.y < -160.0) assert(is_equal_approx(presenter.scale.x, presenter.scale.y)) assert(is_equal_approx(ui_root.scale.x, ui_root.scale.y)) var effective_scale: float = presenter.scale.x * ui_root.scale.x @@ -310,13 +284,13 @@ func _run() -> void: chat_panel.position.x * effective_scale, ] ) - if OS.has_environment("NETFISHING_UI_SCALE_CAPTURE"): + if OS.has_environment("straywild_UI_SCALE_CAPTURE"): await process_frame var capture: Image = root.get_texture().get_image() var capture_path: String = ( "%s-requested-%dx%d-actual-%dx%d.png" ) % [ - OS.get_environment("NETFISHING_UI_SCALE_CAPTURE"), + OS.get_environment("straywild_UI_SCALE_CAPTURE"), target_size.x, target_size.y, actual_size.x, diff --git a/tests/unified_inventory_validation.gd b/tests/unified_inventory_validation.gd index dacc5a0..6928969 100644 --- a/tests/unified_inventory_validation.gd +++ b/tests/unified_inventory_validation.gd @@ -35,6 +35,41 @@ func _run() -> void: hotbar.setup(bag, ItemCatalogResource, catches, layout) assert(PlayerInventoryLayout.INVENTORY_CAPACITIES == [9, 18, 27, 36]) assert(PlayerCoolerCapacity.CAPACITIES == [9, 18, 27, 36, 45, 54, 63, 72]) + var basic_cube: ItemData = ItemCatalogResource.get_item_by_id(&"basic_cube") + assert(basic_cube != null) + assert(basic_cube.icon != null) + assert(basic_cube.hotbar_allowed) + assert(bag.add_item(&"basic_cube")) + assert(layout.is_item_in_inventory(&"basic_cube")) + assert(hotbar.assign_item(0, &"basic_cube")) + assert(hotbar.get_item_id(0) == &"basic_cube") + assert( + layout.get_container( + PlayerInventoryLayout.EntryKind.ITEM, + &"basic_cube", + ) == PlayerInventoryLayout.InventoryContainer.HOTBAR + ) + assert(hotbar.clear_slot(0)) + assert(layout.is_item_in_inventory(&"basic_cube")) + assert(bag.remove_item(&"basic_cube")) + var packed_decor_slot: int = hotbar.find_first_empty_slot() + assert(packed_decor_slot == 0) + assert(layout.prepare_new_item_placement( + &"basic_cube", + PlayerInventoryLayout.InventoryContainer.HOTBAR, + packed_decor_slot, + )) + assert(bag.add_item(&"basic_cube")) + assert( + layout.get_container( + PlayerInventoryLayout.EntryKind.ITEM, + &"basic_cube", + ) == PlayerInventoryLayout.InventoryContainer.HOTBAR + ) + assert(hotbar.assign_item(packed_decor_slot, &"basic_cube")) + assert(hotbar.select_slot(packed_decor_slot)) + assert(hotbar.get_selected_item_id() == &"basic_cube") + assert(bag.remove_item(&"basic_cube")) assert(bag.add_item(&"coffee", 3)) assert(layout.get_inventory_count() == 1) @@ -62,6 +97,7 @@ func _run() -> void: fish_catch.sale_value = Bluegill.get_sale_value_for_weight( fish_catch.weight_lb ) + fish_catch.quality = FishQuality.Tier.IMPRESSIVE assert(catches.add_catch(fish_catch)) assert(layout.get_inventory_count() == 2) assert(layout.move_entry_to_first_free( @@ -106,8 +142,53 @@ func _run() -> void: == Color(UtilityPageStyle.OCEAN_SELECTED, 0.92) ) staged_slot.set_staged(false) + var quality_slot := GeneralInventorySlot.new() + root.add_child(quality_slot) + quality_slot.set_presentation_size(Vector2(78.0, 78.0)) + quality_slot.configure( + 0, + PlayerInventoryLayout.InventoryContainer.STORAGE, + false, + layout, + bag, + catches, + hotbar, + ItemCatalogResource, + ) + assert(quality_slot.entry_identity == fish_catch.catch_id) + assert( + (quality_slot.get_theme_stylebox("normal") as StyleBoxFlat).bg_color + == GeneralInventorySlot.quality_background_color( + FishQuality.Tier.IMPRESSIVE, + GeneralInventorySlot.QualityEmphasis.NORMAL, + ) + ) + quality_slot.set_staged(true) + assert( + (quality_slot.get_theme_stylebox("normal") as StyleBoxFlat).bg_color + == GeneralInventorySlot.quality_background_color( + FishQuality.Tier.IMPRESSIVE, + GeneralInventorySlot.QualityEmphasis.SELECTED, + ) + ) + var distinct_quality_colors: Dictionary[Color, bool] = {} + for quality: int in FishQuality.TIER_COUNT: + var quality_color := GeneralInventorySlot.quality_background_color( + quality, + GeneralInventorySlot.QualityEmphasis.NORMAL, + ) + assert(not distinct_quality_colors.has(quality_color)) + distinct_quality_colors[quality_color] = true + assert(distinct_quality_colors.size() == FishQuality.TIER_COUNT) var sale_tray_slot := ShopSaleTraySlot.new() root.add_child(sale_tray_slot) + sale_tray_slot.configure( + "catch:%s" % fish_catch.catch_id, + fish_catch.fish.display_texture, + fish_catch.fish.display_name, + 1, + fish_catch.quality, + ) assert( sale_tray_slot.custom_minimum_size == GeneralInventoryGrid.DEFAULT_SLOT_SIZE @@ -117,6 +198,14 @@ func _run() -> void: ) as StyleBoxFlat assert(sale_tray_style != null) assert(sale_tray_style.corner_radius_top_left == 26) + var expected_tray_quality_color := ( + GeneralInventorySlot.quality_background_color( + FishQuality.Tier.IMPRESSIVE, + GeneralInventorySlot.QualityEmphasis.NORMAL, + ) + ) + expected_tray_quality_color.a = 0.96 + assert(sale_tray_style.bg_color == expected_tray_quality_color) var wallet := PlayerWallet.new() root.add_child(wallet) assert(wallet.restore_balance(15000)) diff --git a/tests/world_layout_validation.gd b/tests/world_layout_validation.gd index 86bb00a..e6eec39 100644 --- a/tests/world_layout_validation.gd +++ b/tests/world_layout_validation.gd @@ -84,6 +84,11 @@ func _validate_world_switching() -> void: root.add_child(world) await process_frame assert(world.get_world_layout() == WorldLayout.GENERATED) + var initial_generator := world.get_node( + "Regions/GeneratedWorldRegion/Terrain/TerrainChunkGenerator" + ) as TerrainChunkGenerator + assert(initial_generator != null) + assert(initial_generator.get_generated_chunks_root() == null) assert(world.get_fishing_shop() != null) assert(world.get_player_storage() != null) _validate_world_boundary_clearance(world) @@ -95,6 +100,14 @@ func _validate_world_switching() -> void: assert(world.get_fishing_shop() != null) assert(world.get_player_storage() != null) assert(not world.get_fishable_water_regions().is_empty()) + var starter_safe_points := world.get_safe_respawn_points() + assert(not starter_safe_points.is_empty()) + var authored_safe_point: SafeRespawnPoint = starter_safe_points.back() + assert( + world.get_water_recovery_position( + authored_safe_point.global_position + ).is_equal_approx(authored_safe_point.global_position) + ) assert(world.activate_world(WorldLayout.GENERATED, 24680)) assert(world.get_world_layout() == WorldLayout.GENERATED) assert(world.get_generation_seed() == 24680) diff --git a/tests/world_spawn_multiplayer_validation.gd b/tests/world_spawn_multiplayer_validation.gd index c2b4101..f5ffd2e 100644 --- a/tests/world_spawn_multiplayer_validation.gd +++ b/tests/world_spawn_multiplayer_validation.gd @@ -2,9 +2,10 @@ extends SceneTree const MainScene: PackedScene = preload("res://main/main.tscn") const TEST_PORT: int = 18170 -const EXPECTED_POPULATION: int = 8 +const EXPECTED_POPULATION: int = 12 const EXPECTED_BY_TYPE: Dictionary = { &"crab_brown": 2, + &"crab_blue": 4, &"clam_manila": 3, &"beetle_stag_common": 3, } @@ -38,6 +39,10 @@ func _run_host() -> void: var session := main.get_node("%NetworkSession") as NetworkSession var service: Node = main.get_node("%NetworkWorldSpawnService") var world_time := main.get_node("%WorldTimeService") as WorldTimeService + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_dedicated_host(TEST_PORT, 8, "127.0.0.1")) assert(world_time.synchronize_calendar_time(12.0, SUMMER_DATE_ID)) assert(world_time.set_authoritative_time(12.0)) @@ -157,6 +162,10 @@ func _validate_population( (position as Vector3).y >= entry.minimum_surface_y - 0.001 ) + if entry.type_id == &"crab_brown": + assert((position as Vector3).y > -0.45) + elif entry.type_id == &"crab_blue": + assert((position as Vector3).y < -0.45) if expect_authoritative_state: var quality: int = int(state.get("quality", -1)) assert(FishQuality.is_valid(quality)) @@ -192,7 +201,10 @@ func _validate_respawn_budget(service: Node) -> void: false, true, ) - assert((service.get("_entities") as Dictionary).size() == 6) + assert( + (service.get("_entities") as Dictionary).size() + == EXPECTED_POPULATION - crab_ids.size() + ) var now: float = Time.get_ticks_msec() / 1000.0 var respawns: Array = service.get("_respawns") @@ -205,18 +217,27 @@ func _validate_respawn_budget(service: Node) -> void: respawns[index] = respawn service.call("_update_respawns") - assert((service.get("_entities") as Dictionary).size() == 7) + assert( + (service.get("_entities") as Dictionary).size() + == EXPECTED_POPULATION - 1 + ) assert((service.get("_respawns") as Array).size() == 1) var next_by_type: Dictionary = service.get("_next_respawn_by_type") var next_allowed: float = float(next_by_type.get(&"crab_brown", 0.0)) assert(next_allowed - now >= 179.0) service.call("_update_respawns") - assert((service.get("_entities") as Dictionary).size() == 7) + assert( + (service.get("_entities") as Dictionary).size() + == EXPECTED_POPULATION - 1 + ) assert((service.get("_respawns") as Array).size() == 1) next_by_type[&"crab_brown"] = now - 1.0 service.call("_update_respawns") - assert((service.get("_entities") as Dictionary).size() == 8) + assert( + (service.get("_entities") as Dictionary).size() + == EXPECTED_POPULATION + ) assert((service.get("_respawns") as Array).is_empty()) _validate_population(service, true) diff --git a/tests/world_spawn_protocol_validation.gd b/tests/world_spawn_protocol_validation.gd index 66b43fb..e300808 100644 --- a/tests/world_spawn_protocol_validation.gd +++ b/tests/world_spawn_protocol_validation.gd @@ -16,14 +16,18 @@ const CalendarSeasonType = preload("res://world/calendar_season.gd") func _initialize() -> void: - assert(NetworkProtocol.PROTOCOL_VERSION == 9) + call_deferred(&"_run") + + +func _run() -> void: + assert(NetworkProtocol.PROTOCOL_VERSION == 12) assert( NetworkWorldSpawnProtocol.CAPABILITY == NetworkProtocol.WORLD_SPAWN_CAPABILITY ) assert(NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE <= 4) _validate_catalog_statuses() - _validate_billboard_presentation() + await _validate_billboard_presentation() _validate_envelopes() print("World spawn protocol validation: PASS") quit() @@ -51,6 +55,17 @@ func _validate_catalog_statuses() -> void: assert(is_equal_approx(brown.minimum_respawn_spacing_seconds, 180.0)) assert(brown.required_tool_id == &"crab_net") assert(is_equal_approx(brown.minimum_surface_y, -0.44)) + assert( + brown.surface_water_relation + == GatherableData.SurfaceWaterRelation.ABOVE_SALT_WATER + ) + assert(is_equal_approx( + brown.surface_population_per_100_square_meters, + 0.15, + )) + assert(brown.maximum_surface_population == 24) + assert(brown.target_population_for_surface_area(100.0) == 2) + assert(brown.target_population_for_surface_area(7500.0) == 12) assert(FishCatalog.get_fish_by_id(&"crab_brown") == brown.catch_data) assert(not brown.catch_data.is_fishable()) var clam: GatherableData = Gatherables.get_entry(&"clam_manila") @@ -73,6 +88,8 @@ func _validate_catalog_statuses() -> void: assert(beetle.catch_data.collection_method == FishData.CollectionMethod.NET) assert(beetle.required_tool_id == &"crab_net") assert(beetle.spawn_anchor_set_id == &"starter_reachable_tree_trunks") + assert(is_equal_approx(beetle.spawn_anchor_occupancy_ratio, 0.35)) + assert(beetle.maximum_anchor_population == 64) assert(beetle.is_stationary_spawn()) assert(not beetle.is_stationary_hotspot()) assert(not beetle.requires_sneaking) @@ -80,11 +97,27 @@ func _validate_catalog_statuses() -> void: assert(FishCatalog.get_fish_by_id(&"beetle_stag_common") == beetle.catch_data) assert(not beetle.catch_data.is_fishable()) - for type_id: StringName in [ - &"crab_ghost", - &"crab_blue", - &"crab_dungeness", - ]: + var blue: GatherableData = Gatherables.get_entry(&"crab_blue") + assert(blue != null and blue.is_available()) + assert(blue.catch_data.active) + assert(blue.is_available(CalendarSeasonType.Season.SUMMER)) + assert(blue.is_available(CalendarSeasonType.Season.FALL)) + assert(not blue.is_available(CalendarSeasonType.Season.WINTER)) + assert( + blue.surface_water_relation + == GatherableData.SurfaceWaterRelation.BELOW_SALT_WATER + ) + assert(is_equal_approx( + blue.surface_population_per_100_square_meters, + 0.4, + )) + assert(blue.maximum_surface_population == 16) + assert(blue.target_population_for_surface_area(100.0) == 4) + assert(blue.target_population_for_surface_area(2250.0) == 9) + assert(FishCatalog.get_fish_by_id(&"crab_blue") == blue.catch_data) + assert(not blue.catch_data.is_fishable()) + + for type_id: StringName in [&"crab_ghost", &"crab_dungeness"]: var entry: GatherableData = Gatherables.get_entry(type_id) assert(entry != null) assert(entry.is_valid()) @@ -103,8 +136,9 @@ func _validate_catalog_statuses() -> void: ) var available: Array[GatherableData] = Gatherables.get_available_entries() - assert(available.size() == 3) + assert(available.size() == 4) assert(available.has(brown)) + assert(available.has(blue)) assert(available.has(clam)) assert(available.has(beetle)) var winter_available: Array[GatherableData] = ( @@ -112,6 +146,7 @@ func _validate_catalog_statuses() -> void: ) assert(winter_available.has(brown)) assert(winter_available.has(clam)) + assert(not winter_available.has(blue)) assert(not winter_available.has(beetle)) var rng := RandomNumberGenerator.new() rng.seed = 24680 @@ -146,8 +181,27 @@ func _validate_billboard_presentation() -> void: assert(not sprite.shaded) gatherable.free() + var unconfigured_hotspot := WorldGatherableType.new() + unconfigured_hotspot.call("_ensure_water_spurt_visual") + assert( + unconfigured_hotspot.get_node_or_null( + "WaterSpurt/WaterDroplets" + ) == null + ) + unconfigured_hotspot.free() + + var clam: GatherableData = Gatherables.get_entry(&"clam_manila") + assert(clam != null) var hotspot := WorldGatherableType.new() - hotspot.call("_ensure_water_spurt_visual") + root.add_child(hotspot) + var configured_position := Vector3(24.0, 0.3, -11.0) + hotspot.configure( + "world:clam-presentation-regression", + clam, + configured_position, + 0.0, + ) + assert(hotspot.global_position.is_equal_approx(configured_position)) var hole := hotspot.get_node("WaterSpurt/BurrowMark") as MeshInstance3D assert(hole != null) assert(hole.cast_shadow == GeometryInstance3D.SHADOW_CASTING_SETTING_OFF) @@ -156,6 +210,18 @@ func _validate_billboard_presentation() -> void: assert(hole_material.shading_mode == BaseMaterial3D.SHADING_MODE_UNSHADED) assert(hole_material.transparency == BaseMaterial3D.TRANSPARENCY_DISABLED) assert(is_equal_approx(hole_material.albedo_color.a, 1.0)) + var particles := hotspot.get_node( + "WaterSpurt/WaterDroplets" + ) as CPUParticles3D + assert(particles != null and particles.emitting) + assert(particles.local_coords) + assert(particles.global_position.is_equal_approx( + configured_position + Vector3.UP * 0.035 + )) + hotspot.set_process(false) + await create_timer(0.6).timeout + await process_frame + assert(hotspot.get_node_or_null("WaterSpurt/WaterDroplets") == null) hotspot.queue_free() diff --git a/tests/world_time_multiplayer_validation.gd b/tests/world_time_multiplayer_validation.gd index abdd1e8..635ad4f 100644 --- a/tests/world_time_multiplayer_validation.gd +++ b/tests/world_time_multiplayer_validation.gd @@ -30,6 +30,10 @@ func _run_host() -> void: var world_weather := ( main.get_node("%WorldWeatherService") as WorldWeatherService ) + assert(bool(main.call( + "_apply_world", WorldLayout.STARTER_ISLAND, 1, true + ))) + assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1)) assert(session.start_private_host(TEST_PORT)) assert(world_time.set_authoritative_time(INITIAL_HOST_TIME)) assert(world_weather.set_authoritative_weather( diff --git a/tests/world_time_validation.gd b/tests/world_time_validation.gd index 17ddb49..3caea2b 100644 --- a/tests/world_time_validation.gd +++ b/tests/world_time_validation.gd @@ -304,7 +304,7 @@ func _validate_environment_presentation() -> void: var sky := Sky.new() var sky_material := ShaderMaterial.new() sky_material.shader = preload( - "res://world/environment/netfishing_sky.gdshader" + "res://world/environment/straywild_sky.gdshader" ) sky.sky_material = sky_material environment.sky = sky @@ -352,7 +352,7 @@ func _validate_environment_presentation() -> void: "res://world/materials/stylized_water.gdshader" ) var sky_shader: Shader = preload( - "res://world/environment/netfishing_sky.gdshader" + "res://world/environment/straywild_sky.gdshader" ) assert("uniform float fog_horizon_occlusion" in sky_shader.code) assert("fog_horizon_color.rgb" in sky_shader.code) diff --git a/tests/world_weather_validation.gd b/tests/world_weather_validation.gd index c346e93..7bc5114 100644 --- a/tests/world_weather_validation.gd +++ b/tests/world_weather_validation.gd @@ -10,6 +10,9 @@ const WorldTimeServiceType = preload("res://world/world_time_service.gd") const WorldTimeVisualControllerType = preload( "res://world/world_time_visual_controller.gd" ) +const PrecipitationOcclusionType = preload( + "res://world/environment/precipitation_occlusion.gd" +) const FishingContextType = preload("res://fishing/fishing_context.gd") const FishingSpotType = preload("res://fishing/fishing_spot.gd") const FishAvailabilityType = preload("res://fish/fish_availability.gd") @@ -280,7 +283,7 @@ func _validate_weather_presentation() -> void: var sky := Sky.new() var sky_material := ShaderMaterial.new() sky_material.shader = preload( - "res://world/environment/netfishing_sky.gdshader" + "res://world/environment/straywild_sky.gdshader" ) sky.sky_material = sky_material environment.sky = sky @@ -521,11 +524,28 @@ func _validate_weather_presentation() -> void: assert(rain.emitting) assert(rain.amount_ratio > 0.99) assert(rain.amount == WorldTimeVisualControllerType.RAIN_PARTICLE_AMOUNT) + assert( + WorldTimeVisualControllerType.RAIN_EMITTER_OFFSET.y + >= WorldTimeVisualControllerType.RAIN_SUPPORTED_CANOPY_HEIGHT + + WorldTimeVisualControllerType.RAIN_CANOPY_CLEARANCE + ) + assert(is_equal_approx( + rain.lifetime, + WorldTimeVisualControllerType.RAIN_LIFETIME_SECONDS, + )) assert(rain.visibility_aabb == ( WorldTimeVisualControllerType.RAIN_VISIBILITY_AABB )) var rain_material := rain.process_material as ParticleProcessMaterial assert(rain_material != null) + assert( + rain_material.collision_mode + == ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT + ) + assert(is_equal_approx( + rain.collision_base_size, + WorldTimeVisualControllerType.RAIN_COLLISION_BASE_SIZE, + )) assert(rain_material.emission_box_extents.is_equal_approx( WorldTimeVisualControllerType.RAIN_EMISSION_EXTENTS )) @@ -537,11 +557,39 @@ func _validate_weather_presentation() -> void: rain_material.initial_velocity_max, WorldTimeVisualControllerType.RAIN_VELOCITY_MAX, )) + assert(rain_material.gravity.is_equal_approx( + WorldTimeVisualControllerType.RAIN_GRAVITY + )) var rain_mesh := rain.draw_pass_1 as BoxMesh assert(rain_mesh != null) assert(rain_mesh.size.is_equal_approx( WorldTimeVisualControllerType.RAIN_DROP_SIZE )) + var rain_collision := visuals.get_node( + "LocalRainCanopyCollision" + ) as GPUParticlesCollisionHeightField3D + assert(rain_collision != null) + assert(rain_collision.follow_camera_enabled) + assert( + rain_collision.resolution + == GPUParticlesCollisionHeightField3D.RESOLUTION_256 + ) + assert( + rain_collision.update_mode + == GPUParticlesCollisionHeightField3D.UPDATE_MODE_WHEN_MOVED + ) + assert(rain_collision.size.is_equal_approx( + WorldTimeVisualControllerType.RAIN_COLLISION_SIZE + )) + assert( + rain_collision.size.y * 0.5 + > WorldTimeVisualControllerType.RAIN_EMITTER_OFFSET.y + + WorldTimeVisualControllerType.RAIN_EMISSION_EXTENTS.y + ) + assert( + rain_collision.heightfield_mask + == PrecipitationOcclusionType.RENDER_LAYER_MASK + ) visuals.call( "_on_weather_changed", WorldWeatherServiceType.Weather.SUNNY, diff --git a/tools/art/export_creature_art.py b/tools/art/export_creature_art.py new file mode 100644 index 0000000..758be87 --- /dev/null +++ b/tools/art/export_creature_art.py @@ -0,0 +1,256 @@ +#!/usr/bin/env python3 +"""Export cataloged creature artwork with consistent transparent margins.""" + +from __future__ import annotations + +import argparse +import hashlib +import re +import sys +import zipfile +import xml.etree.ElementTree as ET +from pathlib import Path + +from PIL import Image + + +TABLE_NAMESPACE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0" +TABLE_ATTRIBUTE = "{%s}" % TABLE_NAMESPACE +NAMESPACES = {"table": TABLE_NAMESPACE} +VALID_EXPORT_SIZES = {64, 128, 256, 512} +SAFE_AREA_RATIO = 0.875 +KNOWN_SOURCE_ALIASES = { + # The delivered filename predates the catalog's authoritative species ID. + "bowfish": "bowfin", +} + + +def parse_arguments() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description=( + "Export PNG creature art according to the catalog's recommended " + "canvas size, using alpha-bound trimming and nearest-neighbor scaling." + ) + ) + parser.add_argument("--tracker", required=True, type=Path) + parser.add_argument("--source", required=True, type=Path) + parser.add_argument("--output", required=True, type=Path) + parser.add_argument( + "--skip", + action="append", + default=[], + help="Catalog creature ID or source filename stem to skip; repeat as needed.", + ) + parser.add_argument( + "--dry-run", + action="store_true", + help="Validate and report the batch without writing output files.", + ) + return parser.parse_args() + + +def normalize_name(value: str) -> str: + normalized = value.strip().lower().replace("&", " and ") + normalized = re.sub(r"[^a-z0-9]+", "_", normalized) + return normalized.strip("_") + + +def expanded_row_values(row: ET.Element) -> list[str]: + values: list[str] = [] + for cell in row.findall("table:table-cell", NAMESPACES): + repeat = int( + cell.attrib.get( + TABLE_ATTRIBUTE + "number-columns-repeated", + "1", + ) + ) + values.extend(["".join(cell.itertext()).strip()] * repeat) + return values + + +def load_catalog(tracker_path: Path) -> list[dict[str, str]]: + with zipfile.ZipFile(tracker_path) as archive: + root = ET.fromstring(archive.read("content.xml")) + table = root.find(".//table:table", NAMESPACES) + if table is None: + raise ValueError("tracker does not contain a table") + rows = table.findall("table:table-row", NAMESPACES) + if not rows: + raise ValueError("tracker table is empty") + headers = expanded_row_values(rows[0]) + required_headers = { + "catalog_number", + "display_name", + "id", + "recommended_export_canvas_px", + } + missing_headers = required_headers.difference(headers) + if missing_headers: + raise ValueError( + "tracker is missing required columns: " + + ", ".join(sorted(missing_headers)) + ) + records: list[dict[str, str]] = [] + for row in rows[1:]: + values = expanded_row_values(row) + if not any(values): + continue + record = dict(zip(headers, values)) + if record.get("id", "").strip(): + records.append(record) + return records + + +def catalog_lookup(records: list[dict[str, str]]) -> dict[str, dict[str, str]]: + lookup: dict[str, dict[str, str]] = {} + for record in records: + keys = { + normalize_name(record["catalog_number"]), + normalize_name(record["id"]), + normalize_name(record["display_name"]), + } + for key in keys: + previous = lookup.get(key) + if previous is not None and previous["id"] != record["id"]: + raise ValueError( + f"ambiguous normalized catalog name {key!r}: " + f"{previous['id']} and {record['id']}" + ) + lookup[key] = record + return lookup + + +def resolve_record( + source_path: Path, + lookup: dict[str, dict[str, str]], +) -> dict[str, str]: + source_key = normalize_name(source_path.stem) + catalog_key = KNOWN_SOURCE_ALIASES.get(source_key, source_key) + record = lookup.get(catalog_key) + if record is None: + raise ValueError( + f"cannot map source {source_path.name!r} to one catalog creature" + ) + return record + + +def normalize_artwork(source_path: Path, canvas_size: int) -> tuple[Image.Image, tuple[int, int, int, int], tuple[int, int]]: + with Image.open(source_path) as source_image: + artwork = source_image.convert("RGBA") + alpha_bounds = artwork.getchannel("A").getbbox() + if alpha_bounds is None: + raise ValueError(f"source {source_path.name!r} is fully transparent") + visible = artwork.crop(alpha_bounds) + safe_long_side = round(canvas_size * SAFE_AREA_RATIO) + scale = safe_long_side / max(visible.width, visible.height) + scaled_size = ( + max(1, round(visible.width * scale)), + max(1, round(visible.height * scale)), + ) + visible = visible.resize(scaled_size, Image.Resampling.NEAREST) + canvas = Image.new("RGBA", (canvas_size, canvas_size), (0, 0, 0, 0)) + offset = ( + (canvas_size - scaled_size[0]) // 2, + (canvas_size - scaled_size[1]) // 2, + ) + canvas.alpha_composite(visible, offset) + return canvas, alpha_bounds, scaled_size + + +def sha256(path: Path) -> str: + digest = hashlib.sha256() + with path.open("rb") as source: + for block in iter(lambda: source.read(1024 * 1024), b""): + digest.update(block) + return digest.hexdigest() + + +def main() -> int: + arguments = parse_arguments() + records = load_catalog(arguments.tracker) + lookup = catalog_lookup(records) + skip_keys = {normalize_name(value) for value in arguments.skip} + source_paths = sorted(arguments.source.glob("*.png")) + if not source_paths: + raise ValueError(f"no PNG files found under {arguments.source}") + + resolved_by_output: dict[str, tuple[Path, dict[str, str]]] = {} + for source_path in source_paths: + record = resolve_record(source_path, lookup) + source_key = normalize_name(source_path.stem) + creature_key = normalize_name(record["id"]) + if source_key in skip_keys or creature_key in skip_keys: + print(f"SKIP {source_path.name} -> {record['id']}") + continue + output_name = f"{record['catalog_number']}.png" + previous = resolved_by_output.get(output_name) + if previous is not None: + previous_path, _previous_record = previous + catalog_key = normalize_name(record["catalog_number"]) + previous_is_numbered = ( + normalize_name(previous_path.stem) == catalog_key + ) + current_is_numbered = source_key == catalog_key + if current_is_numbered and not previous_is_numbered: + print( + "SUPERSEDE " + f"{previous_path.name} with numbered source " + f"{source_path.name} -> {record['id']}" + ) + resolved_by_output[output_name] = (source_path, record) + continue + if previous_is_numbered and not current_is_numbered: + print( + "SKIP " + f"{source_path.name}; numbered source " + f"{previous_path.name} takes precedence -> {record['id']}" + ) + continue + raise ValueError( + f"duplicate sources for output filename {output_name}: " + f"{previous_path.name} and {source_path.name}" + ) + resolved_by_output[output_name] = (source_path, record) + + resolved = list(resolved_by_output.values()) + + if not arguments.dry_run: + arguments.output.mkdir(parents=True, exist_ok=True) + + for source_path, record in resolved: + canvas_size = int(record["recommended_export_canvas_px"]) + if canvas_size not in VALID_EXPORT_SIZES: + raise ValueError( + f"{record['id']} has invalid export size {canvas_size}" + ) + image, alpha_bounds, scaled_size = normalize_artwork( + source_path, + canvas_size, + ) + output_path = arguments.output / f"{record['catalog_number']}.png" + if not arguments.dry_run: + image.save(output_path, format="PNG", optimize=False, compress_level=6) + output_hash = sha256(output_path) + else: + output_hash = "dry-run" + print( + "EXPORT " + f"{source_path.name} -> {output_path.name} " + f"id={record['id']} canvas={canvas_size}x{canvas_size} " + f"alpha_bounds={alpha_bounds} visible={scaled_size[0]}x{scaled_size[1]} " + f"source_sha256={sha256(source_path)} output_sha256={output_hash}" + ) + + print( + f"Complete: {len(resolved)} export(s), " + f"{len(source_paths) - len(resolved)} skipped." + ) + return 0 + + +if __name__ == "__main__": + try: + raise SystemExit(main()) + except (OSError, ValueError, zipfile.BadZipFile) as error: + print(f"ERROR: {error}", file=sys.stderr) + raise SystemExit(1) diff --git a/tools/blender/export_terrain_chunks.py b/tools/blender/export_terrain_chunks.py index 2c35982..d4a278e 100644 --- a/tools/blender/export_terrain_chunks.py +++ b/tools/blender/export_terrain_chunks.py @@ -10,10 +10,11 @@ Run through Blender rather than a standalone Python interpreter: Collections use ``chunk_####_description`` and contain one primary terrain mesh named ``chunk_####``. Additional production objects may live in the same collection. Reusable procedural props use individual ``prop_description`` -mesh objects. They may be arranged anywhere in the source file because each -object's authored origin becomes the exported runtime anchor. A same-named -``prop_description`` collection remains supported for multi-object props. -Unrelated objects and collections are ignored. +mesh objects. Their child empties are exported with them so authored sockets +remain attached to the prop. Props may be arranged anywhere in the source file +because each root object's authored origin becomes the exported runtime anchor. +A same-named ``prop_description`` collection remains supported for multi-object +props. Unrelated objects and collections are ignored. """ from __future__ import annotations @@ -43,6 +44,12 @@ PROP_COLLECTION_PATTERN = re.compile( r"^prop_(?P